/* =============================================================
   SATYAM · main stylesheet
   0 type · 1 tokens · 2 base · 3 shared · 4 header · 5 hero · 6 intro
   7 machine · 8 section heads · 9 work sheets · 10 figures
   11 research · 12 experience · 13 about · 14 archive
   15 contact · 16 responsive · 17 motion, print, fallbacks
   ============================================================= */

/* ── 0. TYPE ─────────────────────────────────────────────────
   Self-hosted, latin only. The three variable faces are trimmed to the
   weight and width ranges this stylesheet actually uses.             */

@font-face { font-family: 'Hubot Sans'; src: url(../assets/fonts/hubot-sans.woff2) format('woff2');
  font-weight: 600 800; font-stretch: 75% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: 'Mona Sans'; src: url(../assets/fonts/mona-sans.woff2) format('woff2');
  font-weight: 400 800; font-stretch: 100% 118%; font-style: normal; font-display: swap; }
@font-face { font-family: 'Martian Mono'; src: url(../assets/fonts/martian-mono.woff2) format('woff2');
  font-weight: 400 600; font-stretch: 87.5% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: 'STIX Two Text'; src: url(../assets/fonts/stix-two-text.woff2) format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'STIX Two Text'; src: url(../assets/fonts/stix-two-text-greek.woff2) format('woff2');
  font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'STIX Two Text'; src: url(../assets/fonts/stix-two-text-italic.woff2) format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'STIX Two Text'; src: url(../assets/fonts/stix-two-text-italic-greek.woff2) format('woff2');
  font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }

/* ── 1. TOKENS ─────────────────────────────────────────────── */

:root {
  /* paper and ink: a drawing office, not a dashboard */
  --paper:   #EFEDE7;
  --paper-2: #E7E4DC;
  --paper-3: #DDD9CF;
  --sheet:   #F6F5F1;
  --ink:     #131312;
  --ink-2:   #47443F;
  --ink-3:   #6D6962;      /* 4.6:1 on paper; smallest text uses this or darker */
  --ink-4:   #A3A097;      /* rules and decoration only */
  --ink-faint: #8C887F;    /* 3:1 on paper: the floor for large text that has not inked in yet */
  --rule:    rgba(19, 19, 18, .13);
  --rule-2:  rgba(19, 19, 18, .26);

  /* the red is sampled from the race suit in the portrait */
  --red:     #E30B1F;
  --red-ink: #BF0819;      /* red text below 24px: 5.4:1 */
  --red-fill: #D50A1D;     /* behind white text, both themes: 5.3:1 */
  --amber:   #D99400;

  /* tyre compounds, used only to mean what the legend says */
  --tyre-s: #E30B1F;
  --tyre-m: #F0C21A;
  --tyre-h: #FCFBF7;
  --tyre-i: #2E9E4A;
  --tyre-w: #1E6CD4;

  --shadow: 0 1px 0 rgba(19, 19, 18, .05), 0 22px 48px -30px rgba(19, 19, 18, .45);
  --dots: rgba(19, 19, 18, .11);

  --f-display: 'Hubot Sans', 'Mona Sans', ui-sans-serif, system-ui, sans-serif;
  --f-text:    'Mona Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono:    'Martian Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --f-serif:   'STIX Two Text', 'Times New Roman', Times, serif;

  /* one scale, used everywhere. The floor is 13px for labels and 15px for
     anything you read as a sentence, on every screen */
  --t-xs:   clamp(.8125rem, .78rem + .12vw, .875rem);
  --t-sm:   clamp(.9375rem, .9rem + .16vw, 1.0625rem);
  --t-base: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --t-md:   clamp(1.1875rem, 1.06rem + .5vw, 1.5rem);
  --t-lg:   clamp(1.5rem, 1.2rem + 1.1vw, 2.25rem);
  --t-xl:   clamp(1.875rem, 1.3rem + 2.4vw, 3.5rem);
  --t-2xl:  clamp(2.75rem, 1.4rem + 5.6vw, 7rem);
  --t-3xl:  clamp(3.5rem, 1.2rem + 9.6vw, 11.5rem);

  --m: clamp(20px, 4vw, 64px);            /* page margin */
  --g: clamp(16px, 2vw, 32px);            /* gutter */
  --maxw: 1720px;
  --hdr: 64px;
  --sec: clamp(104px, 15vh, 200px);       /* section padding */

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io:  cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper:   #0F0F0E;
  --paper-2: #171716;
  --paper-3: #20201E;
  --sheet:   #141413;
  --ink:     #EDEBE6;
  --ink-2:   #B6B2A9;
  --ink-3:   #8E8A81;
  --ink-4:   #55524C;
  --ink-faint: #66625C;
  --rule:    rgba(237, 235, 230, .12);
  --rule-2:  rgba(237, 235, 230, .24);
  --red:     #FF2B3B;
  --red-ink: #FF5562;
  --amber:   #F0AE2C;
  --tyre-h:  #E9E7E1;
  --shadow: 0 1px 0 rgba(0, 0, 0, .5), 0 26px 50px -28px rgba(0, 0, 0, .9);
  --dots: rgba(237, 235, 230, .09);
  color-scheme: dark;
}

/* ── 2. BASE ───────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
* { margin: 0; padding: 0; }

html {
  background: var(--paper);
  color: var(--ink);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.anchor { height: 0; scroll-margin-top: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

body {
  font-family: var(--f-text);
  font-size: var(--t-base);
  line-height: 1.55;
  font-weight: 400;
  font-kerning: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--paper);
  min-height: 100vh;
  overflow-x: clip;
  transition: background-color .5s var(--ease-io), color .5s var(--ease-io);
}

img, svg, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-weight: inherit; font-size: inherit; text-wrap: balance; }
p { text-wrap: pretty; }
sup { font-size: .62em; line-height: 0; vertical-align: .55em; }
mark { background: none; color: inherit; }
table { border-collapse: collapse; }

::selection { background: var(--red-fill); color: #fff; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 1px;
}

/* theme switch: ui.js draws a circular reveal, so drop the default cross-fade */
html.vt-theme::view-transition-old(root),
html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.vt-theme body { transition: none; }       /* the new snapshot should already be in its final colours */
[tabindex="-1"]:focus { outline: none; }      /* landing spots for in-page links, not controls */

.skip {
  position: fixed; left: var(--m); top: 10px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: var(--paper);
  font-size: var(--t-sm); font-weight: 600;
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip:focus-visible { transform: none; }

/* ── 3. SHARED ─────────────────────────────────────────────── */

.gr { font-family: var(--f-serif); font-style: italic; }
/* digits inside Hubot headings: Mona's plain zero at the same width and weight */
.dg { font-family: var(--f-text); font-weight: 800; letter-spacing: -.01em; }

/* links: the underline draws in from the left and leaves to the right */
.lnk {
  position: relative;
  display: inline-flex; align-items: baseline; gap: .3em;
  font-weight: 550;
  color: var(--ink);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 1px;
  transition: background-size .45s var(--ease-out), color .25s;
}
.lnk:hover { color: var(--red-ink); background-size: 0 1px; background-position: 100% 100%; }
.lnk-sm { font-size: var(--t-sm); }
.lnk-quiet { background-size: 0 1px; background-position: 100% 100%; }
.lnk-quiet:hover { background-size: 100% 1px; background-position: 0 100%; }

.ico-ext {
  width: .72em; height: .72em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: square;
  transform: translateY(.04em);
  transition: transform .35s var(--ease-out);
}
a:hover > .ico-ext { transform: translate(.12em, -.08em); }

.sub-title {
  font-family: var(--f-display);
  font-stretch: 110%;
  font-weight: 750;
  font-size: var(--t-lg);
  line-height: 1.05;
  letter-spacing: -.012em;
}

/* SplitText line masks */
.split-line { padding-bottom: .04em; margin-bottom: -.04em; }

/* ── 4. HEADER ─────────────────────────────────────────────── */

.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--hdr);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--m);
  border-bottom: 1px solid transparent;
  transition: transform .6s var(--ease-out), background-color .4s, border-color .4s;
}
.hdr.is-solid { background: var(--paper); border-bottom-color: var(--rule); }
.hdr.is-hidden { transform: translateY(-101%); }
body.menu-open .hdr { transform: none; background: transparent; border-bottom-color: transparent; }

.hdr-mark { display: inline-flex; align-items: center; gap: 10px; }
.hdr-name {
  font-family: var(--f-display); font-weight: 800; font-stretch: 118%;
  font-size: 1.3125rem; letter-spacing: -.01em; line-height: 1;
}
.hdr-num {
  font-family: var(--f-text); font-weight: 800; font-stretch: 110%;
  font-size: .875rem; line-height: 1;
  color: #fff; background: var(--red-fill);
  padding: 4px 5px 3px;
  border-radius: 2px;
  transition: transform .4s var(--ease-out);
}
.hdr-mark:hover .hdr-num { transform: translateX(3px); }

.hdr-nav { position: relative; display: flex; gap: clamp(16px, 2.2vw, 36px); }
.hdr-nav a {
  position: relative; padding: 8px 0;
  font-size: 1rem; font-weight: 500; color: var(--ink-2);
  transition: color .25s;
}
.hdr-nav a:hover, .hdr-nav a.is-on { color: var(--ink); }
.hdr-nav::after {                        /* one indicator that travels between links */
  content: ''; position: absolute; left: 0; bottom: 2px; height: 2px;
  width: var(--nw, 0px); transform: translateX(var(--nx, 0px));
  background: var(--red);
  transition: transform .55s var(--ease-out), width .55s var(--ease-out), opacity .3s;
  opacity: var(--no, 0);
}

.hdr-side { display: flex; align-items: center; gap: 18px; }
.theme-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 500; color: var(--ink-2);
  padding: 8px 0;
  transition: color .25s;
}
.theme-btn:hover { color: var(--ink); }
.theme-ico {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transition: transform .6s var(--ease-out);
}
[data-theme="dark"] .theme-ico { transform: rotate(180deg); }
.menu-btn { display: none; font-size: 1rem; font-weight: 600; padding: 10px 0; }

