/* ==========================================================================
   Anish Achar — personal site. Minimal black & white: one typeface (Inter),
   pure black ground, hairline borders, white as the only "active" colour.
   Tabbed pages; projects open as maximised panels.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0c0c0c;
  --surface-2: #151515;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-3: rgba(255, 255, 255, 0.26);

  --ink: #fafafa;
  --ink-2: #b8b8b8;
  --muted: #949494;
  --dim: #8a8a8a;   /* the faintest text colour: still 5.3:1 on --surface-2 (WCAG AA) */
  --hover: rgba(255, 255, 255, 0.06);

  /* chart roles (validated dark categorical slots 1–4, one per currency pair) — the only colour on the site */
  --c-eurusd: #3987e5;
  --c-gbpjpy: #d95926;
  --c-gbpusd: #199e70;
  --c-audjpy: #c98500;
  --c-muted: #5c5c5c;
  --c-spx: #f5f5f5;
  --good: #22c55e;
  --bad: #f05252;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --nav-h: 64px;
  --r: 14px;
  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 40px);

  /* motion: one shared rhythm. Arrivals decelerate, departures accelerate and run shorter. */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);       /* arriving */
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);        /* leaving */
  --ease-spring: cubic-bezier(0.22, 1.2, 0.36, 1); /* fallback for the spring below */
  --dur-1: 160ms;   /* hover, press */
  --dur-2: 300ms;   /* state changes */
  --dur-3: 560ms;   /* things arriving */
  --dur-4: 820ms;   /* big entrances */
}
@supports (transition-timing-function: linear(0, 1)) {
  /* a soft spring with a ~2% overshoot, for things that glide into place */
  :root { --ease-spring: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.2%, 1); }
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
html.po-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: #fff; color: #000; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; border-radius: 999px; z-index: 100; }
.skip:focus { left: 8px; }
/* only shown when index.html is opened straight from disk (see the script in <head>) */
.file-note { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300; max-width: 720px; margin: 0 auto; padding: 14px 18px; border-radius: 14px; background: #fff; color: #000; font: 400 14.5px/1.5 var(--font); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); }
.file-note b { font-weight: 600; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 1px solid var(--line-3); border-radius: 999px;
  background: transparent;
  font: 500 14.5px/1 var(--font);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.4); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: #fff; border-color: #fff; color: #000; }
.btn-primary:hover { background: #e4e4e4; border-color: #e4e4e4; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13.5px; }
/* pressed feedback for everything clickable */
.btn:active, .po-min:active, .v-tools button:active, .seg button:active, .nav-toggle:active { transform: scale(0.97); }
.tile:active, .launch:active { transform: scale(0.99); }
/* trailing arrows nudge the way they point */
.btn > svg:last-child { transition: transform var(--dur-2) var(--ease-spring); }
.btn:hover > svg:last-child { transform: translate(var(--nx, 3px), var(--ny, 0)); }
.btn[download], .btn[data-gb-scroll] { --nx: 0px; --ny: 2px; }
.btn[target="_blank"] { --nx: 2px; --ny: -2px; }

/* a soft light that follows the pointer across clickable cards (pointer devices only, set up in main.js) */
.spot { position: relative; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.08), transparent 65%);
  transition: opacity var(--dur-2) var(--ease-out);
}
.spot:hover::before { opacity: 1; }

/* ------------------------------------------------------------------ nav (tabs) */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 16px/1 var(--font); letter-spacing: -0.01em; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #fff; color: #000; font: 700 12.5px/1 var(--font); letter-spacing: -0.03em; }
.brand-name { transition: color 0.2s; }
.brand:hover .brand-name { color: var(--ink-2); }
.nav-links { position: relative; display: flex; gap: 2px; margin-left: auto; }
.nav-links a { padding: 9px 16px; font: 500 14.5px/1 var(--font); color: var(--muted); border-radius: 999px; transition: color var(--dur-2), background var(--dur-2); }
.nav-links a:hover { color: var(--ink); background: var(--hover); }
.nav-links a.active { color: #000; background: #fff; }
/* one white pill that glides to the active tab; "difference" blending turns whatever text it covers black,
   so labels invert exactly where the pill is, even mid-glide */
.nav-pill { display: none; position: absolute; left: 0; top: 0; z-index: 2; border-radius: 999px; background: #fff; mix-blend-mode: difference; pointer-events: none;
  transition: transform var(--dur-3) var(--ease-spring), width var(--dur-3) var(--ease-spring), height var(--dur-3) var(--ease-spring); }
@media (min-width: 861px) {
  .nav-links.has-pill .nav-pill { display: block; }
  .nav-links.has-pill a.active { color: var(--ink); background: transparent; }
}
.nav-toggle { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; cursor: pointer; }
.nav-toggle span { display: block; width: 16px; height: 1.5px; margin: 4px auto; background: var(--ink); transition: transform 0.25s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav .nav-cv { display: none; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 2px;
    padding: 10px var(--gutter) 18px; background: rgba(0, 0, 0, 0.97); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 15px 16px; font-size: 16px; }
  /* the menu's links drop in one after another */
  .nav-links a { opacity: 0; translate: 0 -6px; transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-out), color var(--dur-2), background var(--dur-2); }
  .nav-links.open a { opacity: 1; translate: none; }
  .nav-links.open a:nth-of-type(2) { transition-delay: 35ms; }
  .nav-links.open a:nth-of-type(3) { transition-delay: 70ms; }
  .nav-links.open a:nth-of-type(4) { transition-delay: 105ms; }
  .nav-links.open a:nth-of-type(5) { transition-delay: 140ms; }
}

