/* Anush Bharathi R — portfolio. One system: Archivo (display, UI), Literata (running text),
   Red Hat Mono (dates, units). Drawing-sheet vocabulary on project pages. */

:root {
  --paper: #FFFFFF;
  --ink: #15181B;
  --grey: #59626A;
  --rule: #C8CED2;
  --shade: #EDF2F2;
  --accent: #0D6A6A;
  --accent-ink: #FFFFFF;
  --hl: #FFE26A;
  --hl-ink: #15181B;
  --grid: rgba(13, 106, 106, .075);
  --stage: #0F1414;
  --stage-ink: #E2E9E8;
  --stage-grey: #9AA6A8;
  --stage-rule: #2C3838;
  --t-cad: #0072B2;
  --t-vision: #B8578F;
  --t-pack: #008A64;
  --t-energy: #C98500;
  --t-other: #59626A;
  --f-d: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-t: "Literata", Georgia, "Times New Roman", serif;
  --f-m: "Red Hat Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1414; --ink: #E2E9E8; --grey: #939FA2; --rule: #2C3838; --shade: #172121;
    --accent: #5FC0BC; --accent-ink: #0F1414; --hl: #FFE26A; --hl-ink: #15181B;
    --grid: rgba(95, 192, 188, .07);
    --stage: #090D0D; --stage-ink: #E2E9E8; --stage-grey: #9AA6A8; --stage-rule: #2C3838;
    --t-cad: #56B4E9; --t-vision: #D98CB8; --t-pack: #2DB58C; --t-energy: #E69F00; --t-other: #939FA2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1414; --ink: #E2E9E8; --grey: #939FA2; --rule: #2C3838; --shade: #172121;
  --accent: #5FC0BC; --accent-ink: #0F1414; --hl: #FFE26A; --hl-ink: #15181B;
  --grid: rgba(95, 192, 188, .07);
  --stage: #090D0D; --stage-ink: #E2E9E8; --stage-grey: #9AA6A8; --stage-rule: #2C3838;
  --t-cad: #56B4E9; --t-vision: #D98CB8; --t-pack: #2DB58C; --t-energy: #E69F00; --t-other: #939FA2;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-t); font-size: 1.0625rem; line-height: 1.62;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; display: block; }
img, video { height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }
h1, h2, h3, h4 { font-family: var(--f-d); text-wrap: balance; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.wrap {
  max-width: 1180px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}
.mono, .dim { font-family: var(--f-m); font-size: .78rem; letter-spacing: .02em; color: var(--grey); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 12px; font: 500 .85rem var(--f-d); z-index: 20; }
.skip:focus { left: 8px; top: 8px; }

/* ------------------------------------------------------------------ nav */
.nav { border-bottom: 1px solid var(--rule); }
.nav .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; padding-block: 12px; }
.brand { font: 600 1rem/1 var(--f-d); color: var(--ink); text-decoration: none; margin-right: auto; letter-spacing: .005em; padding-block: 6px; }
.brand span { color: var(--grey); font-weight: 400; }
.nav .l { font: 500 .9rem/1 var(--f-d); color: var(--grey); text-decoration: none; padding: 8px 1px; border-bottom: 2px solid transparent; }
.nav .l:hover { color: var(--ink); }
.nav .l[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 440px) {
  .nav .wrap { gap: 6px 8px; }
  .brand { font-size: .88rem; }
  .nav .l { font-size: .8rem; }
  .nav .theme { width: 30px; height: 30px; }
}
.theme {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border: 1px solid var(--rule); border-radius: 2px; background: transparent; color: var(--ink); cursor: pointer; padding: 0;
}
.theme:hover { border-color: var(--ink); }
.theme svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ shared pieces */
.sec {
  display: flex; align-items: center; gap: 12px; margin: 0 0 22px;
  font: 600 .78rem/1.2 var(--f-d); letter-spacing: .11em; text-transform: uppercase; color: var(--ink);
}
.sec::after { content: ""; flex: 1; height: 1px; background: var(--ink); min-width: 24px; }
.sec .bn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px;
  border: 1.5px solid var(--ink); border-radius: 50%; font: 500 .7rem/1 var(--f-m); letter-spacing: 0;
}
.sec small { font: 400 .74rem var(--f-m); letter-spacing: .02em; text-transform: none; color: var(--grey); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font: 500 .7rem/1 var(--f-m); letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--rule); border-radius: 2px; padding: 4px 8px;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tc, var(--t-other)); }
[data-thread="cad"] { --tc: var(--t-cad); }
[data-thread="vision"] { --tc: var(--t-vision); }
[data-thread="pack"] { --tc: var(--t-pack); }
[data-thread="energy"] { --tc: var(--t-energy); }
[data-thread="other"] { --tc: var(--t-other); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: 600 .88rem/1 var(--f-d); text-decoration: none;
  color: var(--accent-ink); background: var(--accent); border: 1px solid var(--accent); border-radius: 2px; padding: 11px 16px;
}
.btn.ghost { color: var(--ink); background: transparent; border-color: var(--ink); }
.btn:hover { filter: brightness(1.08); }
.arrow::after { content: "\2192"; font-family: var(--f-d); }