.hdr-rail { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.hdr-rail i {
  display: block; height: 100%; width: 100%;
  background: var(--red);
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
}

/* mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--paper);
  padding: calc(var(--hdr) + 32px) var(--m) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu[hidden] { display: none; }
.menu-nav { display: flex; flex-direction: column; }
.menu-nav a {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--f-display); font-weight: 800; font-stretch: 112%;
  font-size: clamp(2.5rem, 11vw, 4.5rem); line-height: 1.04; letter-spacing: -.02em;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
}
.mn-i { font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 400; color: var(--red-ink); transform: translateY(-1.4em); }
.menu-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--t-sm); color: var(--ink-2); }
.menu-foot a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ── 5. HERO ───────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100svh; min-height: 640px; max-height: 1180px;
  max-width: calc(var(--maxw) + 2 * var(--m)); margin-inline: auto;   /* ultra-wide: same measure as every section */
  padding: calc(var(--hdr) + 14px) var(--m) 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto 1fr auto;
  column-gap: var(--g);
  overflow: clip;
  isolation: isolate;
  /* the masthead's final size, straight from the column width: "SATYAM" in Hubot Sans at
     its final width is this many column-widths tall (measured from the font). The portrait,
     the start lights and the masthead's own box are laid out from it, so nothing moves while
     the name launches; motion.js only animates the name inside that box */
  container-type: inline-size;
  --hn-k: .18078;
  --hn-end: calc(100cqw * var(--hn-k));
}
@media (max-width: 860px) { .hero { --hn-k: .21699; } }
@media (max-width: 599px) { .hero { --hn-k: .27962; } }

.hero-meta {
  grid-column: 1 / -1; grid-row: 1;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  font-size: var(--t-sm); line-height: 1.45; color: var(--ink-2);
}
.hero-where { text-align: right; font-variant-numeric: tabular-nums; }
.clock { color: var(--ink); font-weight: 550; }
.hero-tz { color: var(--ink-3); }

.hero-stage { display: contents; }

/* the masthead: fitted to the column (JS refines it to the pixel as --hn-fs), wdth axis animated */
.hero-name {
  grid-column: 1 / -1; grid-row: 2;
  position: relative; z-index: 1;
  margin-top: clamp(4px, 1.4vh, 18px);
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: var(--hn-wd, 125%);
  font-size: var(--hn-fs, var(--hn-end));
  height: calc(var(--hn-end) * .79);
  line-height: .74;
  letter-spacing: -.035em;
  white-space: nowrap;
  user-select: none;
}
.hn { display: inline-flex; padding-top: .05em; }
.hn-ch { display: inline-block; will-change: transform; }

.hero-portrait {
  grid-column: 6 / 12; grid-row: 2 / 5;
  position: relative; z-index: 2;
  align-self: end; justify-self: center;
  height: calc(100% - var(--hn-end) * .38);
  aspect-ratio: 900 / 1191;
  pointer-events: none;
}
.hero-portrait img {
  width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%;
  filter: drop-shadow(0 30px 40px rgba(19, 19, 18, .08));
}
[data-theme="dark"] .hero-portrait img { filter: none; }

.hero-plate {
  grid-column: 11 / -1; grid-row: 3;
  align-self: center; justify-self: end;
  position: relative; z-index: 3;
  display: inline-flex; align-items: stretch;
  background: var(--ink); color: var(--paper);
  font-family: var(--f-display); font-weight: 800; line-height: 1;
}
.hp-bar { width: 6px; background: var(--red); }
.hp-code { padding: 10px 12px 9px; font-stretch: 120%; font-size: 1.125rem; letter-spacing: .02em; }
.hp-num {
  padding: 10px 10px 9px; font-size: 1.125rem;
  font-family: var(--f-text); font-weight: 800; font-stretch: 115%;
  background: var(--paper-3); color: var(--ink);
}

.hero-lede {
  grid-column: 1 / 6; grid-row: 3;
  align-self: end;
  max-width: 30ch;
  margin-bottom: clamp(20px, 3.6vh, 40px);
  font-size: var(--t-md); line-height: 1.38; font-weight: 450;
  color: var(--ink);
}

.hero-facts {
  grid-column: 1 / 6; grid-row: 4;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--g);
  padding-bottom: clamp(20px, 3.4vh, 36px);
}
.hf {
  display: grid; align-content: start; gap: 3px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--rule-2);
}
.hf-k { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .01em; }
.hf-v { font-family: var(--f-display); font-stretch: 110%; font-weight: 700; font-size: var(--t-md); line-height: 1.15; }
.hf-d { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.4; }

/* five start lights, used once by the intro, sitting where the name will land */
.lights {
  position: absolute; z-index: 4;
  top: calc(var(--hdr) + 14px + var(--hn-end) * .38); left: 50%;
  display: flex; gap: clamp(10px, 1.2vw, 16px); transform: translate(-50%, -50%);
  pointer-events: none; opacity: 0;
}
.lights i {
  width: clamp(16px, 1.6vw, 24px); aspect-ratio: 1; border-radius: 50%;
  background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--rule-2);
  transition: background-color .06s;
}
.lights i.on { background: var(--red); box-shadow: none; }

/* ── 6. INTRO STATEMENT ────────────────────────────────────── */

.intro { padding: var(--sec) var(--m); }
.intro-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
}
.intro-k {
  grid-column: 1 / 3; padding-top: .7em;
  font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3);
}
.intro-text {
  grid-column: 3 / 12;
  font-family: var(--f-display); font-stretch: 100%; font-weight: 600;
  font-size: var(--t-xl); line-height: 1.12; letter-spacing: -.018em;
  text-wrap: pretty;
}
/* each word inks in from a grey that still reads (3:1, it is large text) to full ink */
.intro-text .word { display: inline-block; color: color-mix(in srgb, var(--ink) calc(var(--k, 1) * 100%), var(--ink-faint)); }

/* ── 7. MACHINE INTERLUDE ──────────────────────────────────── */

.machine { position: relative; height: 320vh; }
.machine-stage {
  position: sticky; top: 0;
  height: 100svh; overflow: clip;
  border-block: 1px solid var(--rule);
  background: var(--paper);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
.machine-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.machine-fallback {
  position: absolute; left: 63%; top: 56%; width: min(56vw, 900px);
  transform: translate(-50%, -50%);
  opacity: 0; pointer-events: none;
}
/* no WebGL: a still of the same drawing, and no long scroll to scrub through */
.no-webgl .machine-fallback { opacity: 1; }
.no-webgl .machine { height: auto; }
.no-webgl .machine-stage { position: relative; height: min(100svh, 820px); }
.no-webgl .machine-scan, .no-webgl .machine-meter, .no-webgl .machine-cap-live { display: none; }
.machine-cap-still { display: none; }
.no-webgl .machine-cap-still { display: block; }
[data-theme="dark"] .machine-fallback { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }

.machine-scan {
  position: absolute; top: 0; bottom: 0; left: var(--scan, 0%);
  width: 0; border-left: 1.5px solid var(--red);
  pointer-events: none; opacity: 0;
}
.machine-scan span {
  position: absolute; top: calc(var(--hdr) + 18vh);
  font-family: var(--f-mono); font-size: var(--t-xs); white-space: nowrap;
  padding: 4px 8px;
}
.ms-l { right: 10px; color: #fff; background: var(--red-fill); }
.ms-r { left: 10px; color: var(--ink-2); }

.machine-copy {
  position: absolute; left: var(--m); top: calc(var(--hdr) + 8vh);
  max-width: min(44ch, 40vw);
}
.machine-line {
  font-family: var(--f-display); font-weight: 800; font-stretch: 118%;
  font-size: var(--t-2xl); line-height: .92; letter-spacing: -.035em;
}
.machine-note { margin-top: 18px; max-width: 34ch; color: var(--ink-2); font-size: var(--t-base); }
.machine-cap {
  position: absolute; left: var(--m); bottom: 28px; max-width: 58ch;
  font-size: var(--t-sm); color: var(--ink-3); line-height: 1.45;
}
.machine-meter {
  position: absolute; right: var(--m); bottom: 28px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.machine-meter i { width: 120px; height: 2px; background: var(--rule-2); position: relative; }
.machine-meter b { position: absolute; inset: 0; background: var(--red); transform: scaleX(var(--mp, 0)); transform-origin: 0 50%; }

/* ── 8. SECTION HEADS ──────────────────────────────────────── */

.work, .research, .experience, .about, .archive {
  padding: var(--sec) var(--m) 0;
}
.work > *, .research > *, .experience > *, .about > *, .archive > * {
  max-width: var(--maxw); margin-inline: auto;
}

.sec-row {
  position: relative;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-top: 12px;
  font-size: var(--t-sm);
}
.sec-row::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: currentColor;
  transform: scaleX(var(--rw, 1)); transform-origin: 0 50%;
}
.sec-label { font-weight: 600; }
.sec-aside { color: var(--ink-3); font-family: var(--f-mono); font-size: var(--t-xs); }

.sec-main {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
  align-items: end;
  padding: clamp(24px, 5vh, 56px) 0 clamp(40px, 8vh, 96px);
}
.sec-title {
  grid-column: 1 / -1;
  font-family: var(--f-display); font-weight: 800; font-stretch: var(--wd, 125%);
  font-size: var(--t-3xl); line-height: .8; letter-spacing: -.045em;
  margin-left: -.04em;
}
.sec-intro {
  grid-column: 8 / -1;
  margin-top: clamp(22px, 4vh, 44px);
  font-size: var(--t-md); line-height: 1.4; color: var(--ink-2);
  max-width: 36ch;
}
.tw { white-space: nowrap; }
/* short titles leave room for the intro on the same line */
.sec-main.is-short .sec-title { grid-column: 1 / 8; }
.sec-main.is-short .sec-intro { grid-column: 8 / -1; grid-row: 1; margin-top: 0; padding-bottom: .4em; }

/* ── 9. WORK: DRAWING SHEETS ───────────────────────────────── */

.sheets { position: relative; padding-bottom: 8vh; }
.sheet {
  position: sticky; top: calc(var(--hdr) + 14px);
  height: calc(100svh - var(--hdr) - 28px); max-height: 940px; min-height: 620px;
  margin-bottom: 28px;
}
.sheet-in {
  position: relative; height: 100%;
  display: grid; grid-template-rows: auto 1fr auto;
  background: var(--sheet);
  border: 1px solid var(--rule-2);
  box-shadow: var(--shadow);
  transform-origin: 50% 0;
  overflow: hidden;
}
.sheet-in::after {                        /* dims a sheet as the next one covers it */
  content: ''; position: absolute; inset: 0; background: var(--paper);
  opacity: var(--dim, 0); pointer-events: none;
}

.sheet-top {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 0 22px;
  padding: 14px clamp(16px, 2vw, 28px);
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-sm);
}
.sheet-n { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--red-ink); }
.sheet-area { color: var(--ink-2); }
.sheet-status {
  justify-self: start;
  font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-2);
  padding: 3px 8px; border: 1px solid var(--rule-2); border-radius: 99px;
}
.sheet-links { display: flex; gap: 18px; }

