/* ==========================================================================
   Saizen Acuity · Sankitha Kirindu · "The standard"
   Built from his own CV: white paper and cream chapters, one gold, the CV's
   gold corner brackets. The hero is his portrait cut out of its photo and
   breaking out of a bracketed frame; the education chapter keeps its
   staircase loop. Crisp: hairlines, 2 to 4px corners, no glows, no blur.
   Colour with meaning lives only inside the engine room: emerald passed,
   amber caught, red failed.
   ========================================================================== */

:root {
  --gold: #C9A24B;     /* on black */
  --gold-l: #E4C987;
  --gold-d: #8A6A1E;   /* on paper, the CV's gold */
  --gold-dd: #6F5414;
  --black: #000;
  --night: #0A0A0B;
  --ok: #3FA374; --ok-d: #1F7A50;
  --warn: #D49A2A; --warn-d: #946410;
  --bad: #D2493B; --bad-d: #A7291E;

  --f-sc: 'Playfair Display SC', 'Playfair Display', Georgia, serif;
  --f-display: 'Playfair Display', Georgia, serif;
  --f-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --f-mono: 'DM Mono', ui-monospace, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(88px, 10vw, 150px);
}

/* three tones */
body, .wt {
  --bg: #FFFFFF; --panel: #FFFFFF; --panel-2: #FAF7F0;
  --ink: #0A0A0A; --ink-2: #3B3730; --mut: #78715F; --dim: #D8D0BF;
  --ln: rgba(10, 10, 10, 0.09); --ln-2: rgba(10, 10, 10, 0.16); --ln-3: rgba(10, 10, 10, 0.3);
  --acc: var(--gold-d); --brk: var(--gold-d); --soft: rgba(138, 106, 30, 0.05);
}
.lt {
  --bg: #F7F3EA; --panel: #FFFFFF; --panel-2: #FBF8F1;
  --ink: #0A0A0A; --ink-2: #3B3730; --mut: #78715F; --dim: #D3CAB6;
  --ln: rgba(10, 10, 10, 0.1); --ln-2: rgba(10, 10, 10, 0.17); --ln-3: rgba(10, 10, 10, 0.3);
  --acc: var(--gold-d); --brk: var(--gold-d); --soft: rgba(138, 106, 30, 0.06);
}
.dk {
  --bg: #000; --panel: #0C0C0D; --panel-2: #141415;
  --ink: #F4EFE4; --ink-2: #C3BCAD; --mut: #8C8678; --dim: #3A3833;
  --ln: rgba(255, 255, 255, 0.1); --ln-2: rgba(255, 255, 255, 0.17); --ln-3: rgba(255, 255, 255, 0.32);
  --acc: var(--gold); --brk: var(--gold); --soft: rgba(201, 162, 75, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #000; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-variant-ligatures: none; background: #fff; color: var(--ink); font: 400 17px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--gold); color: #000; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
h1, h2, h3, h4, .wm, .hero__name, .boot__name, .stairs__list b, .close__h, .eng__name { font-variant-ligatures: none; font-feature-settings: 'liga' 0, 'clig' 0, 'dlig' 0, 'calt' 0; }
p, blockquote, figure, dl, dd, pre { margin: 0; }
em, i { font-style: normal; }
ul, ol { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: 600; }
.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.4; }
.wm { font-family: var(--f-sc); font-weight: 400; letter-spacing: 0.01em; white-space: nowrap; }
.wm b { font-weight: 700; color: var(--acc); }
.sec, .hero, .close { position: relative; background: var(--bg); color: var(--ink); }

/* the CV's gold corner brackets: top-left and bottom-right */
.brk { position: relative; }
.brk::before, .brk::after { content: ''; position: absolute; width: 18px; height: 18px; pointer-events: none; transition: width 0.45s var(--ease-out), height 0.45s var(--ease-out); }
.brk::before { top: -1px; left: -1px; border-top: 2px solid var(--brk); border-left: 2px solid var(--brk); }
.brk::after { right: -1px; bottom: -1px; border-right: 2px solid var(--brk); border-bottom: 2px solid var(--brk); }
a.brk:hover::before, a.brk:hover::after, .prj:hover::before, .prj:hover::after { width: 30px; height: 30px; }

/* ── buttons ────────────────────────────────────────────────────────── */
.btn { position: relative; display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 6px 0 22px; border: 0; border-radius: 3px; font: 600 15px/1 var(--f-body); white-space: nowrap; transition: background 0.25s, color 0.25s, box-shadow 0.25s; }
.btn__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 2px; transition: transform 0.3s var(--ease-out), background 0.25s, color 0.25s; }
.btn__ico svg { width: 15px; height: 15px; }
.btn:hover .btn__ico { transform: translate(2px, -2px); }
.btn--sm { height: 42px; padding-left: 16px; font-size: 14px; gap: 10px; }
.btn--sm .btn__ico { width: 32px; height: 32px; }
.btn--sm:not(:has(.btn__ico)) { padding: 0 18px; }
.btn--gold { color: #000; background: var(--gold); }
.btn--gold:hover { background: var(--gold-l); }
.btn--gold .btn__ico { color: var(--gold); background: #000; }
.wt .btn--gold, .lt .btn--gold { color: #fff; background: #0A0A0A; }
.wt .btn--gold:hover, .lt .btn--gold:hover { background: #2A2722; }
.wt .btn--gold .btn__ico, .lt .btn--gold .btn__ico { color: #000; background: var(--gold); }
.btn--line { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--ln-3); }
.btn--line .btn__ico { background: var(--soft); }
.btn--line:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--ghost { padding: 0 6px; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ln-2); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--acc); color: var(--acc); }
.btn:disabled { opacity: 0.45; cursor: default; }

/* ── boot: the name, then the page ───────────────────────────────────── */
.boot { display: none; }
.js .boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #000; color: #F4EFE4; clip-path: inset(0 0 0 0); transition: clip-path 0.8s var(--ease-io); animation: bootFailsafe 0.01s 4.5s forwards; }
.boot.is-done { clip-path: inset(0 0 100% 0); }
.boot.is-gone { display: none; }
.boot.is-exit { clip-path: inset(0 0 0 0); animation: none; }
.boot.is-enter { clip-path: inset(100% 0 0 0); animation: none; transition: none; }
@keyframes bootFailsafe { to { visibility: hidden; } }
.boot__in { display: grid; gap: 20px; justify-items: center; text-align: center; }
.boot__name { font: 400 clamp(34px, 5vw, 64px)/1 var(--f-sc); letter-spacing: 0.01em; }
.boot__name b { font-weight: 400; color: var(--gold); }
.boot__bar { width: min(320px, 70vw); height: 1px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.boot__bar i { display: block; height: 100%; background: var(--gold); transform: scaleX(var(--p, 0)); transform-origin: left; }
.boot__line { font: 500 13px/1 var(--f-body); color: #8C8678; letter-spacing: 0.02em; }
.boot__line .wm { font-size: 14px; color: #F4EFE4; }
.boot__line .wm b { color: var(--gold); }

/* ── back ───────────────────────────────────────────────────────────── */
.back { position: fixed; z-index: 60; top: clamp(14px, 2.4vw, 24px); left: var(--gutter); height: 46px; padding: 0 18px 0 4px; gap: 10px; font: 500 14px/1 var(--f-body); color: #3B3730; background: #fff; box-shadow: inset 0 0 0 1px rgba(10,10,10,0.18); }
.back .btn__ico { width: 38px; height: 38px; background: #F7F3EA; color: #0A0A0A; }
.back:hover .btn__ico { transform: translateX(-3px); background: #000; color: var(--gold); }
.back .wm { font-size: 15px; color: #0A0A0A; }
.back .wm b { color: var(--gold-d); }
.js .back { opacity: 0; transform: translateY(-12px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.is-live .back, html:not(.boot-pending) .back { opacity: 1; transform: none; }

/* ── section index (wide screens, after the hero) ────────────────────── */
.idx { position: fixed; z-index: 55; top: clamp(14px, 2.4vw, 24px); right: var(--gutter); display: none; height: 46px; padding: 0 6px; align-items: center; gap: 2px; background: #fff; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(10,10,10,0.18); opacity: 0; transform: translateY(-12px); pointer-events: none; transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
@media (min-width: 1240px) { .idx { display: flex; } }
.idx.is-on { opacity: 1; transform: none; pointer-events: auto; }
.idx a { display: flex; gap: 6px; align-items: baseline; height: 34px; padding: 0 10px; align-items: center; border-radius: 2px; font: 500 12.5px/1 var(--f-body); color: #3B3730; transition: background 0.2s, color 0.2s; }
.idx a b { font: 500 10px/1 var(--f-mono); color: #A39A86; }
.idx a:hover { background: #F7F3EA; color: #0A0A0A; }
.idx a.on { background: #0A0A0A; color: #fff; }
.idx a.on b { color: var(--gold); }

/* ── rail ───────────────────────────────────────────────────────────── */
.bus { position: fixed; z-index: 40; right: clamp(16px, 2vw, 30px); top: 50%; transform: translateY(-50%); display: none; opacity: 0; transition: opacity 0.4s; flex-direction: column; align-items: center; gap: 16px; pointer-events: none; mix-blend-mode: difference; }
@media (min-width: 1180px) { .bus { display: flex; } }
.bus.is-on { opacity: 1; }
.bus__track { position: relative; width: 2px; height: 26vh; background: rgba(255,255,255,0.3); overflow: hidden; }
.bus__fill { position: absolute; inset: 0; background: #fff; transform: scaleY(var(--p, 0)); transform-origin: top; }
.bus__label { writing-mode: vertical-rl; display: flex; gap: 10px; color: #fff; font-size: 10px; }

/* ══ HERO: the orbit backdrop, the name, the portrait in a porthole ═════ */
.hero { min-height: 100svh; display: flex; flex-direction: column; padding-top: clamp(88px, 11vh, 120px); overflow: hidden; isolation: isolate; background: #000; }
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: #0B0B0C; }
.hero__poster, .hero__video { position: absolute; top: 0; height: 100%; left: 18%; width: 100%; object-fit: cover; object-position: 50% 50%; transform: scale(1.12); transform-origin: 60% 50%; }
.hero__video { opacity: 0; transition: opacity 1.4s; }
.hero.has-video .hero__video { opacity: 1; }
.hero__veil { position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  linear-gradient(90deg, #000 0%, #000 18%, rgba(0, 0, 0, 0.9) 34%, rgba(0, 0, 0, 0.5) 54%, rgba(0, 0, 0, 0.12) 74%, rgba(0, 0, 0, 0.3) 100%),
  linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 66%, #000 100%); }
.hero__grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-bottom: 12px; }
.hero__copy { min-width: 0; }
.hero__eyebrow { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 7px 14px 7px 7px; margin-bottom: clamp(20px, 2.6vw, 32px); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); background: rgba(0, 0, 0, 0.5); font: 500 13.5px/1.3 var(--f-body); color: var(--ink-2); }
.hero__eyebrow .wm { font-size: 14.5px; color: var(--ink); }
.hero__eyebrow > i { width: 1px; height: 14px; background: rgba(255, 255, 255, 0.22); }
.hero__now { padding: 4px 7px; background: var(--gold); color: #000; border-radius: 1px; font: 600 10.5px/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.hero__name { font: 400 var(--fs, clamp(52px, 8vw, 128px))/0.9 var(--f-sc); letter-spacing: -0.012em; white-space: nowrap; color: #F4EFE4; }
.hero__l { display: block; overflow: hidden; padding-bottom: 0.05em; }
.hero__w { display: inline-block; }
.hero__w--em { color: var(--gold); }
.hero__w .ch { display: inline-block; }
.js .hero__w .ch { transform: translateY(105%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--w, 0ms) + var(--i) * 34ms + 120ms); }
.is-live .hero__w .ch { transform: none; }
.hero__role { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 9px; margin-top: clamp(16px, 2vw, 24px); font: 600 11px/1.3 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-l); }
.hero__role i { width: 4px; height: 4px; transform: rotate(45deg); background: var(--gold); }
.hero__claim { margin-top: clamp(18px, 2.2vw, 28px); font: 400 clamp(26px, 2.5vw, 36px)/1.16 var(--f-display); color: #F4EFE4; }
.hero__claim em { color: var(--gold); font-style: italic; }
.hero__lead { max-width: 54ch; margin-top: 14px; color: #C3BCAD; font-size: clamp(16px, 1.15vw, 18px); }
.hero__lead b { color: #F4EFE4; font-weight: 600; }
.hero__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(24px, 3vw, 34px); }
.hero .btn--line { background: rgba(0, 0, 0, 0.35); }
.js [data-boot] { opacity: 0; transform: translateY(14px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--d, 0.6s); }
.is-live [data-boot] { opacity: 1; transform: none; }

/* the stage: a porthole with a turning bezel; orbits pass behind and in front of him */
.stage { position: relative; justify-self: end; width: min(100%, 620px, 74svh); aspect-ratio: 1 / 1.06; margin: 0; }
.stage__disc { position: absolute; left: 6%; right: 6%; bottom: 3%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2B2824 0%, #171513 58%, #0C0B0A 100%); box-shadow: inset 0 0 0 1px rgba(201, 162, 75, 0.45), 0 40px 80px -40px #000; }
.stage__bezel { position: absolute; left: 1%; right: 1%; bottom: -2%; width: 98%; height: auto; aspect-ratio: 1; overflow: visible; animation: bezel 140s linear infinite; }
.stage__bezel circle { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; }
.stage__bezel circle.in { stroke: rgba(201, 162, 75, 0.5); stroke-dasharray: 2 6; }
.stage__bezel line { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
.stage__bezel line.mj { stroke: var(--gold); stroke-width: 1.6; }
@keyframes bezel { to { transform: rotate(360deg); } }
.stage__back, .stage__front { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stage__back { z-index: 1; }
.stage__front { z-index: 3; }
.stage__img { position: absolute; z-index: 2; left: 50%; bottom: 3%; width: 92%; height: auto; translate: -50% 0; transform: translate3d(var(--px, 0), var(--py, 0), 0);
  -webkit-mask-image: linear-gradient(180deg, #000 64%, rgba(0, 0, 0, 0.55) 84%, transparent 99%), linear-gradient(90deg, #000 80%, transparent 99%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, #000 64%, rgba(0, 0, 0, 0.55) 84%, transparent 99%), linear-gradient(90deg, #000 80%, transparent 99%); mask-composite: intersect;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6)); }
.pchip { position: absolute; z-index: 4; display: grid; gap: 4px; padding: 11px 15px 12px; background: rgba(10, 10, 10, 0.88); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 20px 40px -24px #000; border-radius: 2px; transform: translate3d(var(--px, 0), var(--py, 0), 0); }
.pchip::before { content: ''; position: absolute; left: -1px; top: -1px; width: 12px; height: 12px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.pchip span { display: flex; align-items: center; gap: 7px; color: #A9A293; font: 500 10.5px/1.2 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.pchip b { font: 500 26px/1 var(--f-display); color: #F4EFE4; }
.pchip--a { left: -10%; top: 50%; }
.pchip--b { right: -6%; top: 25%; }
.pchip--b b { color: var(--gold); }
.pchip--c { left: 3%; bottom: 9%; }
.pchip--c b { font: 600 14px/1.2 var(--f-body); color: var(--gold-l); }
.lamp { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.pchip--a { animation: bob 6s ease-in-out infinite; }
.pchip--b { animation: bob 7s ease-in-out -2s infinite; }
@keyframes bob { 50% { translate: 0 -8px; } }
.hud { position: absolute; z-index: 4; width: 20px; height: 20px; border: 0 solid var(--gold); opacity: 0.8; }
.hud--tl { left: 0; top: 0; border-top-width: 2px; border-left-width: 2px; }
.hud--tr { right: 0; top: 0; border-top-width: 2px; border-right-width: 2px; }
.hud--bl { left: 0; bottom: 0; border-bottom-width: 2px; border-left-width: 2px; }
.hud--br { right: 0; bottom: 0; border-bottom-width: 2px; border-right-width: 2px; }
.js .stage__disc, .js .stage__bezel { opacity: 0; scale: 0.94; transition: opacity 1.2s var(--ease-out) 0.2s, scale 1.4s var(--ease-out) 0.2s; }
.js .stage__img { opacity: 0; translate: -50% 40px; transition: opacity 1.4s var(--ease-out) 0.35s, translate 1.6s var(--ease-out) 0.35s, transform 0.6s var(--ease-out); }
.js .pchip, .js .hud { opacity: 0; transition: opacity 0.8s var(--ease-out); }
.js .pchip--a { transition-delay: 1s; } .js .pchip--b { transition-delay: 1.15s; } .js .pchip--c { transition-delay: 1.3s; } .js .hud { transition-delay: 0.8s; }
.is-live .stage__disc, .is-live .stage__bezel { opacity: 1; scale: 1; }
.is-live .stage__img { opacity: 1; translate: -50% 0; }
.is-live .pchip { opacity: 1; }
.is-live .hud { opacity: 0.8; }

/* the foot: a strip of where the work and study happen */
.hero__foot { position: relative; padding: 8px 0 22px; }
.hero__foot-k { margin-bottom: 12px; color: #8C8678; font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.marquee { overflow: hidden; border-top: 1px solid rgba(255, 255, 255, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.1); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee__track span { display: flex; align-items: center; gap: 28px; padding: 14px 0 14px 28px; font: 400 20px/1 var(--f-sc); color: #D8D0BF; white-space: nowrap; }
.marquee__track span::after { content: ''; width: 6px; height: 6px; transform: rotate(45deg); background: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }
.hero__scroll { position: absolute; right: var(--gutter); top: -8px; transform: translateY(-100%); display: flex; align-items: center; gap: 12px; color: #8C8678; font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.hero__scroll i { position: relative; width: 1px; height: 40px; overflow: hidden; background: rgba(255, 255, 255, 0.18); }
.hero__scroll i::after { content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold); animation: fall 2s var(--ease-io) infinite; }
@keyframes fall { to { top: 100%; } }

/* ══ SECTION HEADS ══════════════════════════════════════════════════════ */
.sec { padding: var(--section) 0; }
.sh { max-width: 900px; margin-bottom: clamp(44px, 6vw, 76px); }
.sh--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.sh--row > div { max-width: 820px; }
.sh__ref { display: flex; align-items: center; gap: 12px; color: var(--mut); margin-bottom: 22px; }
.sh__ref b { color: var(--acc); font-weight: 500; }
.sh__ref i { flex: 0 0 64px; height: 1px; background: var(--ln-3); }
.sh__h { font: 400 clamp(36px, 4.8vw, 66px)/1.04 var(--f-sc); letter-spacing: -0.005em; }
.sh__h em { color: var(--acc); }
.sh__sub { margin-top: 20px; max-width: 66ch; color: var(--ink-2); font-size: 18px; }
.sh__link { display: inline-flex; gap: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--acc); color: var(--acc); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 36px; padding: 0 14px; border: 0; border-radius: 2px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--ln-2); font: 500 13px/1 var(--f-body); color: var(--ink-2); transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: #0A0A0A; color: #fff; box-shadow: none; }

/* reveal */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--d, 0s); }
.js .rv.is-in { opacity: 1; transform: none; }

/* ══ 01 PROFILE ═════════════════════════════════════════════════════════ */
.pf__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(36px, 5vw, 84px); align-items: start; }
.pf__main .sh { margin-bottom: clamp(28px, 3vw, 40px); }
.pf__lead { font: 400 clamp(20px, 1.7vw, 24px)/1.5 var(--f-display); color: var(--ink); }
.pf__story { margin-top: 26px; padding-left: 22px; border-left: 2px solid var(--gold-d); font-size: clamp(17px, 1.3vw, 19.5px); line-height: 1.65; color: var(--ink-2); }
.pf__story.is-split .w { color: #C9C1B0; transition: color 0.25s; }
.pf__story.is-split .w.on { color: var(--ink); }
.pf__story.is-split .w.tip { color: var(--gold-d); }
.pf__side { display: grid; gap: 14px; padding-top: 6px; }
.nums { padding: 20px 22px 4px; background: #0A0A0A; color: #F4EFE4; border-radius: 3px; }
.nums__k { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); color: var(--gold); }
.nums__k span + span { color: #8C8678; }
.nums__grid { display: grid; grid-template-columns: 1fr 1fr; }
.num { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 18px 16px 18px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.num:nth-child(even) { padding-left: 18px; padding-right: 0; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.num:nth-last-child(-n+2) { border-bottom: 0; }
.num dd { font: 400 clamp(36px, 3.3vw, 50px)/1 var(--f-display); color: #F4EFE4; font-variant-numeric: lining-nums tabular-nums; }
.num dd small { margin-left: 2px; font-size: 0.55em; color: var(--gold); }
.num dt { max-width: 30ch; color: #A9A293; font-size: 13.5px; line-height: 1.4; }
.facts { padding: 4px 22px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--ln); border-radius: 3px; }
.facts > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 14px; align-items: center; padding: 13px 0; }
.facts > div + div { border-top: 1px solid var(--ln); }
.facts dt { color: var(--mut); font-size: 10px; }
.facts dd { font-size: 15px; line-height: 1.45; }
.facts__orgs { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.facts__orgs img { height: 30px; width: auto; max-width: 74px; object-fit: contain; }

.rules { margin-top: clamp(64px, 8vw, 110px); }
.rules__q { display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; font: 400 clamp(28px, 3.2vw, 44px)/1.15 var(--f-display); }
.rules__q .mono { color: var(--acc); }
.rules__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rule { padding: 26px 26px 28px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--ln); border-radius: 3px; transition: background 0.45s, color 0.45s; }
.rule__ico { width: 60px; height: 60px; fill: none; stroke: var(--gold-d); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; transition: stroke 0.45s; }
.rule__ico > * { stroke-dasharray: 130; stroke-dashoffset: 130; transition: stroke-dashoffset 1.4s var(--ease-out); }
.rules.is-in .rule__ico > * { stroke-dashoffset: 0; }
.rule__n { margin-top: 22px; color: var(--mut); }
.rule__h { margin-top: 8px; font: 400 clamp(23px, 2vw, 28px)/1.15 var(--f-sc); }
.rule__h em { color: var(--acc); }
.rule__p { margin-top: 12px; color: var(--ink-2); font-size: 15.5px; transition: color 0.45s; }
.rule.is-lit { background: #0A0A0A; color: #F4EFE4; }
.rule.is-lit .rule__ico { stroke: var(--gold); }
.rule.is-lit .rule__p { color: #C3BCAD; }
.rule.is-lit .rule__h em, .rule.is-lit .rule__n { color: var(--gold); }
.rules__go { display: inline-flex; gap: 8px; margin-top: 26px; padding-bottom: 3px; border-bottom: 1px solid currentColor; color: var(--acc); font: 500 15px/1.3 var(--f-body); }

/* ══ 02 EXPERIENCE: a timeline you can open ═════════════════════════════ */
.xp__sub { max-width: 46ch; margin-top: 0; font-size: 17px; }
.xp .sh--row > div, .er .sh--row > div { max-width: 600px; }
.tl { --cols: 17; --lab: 260px; --res: 120px; position: relative; padding: 16px 18px 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--ln); border-radius: 3px; }
.tl__head, .tl__role-row, .tl__rows button { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr) var(--res); gap: 18px; align-items: center; }
.tl__scale { position: relative; height: 24px; }
.tl__scale span { position: absolute; top: 0; left: calc(var(--a) / var(--cols) * 100%); height: 24px; padding-left: 6px; border-left: 1px solid var(--ln-3); font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut); white-space: nowrap; }
.tl__track { position: relative; align-self: stretch; min-height: 44px; background-image: repeating-linear-gradient(90deg, var(--ln) 0 1px, transparent 1px calc(100% / var(--cols))); }
.tl__track::after { content: ''; position: absolute; top: 0; bottom: 0; left: calc(16.5 / var(--cols) * 100%); width: 0; border-left: 1px dashed var(--gold-d); }
.tl__role-row { padding: 8px 0 12px; border-bottom: 1px solid var(--ln-2); }
.tl__role-row .tl__track { min-height: 36px; }
.tl__role { position: absolute; top: 50%; left: calc(var(--a) / var(--cols) * 100%); width: calc((var(--b) - var(--a)) / var(--cols) * 100%); height: 28px; margin-top: -14px; display: flex; align-items: center; padding: 0 10px; overflow: hidden; background: #0A0A0A; color: var(--gold); border-radius: 2px; font: 500 12.5px/1 var(--f-body); white-space: nowrap; transform-origin: left; }
.tl__role--past { padding: 0 4px; justify-content: center; background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ln-3); font-size: 11px; }
.tl__lab { display: grid; gap: 3px; padding-left: 10px; text-align: left; }
.tl__lab b { font: 600 15.5px/1.25 var(--f-body); }
.tl__lab small { color: var(--mut); font-size: 12.5px; }
.tl__rows li + li { border-top: 1px solid var(--ln); }
.tl__rows button { width: 100%; padding: 8px 0; border: 0; border-radius: 2px; background: transparent; color: var(--ink); cursor: pointer; transition: background 0.3s, color 0.3s; }
.tl__rows button:hover { background: var(--panel-2); }
.tl__bar { position: absolute; top: 50%; left: calc(var(--a) / var(--cols) * 100%); width: calc((var(--b) - var(--a)) / var(--cols) * 100%); height: 14px; margin-top: -7px; background: #D9CDB0; border-radius: 1px; transform-origin: left; transition: background 0.3s, transform 1.1s var(--ease-out); }
.tl__bar--on::after { content: ''; position: absolute; right: -7px; top: -1px; border-left: 7px solid currentColor; border-top: 8px solid transparent; border-bottom: 8px solid transparent; color: #D9CDB0; transition: color 0.3s; }
.js .tl .tl__bar, .js .tl .tl__role { transform: scaleX(0); }
.js .tl.is-in .tl__bar, .js .tl.is-in .tl__role { transform: scaleX(1); transition: background 0.3s, transform 1.1s var(--ease-out) calc(var(--i, 0) * 90ms + 150ms); }
.tl__res { padding-right: 12px; text-align: right; font: 500 20px/1 var(--f-display); color: var(--gold-d); white-space: nowrap; font-variant-numeric: lining-nums; }
.tl__rows button[aria-selected="true"] { background: #0A0A0A; color: #F4EFE4; }
.tl__rows button[aria-selected="true"] .tl__lab small { color: #A9A293; }
.tl__rows button[aria-selected="true"] .tl__bar { background: var(--gold); }
.tl__rows button[aria-selected="true"] .tl__bar--on::after { color: var(--gold); }
.tl__rows button[aria-selected="true"] .tl__track { background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px calc(100% / var(--cols))); }
.tl__rows button[aria-selected="true"] .tl__res { color: var(--gold); }
.tl__now { display: none; }

.xs { margin-top: 14px; }
.xs__panel { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); background: #fff; box-shadow: inset 0 0 0 1px var(--ln); border-radius: 3px; overflow: hidden; }
.xs__panel + .xs__panel { margin-top: 14px; }
.js .xs__panel { display: none; margin-top: 0; }
.js .xs__panel.on { display: grid; animation: xsIn 0.6s var(--ease-out) both; }
@keyframes xsIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.xs__img { position: relative; min-height: 420px; margin: 0; overflow: hidden; background: #1A1714; }
.xs__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.xs__panel.on .xs__img img { animation: xsImg 1.8s var(--ease-out) both; }
@keyframes xsImg { from { transform: scale(1.07); } to { transform: none; } }
.xs__img figcaption { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #0A0A0A; color: #F4EFE4; border-radius: 2px; }
.xs__img figcaption b { font: 500 clamp(28px, 2.6vw, 38px)/1 var(--f-display); color: var(--gold); white-space: nowrap; }
.xs__img figcaption span { color: #C3BCAD; font-size: 14px; line-height: 1.35; }
.xs__body { padding: clamp(24px, 3vw, 40px); }
.xs__k { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--ink-2); font-size: 14px; }
.xs__k span { padding: 5px 8px; background: #0A0A0A; color: var(--gold); border-radius: 2px; font: 500 10.5px/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.xs__h { margin-top: 14px; font: 400 clamp(28px, 2.8vw, 40px)/1.08 var(--f-sc); }
.xs__star { margin-top: 20px; }
.xs__star li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--ln); }
.xs__star li > span { padding-top: 3px; color: var(--gold-d); font: 500 10.5px/1.5 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.xs__star p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.xs__star b { color: var(--ink); }
.xs__star .xs__r { margin-top: 6px; padding: 14px 16px; background: #0A0A0A; border-top: 0; border-radius: 2px; }
.xs__r > span { color: var(--gold) !important; }
.xs__r p { color: #E0D9CA; }
.xs__r b { color: var(--gold-l); }
.js .xs__panel.on .xs__star li { animation: xsIn 0.6s var(--ease-out) both; }
.js .xs__panel.on .xs__star li:nth-child(2) { animation-delay: 0.08s; }
.js .xs__panel.on .xs__star li:nth-child(3) { animation-delay: 0.16s; }
.js .xs__panel.on .xs__star li:nth-child(4) { animation-delay: 0.24s; }

/* ══ 03 ENGINE ROOM ═════════════════════════════════════════════════════ */
.er { overflow: hidden; isolation: isolate; background: #000; }
.er__stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 30px; border-top: 1px solid var(--ln-2); border-bottom: 1px solid var(--ln); }
.er__stats p { display: grid; gap: 6px; padding: 18px 18px 18px 0; }
.er__stats p + p { padding-left: 18px; border-left: 1px solid var(--ln); }
.er__stats b { font: 400 clamp(28px, 2.8vw, 40px)/1 var(--f-display); color: var(--gold); }
.er__stats span { color: var(--mut); font-size: 14px; }

.eng { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; padding: 18px; background: #0A0A0B; box-shadow: inset 0 0 0 1px var(--ln-2); border-radius: 4px; }
.eng__k { margin: 6px 0 10px; color: var(--gold); font: 600 13px/1.3 var(--f-body); letter-spacing: 0.02em; }
.eng__k:not(:first-child) { margin-top: 22px; }
.eng__list { display: grid; gap: 4px; }
.eng__list button { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center; padding: 9px 10px; text-align: left; border: 0; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1px var(--ln); color: var(--ink-2); font-size: 14px; transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.eng__list button i { font: 500 10px/1 var(--f-mono); color: var(--mut); }
.eng__list button:hover { box-shadow: inset 0 0 0 1px var(--ln-3); color: var(--ink); }
.eng__list button[aria-checked="true"] { background: var(--gold); color: #000; box-shadow: none; }
.eng__list button[aria-checked="true"] i { color: #000; }
.eng__faults { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.flt { display: grid; gap: 3px; padding: 10px; text-align: left; border: 0; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1px var(--ln); transition: background 0.2s, box-shadow 0.2s; }
.flt b { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.flt span { font-size: 12px; line-height: 1.35; color: var(--mut); }
.flt:hover { box-shadow: inset 0 0 0 1px var(--ln-3); }
.flt[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--gold); background: rgba(201, 162, 75, 0.08); }
.flt[aria-pressed="true"] b { color: var(--gold); }
.sw { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 12px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--ln-2); cursor: pointer; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw__t { position: relative; flex: 0 0 44px; height: 24px; border-radius: 2px; background: var(--bad-d); transition: background 0.25s; }
.sw__t i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 1px; transition: transform 0.3s var(--ease-out); }
.sw input:checked + .sw__t { background: var(--ok-d); }
.sw input:checked + .sw__t i { transform: translateX(20px); }
.sw input:focus-visible + .sw__t { outline: 2px solid var(--gold); outline-offset: 2px; }
.sw__l { display: grid; gap: 3px; }
.sw__l b { font-weight: 500; }
.sw__l small { color: var(--mut); font-size: 12.5px; }
.sw.is-off { box-shadow: inset 0 0 0 1px var(--bad); }
.sw.is-off small { color: #F08A7E; }

.eng__main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.eng__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 4px 4px 14px; border-bottom: 1px solid var(--ln); }
.eng__name { font: 400 clamp(22px, 2vw, 28px)/1.15 var(--f-sc); }
.eng__desc { margin-top: 6px; color: var(--ink-2); font-size: 14.5px; max-width: 60ch; }
/* the pipeline: nodes on a line, a packet travels it */
.pipe__wrap { position: relative; padding: 10px 0 6px; --fill: 0; }
.pipe { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); }
.pipe::before, .pipe::after { content: ''; position: absolute; left: 6.25%; top: 13px; height: 2px; }
.pipe::before { right: 6.25%; background: var(--dim); }
.pipe::after { width: calc(87.5% * var(--fill)); background: var(--gold); transition: width 0.45s var(--ease-io); }
.pipe li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; text-align: center; }
.pipe li i { position: relative; width: 28px; height: 28px; border-radius: 50%; background: #0A0A0B; box-shadow: inset 0 0 0 2px var(--dim); transition: background 0.3s, box-shadow 0.3s; }
.pipe li i::after { content: ''; position: absolute; left: 50%; top: 50%; opacity: 0; transition: opacity 0.2s; }
.pipe li b { font-weight: 500; font-size: 13.5px; color: var(--mut); transition: color 0.3s; }
.pipe li.run i { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 5px rgba(201, 162, 75, 0.16); }
.pipe li.run b, .pipe li.ok b, .pipe li.warn b, .pipe li.hold b { color: var(--ink); }
.pipe li.ok i { background: var(--ok); box-shadow: none; }
.pipe li.ok i::after { width: 6px; height: 11px; margin: -7px 0 0 -3px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 1; }
.pipe li.warn i { background: var(--warn); box-shadow: none; }
.pipe li.warn i::after { width: 2px; height: 12px; margin: -6px 0 0 -1px; background: #000; opacity: 1; }
.pipe li.hold i { background: var(--gold); box-shadow: 0 0 0 5px rgba(201, 162, 75, 0.2); }
.pipe li.hold i::after { width: 8px; height: 10px; margin: -5px 0 0 -4px; border-left: 2.5px solid #000; border-right: 2.5px solid #000; opacity: 1; }
.pipe li.bad i { background: var(--bad); box-shadow: none; }
.pipe li.bad i::after { width: 12px; height: 2px; margin: -1px 0 0 -6px; background: #fff; opacity: 1; }
.pipe li.bad b { color: #F08A7E; }
.pipe li.skip { opacity: 0.35; }
.pipe li.skip b { text-decoration: line-through; text-decoration-thickness: 1px; }
.pipe__dot { position: absolute; z-index: 2; top: 18px; left: calc((var(--at, 0) + 0.5) / 8 * 100%); width: 12px; height: 12px; margin-left: -6px; background: #F4EFE4; border-radius: 50%; opacity: 0; transition: left 0.45s var(--ease-io), opacity 0.3s; pointer-events: none; }
.pipe__wrap.is-run .pipe__dot { opacity: 1; }
.gate { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; background: rgba(201, 162, 75, 0.1); box-shadow: inset 0 0 0 1px var(--gold); border-radius: 2px; }
.gate[hidden] { display: none; }
.gate p { display: grid; gap: 4px; }
.gate p span { color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.gate > div { display: flex; gap: 8px; }
/* what happened, in plain words */
.feed { background: #050505; box-shadow: inset 0 0 0 1px var(--ln); border-radius: 3px; }
.feed__h { padding: 11px 16px; border-bottom: 1px solid var(--ln); color: var(--mut); font-size: 13px; font-weight: 500; }
.feed__body { height: 236px; overflow-y: auto; padding: 8px 16px 12px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.feed__body li { display: grid; grid-template-columns: 10px 170px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 5px 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); animation: feedIn 0.35s var(--ease-out) both; }
@keyframes feedIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.feed__body li i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); transform: translateY(-1px); }
.feed__body li b { font-weight: 600; color: var(--ink); }
.feed__body li.ok i, .feed__body li.ghost i { background: var(--ok); }
.feed__body li.warn i { background: var(--warn); }
.feed__body li.hold i { background: var(--gold); }
.feed__body li.bad i { background: var(--bad); }
.feed__body li.bad b, .feed__body li.bad .m { color: #F08A7E; }
.feed__body li.done b { color: var(--gold); }
.feed__body li.reveal { margin-top: 8px; padding: 10px 12px; background: rgba(210, 73, 59, 0.12); box-shadow: inset 2px 0 0 var(--bad); border-radius: 2px; }
.feed__body li.feed__empty { display: block; color: var(--mut); }
.eng__tally { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.eng__tally p { display: grid; gap: 4px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--ln); border-radius: 2px; color: var(--mut); font-size: 12.5px; }
.eng__tally b { font: 400 24px/1 var(--f-display); color: var(--ink); }
.eng__tally .bad b { color: var(--bad); }
.er__fine { margin-top: 16px; color: var(--mut); font-size: 12.5px; }

/* ══ 04 RESULTS ═════════════════════════════════════════════════════════ */
.rs__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.res { display: flex; flex-direction: column; padding: 22px 22px 18px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--ln); border-radius: 2px; transition: background 0.3s, opacity 0.35s, transform 0.35s var(--ease-out); }
.res:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--ln-3); }
.res.is-dim { opacity: 0.22; transform: scale(0.98); }
.res__fig { width: 100%; height: auto; aspect-ratio: 240 / 90; margin-bottom: 18px; overflow: visible; }
.res__n { font: 500 clamp(30px, 2.6vw, 40px)/1 var(--f-display); color: var(--acc); }
.res__t { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; flex: 1; }
.res__c { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--ln); color: var(--acc); font-size: 10px; }
.res__c span { transition: transform 0.3s var(--ease-out); }
.res:hover .res__c span { transform: translateX(4px); }
/* figure marks */
.fg-grid rect { fill: none; stroke: var(--ln-3); stroke-width: 1; transition: fill 0.3s, stroke 0.3s; }
.fg-grid rect.on { fill: var(--gold-d); stroke: var(--gold-d); }
.fg-ax { stroke: var(--ln-3); stroke-width: 1; }
.fg-g { fill: var(--gold-d); }
.fg-gl { stroke: var(--gold-d); stroke-width: 1.5; fill: none; }
.fg-m { fill: var(--dim); }
.fg-ml { stroke: var(--dim); stroke-width: 1.5; fill: none; }
.fg-t { font: 500 9px var(--f-mono); fill: var(--mut); letter-spacing: 0.06em; }
.fg-tg { font: 500 9px var(--f-mono); fill: var(--gold-d); letter-spacing: 0.06em; }
.fg-box { fill: #fff; stroke: var(--ln-3); }
.fg-big { font: 500 19px var(--f-display); fill: var(--ink); font-variant-numeric: tabular-nums; }
.fg-dk { fill: #B9B09C; }
.fg-hand { stroke: var(--gold-d); stroke-width: 1.5; stroke-linecap: round; transform-box: view-box; transform-origin: 45px 45px; }
.is-on .fg-hand { animation: fgSpin 3s linear infinite; }
@keyframes fgSpin { to { transform: rotate(360deg); } }
.fg-flow { opacity: 0; transition: opacity 0.4s 1s; }
.is-on .fg-flow { opacity: 1; }
.fg-drip { opacity: 0; }
.is-on .fg-drip { animation: fgDrip 2.7s cubic-bezier(.45,0,.55,1) infinite; }
.is-on .fg-g.fg-drip { animation-name: fgDripThrough; }
@keyframes fgDrip { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: 1; } 55% { opacity: 0.9; } 70% { transform: translate(calc(var(--dx) * 0.7), 48px); opacity: 0; } 100% { transform: translate(calc(var(--dx) * 0.7), 48px); opacity: 0; } }
@keyframes fgDripThrough { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--dx), 84px); opacity: 0; } }
.fg-pulse { animation: fgPulse 3.9s ease-in-out infinite; }
@keyframes fgPulse { 0%, 100% { opacity: 1; } 12% { opacity: 0.3; } 24% { opacity: 1; } }

/* ══ 05 PROJECTS: tight cards, no dead space ════════════════════════════ */
.pj__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.prj { display: flex; flex-direction: column; padding: clamp(20px, 2vw, 26px); background: var(--panel); box-shadow: inset 0 0 0 1px var(--ln); border-radius: 2px; transition: opacity 0.35s, box-shadow 0.3s; }
.prj--wide, .prj--span { grid-column: 1 / -1; }
.prj.is-dim { display: none; }
.prj.is-hl { box-shadow: inset 0 0 0 2px var(--gold-d); }
.prj__cols { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(22px, 2.6vw, 36px); align-items: stretch; }
.prj__txt { display: flex; flex-direction: column; min-width: 0; }
.prj__head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.prj__no { padding-top: 7px; color: var(--acc); }
.prj__ttl h3 { font: 400 clamp(23px, 2.1vw, 30px)/1.1 var(--f-sc); }
.prj__tag { margin-top: 5px; color: var(--acc); font-size: 15px; line-height: 1.4; }
.prj__meta { margin-top: 12px; color: var(--mut); font-size: 10px; line-height: 1.75; }
.prj__meta span { margin-right: 10px; padding: 2px 6px; background: #0A0A0A; color: var(--gold); border-radius: 2px; }
.prj__b { display: grid; gap: 9px; margin-top: 16px; }
.prj__b li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.prj__b li::before { content: ''; position: absolute; left: 2px; top: 0.55em; width: 7px; height: 7px; border: 1.5px solid var(--gold-d); transform: rotate(45deg); }
.prj__b b { color: var(--ink); }
.prj__why { margin-top: 16px; padding: 2px 0 2px 14px; border-left: 2px solid var(--gold-d); font: 400 16.5px/1.5 var(--f-display); color: var(--ink); }
.prj__links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: auto; padding-top: 18px; }
.prj__links a { display: inline-flex; gap: 6px; padding-bottom: 3px; border-bottom: 1px solid var(--gold-d); color: var(--acc); }
.prj__links a span { transition: transform 0.3s var(--ease-out); }
.prj__links a:hover span { transform: translateX(3px); }
.prj__side { position: relative; overflow: hidden; margin: 0; border-radius: 2px; background: #E9E2D3; min-height: 300px; }
.prj__side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 35%; transition: transform 1.2s var(--ease-out); }
.prj:hover .prj__side img, .prj:hover .prj__thumb img { transform: scale(1.03); }
.prj__side figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font: 500 10px/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.prj__side figcaption span { padding: 6px 8px; background: rgba(10, 10, 10, 0.86); color: #F4EFE4; border-radius: 2px; }
.prj__side figcaption b { margin-left: auto; padding: 6px 10px; background: var(--gold); color: #000; border-radius: 2px; font-weight: 500; }
/* compact rows: image beside text, the image stretches to the card */
.prj--row { flex-direction: row; padding: 0; overflow: hidden; }
.prj__thumb { position: relative; flex: 0 0 40%; min-height: 250px; margin: 0; overflow: hidden; background: #E9E2D3; }
.prj__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 1.2s var(--ease-out); }
.prj--row .prj__txt { flex: 1; padding: 20px 22px; }
.prj--row .prj__ttl h3 { font-size: clamp(21px, 1.8vw, 25px); }
.prj--row .prj__tag { font-size: 14px; }
.prj--row .prj__b { margin-top: 12px; }
.prj--row .prj__b li { font-size: 14.5px; }
.prj--row .prj__links { padding-top: 14px; }
.prj--span .prj__thumb { flex-basis: 30%; }
.prj__thumb--ui { display: flex; align-items: center; padding: 16px; background: #0A0A0A; }
.prj__fill { position: relative; flex: 1 1 0; min-height: 140px; margin: 18px 0 0; overflow: hidden; border-radius: 2px; background: #1A1714; }
.prj__fill img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.pj__all { display: inline-flex; gap: 8px; margin-top: 28px; padding-bottom: 4px; border-bottom: 1px solid var(--acc); color: var(--acc); }

/* the lab: symbolic regression */
.lab { display: grid; gap: 10px; align-content: start; padding: 14px; background: #0A0A0A; color: #F4EFE4; border-radius: 3px; --ln: rgba(255,255,255,0.1); --ln-2: rgba(255,255,255,0.18); --ln-3: rgba(255,255,255,0.32); --ink: #F4EFE4; --mut: #8C8678; --soft: rgba(201,162,75,0.08); --acc: var(--gold); }
.lab__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lab__k { color: var(--gold); font: 600 13px/1.3 var(--f-body); }
.lab__sel { display: flex; flex-wrap: wrap; gap: 4px; }
.lab__sel button { height: 30px; padding: 0 10px; border: 0; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16); color: #C3BCAD; font: 500 12px/1 var(--f-body); transition: background 0.2s, color 0.2s; }
.lab__sel button:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4); }
.lab__sel button[aria-pressed="true"] { background: var(--gold); color: #000; box-shadow: none; }
.lab__plot { position: relative; aspect-ratio: 16 / 7.6; background: #050505; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); border-radius: 2px; cursor: crosshair; }
.lab__plot canvas { width: 100%; height: 100%; }
.lab__hint { position: absolute; left: 12px; top: 10px; color: #8C8678; font-size: 12px; pointer-events: none; }
.lab__legend { position: absolute; right: 12px; top: 10px; display: flex; gap: 12px; color: #8C8678; font-size: 12px; pointer-events: none; }
.lab__legend span { display: flex; align-items: center; gap: 6px; }
.lab__legend i { width: 7px; height: 7px; border-radius: 50%; }
.lab__legend .tr { background: var(--gold); }
.lab__legend .ho { box-shadow: inset 0 0 0 1.5px #F4EFE4; }
.lab__ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lab__noise { display: flex; align-items: center; gap: 10px; margin-right: auto; color: #8C8678; font-size: 13px; }
.lab__noise input { width: 120px; accent-color: var(--gold); }
.lab__noise output { width: 34px; color: #F4EFE4; }
.lab__out { display: grid; gap: 10px; }
.lab__eq { display: grid; gap: 6px; padding: 12px 14px; box-shadow: inset 0 0 0 1px rgba(201,162,75,0.5); border-radius: 2px; }
.lab__eq span { color: var(--gold); font-size: 12px; font-weight: 600; }
.lab__eq b { font: 400 clamp(16px, 1.5vw, 20px)/1.35 var(--f-mono); font-weight: 400; color: #F4EFE4; letter-spacing: 0; word-break: break-word; }
.lab__verdict { min-height: 18px; font-size: 13px; color: #8C8678; }
.lab__verdict.ok { color: var(--ok); }
.lab__verdict.near { color: var(--warn); }
.lab__verdict.miss { color: var(--bad); }
.lab__board { display: grid; gap: 2px; }
.lab__board li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 96px; gap: 10px; align-items: center; padding: 5px 8px; border-radius: 2px; font: 400 13px/1.3 var(--f-body); color: #8C8678; }
.lab__board li > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.lab__board li .f { color: #C3BCAD; }
.lab__board li .bar { height: 4px; background: rgba(255,255,255,0.08); }
.lab__board li .bar i { display: block; height: 100%; background: #5E5A51; width: var(--w, 0%); transition: width 0.5s var(--ease-out); }
.lab__board li.win { background: rgba(201,162,75,0.12); color: #F4EFE4; }
.lab__board li.win .f { color: var(--gold); }
.lab__board li.win .bar i { background: var(--gold); }
.lab__board li.cur .bar i { background: #F4EFE4; }
.lab__fine { color: #6E695E; font-size: 10px; text-transform: none; letter-spacing: 0.02em; }

/* the benchmark */
.bench { display: flex; flex-direction: column; padding: 18px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--ln); border-radius: 3px; }
.bench__tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.bench__tabs button { height: 34px; padding: 0 12px; border: 0; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1px var(--ln-2); font: 500 13px/1 var(--f-body); color: var(--ink-2); }
.bench__tabs button[aria-selected="true"] { background: #0A0A0A; color: #fff; box-shadow: none; }
.bench__rows { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 170px minmax(0, 1fr) 70px; gap: 14px; align-items: center; }
.bar p { display: grid; gap: 2px; }
.bar p b { font-weight: 500; font-size: 15px; }
.bar p span { color: var(--mut); font-size: 12px; }
.bar__t { height: 30px; background: #fff; box-shadow: inset 0 0 0 1px var(--ln); border-radius: 2px; overflow: hidden; }
.bar__t i { display: block; height: 100%; width: var(--w, 0%); background: #B9B09C; transition: width 0.9s var(--ease-out); }
.bar--me .bar__t i { background: var(--gold-d); }
.bar output { font: 500 22px/1 var(--f-display); text-align: right; font-variant-numeric: tabular-nums; }
.bar--me output { color: var(--acc); }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; font: 500 10px/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; padding-top: 16px; border-top: 1px solid var(--ln); font-size: 9.5px; }
.flow span { padding: 6px 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--ln-2); border-radius: 2px; color: var(--ink); }
.flow span:nth-child(5) { background: #0A0A0A; color: var(--gold); box-shadow: none; }
.flow i { width: 14px; height: 1px; background: var(--gold-d); }
.bench__rows { margin-bottom: 22px; }
.bench__fine { margin-top: 12px; color: var(--mut); font-size: 12px; }

/* the funnel */
.fun { display: grid; gap: 10px; align-content: center; padding: 14px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--ln); border-radius: 3px; }
.fun__stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.fun__stages button { display: grid; gap: 4px; padding: 10px 8px; border: 0; text-align: left; border-radius: 2px; background: #fff; box-shadow: inset 0 0 0 1px var(--ln-2); transition: background 0.2s, box-shadow 0.2s, opacity 0.2s; }
.fun__stages button b { font-size: 13px; font-weight: 500; }
.fun__stages button span { font: 400 11px/1 var(--f-mono); color: var(--acc); font-variant-numeric: tabular-nums; }
.fun__stages button small { font: 400 9px/1.2 var(--f-mono); color: var(--mut); letter-spacing: 0.06em; text-transform: uppercase; }
.fun__stages button[aria-pressed="false"] { background: transparent; box-shadow: inset 0 0 0 1px var(--bad); }
.fun__stages button[aria-pressed="false"] b { text-decoration: line-through; color: var(--bad-d); }
.fun__stages button[aria-pressed="false"] small { color: var(--bad-d); }
.fun__stages button:first-child { cursor: default; }
.fun__body { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 10px; }
.fun__body canvas { width: 100%; height: 220px; background: #0A0A0A; border-radius: 2px; }
.fun__rec { display: grid; gap: 4px; align-content: start; font: 400 11px/1.4 var(--f-mono); }
.fun__rec .r { padding: 7px 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--ln); border-radius: 2px; transition: opacity 0.3s, background 0.3s; }
.fun__rec .r small { display: block; color: var(--mut); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.fun__rec .r.x { opacity: 0.4; text-decoration: line-through; }
.fun__rec .r.ok { box-shadow: inset 2px 0 0 var(--gold-d), inset 0 0 0 1px var(--ln); }
.fun__rec .r.bad { box-shadow: inset 2px 0 0 var(--bad), inset 0 0 0 1px var(--ln); }
.fun__out { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 4px; }
.fun__out p { display: grid; gap: 4px; padding: 10px 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--ln); border-radius: 2px; }
.fun__out p > span { color: var(--mut); font-size: 12px; }
.fun__out b { font: 500 22px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.fun__meter { grid-template-columns: 1fr auto; align-items: center; }
.fun__meter > span { grid-column: 1 / -1; }
.fun__meter i { height: 8px; background: var(--ln); border-radius: 1px; overflow: hidden; }
.fun__meter i b { display: block; height: 100%; width: var(--w, 100%); background: var(--gold-d); transition: width 0.6s var(--ease-out), background 0.3s; }
.fun__meter.is-low i b { background: var(--bad); }
.fun__meter output { font: 500 16px/1 var(--f-display); }
.fun__fine { color: var(--mut); font-size: 12px; }

/* the schematic */
.pcb { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 196px; gap: 8px; align-content: center; padding: 10px; background: #0A0A0A; border-radius: 3px; }
.pcb__svg { width: 100%; height: auto; aspect-ratio: 520 / 250; background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1px); background-size: 20px 20px; border-radius: 2px; touch-action: none; }
.pcb__svg .wire { fill: none; stroke: var(--gold); stroke-width: 1.6; }
.pcb__svg .wire.hot { stroke: #F4EFE4; }
.pcb__svg .cmp { cursor: grab; }
.pcb__svg .cmp:active { cursor: grabbing; }
.pcb__svg .cmp rect.body { fill: #141415; stroke: #8C8678; stroke-width: 1.2; }
.pcb__svg .cmp.sel rect.body { stroke: var(--gold); }
.pcb__svg .cmp text { font: 500 10px var(--f-mono); fill: #F4EFE4; letter-spacing: 0.04em; pointer-events: none; }
.pcb__svg .cmp .pin { fill: var(--gold); }
.pcb__svg .cmp .sym { stroke: #C3BCAD; stroke-width: 1.2; fill: none; pointer-events: none; }
.pcb__json { padding: 10px; overflow: hidden; background: #050505; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); border-radius: 2px; color: #8C8678; font-size: 10px; line-height: 1.5; text-transform: none; letter-spacing: 0; white-space: pre; }
.pcb__json .k { color: #C3BCAD; }
.pcb__json .v { color: var(--gold); }
.pcb__json .hot { color: #fff; background: rgba(201,162,75,0.25); }
.pcb__hint { grid-column: 1 / -1; color: #8C8678; font-size: 12px; }

/* the access levels */
.roles { width: 100%; }
.roles__tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.roles__tabs button { height: 32px; padding: 0 14px; border: 0; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); font: 500 13px/1 var(--f-body); color: #C3BCAD; }
.roles__tabs button[aria-selected="true"] { background: var(--gold); color: #000; box-shadow: none; }
.roles__list { display: grid; gap: 4px; }
.roles__list li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: #141415; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); border-radius: 2px; color: #F4EFE4; font-size: 13px; line-height: 1.3; transition: opacity 0.3s; }
.roles__list li.no { opacity: 0.35; }
.roles__list li.no span:first-child { text-decoration: line-through; text-decoration-thickness: 1px; }
.roles__list .pg { display: flex; align-items: center; gap: 8px; font: 400 11px/1 var(--f-mono); color: #A9A293; }
.roles__list .pg i { width: 56px; height: 4px; background: rgba(255,255,255,0.12); }
.roles__list .pg i b { display: block; height: 100%; width: var(--w); background: var(--gold); }
.roles__list .lock { font: 500 9.5px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #F08A7E; }

/* ══ 06 EDUCATION ═══════════════════════════════════════════════════════ */
.rec { overflow: hidden; isolation: isolate; }
.rec__media { position: absolute; inset: 0 0 auto; height: 100vh; z-index: -1; }
.rec__poster, .rec__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.rec__video { opacity: 0; transition: opacity 1.2s; }
.rec.has-video .rec__video { opacity: 0.55; }
.rec__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.85), rgba(0,0,0,0.35) 70%), linear-gradient(0deg, #000 0%, rgba(0,0,0,0) 40%); }
.stairs { position: relative; margin: 10px 0 clamp(56px, 7vw, 90px); }
.stairs__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stairs__svg .st { fill: none; stroke: var(--gold); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.stairs__svg .gap { stroke: var(--gold-l); stroke-dasharray: 3 4; stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.stairs__list { --rise: clamp(34px, 4.2vw, 56px); position: relative; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--rise) * 5 + 150px); }
.stairs__list li { align-self: end; display: grid; gap: 4px; align-content: end; padding: 0 14px calc(var(--s) * var(--rise) + 16px) 14px; }
.stairs__list li .mono { color: var(--gold); }
.stairs__list li b { font: 400 clamp(17px, 1.6vw, 22px)/1.15 var(--f-sc); }
.stairs__list li span { color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
.js .stairs__list li { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: calc(var(--s) * 0.18s + 0.3s); }
.js .stairs.is-in .stairs__list li { opacity: 1; transform: none; }

.edu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ed { display: flex; flex-direction: column; padding: 20px 22px 24px; background: #0C0C0D; box-shadow: inset 0 0 0 1px var(--ln); border-radius: 2px; }
.ed__img { margin: -20px -22px 18px; aspect-ratio: 16 / 9; overflow: hidden; }
.ed__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.ed__badge { display: flex; align-items: baseline; gap: 12px; }
.ed__badge b { font: 500 34px/1 var(--f-display); color: var(--gold); }
.ed__badge span { color: var(--ink-2); }
.ed__when { margin-top: 12px; color: var(--mut); }
.ed h3 { margin-top: 10px; font: 400 24px/1.15 var(--f-sc); }
.ed__what { margin-top: 6px; color: var(--gold-l); font-size: 14.5px; }
.ed__line { margin-top: 12px; color: var(--ink-2); font-size: 15px; }

.hon { margin-top: clamp(56px, 7vw, 96px); }
.hon__head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; color: var(--gold); }
.hon__head i { flex: 1; height: 1px; background: var(--ln-2); }
.hon__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.hon__list li { display: grid; grid-template-columns: 90px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--ln); }
.hon__list li > b { font: 500 30px/1 var(--f-display); color: var(--gold); }
.hon__list h4 { font: 500 17px/1.3 var(--f-body); }
.hon__list p { margin-top: 4px; color: var(--ink-2); font-size: 14.5px; }
.orgs { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 30px; }
.orgs > .mono { color: var(--mut); }
.orgs ul { display: flex; flex-wrap: wrap; gap: 8px; }
.orgs li { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px 0 10px; background: #F7F3EA; border-radius: 2px; color: #0A0A0A; font-size: 13px; }
.orgs img { height: 34px; width: auto; max-width: 74px; object-fit: contain; }

/* ══ 07 SKILLS ══════════════════════════════════════════════════════════ */
.stack { border-top: 1px solid var(--ln-2); }
.sr { display: grid; grid-template-columns: 210px minmax(0, 1fr) 100px; gap: 24px; align-items: baseline; width: 100%; padding: 20px 12px; border: 0; border-bottom: 1px solid var(--ln); background: transparent; text-align: left; transition: background 0.25s; }
.sr:hover { background: var(--panel-2); }
.sr[aria-pressed="true"] { background: #0A0A0A; color: #F4EFE4; }
.sr__k { color: var(--acc); }
.sr[aria-pressed="true"] .sr__k { color: var(--gold); }
.sr__v { font-size: 16.5px; color: var(--ink); line-height: 1.5; }
.sr[aria-pressed="true"] .sr__v { color: #F4EFE4; }
.sr__u { color: var(--mut); text-align: right; font-size: 10px; }
.stack__used { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; min-height: 40px; }
.stack__used a { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--gold-d); border-radius: 2px; font-size: 14px; }
.stack__used a b { font: 500 10px/1 var(--f-mono); color: var(--acc); }
.stack__used .mono { align-self: center; color: var(--mut); }

/* ══ 08 ALSO SHIPPED ════════════════════════════════════════════════════ */
.al__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.also { display: flex; flex-direction: column; padding: 18px 20px 20px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--ln); border-radius: 2px; }
.also figure { margin: -18px -20px 18px; aspect-ratio: 16 / 9; overflow: hidden; }
.also figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.also:hover figure img { transform: scale(1.04); }
.also__n { font: 500 34px/1 var(--f-display); color: var(--acc); }
.also h3 { margin-top: 10px; font: 400 21px/1.2 var(--f-sc); }
.also > p:not(.also__n) { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; flex: 1; }
.also__go { margin-top: 16px; color: var(--acc); }
.also--lex { background: #0A0A0A; color: #F4EFE4; --ln: rgba(255,255,255,0.12); --ink-2: #C3BCAD; --acc: var(--gold); --brk: var(--gold); }
.also--lex > p:not(.also__n) { flex: 0; }
.also--lex .also__go { margin-top: auto; padding-top: 16px; }
.lex { display: grid; gap: 6px; margin-top: 16px; }
.lex .mono { color: #6E695E; font-size: 9.5px; }
.lex input { height: 40px; padding: 0 10px; border: 0; border-radius: 2px; background: #050505; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); font: 400 14px var(--f-mono); color: #F4EFE4; }
.lex input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--gold); }
.lex__out { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; min-height: 60px; align-content: flex-start; text-transform: none; letter-spacing: 0; }
.lex__out span { display: inline-grid; gap: 1px; padding: 4px 6px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); font-size: 12px; color: #F4EFE4; }
.lex__out span small { font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: #8C8678; }
.lex__out span.kw { box-shadow: inset 0 0 0 1px var(--gold); }
.lex__out span.kw small { color: var(--gold); }
.lex__out span.num small { color: var(--ok); }
.lex__out span.op small { color: #C3BCAD; }
.lex__out span.err { box-shadow: inset 0 0 0 1px var(--bad); }
.lex__out span.err small { color: var(--bad); }

/* ══ 09 REFERENCES ══════════════════════════════════════════════════════ */
.wd__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ref { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 30px 28px 26px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--ln); border-radius: 2px; }
.ref blockquote { position: relative; padding-top: 34px; font: 400 18px/1.55 var(--f-display); color: var(--ink); }
.ref blockquote::before { content: '\201C'; position: absolute; left: -2px; top: -12px; font: 400 64px/1 var(--f-display); color: var(--gold-d); }
.ref figcaption { display: flex; gap: 14px; align-items: center; padding-top: 18px; border-top: 1px solid var(--ln); }
.ref figcaption img { width: 56px; height: 56px; border-radius: 2px; object-fit: cover; filter: grayscale(1); }
.ref figcaption span { display: grid; gap: 3px; }
.ref figcaption b { font-weight: 600; font-size: 15px; }
.ref figcaption small { color: var(--mut); font-size: 13px; line-height: 1.35; }
.ref figcaption a { margin-top: 4px; color: var(--acc); font-size: 10px; }

/* ══ 10 BEYOND ══════════════════════════════════════════════════════════ */
.by__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: clamp(28px, 4vw, 60px); align-items: start; }
.vol { display: grid; gap: 10px; }
.vol li { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: center; padding: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--ln); border-radius: 2px; }
.vol img { width: 110px; height: 110px; object-fit: cover; border-radius: 1px; }
.vol .mono { color: var(--mut); }
.vol h3 { margin-top: 6px; font: 500 17px/1.3 var(--f-body); }
.vol li p:last-child { margin-top: 4px; color: var(--ink-2); font-size: 14.5px; }
.out { padding: 26px 24px; background: #0A0A0A; color: #F4EFE4; border-radius: 2px; --brk: var(--gold); }
.out__k { color: var(--gold); }
.out__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 18px; background: rgba(255,255,255,0.1); }
.out__grid p { display: grid; gap: 6px; padding: 16px 14px; background: #0A0A0A; }
.out__grid b { font: 500 30px/1 var(--f-display); color: var(--gold); }
.out__grid span { color: #8C8678; font-size: 13px; }
.out__p { margin-top: 20px; color: #C3BCAD; font: 400 17px/1.55 var(--f-display); }

/* ══ CLOSE ══════════════════════════════════════════════════════════════ */
.close { padding: var(--section) 0 32px; overflow: hidden; isolation: isolate; }
.close__photo { position: absolute; right: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))); bottom: 0; z-index: -2; width: auto; height: min(78%, 640px); aspect-ratio: 1; object-fit: contain; object-position: 100% 100%; opacity: 0.6; }
.close::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #000 0%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,0) 80%); }
.close__h { margin-top: 10px; max-width: 16ch; font: 400 clamp(44px, 6.4vw, 96px)/1 var(--f-sc); }
.close__h em { color: var(--gold); }
.close__sub { margin-top: 24px; max-width: 58ch; color: var(--ink-2); font-size: 18px; }
.links { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(44px, 6vw, 72px); border-top: 1px solid var(--ln-2); }
.links a { position: relative; display: grid; gap: 10px; padding: 26px 40px 26px 0; border-bottom: 1px solid var(--ln); transition: color 0.25s; }
.links a + a { padding-left: 24px; border-left: 1px solid var(--ln); }
.links a .mono { color: var(--mut); }
.links a b { font: 400 clamp(20px, 1.8vw, 26px)/1.2 var(--f-display); font-weight: 400; }
.links a i { position: absolute; right: 14px; top: 26px; color: var(--gold); transition: transform 0.3s var(--ease-out); }
.links a:hover b { color: var(--gold); }
.links a:hover i { transform: translate(3px, -3px); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: clamp(60px, 8vw, 110px); padding-top: 22px; border-top: 1px solid var(--ln); color: var(--mut); }
.foot__brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.foot__brand .wm { font-size: 20px; }

/* ══ RESPONSIVE ═════════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  .rs__grid { grid-template-columns: repeat(2, 1fr); }
  .al__grid { grid-template-columns: repeat(2, 1fr); }
  .eng { grid-template-columns: 1fr; }
  .eng__list { grid-template-columns: repeat(3, 1fr); }
  .prj__cols { grid-template-columns: 1fr; }
  .prj__side { min-height: 280px; }
  .tl { --lab: 210px; --res: 96px; }
  .pf__grid { grid-template-columns: 1fr; }
  .pf__side { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: start; }
  .xs__panel { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
}
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; gap: 8px; padding-bottom: 28px; }
  .hero__poster, .hero__video { left: 0; transform: none; }
  .hero__veil { background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.82) 40%, rgba(0, 0, 0, 0.6) 70%, #000 100%); }
  .stage { justify-self: center; width: min(100%, 520px); }
  .hero__scroll { display: none; }
  .pf__side { grid-template-columns: 1fr; }
  .rules__list { grid-template-columns: 1fr; }
  .tl { --lab: 1fr; padding: 10px 12px 6px; }
  .tl__head, .tl__role-row .tl__lab { display: none; }
  .tl__role-row { grid-template-columns: 1fr; padding-top: 4px; }
  .tl__rows button { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lab res" "trk trk"; gap: 6px 12px; padding: 10px 0; }
  .tl__rows .tl__lab { grid-area: lab; }
  .tl__rows .tl__res { grid-area: res; }
  .tl__rows .tl__track { grid-area: trk; min-height: 20px; margin: 0 10px; }
  .tl__bar { height: 10px; margin-top: -5px; }
  .tl__role--past { font-size: 0; }
  .xs__panel { grid-template-columns: 1fr; }
  .xs__img { min-height: 0; aspect-ratio: 16 / 9; }
  .pj__list { grid-template-columns: 1fr; }
  .prj--row { flex-direction: column; }
  .prj__thumb { flex-basis: auto; min-height: 0; aspect-ratio: 16 / 8; }
  .prj__thumb--ui { aspect-ratio: auto; }
  .edu, .wd__grid { grid-template-columns: 1fr; }
  .by__grid { grid-template-columns: 1fr; }
  .hon__list { grid-template-columns: 1fr; }
  .er__stats { grid-template-columns: repeat(2, 1fr); }
  .er__stats p:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--ln); }
  .er__stats p:nth-child(4) { border-top: 1px solid var(--ln); }
  .links { grid-template-columns: 1fr; }
  .links a + a { padding-left: 0; border-left: 0; }
  .stairs__list { grid-template-columns: 1fr; height: auto; gap: 0; }
  .stairs__list li { padding: 14px 0 14px 18px; border-left: 1px solid var(--gold); }
  .stairs__svg { display: none; }
  .sr { grid-template-columns: 1fr; gap: 6px; }
  .sr__u { text-align: left; }
  .close__photo { opacity: 0.28; height: 60%; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .back { height: 42px; }
  .back__txt { font-size: 13px; }
  .hero__role i:nth-of-type(2) { display: none; }
  .hero__eyebrow > i, .hero__eyebrow > span:last-child { display: none; }
  .pchip { padding: 8px 11px 9px; }
  .pchip b { font-size: 20px; }
  .pchip span { font-size: 9px; }
  .pchip--a { display: none; }
  .pchip--b { right: 0; top: 58%; }
  .pchip--c { left: 2%; bottom: 6%; }
  .pchip--c b { font-size: 12px; }
  .marquee__track span { font-size: 16px; gap: 20px; padding-left: 20px; }
  .nums { padding: 16px 16px 2px; }
  .num { padding-right: 10px; }
  .num:nth-child(even) { padding-left: 12px; }
  .num dt { font-size: 12.5px; }
  .facts { padding: 2px 16px; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
  .rs__grid, .al__grid { grid-template-columns: 1fr; }
  .xs__star li { grid-template-columns: 1fr; gap: 4px; }
  .eng { padding: 12px; }
  .eng__list { grid-template-columns: 1fr 1fr; }
  .eng__top { flex-direction: column; }
  .pipe li b { font-size: 10.5px; }
  .pipe li i { width: 22px; height: 22px; }
  .pipe::before, .pipe::after { top: 10px; }
  .pipe__dot { top: 15px; width: 10px; height: 10px; margin-left: -5px; }
  .eng__tally { grid-template-columns: repeat(3, 1fr); }
  .feed__body li { grid-template-columns: 10px minmax(0, 1fr); }
  .feed__body li .m { grid-column: 2; }
  .prj__head { grid-template-columns: auto 1fr; }
  .bar { grid-template-columns: 1fr 56px; }
  .bar p { grid-column: 1 / -1; }
  .fun__stages { grid-template-columns: repeat(3, 1fr); }
  .fun__body { grid-template-columns: 1fr; }
  .fun__rec { grid-template-columns: 1fr 1fr; }
  .fun__out { grid-template-columns: 1fr 1fr; }
  .fun__meter { grid-column: 1 / -1; }
  .pcb { grid-template-columns: 1fr; }
  .prj__side { min-height: 220px; }
  .pcb__json { max-height: 120px; }
  .lab__board li { grid-template-columns: 100px minmax(0, 1fr) 80px; }
  .vol li { grid-template-columns: 80px 1fr; gap: 14px; }
  .vol img { width: 80px; height: 80px; }
  .hon__list li { grid-template-columns: 70px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
