/* Tokens — see DESIGN.md */
:root,
:root[data-theme="dark"] {
  --bg: #0b0d0c;
  --surface: #111413;
  --surface-2: #171b19;
  --line: #232826;
  --text: #e8ece9;
  --muted: #9aa39e;
  --primary: #3ddc84;
  --on-primary: #04140b;
  --award: #f2b84b;
  --shadow: none;
  --nav-bg: rgba(11, 13, 12, .85);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --surface-2: #eef0ed;
  --line: #dfe3de;
  --text: #0d110f;
  --muted: #57605a;
  --primary: #0b7a43;
  --on-primary: #ffffff;
  --award: #8a5a00;
  --shadow: 0 1px 2px rgba(13, 17, 15, .04), 0 8px 24px rgba(13, 17, 15, .06);
  --nav-bg: rgba(246, 247, 245, .85);
  color-scheme: light;
}
:root {
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --gutter: 16px;
  --section: 64px;
}
@media (min-width: 768px) {
  :root { --gutter: 32px; --section: 96px; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--primary); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--primary); color: var(--on-primary); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 60ch; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: 8px 14px; border-radius: var(--r-sm); text-decoration: none; font-weight: 500;
}
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  height: 44px; padding: 0 18px;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  font: 500 15px/1 var(--font); text-decoration: none; color: var(--text);
  background: transparent; cursor: pointer;
  transition: border-color .15s, background-color .15s, filter .15s, transform .15s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.btn:hover { color: var(--text); border-color: var(--text); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn--primary:hover { color: var(--on-primary); border-color: var(--primary); filter: brightness(1.08); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }

.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: transparent; color: var(--text); cursor: pointer;
  transition: border-color .15s;
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand__mark {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--primary); border-radius: var(--r-sm);
  font: 500 13px/1 var(--mono); color: var(--primary);
}
.nav__links { display: none; gap: 28px; }
.nav__links a { text-decoration: none; font-size: 14px; color: var(--muted); white-space: nowrap; }
.nav__links a:hover, .nav__links a.is-current { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__cta { display: none; }
@media (min-width: 1180px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__menu { display: none; }
}
@media (max-width: 1179px) {
  .nav__links.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: 64px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .nav__links.is-open a { display: block; padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav__links.is-open li:last-child a { border-bottom: 0; }
}
@media (max-width: 420px) { .brand__name { display: none; } }

/* Reel: full-screen intro video that shrinks to a corner player on scroll */
.reel {
  position: relative; overflow: hidden; color: #fff;
  height: calc(100svh - 64px); min-height: 520px; max-height: 1100px;
  background: #050606 url("assets/video/award-poster.jpg") center 40% / cover no-repeat;
  display: flex; align-items: flex-end;
}
.reel__frame { position: absolute; inset: 0; }
.reel__video { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; }
.reel__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 6, 6, .35) 0%, rgba(5, 6, 6, 0) 25%, rgba(5, 6, 6, .35) 50%, rgba(5, 6, 6, .82) 75%, rgba(5, 6, 6, .92) 100%);
}
.reel__copy { position: relative; width: 100%; padding-bottom: 28px; text-shadow: 0 1px 12px rgba(0, 0, 0, .55); }
.reel__kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #3ddc84; margin-bottom: 12px; }
@media (max-width: 480px) { .reel__kicker { font-size: 11px; letter-spacing: .03em; } }
.reel__title { font-size: clamp(36px, 7vw, 92px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; text-wrap: balance; max-width: 14ch; }
.reel__sub { margin-top: 14px; font-size: clamp(16px, 2vw, 20px); color: rgba(255, 255, 255, .78); }
.reel__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .2); }
.reel__cue { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .85); text-decoration: none; }
.reel__cue:hover { color: #3ddc84; }
.reel__cue svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
.reel__play {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); color: #fff;
}
.reel__play:hover { background: rgba(255, 255, 255, .22); }
.reel__play svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reel__play .i-play { fill: currentColor; }
.reel__play .i-play, .reel__play.is-paused .i-pause { display: none; }
.reel__play.is-paused .i-play { display: block; }
.reel a:focus-visible, .reel button:focus-visible { outline: 2px solid #3ddc84; outline-offset: 3px; }

.reel__pip-btn { display: none; }
.reel__frame.is-pip {
  position: fixed; inset: auto; inset-inline-start: var(--gutter); bottom: var(--gutter); z-index: 40;
  width: 96px; aspect-ratio: 9 / 16; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18); background: #050606;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  animation: pip-in .35s cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 768px) { .reel__frame.is-pip { width: 132px; } }
@keyframes pip-in { from { opacity: 0; transform: translateY(16px) scale(.92); } }
.reel__frame.is-pip .reel__video { object-position: center; }
.reel__frame.is-pip .reel__pip-btn { display: grid; position: absolute; border: 0; cursor: pointer; color: #fff; }
.reel__pip-open { inset: 0; background: transparent; }
.reel__pip-close {
  top: 6px; inset-inline-end: 6px; width: 26px; height: 26px; border-radius: 50%; place-items: center;
  background: rgba(5, 6, 6, .7);
}
.reel__pip-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.reel__pip-btn:focus-visible { outline: 2px solid #3ddc84; outline-offset: -2px; }

/* Hero */
.hero { padding: 48px 0 var(--section); }
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding-top: 88px; }
  .hero__grid { grid-template-columns: 1.5fr 1fr; gap: 56px; }
}
.status {
  display: flex; align-items: flex-start; gap: 10px;
  font: 400 12px/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 28px;
}
.dot { margin-top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 var(--primary); animation: ping 2.4s infinite; flex: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.hero h1 { text-wrap: balance; font-size: clamp(34px, 5.4vw, 66px); line-height: 1.02; letter-spacing: -0.035em; margin-bottom: 24px; }
.muted-h { color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__photo { margin: 0; position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); max-width: 460px; justify-self: center; width: 100%; }
.hero__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.hero__photo figcaption {
  position: absolute; left: 12px; bottom: 12px;
  padding: 6px 10px; border-radius: var(--r-sm);
  background: rgba(8, 10, 9, .78); color: #e8ece9; font-size: 12px;
  display: flex; align-items: center; gap: 4px;
}
.cursor { width: 7px; height: 14px; background: #3ddc84; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.facts {
  margin: 56px 0 0; display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.facts div { padding: 18px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; font-weight: 500; }
.facts div:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(3, 1fr); } .facts div:last-child:nth-child(odd) { grid-column: auto; } .facts div { padding: 22px 24px; } }

/* Sections */
.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.section--alt { background: var(--surface); }
.sec-head { margin-bottom: 40px; }
.sec-num { font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin-bottom: 12px; }
.sec-head h2, .contact h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; }
.sec-lead { color: var(--muted); margin-top: 12px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
  font: 400 12px/1 var(--mono); padding: 6px 8px; border-radius: var(--r-sm);
  border: 1px solid var(--line); color: var(--muted); background: var(--bg);
}
.tag--award { color: var(--award); border-color: color-mix(in srgb, var(--award) 40%, transparent); }