.sheet-body {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
  padding: clamp(18px, 3vh, 36px) clamp(16px, 2vw, 28px);
  min-height: 0;
}
.sheet-text { grid-column: 1 / 6; display: flex; flex-direction: column; min-height: 0; }
.sheet-title {
  font-family: var(--f-display); font-weight: 800; font-stretch: 118%;
  font-size: var(--t-xl); line-height: .95; letter-spacing: -.03em;
}
.sheet-line {
  margin-top: 14px;
  font-size: var(--t-md); line-height: 1.32; font-weight: 450;
}
.sheet-desc { margin-top: 14px; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.6; max-width: 56ch; }
.sheet-points { margin-top: 14px; display: grid; gap: 6px; font-size: var(--t-sm); }
.sheet-points li { position: relative; padding-left: 18px; }
.sheet-points li::before {
  content: ''; position: absolute; left: 0; top: .72em; width: 9px; height: 1px; background: var(--red);
}

.metrics { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 0; }
.metric {
  flex: 1 1 0; min-width: 120px;
  display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px;
  padding: 12px 16px 0 0; margin-right: 16px;
  border-top: 1px solid var(--rule-2);
}
.metric dt { font-size: var(--t-xs); color: var(--ink-3); line-height: 1.35; }
.metric dd { display: flex; align-items: baseline; gap: 4px; }
.m-v {
  font-family: var(--f-mono); font-weight: 400; font-stretch: 87.5%;
  font-size: clamp(1.6rem, 1.1rem + 1.5vw, 2.5rem); line-height: 1; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.m-u { font-family: var(--f-mono); font-size: var(--t-sm); color: var(--red-ink); }

.sheet-fig { grid-column: 6 / -1; display: flex; flex-direction: column; min-height: 0; }
.sheet-fig .fig-plate { flex: 1; min-height: 0; }
.sheet-fig .fig-svg { height: 100%; }

.tblock {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr) minmax(0, .7fr) minmax(0, 1.25fr);
  border-top: 1px solid var(--rule-2);
}
.tb {
  display: grid; gap: 2px;
  padding: 9px clamp(16px, 2vw, 28px) 11px;
  border-left: 1px solid var(--rule);
  min-width: 0;
}
.tb:first-child { border-left: 0; }
.tb span { font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.tb b { font-weight: 500; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 10. FIGURES ───────────────────────────────────────────── */

/* a figure is a plate (the drawing), a readout line and a control strip */
.fig { display: flex; flex-direction: column; }
.fig-plate {
  position: relative;
  display: flex; flex-direction: column;
  background-color: var(--paper-2);
  border: 1px solid var(--rule);
}
.fig-stage {
  position: relative; flex: 1; min-height: 0;
  display: grid; place-items: center;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  padding: clamp(6px, 1.6vw, 22px);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 16px 16px;
  background-position: 8px 8px;
  outline: none;
  touch-action: manipulation;
}
.fig-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--red); }
/* until figkit mounts it, a plate holds its drawing's shape so nothing jumps */
.fig-plate:empty { aspect-ratio: var(--ar, 3 / 2); }

.fig figcaption {
  margin-top: 12px;
  font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2);
  max-width: 72ch;
}
.fig-n { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--red-ink); margin-right: 10px; }

/* readout: what the mechanism is doing, or the part being inspected */
.fig-read {
  display: flex; align-items: baseline; gap: 10px;
  min-height: calc(1.45em * 2 + 20px);
  padding: 10px clamp(12px, 1.4vw, 18px);
  border-top: 1px solid var(--rule);
  background: var(--sheet);
  font-size: var(--t-sm); line-height: 1.45; color: var(--ink-2);
}
.fig-read b { color: var(--ink); font-weight: 650; white-space: nowrap; }
.fig-read .fr-t { min-width: 0; }
.fr-n {
  flex: none; align-self: center;
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--red);
  font: 600 var(--t-xs)/1 var(--f-mono); color: var(--red-ink);
}
.fr-live {
  flex: none; align-self: center;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  animation: fr-blink 1.6s steps(1) infinite;
}
.fig:not(.is-running) .fr-live { animation: none; background: var(--ink-4); }
@keyframes fr-blink { 50% { opacity: .25; } }

/* the control strip */
.fig-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 10px clamp(12px, 1.4vw, 18px);
  border-top: 1px solid var(--rule);
  background: var(--sheet);
}
.fig-ctl { display: contents; }
.fig-hint {
  margin-left: auto;
  font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3);
}
.fk-btn, .fk-sg, .fk-sb, .fk-sel select {
  font: 500 var(--t-xs)/1 var(--f-text);
  font-size: max(13px, var(--t-xs));
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  transition: background-color .15s, border-color .15s, color .15s;
}
.fk-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 12px;
  white-space: nowrap;
}
.fk-ico { font-family: var(--f-mono); font-size: 1.05em; line-height: 1; color: var(--red-ink); }
.fk-btn:disabled { color: var(--ink-3); border-color: var(--rule); cursor: default; }
.fk-btn:disabled .fk-ico { color: inherit; }
.fk-primary:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.fk-primary:not(:disabled) .fk-ico { color: inherit; }
@media (hover: hover) {
  .fk-btn:not(:disabled):hover, .fk-sg:hover, .fk-sb:hover { border-color: var(--ink); }
  .fk-primary:not(:disabled):hover { background: var(--red-fill); border-color: var(--red-fill); color: #fff; }
}
.fk-btn:active:not(:disabled), .fk-sg:active, .fk-sb:active { transform: translateY(1px); }

/* play / pause: two bars that fold into a triangle */
.fk-play { padding: 0 12px 0 11px; }
.fk-pp {
  width: 10px; height: 12px; flex: none;
  background: linear-gradient(90deg, currentColor 0 3px, transparent 3px 7px, currentColor 7px);
  transition: clip-path .2s var(--ease-out);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.fk-play.is-paused .fk-pp { background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.fk-pl { min-width: 3.1em; }

/* stepper, select, segmented */
.fk-step, .fk-sel { display: inline-flex; align-items: center; gap: 6px; }
.fk-sl { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); }
.fk-sb { width: 32px; height: 36px; font-size: 16px; }
.fk-sv {
  min-width: 4.4ch; height: 36px; padding: 0 6px;
  display: inline-grid; place-items: center;
  font: 500 var(--t-xs)/1 var(--f-mono); font-size: max(13px, var(--t-xs));
  border-block: 1px solid var(--rule-2);
  cursor: ew-resize; user-select: none; touch-action: none;
  font-variant-numeric: tabular-nums;
}
.fk-sv.is-drag, .fk-sv:focus-visible { color: var(--red-ink); }
.fk-step .fk-sb:first-of-type { margin-right: -6px; }
.fk-step .fk-sb:last-of-type { margin-left: -6px; }
.fk-sel select { height: 36px; padding: 0 28px 0 10px; font-family: var(--f-mono); appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.fk-seg { display: inline-flex; flex-wrap: wrap; row-gap: 6px; }
.fk-sg { height: 36px; padding: 0 11px; font-family: var(--f-mono); margin-left: -1px; border-radius: 0; }
.fk-sg:first-child { margin-left: 0; border-radius: 2px 0 0 2px; }
.fk-sg:last-child { border-radius: 0 2px 2px 0; }
.fk-sg.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); position: relative; z-index: 1; }
.fk-chip { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); }
.fk-chip b { color: var(--ink); font-weight: 500; }

@media (pointer: coarse) {
  .fk-btn, .fk-sg, .fk-sel select, .fk-sv { height: 44px; }
  .fk-sb { width: 40px; height: 44px; }
  .fig-hint { flex-basis: 100%; margin-left: 0; }
}

/* ---- inside the drawing ---- */
.fig-svg { display: block; width: 100%; height: auto; max-height: 100%; overflow: visible; }
/* blank until it scrolls into view and draws itself */
.fig-svg.is-pre .f-draw:not(.f-dash) { stroke-dasharray: 0 100000; }
.fig-svg.is-pre :is(text, .f-dash, .f-soft, .f-qr, .f-bit, .f-cell, .f-rule, .f-slot, .f-dot, .f-junction, .f-road, .f-pt, .f-ci, .f-head, .f-ship, .f-tier, .f-bar, .f-mark, .f-chip, .f-packet):not([data-nodraw] *) { opacity: 0; }
.fig-svg text { fill: var(--ink); }
.fig-svg .f-part text { transition: fill .3s; }
.fig-svg .f-label { font: 500 14px/1 var(--f-text); }
.fig-svg .f-mono  { font: 400 12.5px/1 var(--f-mono); font-stretch: 87.5%; fill: var(--ink-2); }
.fig-svg .f-tiny  { font-size: 11.5px; }
.fig-svg .f-note  { font: 400 13px/1 var(--f-text); fill: var(--ink-3); }
.fig-svg .f-kicker { font: 600 12px/1 var(--f-mono); font-stretch: 87.5%; fill: var(--red-ink); letter-spacing: .06em; text-transform: uppercase; }
.fig-svg .f-num   { font: 500 15px/1 var(--f-mono); font-stretch: 87.5%; fill: var(--ink); }
.fig-svg .f-num-sm { font-size: 13px; }
.fig-svg .f-big   { font: 500 22px/1 var(--f-mono); font-stretch: 87.5%; fill: var(--ink); letter-spacing: -.02em; }
.fig-svg .f-greek { font-family: var(--f-serif); font-style: italic; font-size: 1.15em; }
.fig-svg .f-sub { font-size: .75em; }
.fig-svg .f-red-text { fill: var(--red-ink); }
/* the phone drawings are about 0.9 scale on screen, so their type is set larger */
.fig-svg[data-l="tall"] .f-label { font-size: 15.5px; }
.fig-svg[data-l="tall"] .f-mono { font-size: 14.2px; }
.fig-svg[data-l="tall"] .f-tiny { font-size: 13.6px; }
.fig-svg[data-l="tall"] .f-note { font-size: 14.5px; }
.fig-svg[data-l="tall"] .f-kicker { font-size: 13.6px; }
.fig-svg[data-l="tall"] .f-num { font-size: 16.5px; }
.fig-svg[data-l="tall"] .f-num-sm { font-size: 14.5px; }
.fig-svg[data-l="tall"] .f-bitnum { font-size: 13.6px; }
.fig-svg[data-l="tall"] .f-badge-t { font-size: 13px; }