/* ------------------------------------------------------------------ home */
.hero { padding-block: clamp(32px, 6vw, 76px) clamp(28px, 4vw, 52px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 290px); gap: clamp(24px, 5vw, 72px); align-items: end; }
.eyebrow { font: 500 .76rem/1.4 var(--f-m); letter-spacing: .09em; text-transform: uppercase; color: var(--grey); margin: 0; }
.name { font: 700 clamp(2.3rem, 6.2vw, 4.2rem)/1.02 var(--f-d); letter-spacing: -.022em; margin: .22em 0 .42em; }
.line { font-size: clamp(1.12rem, 2.1vw, 1.42rem); line-height: 1.48; max-width: 33em; margin: 0; }
.build { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .4em; margin: 1.3em 0 0; font: 600 clamp(1.1rem, 2.2vw, 1.42rem)/1.35 var(--f-d); }
.build-rot { display: grid; }
.build-rot a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.build-rot.rot a { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s; }
.build-rot.rot a.on { opacity: 1; visibility: visible; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 1.8em; }
.portrait { margin: 0; border: 1.5px solid var(--ink); padding: 6px; background: var(--paper); }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; }
.portrait figcaption { display: flex; justify-content: space-between; gap: 8px; font: 400 .68rem/1.3 var(--f-m); color: var(--grey); padding-top: 6px; letter-spacing: .03em; }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .portrait { max-width: 200px; order: -1; }
}
.block { padding-block: clamp(28px, 4.5vw, 56px); }
.block > .wrap > .intro { max-width: 40em; margin: -6px 0 26px; color: var(--ink); }
.block > .wrap > .intro.direction { margin-top: -12px; color: var(--ink-2, var(--ink)); }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(26px, 4vw, 46px) 0 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.facts > div { padding: 12px 20px 14px 0; min-width: 0; }
.facts > div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.facts dt { font: 500 .64rem/1.8 var(--f-m); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }
.facts dd { margin: 0; font: 400 .88rem/1.45 var(--f-d); }
@media (max-width: 900px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 520px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div { padding-left: 0 !important; border-left: 0 !important; }
  .facts > div + div { border-top: 1px solid var(--rule); }
}