/* Feature */
.feature {
  display: grid; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden; box-shadow: var(--shadow);
}
@media (min-width: 960px) { .feature { grid-template-columns: 1.15fr 1fr; } }
.feature__visual { background: var(--surface-2); padding: 20px; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .feature__visual { border-bottom: 0; border-right: 1px solid var(--line); padding: 32px; } }
.feature__visual { gap: 20px; align-content: start; }
.feature__photo { margin: 0; width: 100%; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.feature__photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 48%; }
.feature__photo figcaption { padding: 10px 14px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.feature__body { padding: 28px 24px; }
@media (min-width: 768px) { .feature__body { padding: 40px; } }
.feature h3 { font-size: 28px; letter-spacing: -0.025em; }
.meta { font-size: 13px; color: var(--muted); margin: 8px 0 18px; }
.feature__body > p:not(.tags):not(.meta):not(.stack) { color: var(--muted); }
.ticks { margin: 20px 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 22px; font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 10px; height: 6px; border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); }
.stack { font-size: 13px; color: var(--muted); padding-top: 18px; border-top: 1px solid var(--line); }

.diagram { width: 100%; height: auto; }
.d-node { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; }
.d-node--hl { stroke: var(--primary); stroke-width: 2; }
.d-wire { stroke: var(--muted); stroke-width: 2; fill: none; }
.d-tunnel { stroke: color-mix(in srgb, var(--primary) 30%, transparent); stroke-width: 14; stroke-linecap: round; fill: none; }
.d-tunnel-flow { stroke: var(--primary); stroke-width: 2; stroke-dasharray: 6 10; fill: none; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.d-title { font: 600 15px var(--font); fill: var(--text); }
.d-text { font: 400 12px var(--mono); fill: var(--muted); }
.d-label { font: 500 11px var(--mono); letter-spacing: .08em; }

/* Filters + grid */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 48px 0 24px; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font: 400 13px/1 var(--mono); cursor: pointer; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

.grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden; box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: color-mix(in srgb, var(--text) 35%, var(--line)); transform: translateY(-2px); }
.card[hidden] { display: none; }
.card__img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); display: grid; place-items: center; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__img img { transform: scale(1.03); }
.card__img--grad-a { background: linear-gradient(135deg, #5b6cf0, #c95fbf); }
.card__img--grad-a img { object-fit: contain; padding: 8px; }
.card__img--pair { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 14px; background: linear-gradient(160deg, #ececf1, #d9d8e6); }
.card__img--pair img { width: auto; height: 100%; object-fit: contain; }
.card:hover .card__img--pair img { transform: none; }
.card__img--dark { background: #161618; }
.card__img--dark img { object-fit: cover; object-position: top left; }
.card__img--panels { display: flex; justify-content: center; align-items: flex-start; gap: 8px; padding: 16px 16px 0; background: linear-gradient(160deg, #20232a, #0e0f12); }
.card__img--panels img { width: 30%; height: auto; object-fit: initial; border-radius: 10px; }
.card:hover .card__img--panels img { transform: none; }
.card__img--teal { background: linear-gradient(160deg, #1e4a4a, #0f2626); }
.card__img .card__logo { width: 46%; height: auto; object-fit: contain; filter: drop-shadow(0 16px 30px rgba(0,0,0,.35)); }
.card__img--site img { object-position: top center; }
.card__img--phones { display: flex; justify-content: center; align-items: flex-end; gap: 10px; padding: 18px 18px 0; background: #0a0a0a; }
.card__img--phones img { width: 28%; height: auto; object-fit: initial; border-radius: 14px 14px 0 0; border: 1px solid #2a2a2a; border-bottom: 0; }
.card__img--phones img:nth-child(2) { margin-bottom: -20px; }
.card:hover .card__img--phones img { transform: none; }
.card__img--code { place-items: stretch; background: #0a0c0b; }
.code { margin: 0; padding: 18px 20px; font-size: 12px; line-height: 1.75; color: #b9c2bd; overflow: hidden; white-space: pre; }
.c-g { color: #3ddc84; } .c-m { color: #f2b84b; } .c-d { color: #6c7570; }

.card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 20px; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.appicon { width: 28px; height: 28px; border-radius: 7px; }
.card__body > p:not(.tags):not(.links) { color: var(--muted); font-size: 15px; }
.links { margin-top: auto; padding-top: 18px; display: flex; gap: 18px; font: 500 14px/1 var(--font); }
.links a { text-decoration: none; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.links a::after { content: "↗"; font-size: 12px; transition: transform .15s; }
.links a[href^="#"]::after { content: "↓"; }
.links a:hover { color: var(--text); }
.links a:hover::after { transform: translate(2px, -2px); }
.links .muted { font: 400 13px/1 var(--mono); }

/* Contributions */
.contrib { border-top: 1px solid var(--line); }
.contrib li { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 24px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .contrib li { grid-template-columns: 110px 1fr; gap: 24px; } }
.state { justify-self: start; align-self: start; font: 500 12px/1 var(--mono); padding: 6px 10px; border-radius: 999px; border: 1px solid; }
.state--merged { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.state--open { color: var(--award); border-color: color-mix(in srgb, var(--award) 45%, transparent); }
.state--closed { color: var(--muted); border-color: var(--line); }
.contrib__title { font-size: 18px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.contrib__meta { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.contrib p:last-child { color: var(--muted); max-width: 72ch; }

/* Timeline */
.timeline { border-top: 1px solid var(--line); }
.tl { display: grid; gap: 8px; padding: 32px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .tl { grid-template-columns: 220px 1fr; gap: 32px; } }
.tl__date { font-size: 13px; color: var(--muted); padding-top: 4px; }
.tl h3 { font-size: 20px; }
.at { color: var(--muted); font-weight: 400; }
.tl__type { font-size: 12px; color: var(--primary); margin-top: 6px; }
.tl ul { margin-top: 14px; display: grid; gap: 8px; max-width: 72ch; }
.tl li { position: relative; padding-left: 20px; color: var(--muted); }
.tl li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 1px; background: var(--primary); }

.edu { display: grid; gap: 20px; }
@media (min-width: 720px) { .edu { grid-template-columns: 1fr 1fr; } }
.edu__card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.edu__date { font-size: 12px; color: var(--primary); margin-bottom: 10px; }
.edu__card h3 { font-size: 18px; margin-bottom: 6px; }
.edu__card p:not(.edu__date) { color: var(--muted); }
.edu__card { display: flex; flex-direction: column; padding: 28px; }
.edu__meta { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.edu__meta dt { font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.edu__meta dd { margin: 0; font-size: 15px; }
.edu__meta dd.pills { margin-top: 6px; }
.edu__meta dd.pills span { font-size: 13px; }

/* Skills */
.skills { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
@media (min-width: 720px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .skills { grid-template-columns: repeat(3, 1fr); } }
.skill { background: var(--bg); padding: 24px; }
.skill h3 { font-size: 16px; margin-bottom: 16px; display: flex; gap: 10px; align-items: baseline; }
.skill h3 .mono { font-size: 12px; font-weight: 400; color: var(--primary); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills span { font-size: 13px; padding: 5px 10px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); }

.two-col { display: grid; gap: 40px; margin-top: 56px; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1.2fr 1fr; gap: 64px; } }
.sub-h { font-size: 18px; margin-bottom: 14px; }
.two-col > div > .sub-h:not(:first-child) { margin-top: 36px; }
.certs { border-top: 1px solid var(--line); }
.certs li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.certs .mono { font-size: 13px; color: var(--muted); }

/* Contact */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.copy-btn { margin-inline-start: 16px; vertical-align: middle; }
.copy-btn.is-done { border-color: var(--primary); color: var(--primary); }
@media (max-width: 600px) { .copy-btn { margin: 16px 0 0; display: flex; } }
.contact__inner { max-width: 820px; }
.contact h2 { font-size: clamp(36px, 6vw, 64px); margin-bottom: 18px; }
.contact__email {
  display: inline-block; margin-top: 32px;
  font-size: clamp(22px, 4.2vw, 40px); font-weight: 500; letter-spacing: -0.02em;
  text-decoration: none; border-bottom: 2px solid var(--primary); padding-bottom: 4px;
  word-break: break-all;
}
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.contact__links a {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; font-weight: 500;
}
.contact__links a:hover { border-color: var(--primary); }
.contact__links svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.footer a { text-decoration: none; }

/* Smooth scrolling (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Language picker */
.lang { position: relative; }
.lang__btn { width: auto; gap: 6px; padding: 0 10px; }
.lang__code { font: 500 12px/1 var(--mono); }
.lang__menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 200px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
}
.lang__menu[hidden] { display: none; }
.lang__menu button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 10px; border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--text); font: 400 15px/1.2 var(--font); text-align: start; cursor: pointer;
}
.lang__menu button:hover, .lang__menu button:focus-visible { background: var(--surface-2); }
.lang__menu button[aria-current="true"] { color: var(--primary); font-weight: 500; }
.lang__iso { font: 400 11px/1 var(--mono); color: var(--muted); }
@media (max-width: 420px) { .lang__code { display: none; } .lang__btn { padding: 0; width: 36px; } }

/* Scripts that need their own fonts or spacing */
:root[lang="ar"] { --font: "IBM Plex Sans Arabic", "Geist", system-ui, sans-serif; --mono: "Geist Mono", "IBM Plex Sans Arabic", ui-monospace, monospace; }
:root[lang="hi"] { --font: "Geist", "Noto Sans Devanagari", system-ui, sans-serif; --mono: "Geist Mono", "Noto Sans Devanagari", ui-monospace, monospace; }
:root[lang="zh"] { --font: "Geist", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; --mono: "Geist Mono", "PingFang SC", "Microsoft YaHei", ui-monospace, monospace; }
:root:is([lang="ar"], [lang="hi"], [lang="zh"]) :is(h1, h2, h3, .sec-num, .status, .facts dt, .edu__meta dt, .lang__iso, .reel__title, .reel__kicker, .reel__cue) { letter-spacing: 0; }
:root:is([lang="ar"], [lang="hi"]) .reel__title { line-height: 1.25; }
:root:is([lang="ar"], [lang="hi"]) .hero h1 { line-height: 1.3; }
:root[lang="zh"] .hero h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.18; }
:root:is([lang="ar"], [lang="hi"]) :is(.sec-head h2, .contact h2, .feature h3) { line-height: 1.35; }

/* Right-to-left */
.diagram { direction: ltr; }
[dir="rtl"] .ticks li { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .ticks li::before { left: auto; right: 2px; }
[dir="rtl"] .tl li { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .tl li::before { left: auto; right: 0; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }
[dir="rtl"] .btn:hover svg { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .hero__photo figcaption { left: auto; right: 12px; }
:root:is([lang="ar"], [lang="hi"]) :is(.status, .sec-num, .facts dt, .edu__meta dt, .state, .tag, .tl__type, .lang__menu button, .reel__kicker, .reel__cue, .feature__photo figcaption) { font-family: var(--font); }