.fig-svg .f-box { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.15; transition: stroke .3s, fill .3s, stroke-width .2s; }
.fig-svg .f-box-soft { fill: var(--paper-3); }
.fig-svg .f-box-red { stroke: var(--red); stroke-width: 1.6; }
.fig-svg .f-box-ink { fill: var(--ink); }
.fig-svg .f-box-ink ~ text { fill: var(--paper); }
.fig-svg .f-tray { fill: color-mix(in srgb, var(--red) 5%, var(--sheet)); stroke: var(--red); stroke-dasharray: 3 3; }
.fig-svg .f-frame { fill: none; stroke: var(--ink-4); stroke-width: 1; }
.fig-svg .f-dash { stroke-dasharray: 4 4; }
.fig-svg .f-line { fill: none; stroke: var(--ink); stroke-width: 1.15; transition: stroke .2s; }
.fig-svg .f-thin { fill: none; stroke: var(--ink-3); stroke-width: .9; }
.fig-svg .f-red { stroke: var(--red); }
.fig-svg .f-ah { fill: var(--ink); }
.fig-svg .f-ah-red { fill: var(--red); }
.fig-svg .f-axis { stroke: var(--ink); stroke-width: 1; }
.fig-svg .f-grid { stroke: var(--rule-2); stroke-width: .8; stroke-dasharray: 2 3; }
.fig-svg .f-dot, .fig-svg .f-junction { fill: var(--ink); }
.fig-svg .f-chip { fill: var(--paper-3); stroke: var(--ink); stroke-width: 1; }
.fig-svg .f-check { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fig-svg .f-head { fill: var(--red); }
.fig-svg .f-hit { fill: transparent; stroke: none; }
.fig-svg .f-pulse { fill: var(--red); }
.fig-svg .f-badge { fill: var(--red-fill); }
.fig-svg .f-badge-t { font: 600 12px/1 var(--f-text); fill: #fff; }
.fig-svg .f-bar { fill: var(--ink); }
.fig-svg .f-bar-red { fill: var(--red); }
.fig-svg .f-on-bar { fill: #fff; }

/* inspecting: the part and its connections stay, everything else steps back */
.fig-svg .f-part { cursor: pointer; }
.fig-svg .f-part, .fig-svg [data-rel] { transition: opacity .2s; }
.fig-svg.is-inspecting .f-part:not(.is-hl),
.fig-svg.is-inspecting [data-rel]:not(.is-hl) { opacity: .3; }
.fig-svg .f-part.is-hl .f-box, .fig-svg .f-part.is-hl.f-box { stroke: var(--red); stroke-width: 2; }
.fig-svg [data-rel].is-hl { stroke: var(--red); }
.fig-svg .f-part.is-flash .f-box { stroke: var(--red); stroke-width: 2.2; }
.fig-svg .f-part.is-waiting .f-box { stroke: var(--red); stroke-dasharray: 5 3; animation: f-march .9s linear infinite; }
@keyframes f-march { to { stroke-dashoffset: -16; } }
.f-balloon { pointer-events: none; }
.f-balloon .fb-line { stroke: var(--red); stroke-width: 1.2; }
.f-balloon .fb-dot { fill: var(--red); }
.f-balloon .fb-head circle { fill: var(--sheet); stroke: var(--red); stroke-width: 1.6; }
.f-balloon .fb-head text { font: 600 12px/1 var(--f-mono); fill: var(--red-ink); }
.fig-svg[data-l="tall"] .f-balloon .fb-head text { font-size: 13px; }

/* CareerOS */
.fig-svg .f-packet { fill: var(--ink); }
.fig-svg .f-packet.is-bad { fill: var(--red); }
.fig-svg .f-gate { stroke: var(--red); stroke-width: 3.2; stroke-linecap: round; }
.fig-svg .f-post { fill: var(--red); }

/* SecondAsk */
.fig-svg .f-rule { fill: var(--paper-3); stroke: var(--ink-4); stroke-width: .6; cursor: pointer; }
.fig-svg .f-rule.is-ok { fill: var(--ink); stroke: var(--ink); }
.fig-svg .f-rule.is-bad { fill: var(--red); stroke: var(--red); }
.fig-svg .sa-brk { fill: none; stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 2.5 1.5; pointer-events: none; }
.fig-svg .sa-act.is-best .f-box { stroke-width: 2.2; }
.fig-svg .sa-act.is-bad .f-box, .fig-svg .sa-actbox.is-bad .f-box { stroke: var(--red); fill: color-mix(in srgb, var(--red) 10%, var(--sheet)); }
.fig-svg .sa-act.is-go .f-box, .fig-svg .sa-actbox.is-go .f-box { fill: var(--ink); }
.fig-svg .sa-act.is-go text, .fig-svg .sa-actbox.is-go text { fill: var(--paper); }
.fig-svg .f-dim { fill: none; stroke: var(--ink); stroke-width: 1; }

/* CodeForge */
.fig-svg .f-slot { fill: none; stroke: var(--ink-4); stroke-width: 1; transition: fill .15s, stroke .15s; }
.fig-svg .f-slot.is-full { fill: var(--ink); stroke: var(--ink); }
.fig-svg .cf-w { transition: fill .15s, stroke .15s; }
.fig-svg .cf-w.is-busy { fill: var(--red); stroke: var(--red); }
.fig-svg .cf-w.is-busy + text { fill: #fff; }
.fig-svg .f-sandbox { stroke-dasharray: 5 3; fill: var(--paper-3); }
.fig-svg .is-running > .f-sandbox { stroke: var(--red); animation: f-march .9s linear infinite; }
.fig-svg .f-cell { fill: var(--sheet); stroke: var(--rule-2); stroke-width: 1; transition: fill .2s, stroke .2s; }
.fig-svg .f-cell.is-in { stroke: var(--ink); }
.fig-svg .f-cell.is-pick { fill: var(--paper-3); }
.fig-svg .f-cell.is-min { fill: var(--red); stroke: var(--red); }
.fig-svg .f-cellnum { font-size: 13px; fill: var(--ink); }
.fig-svg[data-l="tall"] .f-cellnum { font-size: 14.5px; }
.fig-svg .f-cellnum.is-light { fill: #fff; }
.fig-svg .f-window { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.fig-svg .cf-span { fill: color-mix(in srgb, var(--ink) 8%, transparent); }
.fig-svg .cf-kgram { stroke: var(--red); stroke-width: 2.5; }
.fig-svg .cf-ch { font-size: 15px; fill: var(--ink-3); transition: fill .2s; }
.fig-svg .cf-ch.is-in { fill: var(--ink); }

/* SynchroPulse */
.fig-svg .f-road { stroke: var(--ink-3); stroke-linecap: round; transition: stroke .35s; }
.fig-svg .f-road-k1 { stroke: var(--amber); }
.fig-svg .f-road-k2 { stroke: var(--red); }
.fig-svg .f-road-key { stroke-width: 4; stroke-linecap: round; }
.fig-svg .f-road-key.f-road-k0 { stroke: var(--ink-3); }
.fig-svg .f-crew { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.6; }
.fig-svg .f-crew-dot { fill: var(--ink); }
.fig-svg .f-barr { fill: url(#synchropulse-stripe); stroke: var(--ink); stroke-width: 1; }
.fig-svg .f-stripe-a { fill: var(--red); }
.fig-svg .f-stripe-b { fill: var(--sheet); }
.fig-svg .sp-hit { cursor: ew-resize; touch-action: none; }

/* CampusFind */
.fig-svg .cf-otp { fill: var(--sheet); stroke: var(--rule-2); stroke-width: 1; }
.fig-svg .cf-dig { font-size: 14px; fill: var(--ink); }
.fig-svg .f-qr { fill: var(--ink); }
.fig-svg .f-scan { stroke: var(--red); stroke-width: 2.4; }
.fig-svg .is-now .f-box, .fig-svg .is-now > circle { stroke: var(--red); stroke-width: 2; }
.fig-svg .cf-done.is-go .f-box { fill: var(--ink); stroke: var(--ink); }
.fig-svg .cf-done.is-go text { fill: var(--paper); }

/* RISC-V */
.fig-svg .f-asm { font: 500 22px/1 var(--f-mono); fill: var(--red-ink); }
.fig-svg .f-asm-args { fill: var(--ink); }
.fig-svg .rv-t-op { cursor: pointer; }
.fig-svg .rv-t-imm { cursor: ew-resize; text-decoration: underline dotted; text-underline-offset: 4px; }
.fig-svg .f-bit { fill: var(--sheet); stroke: var(--rule-2); stroke-width: 1; }
.fig-svg .f-bit.is-one { fill: var(--ink); stroke: var(--ink); }
.fig-svg .f-bit.is-zero { fill: var(--paper-3); }
.fig-svg .f-bitnum { font-size: 12.5px; fill: var(--ink-3); pointer-events: none; }
.fig-svg .f-bit.is-one + .f-bitnum { fill: var(--paper); }
.fig-svg .f-hex { font: 500 28px/1 var(--f-mono); fill: var(--ink); letter-spacing: -.02em; }

/* PGIP and its results */
.fig-svg .f-tier { stroke: none; }
.fig-svg .f-tier-sat { fill: color-mix(in srgb, var(--ink) 34%, var(--paper-2)); }
.fig-svg .f-tier-mid { fill: var(--paper-3); }
.fig-svg .f-tier-res { fill: var(--red); fill-opacity: .85; }
.fig-svg .pg-hit { cursor: grab; touch-action: none; }
.fig-svg .pg-route { stroke: var(--ink-4); stroke-width: 1.2; stroke-dasharray: 3 3; transition: stroke .25s, stroke-width .25s; }
.fig-svg .pg-route.is-on { stroke: var(--ink); stroke-width: 1.8; stroke-dasharray: none; }
.fig-svg .pg-r-res.is-on { stroke: var(--red); }
.fig-svg .is-target .f-box { stroke-width: 2.4; }
.fig-svg [data-part="baseline"].is-target .f-box { fill: var(--ink); }
.fig-svg [data-part="baseline"].is-target text { fill: var(--paper); }
.fig-svg [data-part="stage2"].is-target .f-box { fill: color-mix(in srgb, var(--red) 14%, var(--sheet)); }
.fig-svg .f-ci { stroke: var(--ink); stroke-width: 1.6; }
.fig-svg .f-ci.is-red { stroke: var(--red); }
.fig-svg .f-pt { fill: var(--ink); }
.fig-svg .f-pt-red { fill: var(--red); }
.fig-svg .pr-seg-t { fill: var(--ink); }
.fig-svg .pg-mid { fill: var(--ink-2); }
.fig-svg .pr-seg-t.is-light { fill: #fff; }

/* quant drawings */
.fig-svg .f-curve { fill: none; stroke: var(--red); stroke-width: 1.4; stroke-dasharray: 3 3; }
.fig-svg .f-uni { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 6 4; }
.fig-svg .f-coast { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.fig-svg .f-fence { fill: color-mix(in srgb, var(--red) 6%, transparent); stroke: var(--red); stroke-width: 1.1; }
.fig-svg .f-ship { fill: var(--ink-3); }
.fig-svg .f-ship-in { fill: var(--ink); }

/* compact figures (quant cards): no strip; the readout shows only while inspecting */
.fig-compact .fig-stage { padding: 10px 12px; }
.fig-compact .fig-read {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  min-height: 0; font-size: var(--t-xs); line-height: 1.4;
  transform: translateY(100%); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease-out);
  box-shadow: 0 -1px 0 var(--rule);
}
.fig-compact .fig-read.is-part { transform: none; opacity: 1; }
.fig-compact .fig-read .fr-n { width: 20px; height: 20px; font-size: 11px; }
.fig-compact .fig-plate { overflow: hidden; }
.fk-corner {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  height: 30px; padding: 0 9px; gap: 0;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
}
.fk-corner .fk-pl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); min-width: 0; }
@media (pointer: coarse) { .fk-corner { height: 40px; padding: 0 13px; } }

/* ── 10b. CROSS-REFERENCES, STAMPS, ROLLING NUMBERS ─────────── */

/* a figure waiting to be drawn: its description, in the shape it will take */
.fig-plate.is-pending { aspect-ratio: var(--ar, 3 / 2); display: grid; place-items: center; padding: 24px; }
.fig-alt { max-width: 52ch; font-size: var(--t-sm); line-height: 1.5; color: var(--ink-3); }

/* words in the text that point at a part of the figure */
.xref {
  color: inherit;
  text-decoration: underline dotted var(--red);
  text-decoration-thickness: 1.5px; text-underline-offset: .22em;
  border-radius: 1px;
  transition: background-color .2s, color .2s;
}
.xref:hover, .xref.is-on { color: var(--ink); background-color: color-mix(in srgb, var(--red) 11%, transparent); text-decoration-style: solid; }

/* approval stamp, inked into its own cell of the title block */
.tb-stamp { position: relative; overflow: visible; }
.tb .stamp {
  position: absolute; right: clamp(10px, 1.2vw, 18px); top: 15px; z-index: 2;
  overflow: visible; white-space: nowrap;
  pointer-events: none; transform: rotate(-7deg); transform-origin: 50% 60%;
  font-weight: 600; color: var(--red-ink);
}
.stamp span {
  display: inline-block;
  padding: 7px 11px 6px;
  border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: 2px;
  font: 600 13px/1 var(--f-mono); letter-spacing: .09em; text-transform: uppercase;
  background: color-mix(in srgb, var(--sheet) 70%, transparent);
  /* a little uneven, like a real stamp */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='70'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 2.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='70'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 2.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] .stamp span { background: color-mix(in srgb, var(--sheet) 82%, transparent); }

/* numbers roll up like a timing screen the first time they are seen */
.nr-box { display: inline-flex; align-items: flex-start; }
.nr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nr { display: inline-block; height: 1em; overflow: hidden; line-height: 1; }
.nr > span { display: block; will-change: transform; }
.nr > span > i { display: block; height: 1em; font-style: normal; }
.nr-s { display: inline-block; line-height: 1; }

/* the experience chart: a telemetry cursor follows the pointer */
.st-cursor {
  position: absolute; top: 0; bottom: 6px; z-index: 6; pointer-events: none;
  left: calc(var(--lab) + (100% - var(--lab)) * var(--cx, 0));
  border-left: 1px dashed var(--ink);
  opacity: 0; transition: opacity .15s;
}
.st-cursor span {
  position: absolute; top: 0; left: 0; transform: translateX(-50%);
  padding: 3px 7px; white-space: nowrap;
  font: 500 var(--t-xs)/1.2 var(--f-mono); color: var(--paper); background: var(--ink);
}
.st-chart.is-scrub .st-cursor { opacity: 1; }
.st-chart.is-scrub .stint .stint-bar, .st-chart.is-scrub .stint > .stint-t { transition: opacity .15s; }
.st-chart.is-scrub .stint:not(.is-at) .stint-bar, .st-chart.is-scrub .stint:not(.is-at) > .stint-t { opacity: .3; }
.st-chart.is-scrub .st-year { opacity: .45; }

/* header rail: a tick where each section starts */
.hdr-rail b {
  position: absolute; bottom: 0; width: 1px; height: 6px;
  background: var(--ink-4); opacity: .7;
}

/* ── 11. RESEARCH ──────────────────────────────────────────── */

.paper {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
  align-items: start;
}
.paper-sheet-wrap { grid-column: 1 / 6; position: sticky; top: calc(var(--hdr) + 32px); perspective: 1600px; }
.paper-sheet {
  position: relative;
  background: #FBFAF6; color: #161514;
  aspect-ratio: 8.5 / 11;
  padding: 8% 9% 7%;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 30px 60px -32px rgba(19, 19, 18, .5);
  font-family: var(--f-serif);
  transform: rotate(-1.4deg);
  transform-origin: 50% 0;
  display: flex; flex-direction: column;
}
[data-theme="dark"] .paper-sheet { background: #EDEBE4; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9); }
.ps-run {
  font-size: clamp(11px, .72vw, 12px); padding-bottom: .6em; border-bottom: .5px solid #161514;
  color: #3b3a37;
}
.ps-title {
  margin: 9% 2% 0; text-align: center;
  font-size: clamp(17px, 1.38vw, 22px); line-height: 1.22; font-weight: 400;
}
.ps-auth { margin-top: 5%; text-align: center; font-size: clamp(14px, 1vw, 16px); }
.ps-aff { margin: 1.2% 6% 0; text-align: center; font-size: clamp(12px, .8vw, 13px); color: #3b3a37; }
.ps-abs-h { margin: 7% 0 2%; font-size: clamp(14px, 1.02vw, 16px); }
.ps-abs { font-size: clamp(13px, .86vw, 14px); line-height: 1.45; text-align: justify; hyphens: auto; color: #222; }
.hl {
  background: linear-gradient(transparent 52%, rgba(227, 11, 31, .26) 52%, rgba(227, 11, 31, .26) 92%, transparent 92%) 0 0 / var(--hl, 0%) 100% no-repeat;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.ps-foot {
  margin-top: auto; display: flex; justify-content: space-between;
  font-size: clamp(11px, .7vw, 12px); color: #555; padding-top: .7em; border-top: .5px solid #bbb;
}

.paper-side { grid-column: 7 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vh, 48px); padding-top: 4px; min-width: 0; }
.paper-side > *, .sheet-text, .sheet-fig, .qcard, .udyox-body { min-width: 0; }
.paper-kicker { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--red-ink); }
.paper-plain { margin-top: -18px; font-size: var(--t-md); line-height: 1.42; font-weight: 450; max-width: 48ch; }

.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--g); }
.res { padding: 14px 0 16px; border-top: 1px solid var(--rule-2); display: grid; gap: 4px; }
.res dt { font-size: var(--t-sm); color: var(--ink-2); }
.res dd { display: grid; gap: 4px; }
.res-v {
  font-family: var(--f-mono); font-stretch: 87.5%; font-weight: 400;
  font-size: clamp(2rem, 1.3rem + 2.2vw, 3.25rem); line-height: 1; letter-spacing: -.04em;
}
.res.is-primary .res-v { color: var(--red); }
.res-ci { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-2); }
.res-d { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.4; }

.ds { overflow-x: auto; }
.ds-table { width: 100%; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.ds-table caption { text-align: left; font-size: var(--t-sm); color: var(--ink-2); padding-bottom: 10px; caption-side: top; }
.ds-table th, .ds-table td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ds-table thead th { font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 400; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; border-bottom-color: var(--rule-2); }
.ds-table tbody th { font-weight: 550; }
.ds-table .num { text-align: right; padding-right: 0; font-family: var(--f-mono); }
.ds-table tbody tr { transition: background-color .2s; }
.ds-table tbody tr:hover { background: var(--paper-2); }

.paper-meta { font-size: var(--t-sm); color: var(--ink-2); display: flex; gap: 14px; }
.paper-meta span { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); flex: none; padding-top: 2px; }
.paper-links { display: flex; gap: 20px; }

.udyox {
  margin-top: var(--sec);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
  padding-top: 18px; border-top: 1px solid var(--ink);
}
.udyox-head { grid-column: 1 / 6; }
.udyox-kind { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); }
.udyox-title { margin-top: 10px; font-family: var(--f-display); font-weight: 800; font-stretch: 118%; font-size: var(--t-2xl); line-height: .85; letter-spacing: -.04em; }
.udyox-line { margin-top: 20px; font-size: var(--t-md); line-height: 1.35; max-width: 32ch; }
.udyox-links { margin-top: 18px; display: flex; gap: 20px; }
.udyox-body { grid-column: 7 / -1; }
.udyox-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--g); }
.udyox-nums li { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--rule-2); }
.udyox-nums b { font-family: var(--f-mono); font-weight: 400; font-stretch: 87.5%; font-size: clamp(2rem, 1.2rem + 2.4vw, 3.4rem); line-height: 1; letter-spacing: -.04em; }
.udyox-nums span { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.35; }
.udyox-text { margin-top: 28px; color: var(--ink-2); max-width: 62ch; }
.udyox-stack { margin-top: 16px; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); }

.quant { margin-top: var(--sec); }
.quant-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.sub-note { color: var(--ink-3); font-size: var(--t-sm); }
.quant-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1499px) {
  .quant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qcard:nth-child(2n) { border-right: 0; margin-right: 0; padding-right: 0; }
  .qcard:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
.qfig { max-width: 460px; }
/* the card drawings are small, so their type is set a step up */
.fig-compact .fig-svg .f-label { font-size: 15px; }
.fig-compact .fig-svg .f-mono { font-size: 13.5px; }
.fig-compact .fig-svg .f-tiny { font-size: 12.5px; }
.fig-compact .fig-svg .f-note { font-size: 13.5px; }
.fig-compact .fig-svg .f-num-sm { font-size: 14px; }
.qcard {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px var(--g) 28px 0; margin-right: var(--g);
  border-right: 1px solid var(--rule);
}
.qcard:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.qcard-top { display: flex; align-items: baseline; gap: 10px; }
.qcard-n { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--red-ink); }
.qcard-title { font-family: var(--f-display); font-stretch: 110%; font-weight: 750; font-size: var(--t-md); line-height: 1.1; flex: 1; }
.qcard-q { font-size: var(--t-base); line-height: 1.35; font-weight: 500; min-height: 2.7em; }
.qcard-body { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.55; }
.qcard-finds { display: grid; gap: 8px; font-size: var(--t-sm); line-height: 1.45; }
.qcard-finds li { padding-left: 16px; position: relative; }
.qcard-finds li::before { content: ''; position: absolute; left: 0; top: .7em; width: 8px; height: 1px; background: var(--red); }