.map { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.map-h, .map-r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .8fr); gap: 8px 32px; }
.map-h { padding-block: 9px; border-bottom: 1px solid var(--ink); font: 500 .7rem/1.3 var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.map-r { padding-block: 18px; border-bottom: 1px solid var(--rule); font: 400 .95rem/1.5 var(--f-d); }
.map-r:last-child { border-bottom: 0; }
.map-r > div { min-width: 0; }
.map-r .who { display: block; font: 500 .7rem/1.5 var(--f-m); letter-spacing: .05em; text-transform: uppercase; color: var(--grey); margin-bottom: 3px; }
.map-r .pb { font-family: var(--f-t); font-size: 1.02rem; line-height: 1.5; }
.map-r .res { font-family: var(--f-m); font-size: .82rem; line-height: 1.55; }
.map-r .res a { display: inline-block; margin-top: 6px; font: 600 .84rem var(--f-d); }
.map.two .map-h, .map.two .map-r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
@media (max-width: 760px) {
  .map-h { display: none; }
  .map-r, .map.two .map-r { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .map-r > div[data-l]::before { content: attr(data-l); display: block; font: 500 .66rem/1.6 var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
}

.feats-h { font: 600 1.05rem/1.3 var(--f-d); margin: 2.4em 0 1em; padding-top: 1.4em; border-top: 1px solid var(--rule); }
.feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 32px; }
.feat { display: flex; flex-direction: column; min-width: 0; color: var(--ink); text-decoration: none; }
.feat-m { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--shade); border: 1px solid var(--rule); margin-bottom: 12px; }
.feat-m img, .feat-m svg, .feat-m video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat-m video { object-fit: contain; opacity: 0; }
.feat.on .feat-m video { opacity: 1; background: var(--stage); }
.feat:hover .feat-m, .feat:focus-visible .feat-m { border-color: var(--accent); }
.feat-tag { font: 500 .66rem/1.5 var(--f-m); letter-spacing: .09em; text-transform: uppercase; color: var(--grey); }
.feat-t { font: 700 1.4rem/1.15 var(--f-d); letter-spacing: -.012em; margin: 4px 0 6px; }
.feat:hover .feat-t { color: var(--accent); }
.feat-c { font: 400 .93rem/1.5 var(--f-d); margin-bottom: 12px; }
.pnum { display: flex; align-items: baseline; gap: 12px; margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--ink); }
.pnum b { font: 700 1.9rem/1 var(--f-d); letter-spacing: -.02em; white-space: nowrap; }
.pnum span { font: 400 .74rem/1.4 var(--f-m); color: var(--grey); }
.also { margin: 28px 0 0; font: 400 .92rem/1.5 var(--f-d); }
.also a { font-weight: 600; }
.after { margin: 12px 0 0; font: 600 .9rem/1.3 var(--f-d); }
.refs.compact + .after { margin-top: 18px; }
.refs.compact > li { padding-block: 12px; }
.refs.compact .r-a { font-size: .92rem; }
.refs.compact .r-v { margin-bottom: 6px; }
.refs.compact .r-links { gap: 4px 16px; }
@media (max-width: 760px) { .feats { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ timeline (sideways wave) */
.tl-head { padding-block: clamp(16px, 2.6vw, 28px) 12px; }
.tl-head h1 { font: 700 clamp(1.7rem, 3.6vw, 2.4rem)/1.05 var(--f-d); letter-spacing: -.02em; margin: .15em 0 .3em; }
.tl-head p:not(.eyebrow) { max-width: 46em; margin-bottom: 0; font-size: 1rem; }
.tl-head .eyebrow { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; background: transparent; color: var(--ink);
  font: 500 .8rem/1 var(--f-d); border: 1px solid var(--rule); border-radius: 2px; padding: 9px 12px;
}
.filters button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tc, transparent); }
.filters button[data-f="all"]::before { display: none; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* sideways timeline: pinned while the page scrolls past it, and the vertical scroll moves it sideways */
.hz { position: relative; --k: 1; }
.hz-stick { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hz-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding-bottom: 6px; }
.hz-head > .sec, .hz-head > h2 { margin-bottom: 0; }
.hz-bar { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.hz-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.hz-bar button {
  font: 500 .72rem/1 var(--f-m); letter-spacing: .04em; color: var(--grey); background: transparent;
  border: 1px solid var(--rule); border-radius: 999px; padding: 6px 10px; cursor: pointer;
}
.hz-bar button:hover { border-color: var(--ink); color: var(--ink); }
.hz-bar button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hz-hint { font: 400 .72rem/1.4 var(--f-m); color: var(--grey); }
.hz-full { font: 600 .84rem/1.3 var(--f-d); }
.hz-view { position: relative; overflow: hidden; cursor: grab; touch-action: pan-y; outline-offset: -2px; }
.hz-view.drag { cursor: grabbing; user-select: none; }
.hz-track {
  position: relative; width: calc(var(--W) * var(--k) * 1px); height: calc(var(--H) * var(--k) * 1px);
  will-change: transform; margin-left: max(0px, calc((100vw - 1180px) / 2));
}
.hz-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hz-w { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.hz-ld { stroke: var(--ink); stroke-width: 1; }
.hz-d { fill: var(--paper); stroke: var(--tc, var(--t-other)); stroke-width: 3.5; }
.hz-dm { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.hz-yr { font: 600 15px var(--f-m); fill: var(--ink); letter-spacing: .06em; }
.hz-n {
  position: absolute; left: calc(var(--x) * var(--k) * 1px);
  width: calc(184px * var(--k)); margin-left: calc(-92px * var(--k));
  display: flex; flex-direction: column; gap: 5px; color: var(--ink); text-decoration: none; -webkit-user-drag: none;
}
.hz-n.up, .hz-e.up { bottom: calc(var(--b) * var(--k) * 1px); }
.hz-n.dn, .hz-e.dn { top: calc(var(--t) * var(--k) * 1px); }
.hz-n.up { flex-direction: column-reverse; }
.hz-th { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--shade); border: 1px solid var(--ink); border-radius: 4px; }
.hz-th img, .hz-th svg { width: 100%; height: 100%; object-fit: cover; pointer-events: none; display: block; }
.hz-lb { display: flex; flex-direction: column; gap: 2px; font: 600 .8rem/1.25 var(--f-d); }
.hz-lb b { font-weight: 700; min-width: 0; text-wrap: balance; }
.hz-lb i { font: 400 .62rem/1.3 var(--f-m); font-style: normal; color: var(--grey); }
.hz-n:hover .hz-th, .hz-n:focus-visible .hz-th { border-color: var(--accent); }
.hz-n:hover b { color: var(--accent); }
.hz-e {
  position: absolute; left: calc(var(--x) * var(--k) * 1px);
  width: calc(150px * var(--k)); margin-left: calc(-75px * var(--k));
  display: block; text-align: center; text-decoration: none; cursor: default; font: 400 .7rem/1.3 var(--f-d); color: var(--grey);
}
a.hz-e { cursor: pointer; }
.hz-e i { display: block; font: 400 .62rem/1.4 var(--f-m); font-style: normal; }
.hz-e b { display: block; font: 600 .74rem/1.25 var(--f-d); color: var(--ink); }
.hz-n, .hz-e { transition: opacity .2s; }
.hz-n.dim, .hz-e.dim { opacity: .2; }

.hz-pop { position: absolute; z-index: 6; opacity: 0; transition: opacity .12s; width: min(360px, calc(100% - 24px)); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.hz-pop.on { opacity: 1; }
.hz-pm { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--stage); }
.hz-pm img, .hz-pm video, .hz-pm svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hz-pm video { object-fit: contain; background: var(--stage); }
.hz-pdraw { position: absolute; inset: 0; background: var(--shade); }
.hz-pt { padding: 11px 14px 13px; }
.hz-pt .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.hz-pt h3 { font: 600 1.06rem/1.25 var(--f-d); margin: 0 0 4px; }
.hz-pc { font: 400 .86rem/1.45 var(--f-d); color: var(--grey); margin: 0 0 8px; }
.hz-po { font: 600 .82rem/1.3 var(--f-d); }
@media (max-width: 700px) {
  .hz-hint { display: none; }
  .hz-lb { font-size: .74rem; }
  .hz-jump { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
}
@media (prefers-reduced-motion: reduce) { .hz-pop { transition: none; } }

/* ------------------------------------------------------------------ project page */
.p-head { padding-block: 22px clamp(20px, 3vw, 34px); }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font: 500 .76rem/1 var(--f-m); color: var(--grey); margin: 0; }
.crumb a { color: var(--grey); }
.p-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 350px); gap: 26px 56px; align-items: end; margin-top: 20px; }
.p-title { font: 700 clamp(1.9rem, 4.4vw, 3.05rem)/1.06 var(--f-d); letter-spacing: -.02em; margin: 0; }
.lede { font-size: clamp(1.06rem, 1.7vw, 1.24rem); line-height: 1.52; margin: .75em 0 0; max-width: 35em; }
.tb { display: grid; grid-template-columns: auto minmax(0, 1fr); margin: 0; border: 1.5px solid var(--ink); font: 400 .84rem/1.4 var(--f-d); background: var(--paper); }
.tb dt { font: 500 .64rem/1.7 var(--f-m); letter-spacing: .09em; text-transform: uppercase; color: var(--grey); padding: 7px 12px 6px 10px; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.tb dd { margin: 0; padding: 6px 10px; border-bottom: 1px solid var(--rule); min-width: 0; }
.tb dt:nth-last-of-type(1), .tb dd:nth-last-of-type(1) { border-bottom: 0; }
@media (max-width: 860px) { .p-top { grid-template-columns: minmax(0, 1fr); align-items: start; } }

.stage { background: var(--stage); color: var(--stage-ink); border-block: 1px solid var(--stage-rule); }
.stage .wrap { padding-block: clamp(14px, 3vw, 34px); }
.stage figure { margin: 0 auto; max-width: 1040px; }
.stage video, .stage img { width: 100%; max-height: 78vh; object-fit: contain; background: var(--stage); }
.stage figcaption { color: var(--stage-grey); border-color: var(--stage-rule); }
.stage figcaption b { color: var(--stage-ink); }
.stage figcaption a { color: var(--stage-ink); }
.stage.sheet {
  background-color: var(--shade); color: var(--ink); border-color: var(--rule);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px;
}
.stage.sheet figure > .frame { background: var(--paper); border: 1.5px solid var(--ink); padding: clamp(10px, 2vw, 22px); }
.stage.sheet video, .stage.sheet img { background: var(--paper); }
.stage.sheet figcaption { color: var(--grey); border-color: var(--rule); }
.stage.sheet figcaption b, .stage.sheet figcaption a { color: var(--ink); }

.p-body { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 40px 64px; padding-block: clamp(30px, 5vw, 60px); align-items: start; }
.prose { min-width: 0; }
.prose > p, .prose > ul, .prose > ol, .prose > blockquote, .prose > h3 { max-width: 66ch; }
.prose > .sec { margin-top: 2.6em; }
.prose > .sec:first-child { margin-top: 0; }
.prose h3 { font: 600 1.1rem/1.3 var(--f-d); margin: 1.8em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose strong, .prose b { font-weight: 600; }
.prose .n, .n { font-family: var(--f-m); font-size: .88em; white-space: nowrap; }
.why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 2.4em; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.why > div { padding: 14px 26px 18px 0; min-width: 0; }
.why > div + div { padding-left: 26px; padding-right: 0; border-left: 1px solid var(--rule); }
.why h2 { font: 500 .66rem/1.8 var(--f-m); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); margin: 0 0 4px; }
.why p { font-size: 1.04rem; line-height: 1.56; margin: 0; }
@media (max-width: 700px) {
  .why { grid-template-columns: minmax(0, 1fr); }
  .why > div { padding-right: 0; }
  .why > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}
.one { border-left: 3px solid var(--accent); padding: 2px 0 2px 16px; font-size: 1.14rem; line-height: 1.5; max-width: 62ch; margin: 0 0 1.4em; }
.one small { display: block; font: 500 .68rem/1.8 var(--f-m); letter-spacing: .09em; text-transform: uppercase; color: var(--grey); }

figure.fig { margin: 1.7em 0; }
figure.fig > a { display: block; border: 1px solid var(--rule); background: var(--shade); }
figure.fig img { width: 100%; }
figcaption { font: 400 .84rem/1.5 var(--f-d); color: var(--grey); padding-top: 9px; max-width: 70ch; }
figcaption b { font: 500 .72rem var(--f-m); letter-spacing: .05em; color: var(--ink); margin-right: .5em; text-transform: uppercase; }
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; margin: 1.7em 0; align-items: start; }
.figs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figs figure.fig { margin: 0; }
.figs.crop figure.fig img { aspect-ratio: 4 / 3; object-fit: cover; }
.figs.tall figure.fig img { aspect-ratio: 3 / 4; object-fit: cover; }
@media (max-width: 620px) { .figs.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .figs, .figs.three { grid-template-columns: minmax(0, 1fr); } .figs.tall, .figs.three.keep { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
figure.vid { margin: 1.7em 0; }
figure.vid video { width: 100%; max-height: 80vh; background: var(--stage); border: 1px solid var(--rule); }
figure.vid.narrow { max-width: 360px; }
.yt { font: 600 .82rem var(--f-d); white-space: nowrap; }

figure.schem { margin: 1.8em 0; }
.schem-box { border: 1.5px solid var(--ink); background: var(--paper); overflow-x: auto; padding: 8px; }
.sch { width: 100%; height: auto; margin-inline: auto; }
.sch-n { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.sch-n.key { fill: var(--shade); stroke: var(--accent); stroke-width: 2; }
.sch-n.io { stroke: var(--grey); }
.sch-n.ext { stroke: var(--grey); stroke-dasharray: 5 4; }
.sch-n.check { stroke-width: 1.4; }
.sch-n2 { fill: none; stroke: var(--ink); stroke-width: .9; }
.sch-t { font: 600 12.5px var(--f-d); fill: var(--ink); text-anchor: middle; }
.sch-s { font: 400 9.8px var(--f-m); fill: var(--grey); text-anchor: middle; }
.sch-e { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.sch-e.dash { stroke-dasharray: 5 4; }
.sch-ah { fill: var(--ink); }
.sch-l { font: 500 9.6px var(--f-m); fill: var(--accent); text-anchor: middle; paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; }
.sch-l.side { text-anchor: start; }
.sch-grp { fill: none; stroke: var(--grey); stroke-width: 1; stroke-dasharray: 2 4; }
.sch-grpt { font: 500 9.4px var(--f-m); fill: var(--grey); letter-spacing: .06em; text-transform: uppercase; }

.tdraw { width: 100%; height: 100%; }
.td-bg { fill: var(--shade); }
.td-grid { stroke: var(--grid); stroke-width: 1; fill: none; }
.td-thin { fill: none; stroke: var(--grey); stroke-width: 1; stroke-linejoin: round; }
.td-line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.td-fill { fill: var(--ink); }
.td-part { fill: var(--paper); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.td-dim { fill: none; stroke: var(--accent); stroke-width: 1; }
.td-txt { font: 500 9.5px var(--f-m); fill: var(--accent); text-anchor: middle; }
.td-txt.l { text-anchor: start; }
.td-num { font: 700 58px var(--f-d); letter-spacing: -1px; fill: var(--ink); text-anchor: start; }
.td-cap { font: 600 13px var(--f-d); fill: var(--ink); text-anchor: start; }
.td-sub { font: 400 9.5px var(--f-m); fill: var(--grey); text-anchor: start; }
.td-txt.inv { fill: var(--accent-ink); }
.td-win { fill: none; stroke: var(--accent); stroke-width: 2; }
.td-c0 { fill: var(--paper); stroke: var(--rule); } .td-c1 { fill: var(--accent); fill-opacity: .12; stroke: var(--rule); }
.td-c2 { fill: var(--accent); fill-opacity: .3; stroke: var(--rule); } .td-c3 { fill: var(--accent); fill-opacity: .55; stroke: var(--rule); }
.td-c4 { fill: var(--accent); fill-opacity: .85; stroke: var(--rule); }
.td-lvl rect { fill: var(--paper); stroke: var(--rule); } .td-lvl rect.on { fill: var(--accent); stroke: var(--accent); }

.tbl-wrap { overflow-x: auto; margin: 1.6em 0; }
table.tbl { width: 100%; border-collapse: collapse; font: 400 .88rem/1.45 var(--f-d); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.tbl caption { caption-side: bottom; text-align: left; font: 400 .84rem/1.5 var(--f-d); color: var(--grey); padding-top: 9px; }
.tbl th { text-align: left; font: 500 .66rem/1.5 var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); padding: 8px 14px 8px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.tbl td { padding: 9px 14px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.n { font-family: var(--f-m); font-size: .82rem; white-space: nowrap; }
.tbl tr.hi td { background: var(--shade); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 1.6em 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.stats div { padding: 14px 16px 14px 0; min-width: 0; }
.stats b { display: block; font: 700 clamp(1.5rem, 3vw, 2rem)/1.1 var(--f-d); letter-spacing: -.01em; }
.stats span { display: block; font: 400 .82rem/1.4 var(--f-d); color: var(--grey); margin-top: 4px; }
blockquote.q { margin: 1.5em 0; padding: 0 0 0 18px; border-left: 3px solid var(--ink); }
blockquote.q p { font-size: 1.1rem; line-height: 1.5; margin: 0 0 .35em; }
blockquote.q footer { font: 400 .8rem/1.4 var(--f-d); color: var(--grey); }
.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 1.6em 0; }
.cells div { background: var(--paper); padding: 14px 16px 16px; min-width: 0; }
.cells .lab { display: block; font: 500 .66rem/1.7 var(--f-m); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.cells b { display: block; font: 600 1rem/1.3 var(--f-d); margin: 2px 0 6px; }
.cells p { font: 400 .88rem/1.5 var(--f-d); color: var(--ink); margin: 0; }
.note { border: 1px solid var(--rule); background: var(--shade); padding: 14px 16px; font: 400 .9rem/1.5 var(--f-d); max-width: 66ch; margin: 1.5em 0; }
.note b { font-weight: 600; }
.note .lab { display: block; font: 500 .66rem/1.7 var(--f-m); letter-spacing: .09em; text-transform: uppercase; color: var(--grey); }
mark { background: var(--hl); color: var(--hl-ink); padding: 0 .15em; }

.rail { display: grid; gap: 30px; position: sticky; top: 20px; min-width: 0; }
.rail h2 { font: 500 .68rem/1.4 var(--f-m); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); margin: 0 0 8px; }
.rev { width: 100%; border-collapse: collapse; border: 1.5px solid var(--ink); font: 400 .8rem/1.35 var(--f-d); }
.rev th { font: 500 .62rem/1.4 var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--ink); }
.rev td { padding: 7px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.rev tr:last-child td { border-bottom: 0; }
.rev td:first-child, .rev td:last-child { font-family: var(--f-m); font-size: .7rem; white-space: nowrap; color: var(--grey); }
.rev a { color: var(--ink); }
.rev tr.cur td { background: var(--shade); font-weight: 600; }
.rev tr.cur td:first-child { color: var(--accent); }
.rail p { font: 400 .84rem/1.5 var(--f-d); color: var(--grey); margin: 8px 0 0; }
.links { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); font: 500 .86rem/1.4 var(--f-d); }
.links li { border-bottom: 1px solid var(--rule); }
.links a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; text-decoration: none; color: var(--ink); }
.links a::after { content: "\2197"; color: var(--grey); }
.links a:hover { color: var(--accent); }
.credit { font: 400 .84rem/1.5 var(--f-d); color: var(--ink); margin: 0; }
@media (max-width: 980px) {
  .p-body { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

.where { padding-block: 8px 34px; }
.where-box { border: 1.5px solid var(--ink); padding: 14px 16px 6px; }
.where-box > p { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; font: 500 .68rem/1.4 var(--f-m); letter-spacing: .09em; text-transform: uppercase; color: var(--grey); margin: 0 0 4px; }
.where-box > p a { color: var(--grey); }
.where-scroll { overflow-x: auto; }
.mini { width: 100%; min-width: 640px; height: auto; }
.mini-w { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.mini-tick { stroke: var(--grey); stroke-width: 1; }
.mini-yr { font: 400 10px var(--f-m); fill: var(--grey); text-anchor: middle; }
.mini-d { fill: var(--paper); stroke: var(--tc, var(--t-other)); stroke-width: 2.5; }
.mini-hit { fill: transparent; }
.mini a:hover .mini-d, .mini a:focus-visible .mini-d { fill: var(--tc, var(--t-other)); }
.mini .th-cad { --tc: var(--t-cad); } .mini .th-vision { --tc: var(--t-vision); } .mini .th-pack { --tc: var(--t-pack); }
.mini .th-energy { --tc: var(--t-energy); } .mini .th-other { --tc: var(--t-other); }
.mini-cur { fill: var(--hl); stroke: var(--ink); stroke-width: 2; }
.mini-lead { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.mini-lab { font: 600 12px var(--f-d); fill: var(--ink); }

.pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-block: 0 clamp(36px, 6vw, 70px); }
.pn a { display: block; border: 1px solid var(--rule); padding: 14px 16px; text-decoration: none; color: var(--ink); min-width: 0; }
.pn a:hover { border-color: var(--accent); }
.pn a.nx { text-align: right; }
.pn small { display: block; font: 500 .66rem/1.7 var(--f-m); letter-spacing: .09em; text-transform: uppercase; color: var(--grey); }
.pn b { display: block; font: 600 1rem/1.3 var(--f-d); }
.pn span { display: block; font: 400 .84rem/1.4 var(--f-d); color: var(--grey); margin-top: 2px; }
@media (max-width: 520px) { .pn { grid-template-columns: minmax(0, 1fr); } .pn a.nx { text-align: left; } }

/* ------------------------------------------------------------------ research + about */
.page-head { padding-block: clamp(28px, 5vw, 56px) 4px; }
.page-head h1 { font: 700 clamp(2rem, 5vw, 3.2rem)/1.05 var(--f-d); letter-spacing: -.02em; margin: .2em 0 .4em; }
.page-head p { max-width: 40em; font-size: 1.1rem; }
.refs { list-style: none; margin: 0; padding: 0; counter-reset: ref; }
.refs > li { counter-increment: ref; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); padding-block: 18px; border-bottom: 1px solid var(--rule); }
.refs > li:first-child { border-top: 2px solid var(--ink); }
.refs > li::before { content: "[" counter(ref) "]"; font: 500 .8rem/1.9 var(--f-m); color: var(--grey); }
.refs .r-t { font: 600 1.06rem/1.35 var(--f-d); margin: 0 0 3px; }
.refs .r-a { font-size: .98rem; margin: 0 0 2px; }
.refs .r-v { font: 400 .9rem/1.5 var(--f-d); color: var(--grey); margin: 0 0 8px; }
.refs .r-n { font: 400 .92rem/1.5 var(--f-d); margin: 0 0 8px; max-width: 64ch; }
.r-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 600 .82rem/1.4 var(--f-d); align-items: center; }
.r-links button { font: 600 .82rem/1.4 var(--f-d); color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
pre.bib { font: 400 .76rem/1.55 var(--f-m); background: var(--shade); border: 1px solid var(--rule); padding: 12px 14px; overflow-x: auto; margin: 10px 0 0; white-space: pre; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 30px 56px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.two-col .prose > p { max-width: 62ch; }
.list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); font: 400 .93rem/1.5 var(--f-d); }
.list li { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.list .dim { padding-top: 2px; }
.list li > span { min-width: 0; overflow-wrap: anywhere; }
.list b { font-weight: 600; }
.list span span { color: var(--grey); }
details.more { border-bottom: 1px solid var(--rule); font: 400 .93rem/1.5 var(--f-d); }
details.more summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
details.more ul { margin: 0 0 12px; padding-left: 1.2em; }

/* ------------------------------------------------------------------ footer */
.foot { border-top: 1.5px solid var(--ink); margin-top: 10px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; padding-block: 26px 34px; font: 400 .86rem/1.6 var(--f-d); }
.foot h2 { font: 500 .66rem/1.6 var(--f-m); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); margin: 0 0 4px; }
.foot p { margin: 0; }
.foot a { color: var(--ink); }
.foot .sel { user-select: all; }
@media (max-width: 700px) { .foot .wrap { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media print { .nav, .theme, .filters, .pn, .where { display: none; } }

/* YouTube player embedded in place */
.yt-frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: #000; border-radius: 6px; overflow: hidden; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* research: one small card per problem */
.pcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 26px 24px; }
.pc { display: flex; flex-direction: column; min-width: 0; color: var(--ink); text-decoration: none; }
.pc-m { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--shade); border: 1px solid var(--rule); margin-bottom: 10px; }
.pc-m img, .pc-m svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc:hover .pc-m, .pc:focus-visible .pc-m { border-color: var(--accent); }
.pc-w { font: 500 .66rem/1.5 var(--f-m); letter-spacing: .09em; text-transform: uppercase; color: var(--grey); }
.pc-p { font: 600 1.02rem/1.35 var(--f-d); margin: 3px 0 8px; text-wrap: balance; }
.pc-r { font: 500 .8rem/1.4 var(--f-m); color: var(--accent); }
.pc-n { margin-top: 6px; font: 600 .82rem var(--f-d); color: var(--grey); }
.pc:hover .pc-n { color: var(--accent); }

/* project pages whose lead video sits beside the text */
.side-media { margin: 0; }
.side-media video, .side-media img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); border-radius: 4px; background: var(--stage); }
.side-media figcaption { font: 400 .78rem/1.45 var(--f-d); color: var(--grey); margin-top: 6px; }

/* miniature box timeline at the foot of each project page */
.where-box { border: 1px solid var(--rule); border-radius: 6px; }
.mt { display: block; margin-inline: auto; max-width: none; }
.mt-w { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.mt-y { font: 500 10px var(--f-m); fill: var(--grey); letter-spacing: .06em; }
.mt-d { fill: var(--paper); stroke: var(--tc, var(--t-other)); stroke-width: 2.5; }
.mt a:hover .mt-d, .mt a:focus .mt-d { fill: var(--tc, var(--t-other)); }
.mt-c { fill: var(--accent); stroke: var(--paper); stroke-width: 2; }
.mt-n { font: 700 11px var(--f-d); fill: var(--ink); }

/* project pages: the problem leads under the title, the idea opens the body */
.prob { margin: 1.1em 0 0; max-width: 40em; border-left: 3px solid var(--accent); padding: 2px 0 2px 16px; }
.prob h2, .idea h2 { font: 600 .7rem/1.6 var(--f-m); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.prob p { font-size: clamp(1.06rem, 1.6vw, 1.2rem); line-height: 1.55; margin: 0; }
.idea { margin: 0 0 2.2em; padding: 14px 0 16px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.idea p { font-size: 1.06rem; line-height: 1.58; margin: 0; }
.fig.loop video { display: block; width: 100%; height: auto; background: var(--stage); border: 1px solid var(--rule); }

/* Point-cloud viewer (site.js): poster image first, canvas on top once loaded */
.fig.pc3d .pc3d-box { position: relative; aspect-ratio: 16 / 9; background: #111113; border: 1px solid var(--rule); overflow: hidden; }
.fig.pc3d .pc3d-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fig.pc3d .pc3d-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.fig.pc3d .pc3d-box canvas:active { cursor: grabbing; }
.fig.pc3d .pc3d-hint { position: absolute; right: .6em; bottom: .5em; z-index: 1; font: 11px/1 var(--mono, monospace); color: #bbb; opacity: 0; transition: opacity .4s; pointer-events: none; }
.fig.pc3d .pc3d-box.live .pc3d-hint { opacity: .8; }
.fig.pc3d .pc3d-box.used .pc3d-hint { opacity: 0; }