/* ------------------------------------------------------------------ tab views */
.view { min-height: 100svh; padding: calc(var(--nav-h) + clamp(40px, 6vw, 80px)) 0 64px; }
.view[hidden] { display: none; }
.view.enter { animation: view-in var(--dur-3) var(--ease-out) both; } /* fallback when View Transitions aren't supported */
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* tab changes: the page slides in the direction you're moving through the tabs; the nav stays put and its pill glides */
.nav { view-transition-name: nav; }
::view-transition-old(nav) { display: none; }
::view-transition-new(nav) { animation: none; }
::view-transition-old(root) { animation: vt-out-fwd var(--dur-2) var(--ease-in) both; }
::view-transition-new(root) { animation: vt-in-fwd var(--dur-3) var(--ease-out) both; }
html[data-dir="back"]::view-transition-old(root) { animation-name: vt-out-back; }
html[data-dir="back"]::view-transition-new(root) { animation-name: vt-in-back; }
@keyframes vt-out-fwd { to { opacity: 0; transform: translateX(-32px); } }
@keyframes vt-in-fwd { from { opacity: 0; transform: translateX(44px); } }
@keyframes vt-out-back { to { opacity: 0; transform: translateX(32px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateX(-44px); } }
.view-about { padding-top: 0; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: calc(var(--nav-h) + 56px) 0 24px; min-height: min(100svh, 960px); display: flex; flex-direction: column; justify-content: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; font: 500 14px/1.45 var(--font); color: var(--ink-2); }
.eyebrow .dot { display: none; }
.hero-who { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-2); object-fit: cover; background: var(--surface); }
.hero-name { margin: 0; font: 600 clamp(56px, 9.2vw, 124px)/0.92 var(--font); letter-spacing: -0.055em; color: var(--ink); }
/* each line of the name rises out of its own mask the first time About is shown */
.hero-name .ln { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-name .ln > span { display: inline-block; }
.js .hero-name .ln > span { transform: translateY(110%); animation: rise var(--dur-4) var(--ease-out) 60ms forwards; }
.js .hero-name .ln + .ln > span { animation-delay: 150ms; }
@keyframes rise { to { transform: none; } }
.caret { display: none; }
.hero-lede { max-width: 520px; margin: 28px 0 32px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink-2); }
.hero-lede em { font-style: normal; color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
/* now / based in / say hi: a small spec table under the buttons */
.hero-facts { max-width: 540px; margin: 36px 0 0; }
.hero-facts > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 46px; padding: 6px 0; border-top: 1px solid var(--line); }
.hero-facts > div:last-child { border-bottom: 1px solid var(--line); }
.hero-facts dt { font: 500 13px/1.4 var(--font); color: var(--muted); }
.hero-facts dd { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.hero-facts dd > a:not(.icon-btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.hero-facts dd > a:not(.icon-btn):hover { text-decoration-color: var(--ink); }
.hf-time b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.hf-hi { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.hf-hi > a:first-child { margin-right: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.icon-btn:hover { border-color: var(--line-3); color: var(--ink); background: var(--hover); }
.icon-btn svg { width: 15px; height: 15px; }
@media (max-width: 520px) { .hero-facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 0; } }

.hero-fig { margin: 0; }
.sheet { position: relative; border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface); overflow: hidden; }
.sheet::before {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  background:
    linear-gradient(var(--line-2), var(--line-2)) top left / 12px 1px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) top left / 1px 12px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) top right / 12px 1px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) top right / 1px 12px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) bottom left / 12px 1px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) bottom left / 1px 12px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) bottom right / 12px 1px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) bottom right / 1px 12px no-repeat;
}
.sheet-top { display: flex; justify-content: space-between; padding: 16px 22px 0; font: 500 11px/1 var(--mono); letter-spacing: 0.06em; color: var(--muted); }
.sheet-top b { color: var(--ink); font-weight: 500; }
#hero-svg { width: 100%; height: auto; aspect-ratio: 800 / 760; }
.sheet-foot { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); font: 500 11.5px/1.3 var(--mono); }
.sheet-foot > div { padding: 10px 14px 12px; border-right: 1px solid var(--line); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-foot > div:last-child { border-right: 0; }
.sheet-foot span { display: block; margin-bottom: 4px; font-size: 9.5px; letter-spacing: 0.08em; color: var(--dim); }
.sheet-foot b { font-weight: 500; color: var(--ink); }

/* one proof number per project; each opens that project */
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(48px, 7vw, 80px) 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.hero-stats li + li { border-left: 1px solid var(--line); }
.hero-stats a { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; height: 100%; padding: 22px 24px; transition: background var(--dur-2) var(--ease-out); }
.hero-stats a:hover { background: var(--surface-2); }
.hs-label { padding-right: 24px; font: 500 13px/1.4 var(--font); color: var(--muted); }
.hs-num { font: 600 clamp(28px, 3vw, 38px)/1 var(--font); letter-spacing: -0.035em; color: var(--ink); }
.hs-go { position: absolute; top: 21px; right: 20px; width: 16px; height: 16px; color: var(--dim); transition: color var(--dur-1), transform var(--dur-2) var(--ease-spring); }
.hero-stats a:hover .hs-go { color: var(--ink); transform: translate(2px, -2px); }

@media (max-width: 960px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-fig { max-width: 560px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats li + li { border-left: 0; }
  .hero-stats li:nth-child(even) { border-left: 1px solid var(--line); }
  .hero-stats li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 400px) { .hero-stats a { padding: 18px 16px; } .hs-label { padding-right: 18px; } .hs-go { top: 17px; right: 12px; } }

/* ------------------------------------------------------------------ section heads */
.section { padding-top: clamp(72px, 10vw, 128px); }
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-num, .sec-rule { display: none; }
.sec-head h2 { margin: 0; flex: 1; font: 600 clamp(38px, 5.2vw, 60px)/1.02 var(--font); letter-spacing: -0.045em; }
.sec-kicker { margin: 0; font: 400 15px/1.4 var(--font); color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) { .sec-kicker { display: none; } .sheet-foot > div { white-space: normal; } }
.sub-h { margin: 64px 0 20px; font: 600 22px/1.2 var(--font); letter-spacing: -0.025em; color: var(--ink); }

/* content only starts hidden once main.js is running, so it can never get stuck invisible */
/* An animation, not a transition, so it never overrides an element's own hover/press transitions; it moves the
   separate `translate` property, so hover lifts and press scales (which use `transform`) still apply on top. */
.js .reveal:not(.in) { opacity: 0; translate: 0 18px; }
.js .reveal.in { animation: reveal-in var(--dur-4) var(--ease-out) backwards; }
@keyframes reveal-in { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: none; } }
@media print { .js .reveal:not(.in), .js .wipe:not(.wiped) { opacity: 1 !important; translate: none !important; } .nav { position: static; } .view[hidden] { display: block; } }

/* ------------------------------------------------------------------ about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); }
.about-grid > *, .build-grid > *, .ex-grid > *, .edu-grid > *, .two-col > *, .skills-grid > *, .hero-grid > *, .proj-layout > * { min-width: 0; }
.about-copy p { margin: 0 0 16px; color: var(--ink-2); font-size: 17px; }
.about-copy .big { font: 500 clamp(22px, 2.3vw, 28px)/1.38 var(--font); letter-spacing: -0.025em; color: var(--ink); margin-bottom: 22px; }
.about-copy strong { color: var(--ink); font-weight: 600; }
/* the CV in six lines */
.glance { align-self: start; padding: 20px 22px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.glance h3 { margin: 0 0 8px; font: 600 15px/1.2 var(--font); color: var(--ink); }
.glance dl { margin: 0; }
.glance dl > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.glance dt { font: 500 13px/1.5 var(--font); color: var(--muted); }
.glance dd { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }

.interests { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.interest { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color var(--dur-2), background var(--dur-2), transform var(--dur-2) var(--ease-spring); }
.interest:hover { border-color: var(--line-3); background: var(--surface-2); }
.interest svg { width: 30px; height: 30px; color: var(--ink); margin-bottom: 20px; }
.interest h4 { margin: 0 0 8px; font: 600 17px/1.25 var(--font); letter-spacing: -0.015em; }
.interest p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.55; }

/* project shortcuts at the bottom of About */
.launch-head { display: flex; align-items: baseline; gap: 16px; margin: 64px 0 20px; }
.launch-all { font: 500 14px/1 var(--font); color: var(--muted); white-space: nowrap; }
.launch-all:hover { color: var(--ink); }
.launcher { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } /* five projects + "All projects" = 3 x 2 */
.launch { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color var(--dur-2), background var(--dur-2), transform var(--dur-2) var(--ease-spring); }
.launch:hover { border-color: var(--line-3); background: var(--surface-2); }
.launch-art { flex: none; width: 60px; height: 60px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #161616; border: 1px solid var(--line); }
.launch-art img { width: 118%; height: auto; max-width: none; }
.launch-art svg { width: 100%; height: 100%; }
.launch-art .tt-glyph { width: 28px; height: 28px; color: #fff; }
.launch-more .launch-art svg { width: 26px; height: 26px; color: var(--ink-2); }
.launch-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.launch-txt b { font: 600 15px/1.25 var(--font); letter-spacing: -0.01em; }
.launch-txt small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.launch-go { font-size: 16px; color: var(--dim); transition: color var(--dur-1), transform var(--dur-2) var(--ease-spring); }
.launch:hover .launch-go { color: var(--ink); transform: translate(2px, -2px); }

@media (max-width: 1020px) { .launcher { grid-template-columns: 1fr 1fr; } }
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; }
  .interests { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .interests, .launcher { grid-template-columns: 1fr; }
  .glance dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ------------------------------------------------------------------ projects tab: 4 squares */
.proj-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 5vw, 72px); align-items: center; }
.proj-intro .big { margin: 0 0 16px; font: 500 clamp(22px, 2.4vw, 30px)/1.3 var(--font); letter-spacing: -0.03em; }
.proj-intro p { margin: 0 0 24px; color: var(--ink-2); max-width: 440px; }
.proj-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 440px; }
.proj-index a { display: flex; align-items: center; gap: 16px; padding: 15px 4px; border-bottom: 1px solid var(--line); font: 500 16px/1.3 var(--font); letter-spacing: -0.01em; color: var(--ink-2); transition: color 0.2s, padding 0.25s var(--ease); }
.proj-index a span { font: 500 13px/1 var(--font); color: var(--dim); font-variant-numeric: tabular-nums; }
.proj-index a::after { content: "↗"; margin-left: auto; color: var(--dim); transition: color 0.2s; }
.proj-index a:hover, .proj-index a.hot { color: var(--ink); padding-left: 10px; }
.proj-index a:hover span, .proj-index a.hot span, .proj-index a:hover::after, .proj-index a.hot::after { color: var(--ink); }

.tiles { --tile: clamp(160px, min(calc((100svh - var(--nav-h) - 230px) / 2), 29vw), 330px); display: grid; grid-template-columns: repeat(2, var(--tile)); gap: 14px; }
.tile {
  position: relative; display: block; width: var(--tile); aspect-ratio: 1; border-radius: 20px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line); container-type: inline-size;
  background: radial-gradient(90% 70% at 50% 30%, #1a1a1a 0%, #0c0c0c 70%);
  transition: border-color var(--dur-2), transform var(--dur-3) var(--ease-spring);
}
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.9) 100%); pointer-events: none; }
.tile:hover, .tile.hot { border-color: var(--line-3); transform: translateY(-3px); }
.tile-art { position: absolute; inset: 0; display: grid; place-items: center; transition: transform var(--dur-4) var(--ease-out); }
.tile:hover .tile-art, .tile.hot .tile-art { transform: scale(1.04); }
.tile-v8 .tile-art img { width: 92%; height: auto; margin-top: -16%; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.7)); }
.tile-trading .tile-art svg { width: 88%; margin-top: -16%; }
.tile-biking .tile-art svg { width: 90%; margin-top: -16%; }
.tile-top { position: absolute; top: 14px; left: 16px; right: 14px; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
.tile-num { font: 500 clamp(11px, 4cqi, 13px)/1 var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.tile-max { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.5); color: var(--ink-2); transition: all 0.25s; }
.tile-max svg { width: 14px; height: 14px; }
.tile:hover .tile-max { background: #fff; border-color: #fff; color: #000; }
.tile-info { position: absolute; left: 16px; right: 16px; bottom: 15px; z-index: 1; display: grid; gap: 3px; }
.tile-kicker { font: 500 clamp(10.5px, 3.8cqi, 12.5px)/1.25 var(--font); color: var(--muted); }
.tile-title { font: 600 clamp(17px, 8.4cqi, 28px)/1.08 var(--font); letter-spacing: -0.035em; color: #fff; }
.tile-sub { font-size: clamp(11.5px, 4.4cqi, 14px); line-height: 1.35; color: var(--ink-2); }
@container (max-width: 210px) { .tile-sub, .tile-kicker { display: none; } .tile-info { left: 12px; right: 12px; bottom: 12px; } .tile-top { top: 10px; left: 12px; right: 10px; } }

/* TikTok tile: a small phone */
.mini-phone { position: relative; width: 29%; aspect-ratio: 9 / 18; margin-top: -20%; border-radius: 14% / 7%; padding: 4%; background: #1c1c1c; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8); transform: rotate(-8deg); }
.mp-screen { position: relative; display: block; width: 100%; height: 100%; border-radius: 10% / 5%; overflow: hidden; background: radial-gradient(90% 60% at 30% 25%, #3a3a3a 0%, transparent 70%), radial-gradient(80% 60% at 80% 80%, #262626 0%, transparent 70%), #0e0e0e; }
.mp-play { position: absolute; left: 50%; top: 42%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.mp-play::after { content: ""; position: absolute; left: 40%; top: 30%; border-left: 9px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.mp-handle { position: absolute; left: 8%; bottom: 17%; font: 600 clamp(6px, 2.6cqi, 9px)/1 var(--font); color: #fff; }
.mp-lines { position: absolute; left: 8%; right: 30%; bottom: 7%; display: grid; gap: 3px; }
.mp-lines i { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.4); }
.mp-lines i + i { width: 70%; }
.mp-side { position: absolute; right: 6%; bottom: 14%; display: grid; gap: 7px; }
.mp-side i { display: block; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); }

@media (max-width: 960px) {
  .proj-layout { grid-template-columns: 1fr; }
  .proj-intro p, .proj-index { max-width: none; }
  .tiles { --tile: max(140px, min(calc((min(100vw, var(--maxw)) - 2 * var(--gutter) - 12px) / 2), calc((100svh - var(--nav-h) - 190px) / 2))); gap: 12px; order: -1; justify-content: center; }
  .tile { border-radius: 18px; }
}
/* short landscape screens (phones on their side): all four tiles in one row */
@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  .tiles { --tile: min(calc((100vw - 2 * var(--gutter) - 36px) / 4), 220px); grid-template-columns: repeat(4, var(--tile)); }
}

/* smaller work under the four squares */
.more-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: clamp(64px, 9vw, 112px) 0 20px; }
.more-head .sub-h { margin: 0; }
.more-head p { margin: 0; font-size: 15px; color: var(--muted); }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.more-card { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.more-card.wide { grid-column: span 2; }
.more-card.wide p { max-width: 560px; }
.mc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.more-card h4 { margin: 0; font: 600 17px/1.25 var(--font); letter-spacing: -0.015em; }
.more-card p { flex: 1; margin: 10px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.more-card .tags { margin-top: 18px; }
.status { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 11.5px/1 var(--font); color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.status.live { border-color: var(--line-3); color: var(--ink); }
.status.live::before { background: #fff; }
@media (max-width: 980px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .more-grid { grid-template-columns: minmax(0, 1fr); } .more-card.wide { grid-column: auto; } }

/* ------------------------------------------------------------------ maximised project panel */
.po { position: fixed; inset: var(--nav-h) 0 0 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); isolation: isolate; will-change: clip-path; }
.po[hidden] { display: none; }
.po-bar { flex: none; height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, 0.88); backdrop-filter: blur(12px); }
.po-num { font: 500 12.5px/1 var(--font); color: var(--muted); padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 999px; font-variant-numeric: tabular-nums; }
.po-title { font: 600 17px/1.2 var(--font); letter-spacing: -0.02em; white-space: nowrap; }
.po-sub { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.po-min {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; flex: none;
  border: 1px solid var(--line-3); border-radius: 999px; background: transparent; cursor: pointer;
  font: 500 14px/1 var(--font); color: var(--ink); transition: all 0.2s;
}
.po-min:hover { background: #fff; border-color: #fff; color: #000; }
.po-min svg { width: 16px; height: 16px; }
.po-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: clamp(28px, 4vw, 48px) 0 80px; scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
.po-panel[hidden] { display: none; }
/* as the panel grows out of its tile, its content rises in just behind it; on the way back it fades first */
.po.opening .po-panel { animation: panel-in var(--dur-4) var(--ease-out) both; }
@keyframes panel-in { 0%, 30% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: none; } }
.po.closing .po-panel { opacity: 0; transition: opacity var(--dur-1) var(--ease-in); }
/* reading progress along the bottom of the project's title bar */
.po-bar { position: relative; }
.po-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: #fff; transform-origin: left; transform: scaleX(var(--p, 0)); pointer-events: none; }
@media (max-width: 640px) { .po-sub { display: none; } .po-min span { display: none; } .po-min { padding: 0 11px; } }

/* ------------------------------------------------------------------ project content */
.proj-head { display: grid; gap: 6px; margin-bottom: 24px; }
.proj-title { margin: 0; font: 600 clamp(32px, 4.2vw, 52px)/1.04 var(--font); letter-spacing: -0.045em; }
.proj-title > span:last-child { display: block; margin-top: 10px; font: 400 clamp(16px, 1.5vw, 19px)/1.35 var(--font); letter-spacing: -0.01em; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.tags li { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 12.5px/1 var(--font); color: var(--ink-2); }
.proj-lede { max-width: 860px; margin: 18px 0 28px; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.proj-lede strong { color: var(--ink); font-weight: 600; }

.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.panel-pad { padding: clamp(20px, 2.4vw, 28px); }
.panel h4, .h4 { margin: 0 0 4px; font: 600 17px/1.3 var(--font); letter-spacing: -0.02em; }
.panel .sub, .sub { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.label { font: 500 12.5px/1.35 var(--font); color: var(--muted); }

/* ---------------------------------------------------------- V8 viewer */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 340px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: radial-gradient(ellipse at 50% 35%, #161616 0%, #050505 72%); }
.viewer-stage { position: relative; min-height: 460px; height: clamp(460px, calc(100svh - var(--nav-h) - 58px - 220px), 760px); touch-action: none; }
#v8-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
#v8-canvas.hovering { cursor: pointer; }
#v8-canvas:active { cursor: grabbing; }
.v-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; font: 500 13px/1 var(--font); color: var(--muted); transition: opacity 0.5s; }
.v-loading.done { opacity: 0; pointer-events: none; }
.v-loading.failed .bar { display: none; }
/* controls only appear once the model is ready (and never on failure) */
.viewer:not(.ready) :is(.v-tools, .v-hud, .viewer-side .parts-head, .v-title p) { visibility: hidden; }
.v-loading.failed span { max-width: 320px; text-align: center; line-height: 1.6; color: var(--ink-2); }
.v-loading .bar { width: 160px; height: 2px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.v-loading .bar i { display: block; width: 40%; height: 100%; background: #fff; animation: load 1.1s infinite var(--ease); }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.v-title { position: absolute; top: 18px; left: 20px; right: 150px; pointer-events: none; }
.v-title .label { color: var(--ink); font-weight: 600; }
.v-title p { margin: 4px 0 0; font: 400 13px/1.4 var(--font); color: var(--muted); }
.v-tools { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.v-tools button {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 500 13px/1 var(--font); color: var(--ink-2); cursor: pointer; transition: all 0.2s;
}
.v-tools button:hover { border-color: var(--line-3); color: var(--ink); }
.v-tools button[aria-pressed="true"] { border-color: #fff; color: #000; background: #fff; }
.v-tools button svg { width: 14px; height: 14px; }
.v-hud {
  position: absolute; left: 14px; bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 500 12.5px/1 var(--font); color: var(--muted); width: fit-content; max-width: calc(100% - 28px);
}
.hud-k { color: var(--dim); font-size: 12px; margin-right: 6px; }
.hud-v { color: var(--ink); display: inline-block; min-width: 38px; font-variant-numeric: tabular-nums; }
.firing { display: flex; align-items: center; gap: 4px; }
.firing i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--line-2); font-style: normal; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; transition: background 0.12s, color 0.12s, border-color 0.12s; }
.firing i.on { background: #fff; border-color: #fff; color: #000; }
.hud-speed { display: flex; align-items: center; gap: 8px; }
.hud-speed input { width: 110px; accent-color: #fff; }
.v-tip { position: absolute; z-index: 3; pointer-events: none; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(12, 12, 12, 0.95); font: 500 13px/1.25 var(--font); color: var(--ink); white-space: nowrap; transform: translate(14px, 14px); }
.v-tip small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

.viewer-side { border-left: 1px solid var(--line); background: rgba(10, 10, 10, 0.85); display: flex; flex-direction: column; min-height: 0; max-height: clamp(460px, calc(100svh - var(--nav-h) - 58px - 220px), 760px); }
.parts-head { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.parts-head .label { color: var(--ink); font-weight: 600; font-size: 14px; }
.parts-head span:last-child { font: 400 12.5px/1 var(--font); color: var(--dim); }
.parts-list { list-style: none; margin: 0; padding: 6px 0 12px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
.parts-cat { padding: 16px 18px 6px; font: 500 12px/1 var(--font); color: var(--dim); }
.part-item { border-left: 2px solid transparent; transition: background 0.2s, border-color 0.2s; }
.part-item.hot { background: var(--hover); }
.part-item.open { background: var(--surface-2); border-left-color: #fff; }
.part-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 0; background: none; text-align: left; cursor: pointer; }
.part-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.part-name { flex: 1; font-size: 14.5px; color: var(--ink); }
.part-count { font: 500 12px/1 var(--font); color: var(--dim); font-variant-numeric: tabular-nums; }
.part-chev { flex: none; width: 14px; height: 14px; color: var(--dim); transition: transform 0.3s var(--ease); }
.part-item.open .part-chev { transform: rotate(90deg); color: var(--ink); }
.part-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.part-item.open .part-body { grid-template-rows: 1fr; }
.part-body > div { overflow: hidden; }
.part-body-in { padding: 2px 16px 16px 36px; }
.part-body p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.spec-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 13px; }
.spec-dl dt { color: var(--muted); padding-top: 1px; }
.spec-dl dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.feat-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.feat-chips span { padding: 3px 8px; border-radius: 999px; background: var(--hover); font: 400 11.5px/1.3 var(--font); color: var(--muted); }
.feat-title { margin: 0 0 6px; font: 500 12px/1 var(--font); color: var(--dim); }

@media (max-width: 1020px) {
  .viewer { grid-template-columns: 1fr; }
  .viewer-stage { height: 62vh; min-height: 420px; }
  .viewer-side { border-left: 0; border-top: 1px solid var(--line); max-height: 520px; }
}
@media (max-width: 560px) {
  .viewer-stage { height: 66vh; min-height: 400px; }
  .v-tools button { height: 34px; padding: 0 10px; font-size: 12px; }
  .v-tools button .t-label { display: none; }
  .v-title { right: 64px; }
  .hud-speed input { width: 80px; }
  .v-hud { gap: 8px 12px; padding: 8px 10px; left: 10px; bottom: 10px; }
}

.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.spec-grid > div { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec-grid > div:nth-child(4n) { border-right: 0; }
.spec-grid > div:nth-last-child(-n+4) { border-bottom: 0; }
.spec-grid b { display: block; margin-top: 6px; font: 600 18px/1.2 var(--font); letter-spacing: -0.025em; }
.spec-grid b small { font: 400 13px/1 var(--font); color: var(--muted); letter-spacing: 0; }
@media (max-width: 760px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .spec-grid > div:nth-child(4n) { border-right: 1px solid var(--line); }
  .spec-grid > div:nth-child(2n) { border-right: 0; }
  .spec-grid > div:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .spec-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
}

.build-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; margin-top: 14px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 0 20px 46px; counter-increment: step; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-3); border-radius: 999px; font: 500 13px/1 var(--font); color: var(--ink); }
.steps li::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 6px; width: 1px; background: var(--line-2); }
.steps li:last-child::after { display: none; }
.steps h5 { margin: 4px 0 4px; font: 600 15.5px/1.3 var(--font); letter-spacing: -0.015em; }
.steps p { margin: 0; font-size: 14.5px; color: var(--muted); }
.steps p b { color: var(--ink-2); font-weight: 500; }

.code { margin: 0; padding: 18px 20px; overflow-x: auto; border-radius: 12px; background: #050505; border: 1px solid var(--line); font: 400 12.5px/1.7 var(--mono); color: #d4d4d4; tab-size: 4; }
.code .c { color: #858585; }
.code .k { color: #ffffff; font-weight: 500; }
.code .t { color: #a8a8a8; }
.code .f { color: #ffffff; }
.code-cap { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 10px; font: 500 13px/1.4 var(--font); color: var(--muted); }

.renders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.renders figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #e9e9ea; }
.renders img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.6s var(--ease); }
.renders figure:hover img { transform: scale(1.03); }
.renders figcaption { padding: 10px 12px; background: var(--surface); font: 500 12.5px/1.3 var(--font); color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 860px) { .build-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) { .renders { grid-template-columns: 1fr 1fr; } .renders figure:last-child { display: none; } }

/* ---------------------------------------------------------- trading */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.kpi b { display: block; margin: 10px 0 6px; font: 600 clamp(26px, 3vw, 34px)/1 var(--font); letter-spacing: -0.04em; }
.kpi p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

.how { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); overflow: hidden; }
.how-chart { position: relative; padding: 18px 18px 8px; border-right: 1px solid var(--line); min-width: 0; }
.how-chart svg { width: 100%; height: auto; }
.how-note { position: absolute; left: 20px; bottom: 10px; font: 400 12px/1 var(--font); color: var(--dim); }
.how-steps { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.how-step { border-radius: 12px; transition: background 0.25s; }
.how-step button { width: 100%; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px; border: 0; background: none; text-align: left; cursor: pointer; }
.how-step .n { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line-3); font: 500 12px/1 var(--font); color: var(--muted); transition: all 0.25s; }
.how-step .hs-t { display: block; margin: 3px 0 0; font: 600 15px/1.3 var(--font); letter-spacing: -0.015em; color: var(--ink-2); transition: color 0.25s; }
.how-step .hs-d { display: block; grid-column: 2; margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.45s var(--ease), opacity 0.3s, margin 0.3s; }
.how-step .hs-d code { font: 500 12px/1 var(--mono); color: var(--ink-2); background: var(--hover); padding: 2px 6px; border-radius: 6px; }
.how-step.on { background: var(--surface-2); }
.how-step.on .n { background: #fff; border-color: #fff; color: #000; }
.how-step.on .hs-t { color: var(--ink); }
.how-step.on .hs-d { max-height: 220px; opacity: 1; margin-top: 6px; }
.layer { transition: opacity 0.45s var(--ease); }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; } .how-chart { border-right: 0; border-bottom: 1px solid var(--line); } }

.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 14px; }
.pipe { position: relative; padding: 20px 18px; border: 1px solid var(--line); border-right: 0; background: var(--surface); }
.pipe:first-child { border-radius: var(--r) 0 0 var(--r); }
.pipe:last-child { border-right: 1px solid var(--line); border-radius: 0 var(--r) var(--r) 0; }
.pipe::after { content: ""; position: absolute; right: -7px; top: 50%; z-index: 1; width: 12px; height: 12px; border-top: 1px solid var(--line-3); border-right: 1px solid var(--line-3); background: var(--surface); transform: translateY(-50%) rotate(45deg); }
.pipe:last-child::after { display: none; }
.pipe .label { font-size: 12px; }
.pipe h4 { margin: 8px 0 6px; font: 600 15.5px/1.25 var(--font); letter-spacing: -0.015em; }
.pipe p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.pipe b { font-weight: 600; color: var(--ink); }
@media (max-width: 980px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipe, .pipe:first-child, .pipe:last-child { border-right: 1px solid var(--line); border-bottom: 0; border-radius: 0; }
  .pipe:first-child { border-radius: var(--r) var(--r) 0 0; }
  .pipe:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
  .pipe::after { right: auto; left: 28px; top: auto; bottom: -7px; transform: rotate(135deg); }
}
.ranges { margin: 14px 0 0; font: 400 13.5px/1.65 var(--font); color: var(--dim); }
.ranges b { color: var(--muted); font-weight: 500; }

.explorer-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin: 64px 0 18px; }
.explorer-head h4 { margin: 0; font: 600 clamp(24px, 2.6vw, 30px)/1.1 var(--font); letter-spacing: -0.04em; }
.explorer-head p { margin: 8px 0 0; font-size: 15px; color: var(--muted); max-width: 620px; }
.seg { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); }
.seg button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 15px; border: 0; border-radius: 999px; background: none; font: 500 13.5px/1 var(--font); color: var(--muted); cursor: pointer; transition: all 0.2s; }
.seg button:hover { color: var(--ink); background: var(--hover); }
.seg button[aria-pressed="true"] { background: #fff; color: #000; }
.seg .sw { width: 8px; height: 8px; border-radius: 50%; }
@media (max-width: 560px) { .seg button { padding: 0 10px; font-size: 12.5px; } }
@media (max-width: 480px) { .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 22px; } .seg button { justify-content: center; } }

.ex-status { display: flex; align-items: center; gap: 10px; margin: 0; padding: 18px 20px; border: 1px dashed var(--line-2); border-radius: var(--r); font: 500 14px/1.5 var(--font); color: var(--muted); }
.ex-status::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: #fff; animation: spin 0.8s linear infinite; }
.ex-status.failed { border-style: solid; border-color: rgba(240, 82, 82, 0.4); color: var(--ink-2); }
.ex-status.failed::before { animation: none; border-color: var(--bad); background: radial-gradient(circle, var(--bad) 30%, transparent 32%); }
.link-btn { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink-2); }
.ex-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; }
.ex-grid + .ex-grid { margin-top: 14px; }
.ex-grid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 980px) { .ex-grid, .ex-grid.even { grid-template-columns: 1fr; } }

.chart { position: relative; width: 100%; }
.chart svg { width: 100%; overflow: visible; }
.chart text { font-family: var(--font); }
.tick-label { font: 400 11.5px var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
.gridline { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; shape-rendering: crispEdges; }
.baseline { stroke: rgba(255, 255, 255, 0.26); stroke-width: 1; shape-rendering: crispEdges; }
.series-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.end-label { font: 500 12.5px var(--font); fill: var(--ink); }
.end-label.muted { fill: var(--muted); }
.crosshair { stroke: rgba(255, 255, 255, 0.3); stroke-width: 1; }
.tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: 12px; background: rgba(12, 12, 12, 0.96); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.9);
  font-size: 13px; line-height: 1.45; color: var(--ink); opacity: 0; transition: opacity 0.12s;
}
.tip.show { opacity: 1; }
.tip .t-h { margin-bottom: 6px; font: 500 12px/1.3 var(--font); color: var(--muted); }
.tip .t-r { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .t-r span:first-child { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.tip .t-r b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tip .key { width: 10px; height: 3px; border-radius: 2px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend .key { width: 16px; height: 3px; border-radius: 2px; }
.legend .dotkey { width: 9px; height: 9px; border-radius: 50%; }
.legend .ring { width: 11px; height: 11px; border-radius: 50%; border: 2px solid; }

.stat-list { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.stat-list > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.stat-list > div:nth-child(odd) { padding-right: 12px; }
.stat-list dt { font: 500 12.5px/1.3 var(--font); color: var(--muted); }
.stat-list dd { margin: 6px 0 0; font: 600 21px/1.1 var(--font); letter-spacing: -0.03em; }
.stat-list dd small { display: block; margin-top: 4px; font: 400 12.5px/1.2 var(--font); color: var(--muted); letter-spacing: 0; }
.pos { color: var(--good); }
.neg { color: var(--bad); }

.settings-table, .data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.settings-table th, .settings-table td, .data-table th, .data-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.settings-table th, .data-table th { font: 500 12.5px/1.3 var(--font); color: var(--muted); }
.settings-table td:first-child { color: var(--muted); white-space: nowrap; }
.settings-table td { color: var(--ink-2); }
.settings-table tr.changed td:last-child { color: var(--ink); font-weight: 500; }
.settings-table tr.changed td:last-child::before { content: "●"; margin-right: 6px; font-size: 8px; color: #fff; vertical-align: 2px; }
.data-table td { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.data-table td.num, .data-table th.num { text-align: right; }
.data-table tr.hl td { color: var(--ink); background: var(--hover); }
.table-wrap { overflow-x: auto; }
details.tv { margin-top: 12px; }
details.tv summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--font); color: var(--muted); }
details.tv summary::-webkit-details-marker { display: none; }
details.tv summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--line-3); border-radius: 999px; font-size: 12px; }
details.tv[open] summary::before { content: "−"; }
details.tv summary:hover { color: var(--ink); }
details.tv > div { margin-top: 12px; }

.sens-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sens-grid .panel { min-width: 0; }
.sens-grid .wide { grid-column: 1 / -1; }
@media (max-width: 1100px) { .sens-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .sens-grid { grid-template-columns: 1fr; } }
.sens-row { display: grid; grid-template-columns: 92px 1fr 64px; align-items: center; gap: 8px; height: 22px; font-size: 12.5px; color: var(--ink-2); cursor: default; }
.sens-row .lbl { font: 400 12.5px/1 var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sens-row.pick .lbl { color: var(--ink); font-weight: 500; }
.sens-row .val { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--dim); }
.sens-row.pick .val { color: var(--ink); font-weight: 600; }
.sens-row:hover .val { color: var(--ink-2); }
.sens-track { position: relative; height: 12px; }
.sens-track .zero { position: absolute; top: -3px; bottom: -3px; width: 1px; background: rgba(255, 255, 255, 0.26); }
.sens-track .bar { position: absolute; top: 0; height: 12px; background: var(--c-muted); transition: width 0.6s var(--ease), left 0.6s var(--ease); }
.sens-track .bar.r { border-radius: 0 4px 4px 0; }
.sens-track .bar.l { border-radius: 4px 0 0 4px; }
.sens-row.fail .bar { opacity: 0.38; }
.sens-foot { margin: 10px 0 0; font-size: 12.5px; color: var(--dim); }

.ww { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ww ul { margin: 0; padding: 0; list-style: none; }
.ww li { position: relative; padding: 11px 0 11px 28px; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.ww li:last-child { border-bottom: 0; }
.ww li::before { position: absolute; left: 0; top: 12px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; font: 700 10px/1 var(--font); }
.ww .worked li::before { content: "✓"; color: var(--good); background: rgba(34, 197, 94, 0.12); }
.ww .failed li::before { content: "✕"; color: var(--bad); background: rgba(240, 82, 82, 0.12); }
.ww h5 { margin: 0 0 6px; font: 600 16px/1.2 var(--font); letter-spacing: -0.015em; }
@media (max-width: 760px) { .ww { grid-template-columns: 1fr; } }

.caveats { display: grid; grid-template-columns: auto 1fr; gap: 18px; margin-top: 14px; }
.caveats .ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 999px; background: var(--hover); border: 1px solid var(--line-2); color: var(--ink); }
.caveats ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.caveats li { margin: 4px 0; }
.caveats li::marker { color: var(--dim); }

/* ---------------------------------------------------------- TikTok project */
.tt-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.tt-phone-wrap { display: grid; place-items: center; padding: 10px 20px; }
.phone { position: relative; width: clamp(220px, 24vw, 300px); aspect-ratio: 9 / 19; padding: 12px; border-radius: 44px; background: #181818; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 50px 100px -30px rgba(0, 0, 0, 1), inset 0 0 0 2px rgba(0, 0, 0, 0.6); transform: rotate(-4deg); }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 30%; height: 18px; transform: translateX(-50%); border-radius: 12px; background: #000; z-index: 2; }
.phone-screen { position: relative; height: 100%; border-radius: 34px; overflow: hidden; background: #0a0a0a; }
.ps-glow { position: absolute; inset: -20%; background: radial-gradient(50% 40% at 30% 30%, rgba(255, 255, 255, 0.16), transparent 70%), radial-gradient(50% 40% at 75% 70%, rgba(255, 255, 255, 0.09), transparent 70%); animation: drift 9s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(6%, -5%) scale(1.08); } }
.ps-top { position: absolute; top: 50px; left: 0; right: 0; display: flex; justify-content: center; gap: 14px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.ps-top b { color: #fff; font-weight: 600; border-bottom: 2px solid #fff; padding-bottom: 3px; }
.ps-play { position: absolute; left: 50%; top: 45%; width: 64px; height: 64px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(6px); }
.ps-play::after { content: ""; position: absolute; left: 25px; top: 19px; border-left: 20px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
.ps-side { position: absolute; right: 12px; bottom: 90px; display: grid; gap: 16px; }
.ps-side i { display: block; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.8); }
.ps-side i:first-child { background: url("../img/anish.png") center / cover; border: 2px solid #fff; }
.ps-caption { position: absolute; left: 14px; right: 60px; bottom: 26px; display: grid; gap: 4px; font-size: 12.5px; color: rgba(255, 255, 255, 0.85); }
.ps-caption b { color: #fff; font-size: 14px; }
.tt-copy .proj-lede { margin-top: 12px; }
.tt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 24px; }
.tt-stats > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tt-stats b { display: block; margin: 8px 0 2px; font: 600 20px/1.1 var(--font); letter-spacing: -0.03em; }
.tt-stats small { font-size: 13px; color: var(--muted); }
.tt-copy .btn svg { width: 18px; height: 18px; }
.tt-list { margin: 10px 0 0; padding: 0; list-style: none; }
.tt-list li { position: relative; padding: 0 0 10px 18px; font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.tt-list li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
@media (max-width: 860px) { .tt-grid { grid-template-columns: 1fr; } .tt-stats { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 520px) { .tt-stats { grid-template-columns: 1fr; } }
/* most-watched videos + the ambassador welcome email */
.tt-note { margin: -8px 0 22px; font-size: 15px; color: var(--muted); }
.tt-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 960px; margin: 0; padding: 0; list-style: none; }
.tt-top img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r); background: #000; }
.tt-vid-txt { display: grid; gap: 4px; padding: 14px 2px 0; }
.tt-views { font-size: 14px; color: var(--muted); }
.tt-views b { margin-right: 2px; font: 600 22px/1.1 var(--font); letter-spacing: -0.035em; color: var(--ink); }
.tt-title { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.tt-amb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(20px, 3vw, 40px); }
.tt-amb-p { max-width: 440px; margin: 10px 0 0; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.tt-amb-p strong { color: var(--ink); font-weight: 600; }
.tt-mail { margin: 0; }
.tt-mail img { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: 10px; }
.tt-mail figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .tt-amb { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .tt-top { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tt-top li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: center; }
  .tt-vid-txt { padding: 0; }
  .tt-amb-p { font-size: 16px; }
}

/* ---------------------------------------------------------- Biking project */
.bike-explorer { display: grid; grid-template-columns: minmax(0, 1fr) 340px; overflow: hidden; border-radius: 20px; background: radial-gradient(ellipse at 45% 40%, #161616 0%, #050505 75%); }
.bike-stage { position: relative; display: grid; place-items: center; padding: 48px 24px 24px; min-height: 420px; }
.bike-label { position: absolute; top: 18px; left: 20px; color: var(--muted); }
.bike-svg { width: 100%; max-width: 760px; height: auto; }
.bike-side { max-height: none; }
.bk-tag { font: 500 11.5px/1.2 var(--font); color: var(--ink-2); padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; }
.bike-cards { margin-top: 14px; }
@media (max-width: 1020px) { .bike-explorer { grid-template-columns: 1fr; } .bike-side { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .bk-tag { display: none; } }

/* bike line drawing (tile + explorer) */
.bk-line { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.25s, opacity 0.25s, filter 0.25s; }
.bk-line.tyre { stroke-width: 9; stroke: rgba(255, 255, 255, 0.16); }
.bk-line.thin { stroke-width: 1.2; stroke: rgba(255, 255, 255, 0.24); }
.bk-line.chain { stroke-dasharray: 4 3; stroke: rgba(255, 255, 255, 0.75); }
.bk-hit { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; cursor: pointer; }
.bike-svg .bk-part, .bike-svg .bk-line { pointer-events: none; }
.bike-svg .bk-hit { pointer-events: stroke; }
.bike-svg.has-focus .bk-part:not(.on) .bk-line { opacity: 0.22; }
.bk-part.on .bk-line { stroke: #fff; filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.45)); }
.bk-part.on .bk-line.tyre { stroke: rgba(255, 255, 255, 0.5); }
/* tile + launcher art: the drivetrain in full white */
.bike-art .bk-part[data-part="chain"] .bk-line, .bike-art .bk-part[data-part="cranks"] .bk-line, .bike-art .bk-part[data-part="cassette"] .bk-line, .bike-art .bk-part[data-part="rder"] .bk-line { stroke: #fff; }
.launch-art .bike-art .bk-line { stroke-width: 6; }
.launch-art .bike-art .bk-line.tyre { stroke-width: 16; }

/* ---------------------------------------------------------- media gallery */
.media-wrap[hidden] { display: none; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.media-item { margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.media-item img, .media-item video { width: 100%; height: auto; display: block; aspect-ratio: 4 / 3; object-fit: cover; background: #000; }
.media-item.tall img, .media-item.tall video, .media-item iframe { aspect-ratio: 9 / 16; width: 100%; border: 0; display: block; }
.media-item figcaption { padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); border-top: 1px solid var(--line); }

/* ---------------------------------------------------------- experience */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 172px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
/* a white line fills down the timeline as you scroll through it (--prog is set in main.js) */
.timeline::after { background: #fff; transform-origin: top; transform: scaleY(var(--prog, 0)); }
.job { position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 44px; }
.job-when { padding-top: 24px; text-align: right; font: 400 13.5px/1.5 var(--font); color: var(--muted); }
.job-when b { display: block; font-weight: 500; color: var(--ink); }
.job::before { content: ""; position: absolute; left: 168px; top: 30px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-3); transition: all 0.3s; z-index: 1; }
.job.now::before { background: #fff; border-color: #fff; }
.job.open::before, .job.passed::before { border-color: #fff; }
.job-card { margin: 8px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color 0.3s, background 0.3s; }
.job-card:hover { border-color: var(--line-2); }
.job.open .job-card { border-color: var(--line-2); background: var(--surface-2); }
.job-btn { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 0; background: none; text-align: left; cursor: pointer; }
.job-h { margin: 0; font: inherit; letter-spacing: normal; }
.job-text { display: block; flex: 1; min-width: 0; }
.job-title { display: block; font: 600 clamp(17px, 1.8vw, 20px)/1.25 var(--font); letter-spacing: -0.025em; color: var(--ink); }
.job .org { display: block; margin-top: 3px; font-size: 14.5px; color: var(--muted); }
.job .org b { color: var(--ink-2); font-weight: 500; }
.badge { display: inline-block; margin-left: 8px; padding: 4px 9px; border-radius: 999px; background: #fff; font: 600 11px/1 var(--font); color: #000; vertical-align: 3px; letter-spacing: 0; }
.job-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-3) var(--ease-out); }
.job-body > div > * { opacity: 0; translate: 0 -4px; transition: opacity var(--dur-1) var(--ease-in), translate var(--dur-1) var(--ease-in); }
.job.open .job-body > div > * { opacity: 1; translate: none; transition: opacity var(--dur-3) var(--ease-out) 90ms, translate var(--dur-3) var(--ease-out) 90ms; }
.job.open .job-body { grid-template-rows: 1fr; }
.job-body > div { overflow: hidden; }
.job-body ul:not(.tags) { margin: 0; padding: 0 20px 18px; list-style: none; }
.job-body ul:not(.tags) li { position: relative; padding: 0 0 10px 18px; font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.job-body ul:not(.tags) li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.job-body .tags { padding: 0 20px 20px; margin: 0; }
.job-link { display: inline-block; margin: -6px 20px 20px; font: 500 14px/1 var(--font); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); }
.job-link:hover { text-decoration-color: #fff; }
.plus { position: relative; flex: none; width: 28px; height: 28px; border: 1px solid var(--line-2); border-radius: 50%; transition: transform var(--dur-3) var(--ease-spring), border-color var(--dur-2), background var(--dur-2); }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--ink-2); transform: translate(-50%, -50%); }
.plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.35s var(--ease); }
.job.open .plus { transform: rotate(180deg); border-color: var(--line-3); }
.job.open .plus::after { transform: translate(-50%, -50%) rotate(0deg); }
@media (max-width: 720px) {
  .timeline::before, .timeline::after { left: 4px; }
  .job { grid-template-columns: 1fr; gap: 0; padding-left: 26px; }
  .job::before { left: 0; top: 6px; }
  .job-when { text-align: left; padding-top: 0; }
  .job-when b { display: inline; margin-right: 8px; }
}

/* ---------------------------------------------------------- education & skills */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edu { position: relative; padding: 26px; overflow: hidden; }
.edu h3 { margin: 12px 0 4px; font: 600 23px/1.2 var(--font); letter-spacing: -0.03em; }
.edu .where { font-size: 15.5px; color: var(--ink-2); }
.edu .when { margin-top: 14px; font: 400 14px/1.3 var(--font); color: var(--muted); }
.edu .big-glyph { position: absolute; right: -6px; bottom: -24px; font: 700 110px/1 var(--font); letter-spacing: -0.07em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.09); pointer-events: none; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skill-group { padding: 24px; }
.skill-group h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 600 16.5px/1.2 var(--font); letter-spacing: -0.02em; }
.skill-group h4 svg { width: 18px; height: 18px; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13.5px; color: var(--ink-2); transition: border-color 0.2s, color 0.2s; }
.chips span:hover { border-color: var(--line-3); color: var(--ink); }
.chips span b { font-weight: 500; color: var(--ink); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.course { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.course:last-child { border-bottom: 0; padding-bottom: 0; }
.course:first-of-type { padding-top: 4px; }
.course svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--ink-2); }
.course b { display: block; font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.course span { font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .skills-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .edu-grid, .two-col { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- contact */
.view-contact { display: flex; align-items: center; }
.view-contact > .wrap { width: 100%; }
.contact { padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.contact-photo { position: relative; width: clamp(120px, 15vw, 168px); aspect-ratio: 1; }
.contact-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
@keyframes spin { to { transform: rotate(360deg); } }
.contact h2 { margin: 0; font: 600 clamp(36px, 5vw, 60px)/1.02 var(--font); letter-spacing: -0.05em; }
.contact p { margin: 14px 0 26px; font-size: 18px; color: var(--ink-2); max-width: 560px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; }
.copy-mail { position: relative; }
.copy-mail .copied { position: absolute; left: 50%; top: -32px; transform: translateX(-50%); padding: 5px 10px; border-radius: 999px; background: #fff; color: #000; font: 500 12px/1 var(--font); opacity: 0; transition: opacity 0.2s; pointer-events: none; white-space: nowrap; }
.copy-mail.done .copied { opacity: 1; }
@media (max-width: 640px) { .contact { grid-template-columns: 1fr; } }

.footer { padding: 28px 0 40px; border-top: 1px solid var(--line); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font: 400 13.5px/1.5 var(--font); color: var(--dim); }
.foot-links { display: flex; gap: 20px; }
.footer a:hover { color: var(--ink); }

/* touch screens: every control gets at least a 44px hit area */
@media (pointer: coarse) {
  .seg button, .po-min, .nav-toggle { height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .po-min, .nav-toggle { min-width: 44px; justify-content: center; }
  .v-tools button { height: 44px; min-width: 44px; justify-content: center; }
  .part-btn { min-height: 44px; }
  .hud-speed input { height: 44px; }
  details.tv summary, .launch-all, .foot-links a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -14px; }
  .job-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: -21px; margin-bottom: 5px; }
}

/* Reduced motion (the device setting, or the footer switch) is the html.reduce-motion class, set in <head>.
   It swaps movement for fades rather than switching everything off; see the end of fx.css. */
html.reduce-motion .ps-glow { animation: none; }
html.reduce-motion .view.enter { animation-name: fx-fade-in; }