.ongoing { margin-top: clamp(72px, 12vh, 140px); }
.og-list { margin-top: 18px; border-top: 1px solid var(--ink); }
.og {
  display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 6fr) minmax(0, 1.2fr); gap: var(--g);
  align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.og b { font-family: var(--f-display); font-stretch: 110%; font-weight: 700; font-size: var(--t-md); }
.og span { color: var(--ink-2); font-size: var(--t-sm); }
.og .lnk, .og-tag { justify-self: end; }
.og-tag { font-family: var(--f-mono); font-size: var(--t-xs); font-style: normal; color: var(--ink-3); }

/* ── 12. EXPERIENCE ────────────────────────────────────────── */

.stints { margin-bottom: clamp(64px, 10vh, 120px); }
.st-chart {
  --lab: 132px;                            /* width of the row-label column */
  position: relative;
  display: grid; gap: 10px;
  padding: 0 0 6px;
  min-width: 0;
}
.st-head { min-height: 24px; height: 24px; }   /* room for the year labels; a sticky corner on phones */
.st-axis { position: absolute; left: var(--lab); right: 0; top: 0; height: 100%; pointer-events: none; }
.st-year {
  position: absolute; top: 0; bottom: 0; transform: translateX(-.5px);
  border-left: 1px dashed var(--rule-2);
  padding-left: 6px;
  font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3);
}
.st-row { display: grid; grid-template-columns: var(--lab) 1fr; align-items: center; min-height: 40px; }
.st-label { font-size: var(--t-sm); color: var(--ink-2); }
.st-track { position: relative; height: 40px; border-top: 1px solid var(--rule); }
.stint {
  position: absolute; top: 5px; bottom: 5px;
  font-size: var(--t-sm); font-weight: 550; white-space: nowrap;
  outline-offset: 2px;
}
.stint-bar {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px 0 4px;
  background: var(--sheet);
  border: 1px solid var(--rule-2);
  overflow: hidden;
  transition: background-color .25s, border-color .25s;
}
.stint:hover, .stint:focus-visible { z-index: 3; }
.stint:hover .stint-bar, .stint:focus-visible .stint-bar { border-color: var(--ink); }
.stint-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stint.is-narrow { z-index: 3; }           /* its outside label sits above the now line */
.stint.is-narrow > .stint-t {
  position: absolute; left: calc(100% + 4px); top: 50%; transform: translateY(-50%);
  overflow: visible; padding: 2px 6px; background: var(--paper);
}
.stint.is-open .stint-bar { border-right: 0; background-image: linear-gradient(90deg, transparent 70%, var(--paper) 100%); }

