/* ---------- Base ---------- */
:root {
  --bg: #08090c;
  --bg-alt: #0b0d11;
  --panel: #101318;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ebf0;
  --muted: #8d94a3;
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.12);
  --max: 1120px;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
strong { color: #fff; font-weight: 600; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.accent { color: var(--accent); }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(8, 9, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding: 12px 28px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-dim);
  border: 1px solid rgba(94, 234, 212, 0.28);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.nav__name { font-size: 15px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}

.nav__links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav__links a:hover { color: var(--text); }

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav__links a:hover::after,
.nav__links a.is-active::after { width: 100%; }

.nav__links a.is-active { color: var(--text); }

.nav__links .nav__cta {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav__links .nav__cta::after { display: none; }

.nav__links .nav__cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #06231f;
}

.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  place-items: center;
  gap: 5px;
  flex-direction: column;
}

.nav__toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.2px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.2px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 180px 0 110px;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -320px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(circle at 50% 50%, rgba(94, 234, 212, 0.16), transparent 62%);
  filter: blur(20px);
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}

.hero__title {
  font-size: clamp(2.8rem, 8vw, 5.6rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin-bottom: 26px;
}

.hero__role {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--text);
  font-weight: 400;
  margin-bottom: 18px;
}

.hero__lede {
  max-width: 590px;
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 38px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 74px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--accent);
  color: #052e28;
}

.btn--primary:hover { background: #8af5e2; }

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--ghost:hover { border-color: rgba(94, 234, 212, 0.5); color: var(--accent); }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0;
}

.hero__stats > div {
  background: var(--bg);
  padding: 24px 20px 22px 0;
}

.hero__stats dt {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

.hero__stats dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.7rem;
  color: #fff;
  letter-spacing: -0.02em;
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: 108px 0;
}

.section--alt { background: var(--bg-alt); }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 22px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.section__index {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.section__head h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 64px;
  align-items: start;
}

.about__text p {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 1.02rem;
  max-width: 62ch;
}

.about__text p:last-child { margin-bottom: 0; }

.about__card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.about__card h3 {
  font-size: 0.78rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 20px;
}

.focus li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.focus li:first-child { border-top: 0; padding-top: 0; }
.focus li:last-child { padding-bottom: 0; }

.focus li span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.job {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.job:first-child { border-top: 0; padding-top: 0; }
.job:last-child { padding-bottom: 0; }

.job__meta { display: flex; flex-direction: column; gap: 6px; }

.job__period {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.job__place { font-size: 0.92rem; color: var(--muted); }

.job__body h3 { font-size: 1.22rem; margin-bottom: 18px; }

.job__sub {
  display: block;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 5px;
  letter-spacing: 0;
}

.bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: 10px;
}

.bullets li:last-child { margin-bottom: 0; }

.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 7px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.clients {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.client {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(94, 234, 212, 0.45);
  border-radius: 12px;
  padding: 20px 22px;
}

.client h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.client h4 span {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 400;
  color: var(--muted);
}

.client .bullets li { font-size: 0.92rem; }

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.skill {
  background: var(--bg-alt);
  padding: 28px 26px;
  transition: background 0.25s ease;
}

.skill:hover { background: #12161c; }

.skill h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: #fff;
}

.skill p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.competencies {
  margin-top: 34px;
}

.competencies h3 {
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 18px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chips span,
.tags li {
  font-size: 12.5px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: #c3c9d4;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.chips span:hover {
  border-color: rgba(94, 234, 212, 0.45);
  color: var(--accent);
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.project::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at 50% 0%, rgba(94, 234, 212, 0.07), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project:hover {
  border-color: rgba(94, 234, 212, 0.32);
  transform: translateY(-3px);
}

.project:hover::before { opacity: 1; }

.project--feature {
  grid-column: span 2;
  background: linear-gradient(160deg, rgba(94, 234, 212, 0.07), var(--panel) 55%);
}

.project__tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.project h3 { font-size: 1.14rem; }

.project p {
  font-size: 0.94rem;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.tags li {
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 11px;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 56px;
}

.edu {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edu__period {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.edu h3 { font-size: 1.08rem; }
.edu p { font-size: 0.92rem; color: var(--muted); }

.edu__score {
  align-self: flex-start;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
}

.certs h3 {
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 18px;
}

.cert-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cert-list li {
  background: var(--bg-alt);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.cert-list li span {
  font-family: var(--font);
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

/* ---------- Contact ---------- */
.contact { padding-bottom: 120px; }

.contact__title {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.contact__lede {
  max-width: 520px;
  color: var(--muted);
  margin-bottom: 52px;
}

.contact__links {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--bg);
  padding: 24px 4px;
  transition: padding 0.25s ease, background 0.25s ease;
}

.contact__link:hover { padding-left: 14px; background: #0c0f14; }

.contact__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact__value {
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.contact__link:hover .contact__value { color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .job { grid-template-columns: 180px 1fr; gap: 28px; }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cert-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .nav__toggle { display: flex; }
  .nav__name { display: none; }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 28px 22px;
    background: rgba(8, 9, 12, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .nav__links.is-open { display: flex; }

  .nav__links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .nav__links a::after { display: none; }

  .nav__links .nav__cta {
    margin-top: 16px;
    text-align: center;
    border-bottom: 1px solid var(--line-strong);
  }

  .hero { padding: 140px 0 80px; }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__stats > div { padding: 20px 16px 18px 0; }
  .section { padding: 82px 0; }
  .section__head { margin-bottom: 40px; }

  .job { grid-template-columns: 1fr; gap: 14px; padding: 32px 0; }
  .job__meta { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; }
  .job__place { font-size: 0.86rem; }

  .project-grid { grid-template-columns: 1fr; }
  .project--feature { grid-column: span 1; }
  .edu-grid { grid-template-columns: 1fr; margin-bottom: 44px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .nav { padding: 14px 20px; }
  .nav.is-scrolled { padding: 10px 20px; }
  .skills { grid-template-columns: 1fr; }
  .cert-list { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 auto; }
  .project { padding: 24px; }
  .client { padding: 18px; }
  .contact__link { padding: 20px 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .project:hover { transform: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