/* the tyre: coloured sidewall around the compound letter */
.tyre {
  flex: none; width: 25px; height: 25px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 12px; line-height: 1;
  color: var(--ink); background: var(--paper);
  box-shadow: inset 0 0 0 3.5px var(--tc), inset 0 0 0 4.5px var(--ink);
}
.c-s { --tc: var(--tyre-s); }
.c-m { --tc: var(--tyre-m); }
.c-h { --tc: var(--tyre-h); }
.c-i { --tc: var(--tyre-i); }
.c-w { --tc: var(--tyre-w); }
.stint.c-s .stint-bar { border-left: 3px solid var(--tyre-s); }
.stint.c-m .stint-bar { border-left: 3px solid var(--tyre-m); }
.stint.c-h .stint-bar { border-left: 3px solid var(--ink-4); }
.stint.c-i .stint-bar { border-left: 3px solid var(--tyre-i); }
.stint.c-w .stint-bar { border-left: 3px solid var(--tyre-w); }

.stint-tip {
  position: absolute; left: 0; bottom: calc(100% + 10px);
  display: grid; gap: 2px; min-width: 220px;
  padding: 10px 12px; background: var(--ink); color: var(--paper);
  font-size: var(--t-sm); font-weight: 400; white-space: normal; line-height: 1.35;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .2s, transform .3s var(--ease-out);
  z-index: 5;
}
.stint-tip b { font-weight: 600; }
.stint-when { font-family: var(--f-mono); font-size: var(--t-xs); opacity: .75; }
.stint:hover .stint-tip, .stint:focus-visible .stint-tip { opacity: 1; transform: none; }

.st-now {
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--lab) + (100% - var(--lab)) * var(--now) / 100%);
  border-left: 1.5px solid var(--red); pointer-events: none; z-index: 2;
}
.st-now span {
  position: absolute; top: 0; left: 6px;
  font-family: var(--f-mono); font-size: var(--t-xs); color: var(--red-ink);
}
.st-future {
  position: absolute; top: 34px; bottom: 6px; right: 0;
  left: calc(var(--lab) + (100% - var(--lab)) * var(--now) / 100%);
  background-image: repeating-linear-gradient(-45deg, var(--rule) 0 1px, transparent 1px 7px);
  pointer-events: none; z-index: 0;
}
.st-cap { margin-top: 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px 48px; flex-wrap: wrap; }
.st-cap p { font-size: var(--t-sm); color: var(--ink-3); max-width: 52ch; }
.st-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.lg { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--ink-2); }
.lg b { color: var(--ink); font-weight: 600; }
.lg i { font-style: normal; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); margin-left: 2px; }

.jobs { border-top: 1px solid var(--ink); }
.job {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
  padding: clamp(24px, 4vh, 40px) 0;
  border-bottom: 1px solid var(--rule);
}
.job-when { grid-column: 1 / 4; display: grid; align-content: start; gap: 4px; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-2); padding-top: .55em; }
.job-where { color: var(--ink-3); }
.job-main { grid-column: 4 / 11; }
.job-org { font-family: var(--f-display); font-weight: 800; font-stretch: 118%; font-size: var(--t-xl); line-height: .98; letter-spacing: -.03em; }
.job-role { margin-top: 6px; font-weight: 550; }
.job-d { margin-top: 14px; font-size: var(--t-md); line-height: 1.4; max-width: 50ch; }
.job-points { margin-top: 16px; display: grid; gap: 8px; color: var(--ink-2); max-width: 66ch; }
.job-points li { position: relative; padding-left: 20px; }
.job-points li::before { content: ''; position: absolute; left: 0; top: .78em; width: 10px; height: 1px; background: var(--red); }
.job-tags { margin-top: 18px; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); }

/* ── 13. ABOUT: OFF TRACK, RECOGNITION, TOOLKIT ────────────── */

.ot-list { border-top: 1px solid var(--ink); counter-reset: ot; }
.ot {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
  align-items: end;
  padding: clamp(22px, 3.6vh, 34px) 0;
  border-bottom: 1px solid var(--rule);
  transition: background-color .3s;
}
.ot-main { grid-column: 1 / 9; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: var(--g); align-items: baseline; }
.ot-role { grid-column: 1 / -1; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); margin-bottom: 8px; }
.ot-org { font-family: var(--f-display); font-weight: 800; font-stretch: 118%; font-size: var(--t-xl); line-height: .98; letter-spacing: -.03em; }
.ot-org .lnk { display: inline; font-weight: inherit; }
.ot-org .ico-ext { display: inline-block; width: .42em; height: .42em; margin-left: .12em; vertical-align: .55em; stroke-width: 1.2; }
.ot-d { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.5; max-width: 46ch; }
.ot-num { grid-column: 9 / -1; justify-self: end; text-align: right; display: grid; gap: 4px; }
.ot-num b {
  font-family: var(--f-text); font-weight: 800; font-stretch: 112%;
  font-size: clamp(2.75rem, 1.6rem + 4.4vw, 6rem); line-height: .86; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums lining-nums;
}
.ot-num span { font-size: var(--t-sm); color: var(--ink-3); }

.about-split {
  margin-top: clamp(72px, 12vh, 140px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g);
}
.awards { grid-column: 1 / 7; }
.courses { grid-column: 8 / -1; }
.aw-list { margin-top: 18px; border-top: 1px solid var(--ink); }
.aw { display: grid; gap: 2px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.aw b { font-weight: 600; }
.aw span { font-size: var(--t-sm); color: var(--ink-3); }
.langs { margin-top: 22px; font-size: var(--t-sm); color: var(--ink-2); display: flex; gap: 14px; }
.langs span { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); padding-top: 2px; }
.course-list { margin-top: 18px; border-top: 1px solid var(--ink); padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 0; font-size: var(--t-base); line-height: 1.5; }
.course-list span:not(:last-child)::after { content: '/'; color: var(--ink-4); margin: 0 .6em; }

.toolkit { margin-top: clamp(72px, 12vh, 140px); }
.tk-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-items: baseline; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.tk-head .sub-title { grid-column: 1 / 5; }
/* room for the longest readout, so hovering a tool never moves the grid under the pointer */
.tk-readout { grid-column: 5 / -1; font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2); min-height: 4.5em; }
.tk-readout b { color: var(--ink); font-weight: 600; }
.tk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 var(--g); }
.tk-group { padding: 18px 0 24px; border-bottom: 1px solid var(--rule); }
.tk-h { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); margin-bottom: 10px; }
.tk-list { display: grid; gap: 1px; }
.tk {
  display: inline-block;
  padding: 3px 0; text-align: left;
  font-size: var(--t-base); line-height: 1.35;
  color: var(--ink);
  transition: color .2s, transform .35s var(--ease-out);
}
.tk sup { font-family: var(--f-mono); font-size: .72em; color: var(--red-ink); margin-left: 2px; }
.tk[data-none] { color: var(--ink-2); cursor: default; }
.tk:not([data-none]):hover, .tk:not([data-none]):focus-visible { color: var(--red-ink); transform: translateX(4px); }

/* ── 14. ARCHIVE ───────────────────────────────────────────── */

.flt-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.flt {
  display: inline-flex; align-items: baseline; gap: 2px;
  padding: 8px 14px 7px;
  border: 1px solid var(--rule-2); border-radius: 99px;
  font-size: var(--t-sm); font-weight: 500; color: var(--ink-2);
  transition: color .2s, background-color .2s, border-color .2s;
}
.flt sup { font-family: var(--f-mono); font-size: .78em; margin-left: 3px; color: var(--ink-3); }
.flt:hover { border-color: var(--ink); color: var(--ink); }
.flt.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.flt.is-on sup { color: inherit; opacity: .7; }
.flt[hidden] { display: none; }
.flt-tool { background: var(--red-fill); border-color: var(--red-fill); color: #fff; }
.flt-tool::after { content: '×'; margin-left: 8px; }

.ar-head, .ar {
  display: grid;
  grid-template-columns: 40px minmax(0, 2.2fr) minmax(0, 4fr) minmax(0, 1.8fr) minmax(0, 1.25fr) minmax(0, 1.25fr);
  column-gap: var(--g); align-items: baseline;
}
.ar-head { padding-bottom: 10px; border-bottom: 1px solid var(--ink); font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.ar-list { border-bottom: 1px solid var(--rule); }
.ar { padding: 15px 0; border-top: 1px solid var(--rule); transition: background-color .25s; position: relative; }
.ar:first-child { border-top: 0; }
.ar:hover { background: var(--paper-2); }
.ar.is-hidden { display: none; }
.ar-n { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); }
.ar-name { font-family: var(--f-display); font-stretch: 110%; font-weight: 700; font-size: var(--t-md); line-height: 1.15; }
.ar-jump { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease-out), color .2s; }
.ar-jump:hover { color: var(--red-ink); background-size: 100% 1px; }
.ar-d { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.45; }
.ar-area { font-size: var(--t-sm); color: var(--ink-3); }
.ar-status { justify-self: start; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-2); padding-left: 14px; position: relative; }
.ar-status::before { content: ''; position: absolute; left: 0; top: .45em; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--ink-3); }
.s-live::before, .s-deployed::before { background: var(--tyre-i); border-color: var(--tyre-i); }
.s-preprint::before { background: var(--red); border-color: var(--red); }
.s-in-progress::before, .s-in-research::before { background: linear-gradient(90deg, var(--ink-3) 50%, transparent 50%); }
.ar-links { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; }
.ar-nolink { font-size: var(--t-xs); color: var(--ink-3); }

/* ── 15. CONTACT + FOOTER ──────────────────────────────────── */

.contact {
  position: relative;
  margin-top: var(--sec);
  padding: clamp(18px, 3vh, 28px) var(--m) 0;
  background: var(--ink); color: var(--paper);
  --rule: rgba(239, 237, 231, .16); --rule-2: rgba(239, 237, 231, .28);
}
[data-theme="dark"] .contact { background: #050505; color: var(--ink); --rule: rgba(237, 235, 230, .12); --rule-2: rgba(237, 235, 230, .22); }
.contact > * { max-width: var(--maxw); margin-inline: auto; }
.contact .sec-row { border-top-color: currentColor; }
.contact .sec-aside { color: inherit; opacity: .6; display: inline-flex; align-items: center; gap: 8px; }
.radio-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
/* the team-radio waveform from the broadcast graphic */
.wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; margin-left: 4px; }
.wave i {
  width: 2px; height: 100%; background: currentColor; border-radius: 1px;
  transform: scaleY(.25); transform-origin: 50% 50%;
  animation: wave 1.1s cubic-bezier(.45, 0, .55, 1) infinite alternate;
  animation-delay: calc(var(--k) * -137ms);
}
.wave i:nth-child(3n) { animation-duration: .8s; }
.wave i:nth-child(4n+1) { animation-duration: 1.4s; }
@keyframes wave { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .wave i { animation: none; transform: scaleY(.5); } }
.contact-title {
  padding: clamp(40px, 9vh, 120px) 0 clamp(28px, 5vh, 56px);
  font-family: var(--f-display); font-weight: 800; font-stretch: var(--wd, 125%);
  font-size: var(--t-3xl); line-height: .82; letter-spacing: -.045em;
  margin-left: -.04em;
}
.contact-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 40px;
  padding-bottom: clamp(64px, 12vh, 140px);
}
.contact-open { grid-column: 1 / 6; font-size: var(--t-md); line-height: 1.4; opacity: .82; max-width: 36ch; }
.contact-mail { grid-column: 6 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; align-self: start; }
.mail {
  font-family: var(--f-display); font-weight: 700; font-stretch: 105%;
  font-size: clamp(1.4rem, .9rem + 2.4vw, 3rem); line-height: 1.05; letter-spacing: -.02em;
  background: linear-gradient(var(--red), var(--red)) 0 100% / 0 3px no-repeat;
  padding-bottom: 4px;
  transition: background-size .55s var(--ease-out);
  word-break: break-all;
}
.mail:hover { background-size: 100% 3px; }
.copy {
  font-family: var(--f-mono); font-size: var(--t-xs);
  border: 1px solid var(--rule-2); border-radius: 99px; padding: 8px 14px 7px;
  transition: background-color .2s, color .2s, border-color .2s;
}
.copy:hover { border-color: currentColor; }
.copy.is-done { background: var(--red-fill); border-color: var(--red-fill); color: #fff; }
.contact-links { grid-column: 6 / -1; border-top: 1px solid var(--rule-2); }
.cl {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--rule);
  transition: padding-left .45s var(--ease-out), color .2s;
}
.cl:hover { padding-left: 10px; }
.cl-l { font-weight: 600; font-size: var(--t-md); }
.cl-h { font-family: var(--f-mono); font-size: var(--t-xs); opacity: .6; }
.contact-cv { grid-column: 6 / -1; }
.contact .lnk { color: inherit; }

.foot {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 10px;
  padding: 22px 0 26px; border-top: 1px solid var(--rule-2);
  font-size: var(--t-sm); opacity: .72;
}
.foot-c { grid-column: 1 / 3; }
.foot-col { grid-column: 3 / 11; max-width: 60ch; }
.foot-top { grid-column: 11 / -1; justify-self: end; align-self: start; font-size: var(--t-sm); }

.flag {
  height: 28px; max-width: none !important; margin: 0 calc(var(--m) * -1);
  background-image:
    linear-gradient(45deg, currentColor 25%, transparent 25%, transparent 75%, currentColor 75%),
    linear-gradient(45deg, currentColor 25%, transparent 25%, transparent 75%, currentColor 75%);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  opacity: .9;
}

/* ── 16. RESPONSIVE ────────────────────────────────────────── */

@media (max-width: 1180px) {
  .tk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ar-head, .ar { grid-template-columns: 36px minmax(0, 2fr) minmax(0, 4fr) minmax(0, 1.4fr) minmax(0, 1.2fr); }
  .ar-area, .ar-head span:nth-child(4) { display: none; }
}

@media (max-width: 1024px) {
  .sheet { position: relative; top: auto; height: auto; max-height: none; min-height: 0; margin-bottom: 40px; }
  .sheet-text { grid-column: 1 / -1; }
  .sheet-fig { grid-column: 1 / -1; margin-top: 28px; }
  .tblock { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tb-wide { grid-column: 1 / -1; order: 3; border-left: 0; border-top: 1px solid var(--rule); }
  .tb b { white-space: normal; }
  .paper-sheet-wrap { grid-column: 1 / -1; position: relative; top: auto; max-width: 560px; margin: 0 auto 56px; padding: 0 12px; }
  .paper-side { grid-column: 1 / -1; }
  .udyox-head, .udyox-body { grid-column: 1 / -1; }
  .udyox-body { margin-top: 36px; }
  .ot-main { grid-column: 1 / 10; grid-template-columns: 1fr; row-gap: 10px; }
  .ot-num { grid-column: 10 / -1; }
  .awards, .courses { grid-column: 1 / -1; }
  .courses { margin-top: 56px; }
  .job-when { grid-column: 1 / -1; display: flex; gap: 14px; margin-bottom: 12px; padding-top: 0; }
  .job-main { grid-column: 1 / -1; }
  .contact-open, .contact-mail, .contact-links, .contact-cv { grid-column: 1 / -1; }
  .foot-c { grid-column: 1 / 5; } .foot-col { grid-column: 1 / -1; order: 3; }
  .foot-top { grid-column: 5 / -1; }
}

@media (max-width: 860px) {
  .hdr-nav { display: none; }
  .menu-btn { display: inline-block; }
  .theme-txt { display: none; }

  .intro-k { grid-column: 1 / -1; padding: 0 0 14px; }
  .intro-text { grid-column: 1 / -1; }

  .machine { height: 260vh; }
  .machine-fallback { left: 50%; top: 64%; width: 92vw; }
  .machine-scan span { top: 49%; }
  .machine-copy { max-width: none; right: var(--m); }
  .machine-line { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .machine-cap { right: var(--m); bottom: 70px; font-size: var(--t-xs); }
  .machine-meter { left: var(--m); right: auto; bottom: 26px; }

  .sec-title, .sec-main.is-short .sec-title { grid-column: 1 / -1; }
  .sec-intro, .sec-main.is-short .sec-intro { grid-column: 1 / -1; grid-row: auto; margin-top: 22px; }

  .sheet-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
  .sheet-links { flex-basis: 100%; }

  .results { grid-template-columns: 1fr 1fr; }
  .udyox-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }

  /* the chart is wider than a phone: it scrolls on its own, labels stay put,
     and the right edge fades to say there is more */
  .st-scroll {
    overflow-x: auto; overflow-y: hidden;
    margin-inline: calc(var(--m) * -1); padding-inline: var(--m);
    scrollbar-width: none; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent);
  }
  .st-scroll::-webkit-scrollbar { display: none; }
  .st-chart { min-width: 760px; --lab: 104px; }
  .st-label {
    /* sticky insets count from the scroller's content edge, so reach back over its padding */
    position: sticky; left: calc(var(--m) * -1); z-index: 4; align-self: stretch;
    display: flex; align-items: center;
    margin-left: calc(var(--m) * -1); padding-left: var(--m);
    background: var(--paper);
    box-shadow: 0 -5px 0 var(--paper), 0 5px 0 var(--paper);   /* cover the row gaps too */
  }

  .og { grid-template-columns: 1fr auto; }
  .og span { grid-column: 1 / -1; grid-row: 2; }
  .og .lnk, .og-tag { grid-column: 2; grid-row: 1; }

  .ot { grid-template-columns: 1fr; row-gap: 14px; }
  .ot-main, .ot-num { grid-column: 1 / -1; }
  .ot-num { justify-self: start; text-align: left; grid-auto-flow: column; align-items: baseline; gap: 10px; }
  .ot-num-none { display: none; }

  .tk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-head .sub-title, .tk-readout { grid-column: 1 / -1; }
  .tk-readout { margin-top: 10px; min-height: 0; }

  .ar-head { display: none; }
  .ar { grid-template-columns: 30px minmax(0, 1fr) auto; row-gap: 6px; }
  .ar-n { grid-row: 1; }
  .ar-name { grid-column: 2; }
  .ar-status { grid-column: 3; grid-row: 1; }
  .ar-d { grid-column: 2 / -1; }
  .ar-links { grid-column: 2 / -1; justify-content: flex-start; }
  .quant-grid { grid-template-columns: 1fr; }
  .qcard { border-right: 0; margin-right: 0; padding-right: 0; border-top: 1px solid var(--rule); }
  .qcard:first-child { border-top: 0; }
}

@media (max-width: 560px) {
  .sec-title, .contact-title { font-size: 13.4vw; }
  /* a sheet's drawing uses the sheet's full width; its caption keeps the text margin */
  .sheet-fig { margin-inline: calc(-1 * clamp(16px, 2vw, 28px)); }
  .sheet-fig .fig-plate { border-inline: 0; }
  .sheet-fig figcaption { padding-inline: clamp(16px, 2vw, 28px); }
  .ds-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ds-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .ds-table th, .ds-table td { padding: 0; border: 0; white-space: normal; }
  .ds-table tbody th { flex: 1 0 60%; }
  .ds-table td.num { margin-left: auto; }
  .ds-table td:not(.num) { order: 2; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-3); }
  .ds-table td:not(.num) ~ td:not(.num)::before { content: '· '; }
  .hero-meta { flex-direction: column; gap: 6px; }
  .hero-where { text-align: left; }
  .hero-facts { grid-template-columns: 1fr; }
  .results { grid-template-columns: 1fr; }
  .tk-grid { grid-template-columns: 1fr; }
  .tblock { grid-template-columns: 1fr; }
  .tb { border-left: 0; border-top: 1px solid var(--rule); }
  .tb:first-child { border-top: 0; }
  .tb-stamp { min-height: 64px; }
  .foot > * { grid-column: 1 / -1 !important; justify-self: start !important; }
}

/* phones, and any portrait screen up to a large tablet: stack the hero so the
   portrait spans the width and still overlaps the masthead */
@media (max-width: 860px), (orientation: portrait) and (max-width: 1200px) {
  .hero {
    height: auto; min-height: 0; max-height: none;
    grid-template-rows: auto auto auto auto auto;
    padding-bottom: 8px;
  }
  .hero-name { margin-top: 18px; }
  .hero-portrait {
    grid-column: 1 / -1; grid-row: 3;
    height: auto; width: min(100%, 520px, 62svh); justify-self: center;
    margin-top: calc(var(--hn-end) * -.34);
  }
  .hero-plate { grid-column: 1 / -1; grid-row: 3; align-self: end; justify-self: end; margin-bottom: 22%; }
  .hero-lede { grid-column: 1 / -1; grid-row: 4; max-width: 40ch; margin: 28px 0 22px; }
  .hero-facts { grid-column: 1 / -1; grid-row: 5; }
}
@media (orientation: portrait) and (min-width: 861px) and (max-width: 1200px) {
  .hero-portrait { width: min(100%, 640px, 56svh); }
  .hero-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* wide, short windows (a laptop with browser chrome): the hero facts drop their
   one-line details, which the page repeats further down anyway */
@media (min-width: 861px) and (min-aspect-ratio: 19/10), (min-width: 861px) and (max-height: 640px) {
  .hf-d { display: none; }
  .hf { padding: 10px 0 12px; }
  .hero-lede { margin-bottom: 16px; }
}

/* shorter screens: the sheets stop stacking and take the height their content needs,
   rather than shrinking the type and drawings to fit */
@media (min-width: 1025px) and (max-height: 859px) {
  .sheet { position: relative; top: auto; height: auto; min-height: 0; max-height: none; margin-bottom: 40px; }
}

/* ── 17. MOTION PREFS, PRINT, FALLBACKS ────────────────────── */

/* boot state only applies when motion.js is going to animate it */
.motion .boot { opacity: 0; }
.motion .hn-ch { transform: translateY(104%); }
.motion .hn { clip-path: inset(-10% -5% 0 -5%); }
/* if the script never runs, the hero shows itself anyway */
.motion:not(.booted) .boot, .motion:not(.booted) .hn-ch {
  animation: boot-fallback 0s 3.2s forwards;
}
@keyframes boot-fallback { to { opacity: 1; transform: none; clip-path: none; } }
.nr-on { position: relative; color: transparent; }
.nr-on > .nr-box { position: absolute; left: 0; top: 0; color: var(--nr-c, var(--ink)); white-space: pre; font: inherit; letter-spacing: inherit; }
/* reels must look exactly like the number they stand in for, whatever the label rules around them say */
.nr-on .nr-box span, .nr-on .nr-box i { font: inherit; color: inherit; letter-spacing: inherit; font-variant-numeric: inherit; }
.nr { height: 1em; height: 1lh; overflow: clip; overflow-clip-margin: .05em; }
.nr > span > i { height: 1em; height: 1lh; }
.res.is-primary .nr-on { --nr-c: var(--red); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .machine { height: auto; }
  .machine-stage { position: relative; height: min(100svh, 820px); }
}

.nojs { padding: 120px var(--m); max-width: 60ch; }
.nojs h1 { font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: var(--t-2xl); line-height: .9; margin-bottom: 24px; }
.nojs p { margin-bottom: 14px; }
.nojs a { text-decoration: underline; }

@media print {
  :root, :root[data-theme="dark"] { --paper: #fff; --sheet: #fff; --paper-2: #fff; --ink: #000; --ink-2: #222; --ink-3: #444; }
  .hdr, .menu, .machine, .lights, .flag, .flt-bar, .copy, .skip, .hero-plate,
  .fig-bar, .fig-read, .fk-corner, .st-cursor, .f-balloon { display: none !important; }
  .stint-tip, .fig-alt { display: none !important; }
  /* on paper everything is already "revealed": undo what the scroll animations left hidden */
  main *:not(svg, svg *, .stint-tip) { opacity: 1 !important; }
  .hn-ch, .sec-title *, .contact-title *, .sheet-title *, .machine-line *, .sec-row > * { transform: none !important; }
  .fig-svg.is-pre .f-draw:not(.f-dash) { stroke-dasharray: none !important; }
  .fig-svg :is(text, .f-dash, .f-soft, .f-qr, .f-bit, .f-cell, .f-rule, .f-slot, .f-dot, .f-junction, .f-road, .f-pt, .f-ci, .f-head, .f-tier, .f-bar, .f-chip) { opacity: 1 !important; }
  /* the masthead fits the paper, not the screen it was last fitted to */
  .hero { --hn-k: .18078 !important; }
  .hero-name { font-size: var(--hn-end) !important; font-stretch: 125% !important; }
  .sheet-fig .fig-svg { height: auto; }
  .fig, .qcard, .job, .ot { break-inside: avoid; }
  .hero { height: auto; min-height: 0; }
  .sheet { position: static; height: auto; min-height: 0; max-height: none; box-shadow: none; }
  .sheet-top, .tblock { break-inside: avoid; }
  .sheet-in { box-shadow: none; }
  .paper-sheet-wrap { position: static; }
  .contact { background: #fff; color: #000; }
  a { color: #000; }
  .work, .research, .experience, .about, .archive { padding-top: 40px; }
}
