/* ==========================================================================
   Ali Mohammadi Ruzbahani: design system
   Monochrome · precise · typographic
   ========================================================================== */

:root {
  --black: #0a0a0b;
  --black-2: #131315;
  --black-3: #1b1b1e;
  --ink: #0e0e10;
  --ink-body: #2a2a2e;
  --ink-2: #4b4b51;
  --ink-3: #6c6c72;
  --paper: #ffffff;
  --paper-2: #f4f4f2;
  --paper-3: #e9e9e5;
  --line: #e3e3df;
  --line-2: #cfcfca;
  --on-dark: #f4f4f2;
  --on-dark-2: #a7a7ac;
  --on-dark-3: #838389;
  --line-dark: rgba(255, 255, 255, .13);
  --line-dark-2: rgba(255, 255, 255, .28);
  --signal: #ff5a4e;
  --live: #35c97d;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --max: 1440px;
  --gutter: clamp(20px, 4.6vw, 64px);
  --gap: clamp(16px, 1.9vw, 28px);
  --section: clamp(72px, 8vw, 128px);
  --nav-h: 72px;
  --radius: 2px;

  --ease: cubic-bezier(.25, .1, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
@media (max-width: 760px) { :root { --nav-h: 60px; } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}
@supports (interpolate-size: allow-keywords) { :root { interpolate-size: allow-keywords; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 0; }
strong, b { font-weight: 600; }
em { font-style: italic; }
::selection { background: var(--ink); color: var(--paper); }
.is-dark ::selection { background: var(--paper); color: var(--ink); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
[hidden] { display: none !important; }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  padding: 12px 18px; background: var(--ink); color: var(--paper); font-weight: 500;
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: none; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.label {
  font-size: .6875rem;
  line-height: 1.4;
  font-weight: 600;
  font-stretch: 125%;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.is-dark { background: var(--black); color: var(--on-dark); }
.arrow { width: 18px; height: 18px; flex: none; transition: transform .45s var(--ease-out); }
.arrow--ne { transform: rotate(-45deg); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 52px; padding: 0 24px;
  font-size: .9375rem; font-weight: 500; letter-spacing: .005em; white-space: nowrap;
  border: 1px solid currentColor; border-radius: var(--radius);
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }
.btn--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--ink:hover { background: transparent; color: var(--ink); }
.btn--paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--paper:hover { background: transparent; color: var(--paper); }
.btn--ghost-dark { color: var(--on-dark); border-color: var(--line-dark-2); }
.btn--ghost-dark:hover { border-color: var(--on-dark); background: rgba(255, 255, 255, .06); }
.btn--ghost { color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); }

.link {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size .55s var(--ease-out);
}
.link:hover { background-size: 100% 1px; }
.link:hover .arrow { transform: translateX(4px); }
.link:hover .arrow--ne { transform: rotate(-45deg) translateX(3px); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--nav-h);
  color: var(--on-dark);
  border-bottom: 1px solid transparent;
  transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease), transform .6s var(--ease-out);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.brand {
  margin-right: auto;
  font-size: .8125rem; font-weight: 600; font-stretch: 125%;
  letter-spacing: .17em; text-transform: uppercase; white-space: nowrap;
}
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.2vw, 34px); }
.nav__links a { position: relative; font-size: .875rem; font-weight: 450; opacity: .76; transition: opacity .3s var(--ease); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.nav__links a:hover, .nav__links a[aria-current] { opacity: 1; }
.nav__links a:hover::after, .nav__links a[aria-current]::after { transform: scaleX(1); }
.nav__cta {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px;
  font-size: .875rem; font-weight: 500;
  color: var(--on-dark);
  border: 1px solid var(--line-dark-2); border-radius: var(--radius);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.nav__cta:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.nav__menu { display: inline-flex; align-items: center; gap: 12px; height: 40px; font-size: .875rem; font-weight: 500; }
.nav__menu-icon { position: relative; width: 20px; height: 10px; }
.nav__menu-icon::before, .nav__menu-icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .5s var(--ease-out), top .5s var(--ease-out);
}
.nav__menu-icon::before { top: 0; }
.nav__menu-icon::after { top: 8.5px; }

.nav--solid {
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
}
.nav--solid .nav__cta { color: var(--ink); border-color: var(--ink); }
.nav--solid .nav__cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.nav--hidden { transform: translateY(-100%); }

.menu-open, .is-locked { overflow: hidden; }
.menu-open .nav { background: transparent; color: var(--on-dark); border-bottom-color: transparent; transform: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-open .nav__links, .menu-open .nav__cta { visibility: hidden; }
.menu-open .nav__menu-icon::before { top: 4.25px; transform: rotate(45deg); }
.menu-open .nav__menu-icon::after { top: 4.25px; transform: rotate(-45deg); }
@media (max-width: 1180px) { .nav__links, .nav__cta { display: none; } }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--black); color: var(--on-dark);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility 0s linear .5s;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .5s var(--ease), visibility 0s; }
.menu__inner {
  min-height: 100%;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 56px;
  align-content: start;
  padding-top: calc(var(--nav-h) + clamp(28px, 6vh, 72px)); padding-bottom: 48px;
}
.menu__list { grid-column: 1 / span 8; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); border-top: 1px solid var(--line-dark); }
.menu__list li { border-bottom: 1px solid var(--line-dark); opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(var(--i, 0) * 35ms + 80ms); }
.menu-open .menu__list li { opacity: 1; transform: none; }
.menu__list a {
  display: flex; align-items: baseline; gap: 18px; padding: 16px 0;
  font-size: clamp(1.375rem, 1rem + 1.4vw, 2.25rem); font-weight: 400; letter-spacing: -.03em; line-height: 1.1;
  transition: transform .5s var(--ease-out), opacity .3s;
}
.menu__list a:hover { transform: translateX(10px); }
.menu__list .label { color: var(--on-dark-3); min-width: 2.4em; }
.menu__aside { grid-column: 10 / -1; display: flex; flex-direction: column; gap: 32px; }
.menu__aside .label { color: var(--on-dark-3); margin-bottom: 12px; }
.menu__aside a { display: block; padding: 4px 0; color: var(--on-dark-2); transition: color .3s; }
.menu__aside a:hover { color: var(--on-dark); }
@media (max-width: 1000px) {
  .menu__list, .menu__aside { grid-column: 1 / -1; }
  .menu__list { grid-template-columns: 1fr; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48% 62% at 82% 38%, rgba(255, 255, 255, .085), transparent 72%),
    radial-gradient(36% 44% at 6% 108%, rgba(255, 255, 255, .04), transparent 70%);
}
.hero__inner {
  position: relative;
  min-height: clamp(700px, 100svh, 1040px);
  display: flex; flex-direction: column;
  padding-top: calc(var(--nav-h) + clamp(40px, 9vh, 112px));
  padding-bottom: clamp(28px, 4vh, 44px);
}
.hero__grid { flex: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.hero__copy { grid-column: 1 / span 8; align-self: center; }
.status { display: inline-flex; align-items: center; gap: 12px; color: var(--on-dark-2); }
.status__dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.status__dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--live); opacity: 0; animation: ping 2.6s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.hero__title {
  margin-top: clamp(24px, 3.4vh, 36px);
  max-width: 13ch;
  font-size: clamp(2.75rem, 1.05rem + 5.4vw, 6.25rem);
  font-weight: 430; line-height: .98; letter-spacing: -.045em;
  text-wrap: balance;
}
.hero__lead { margin-top: clamp(24px, 3.4vh, 36px); max-width: 54ch; font-size: clamp(1.0625rem, .98rem + .35vw, 1.25rem); line-height: 1.6; color: var(--on-dark-2); }
.hero__lead strong { color: var(--on-dark); font-weight: 500; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4.2vh, 44px); }
.portrait { grid-column: 9 / -1; align-self: end; max-width: 440px; justify-self: end; width: 100%; }
.portrait__frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--black-3); }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.06) brightness(.94); }
.portrait__frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); pointer-events: none; }
.portrait figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--on-dark-3); }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(48px, 8vh, 96px); border-top: 1px solid var(--line-dark); }
.spec { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; padding: 22px 24px 0 0; }
.spec + .spec { padding-left: 24px; border-left: 1px solid var(--line-dark); }
.spec dt { color: var(--on-dark-3); }
.spec dd { font-size: clamp(2.25rem, 1.5rem + 2.2vw, 3.75rem); font-weight: 250; font-stretch: 110%; letter-spacing: -.04em; line-height: 1; }
.spec dd sup { font-size: .5em; vertical-align: top; position: relative; top: .12em; margin-left: .04em; }
.scroll-cue { position: absolute; right: var(--gutter); bottom: clamp(28px, 4vh, 44px); color: var(--on-dark-3); }
.scroll-cue span { display: inline-flex; align-items: center; gap: 14px; }
.scroll-cue i { position: relative; width: 1px; height: 44px; background: var(--line-dark); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 100%; background: var(--on-dark); animation: drop 2.4s var(--ease-out) infinite; }
@keyframes drop { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

@media (max-width: 960px) {
  .hero__copy { grid-column: 1 / -1; }
  .portrait { grid-column: 1 / span 7; margin-top: 56px; justify-self: start; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec:nth-child(3) { padding-left: 0; border-left: 0; }
  .spec:nth-child(n + 3) { margin-top: 18px; border-top: 1px solid var(--line-dark); }
  .scroll-cue { display: none; }
}
@media (max-width: 560px) {
  .portrait { grid-column: 1 / -1; }
  .portrait__frame { aspect-ratio: 1 / 1; }
  .portrait figcaption { flex-direction: column; gap: 4px; }
  .spec { padding: 18px 12px 0 0; }
  .spec + .spec { padding-left: 12px; }
  .spec dt { font-size: .5625rem; letter-spacing: .12em; }
}

/* hero entrance */
@media (prefers-reduced-motion: no-preference) {
  .intro { animation: intro 1.15s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
  .portrait__frame img { animation: develop 2s var(--ease-out) both; }
}
@keyframes intro { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes develop { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: var(--section); }
.section--tint { background: var(--paper-2); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.section__grid { position: relative; padding-top: clamp(20px, 2.2vw, 30px); }
.section__grid::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--ink); }
.is-dark .section__grid::before { background: var(--on-dark); }
.section__body > :is(.entries, .ledger, .pubs, .contact-list):first-child { border-top: 0; }
.section__body > :is(.entries, .ledger):first-child > :first-child { padding-top: 0; }
.section__head { grid-column: 1 / span 3; }
.section__sticky { position: sticky; top: calc(var(--nav-h) + 28px); }
.section__num { color: var(--ink-3); margin-bottom: 14px; }
.is-dark .section__num { color: var(--on-dark-3); }
.section__title { font-size: clamp(1.75rem, 1.2rem + 1.35vw, 2.625rem); font-weight: 450; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.section__body { grid-column: 4 / -1; min-width: 0; }
.section__aside { margin-top: 24px; }
/* stacked head variant */
.section__bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; border-top: 1px solid var(--ink); padding-top: clamp(20px, 2.2vw, 30px); margin-bottom: clamp(40px, 5vw, 72px); }
.is-dark .section__bar { border-top-color: var(--on-dark); }
.section__bar .section__title { font-size: clamp(2.25rem, 1.3rem + 3vw, 4.5rem); }
.section__bar-text { max-width: 44ch; color: var(--ink-2); }
.is-dark .section__bar-text { color: var(--on-dark-2); }
@media (max-width: 1000px) {
  .section__head, .section__body { grid-column: 1 / -1; }
  .section__head { margin-bottom: clamp(32px, 6vw, 48px); }
  .section__sticky { position: static; }
}

.statement { font-size: clamp(1.625rem, 1.05rem + 1.9vw, 3rem); font-weight: 400; line-height: 1.14; letter-spacing: -.032em; text-wrap: balance; max-width: 25ch; }
.lead { font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); line-height: 1.6; color: var(--ink-2); }
.lead strong { color: var(--ink); font-weight: 500; }
.copy p { color: var(--ink-2); line-height: 1.72; max-width: 62ch; }
.copy p + p { margin-top: 1.1em; }
.subhead { color: var(--ink-3); margin-bottom: 20px; }
.is-dark .subhead { color: var(--on-dark-3); }

/* ---------- About ---------- */
.about__statement { margin-bottom: clamp(48px, 6vw, 88px); }
.about__cols { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); }
.about__text { grid-column: 1 / span 5; }
.facts { grid-column: 6 / -1; margin-left: clamp(0px, 2vw, 32px); border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 104px 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-3); padding-top: 3px; }
.facts dd { font-size: .9375rem; font-weight: 500; line-height: 1.45; }
@media (max-width: 1000px) {
  .about__text, .facts { grid-column: 1 / -1; margin-left: 0; }
  .facts { margin-top: 48px; }
}

/* ---------- Research focus ---------- */
.focus__top { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; border-top: 1px solid var(--on-dark); padding-top: 22px; margin-bottom: clamp(56px, 8vw, 120px); }
.focus__top .label { color: var(--on-dark-3); }
.focus__top h2 { color: var(--on-dark); }
.focus__grid { --fgap: clamp(40px, 5.2vw, 88px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--fgap); }
.focus__item { position: relative; min-width: 0; }
.focus__item + .focus__item::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--fgap) / -2); width: 1px; background: var(--line-dark); }
.focus__num { font-size: clamp(3.5rem, 1.8rem + 4.4vw, 7rem); font-weight: 200; font-stretch: 125%; letter-spacing: -.05em; line-height: .85; color: #3a3a3f; }
.focus__title { margin-top: clamp(40px, 6vw, 96px); font-size: clamp(1.5rem, 1.1rem + 1.15vw, 2.375rem); font-weight: 420; letter-spacing: -.032em; line-height: 1.08; text-wrap: balance; }
.focus__meta { margin-top: 18px; color: var(--on-dark-2); font-size: .9375rem; line-height: 1.6; }
@media (max-width: 860px) {
  .focus__grid { grid-template-columns: 1fr; }
  .focus__item { padding-right: 0; }
  .focus__item + .focus__item { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-dark); margin-top: 40px; padding-top: 40px; }
  .focus__item + .focus__item::before { display: none; }
  .focus__title { margin-top: 24px; }
}

/* ---------- Publications ---------- */
.feature {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
  padding: clamp(28px, 3.8vw, 60px);
  margin-bottom: clamp(32px, 3.4vw, 48px);
}
.feature__label { color: var(--on-dark-3); }
.feature__title { margin-top: clamp(28px, 4vw, 56px); max-width: 26ch; font-size: clamp(1.5rem, 1.05rem + 1.45vw, 2.5rem); font-weight: 420; letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; }
.feature__meta { margin-top: 24px; color: var(--on-dark-2); font-size: .9375rem; line-height: 1.55; }
.feature__meta i { font-style: normal; color: var(--on-dark); }
.feature__num { font-size: clamp(4.5rem, 2rem + 6.4vw, 10rem); font-weight: 200; font-stretch: 125%; line-height: .78; letter-spacing: -.05em; color: #2c2c31; }
@media (max-width: 640px) { .feature { grid-template-columns: 1fr; } .feature__num { display: none; } }

.pubs { border-top: 1px solid var(--ink); }
.pub { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: clamp(16px, 2.2vw, 36px); align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--line); }
.pub__num { color: var(--ink-3); }
.pub__title { font-size: clamp(1.0625rem, .98rem + .3vw, 1.25rem); font-weight: 500; letter-spacing: -.016em; line-height: 1.35; text-wrap: pretty; }
.pub__meta { margin-top: 8px; font-size: .875rem; line-height: 1.55; color: var(--ink-3); }
.pub__meta i { font-style: normal; color: var(--ink-2); }
.pub__meta a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color .3s; }
.pub__meta a:hover { text-decoration-color: currentColor; }
.pub__type { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink-2); white-space: nowrap; }
.more { margin-top: clamp(28px, 3vw, 40px); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; color: var(--ink-3); }
.more .link { color: var(--ink); }
.is-dark .more .link { color: var(--on-dark); }
@media (max-width: 640px) {
  .pub { grid-template-columns: 36px minmax(0, 1fr); }
  .pub__type { grid-column: 2; justify-self: start; margin-top: 4px; }
}

/* ---------- Interactive research cards (home) ---------- */
.feature__title--wide { max-width: 34ch; }
.feature__meta a { color: var(--on-dark); text-decoration: underline; text-decoration-color: var(--line-dark-2); text-underline-offset: 3px; transition: text-decoration-color .3s; }
.feature__meta a:hover { text-decoration-color: currentColor; }
.rpubs-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 20px; }
.rpubs-head .subhead { margin-bottom: 0; }
.rpubs-head__text { color: var(--ink-3); font-size: .9375rem; }
.rpubs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: clamp(44px, 5vw, 72px); }
.rpub { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line-2); transition: border-color .35s var(--ease); }
.rpub:hover { border-color: var(--ink); }
.rpub__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--black); }
.rpub__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.rpub:hover .rpub__media img { transform: scale(1.035); }
.rpub__badge { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; background: rgba(10, 10, 11, .74); color: var(--on-dark); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.rpub__badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgba(53, 201, 125, .22); }
.rpub__body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.rpub__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-3); }
.rpub__title { margin-top: 14px; font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); font-weight: 480; letter-spacing: -.02em; line-height: 1.26; text-wrap: pretty; }
.rpub__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease-out); }
.rpub__title a:hover { background-size: 100% 1px; }
.rpub__authors { margin-top: 10px; font-size: .875rem; color: var(--ink-3); }
.rpub__links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: auto; padding-top: 22px; font-size: .9375rem; }
.rpub__paper { color: var(--ink-3); transition: color .3s; }
.rpub__paper:hover { color: var(--ink); }
@media (max-width: 760px) { .rpubs { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.project { display: flex; flex-direction: column; min-width: 0; background: var(--paper); border: 1px solid var(--line-2); transition: border-color .35s var(--ease); }
.project:hover { border-color: var(--ink); }
.project__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--black); border-bottom: 1px solid var(--line-2); }
.project__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1.6s var(--ease-out); }
.project:hover .project__media img { transform: scale(1.03); }
.project__body { display: flex; flex-direction: column; flex: 1; padding: clamp(20px, 2vw, 28px); }
.project__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-3); }
.project__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 12px; }
.project__title { font-size: clamp(1.625rem, 1.25rem + 1vw, 2.125rem); font-weight: 440; letter-spacing: -.04em; line-height: 1.05; }
.project__tagline { font-size: .9375rem; color: var(--ink-2); letter-spacing: -.01em; }
.project__text { margin-top: 12px; color: var(--ink-2); font-size: .875rem; line-height: 1.62; }
.project__specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; border-top: 1px solid var(--line-2); }
.project__specs div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 12px 10px 0 0; min-width: 0; }
.project__specs div + div { padding-left: 12px; border-left: 1px solid var(--line-2); }
.project__specs dt { color: var(--ink-3); font-size: .625rem; letter-spacing: .12em; }
.project__specs dd { font-size: clamp(1.25rem, 1.05rem + .5vw, 1.625rem); font-weight: 300; font-stretch: 110%; letter-spacing: -.035em; line-height: 1; }
.project__links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: auto; padding-top: 20px; font-size: .9375rem; }
.project__links .link + .link { color: var(--ink-3); }
@media (max-width: 900px) { .projects { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .project__specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project__specs div:nth-child(3) { padding-left: 0; border-left: 0; }
  .project__specs div:nth-child(n + 3) { margin-top: 12px; }
}

.tracks { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: clamp(24px, 3vw, 36px); }
.tracks .label { color: var(--ink-3); }
.tracks__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tracks__list li { padding: 7px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); font-size: .8125rem; color: var(--ink-2); }

/* ---------- Tiles (services) ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.tile { --pad: clamp(18px, 2.2vw, 32px); padding: clamp(22px, 2.2vw, 32px) var(--pad) clamp(28px, 2.8vw, 40px); display: flex; flex-direction: column; min-height: clamp(200px, 18vw, 260px); border-bottom: 1px solid var(--line-2); }
.tile__top { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-3); }
.tile__title { padding-top: clamp(40px, 4.4vw, 64px); font-size: clamp(1.25rem, 1.02rem + .65vw, 1.625rem); font-weight: 470; letter-spacing: -.024em; line-height: 1.18; }
.tile__title:last-child { margin-top: auto; }
.tile__text { margin-top: 12px; color: var(--ink-2); font-size: .9375rem; line-height: 1.65; }
.tile__status { display: inline-flex; align-items: center; gap: 8px; }
.tile__status::before { content: ""; width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; }
@media (min-width: 1001px) {
  .tile:nth-child(3n + 1) { padding-left: 0; }
  .tile:not(:nth-child(3n + 1)) { border-left: 1px solid var(--line-2); }
}
@media (max-width: 1000px) and (min-width: 641px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile:nth-child(2n + 1) { padding-left: 0; }
  .tile:nth-child(2n) { border-left: 1px solid var(--line-2); }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { padding-left: 0; padding-right: 0; min-height: 0; }
  .tile__title { padding-top: 28px; }
}

.projects__note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 32px; color: var(--ink-3); }

/* ---------- Writing cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 2.6vw, 40px) var(--gap); }
.card__link { display: flex; flex-direction: column; height: 100%; }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--black); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.card__link:hover .card__media img { transform: scale(1.045); }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 22px; color: var(--ink-3); }
.card__title { margin-top: 12px; font-size: clamp(1.25rem, 1.05rem + .5vw, 1.5rem); font-weight: 470; letter-spacing: -.024em; line-height: 1.2; text-wrap: balance; }
.card__title span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease-out); }
.card__link:hover .card__title span { background-size: 100% 1px; }
.card__text { margin-top: 12px; color: var(--ink-2); font-size: .9375rem; line-height: 1.62; }
.card__cta { margin-top: auto; padding-top: 22px; display: inline-flex; align-items: center; gap: 10px; font-size: .875rem; font-weight: 500; }
.card__link:hover .card__cta .arrow { transform: translateX(4px); }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Entries (experience / education) ---------- */
.entries { border-top: 1px solid var(--ink); }
.entry { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); padding: clamp(26px, 2.8vw, 40px) 0; border-bottom: 1px solid var(--line); }
.entry__when { grid-column: 1 / span 3; }
.entry__date { color: var(--ink); }
.entry__place { margin-top: 10px; font-size: .875rem; line-height: 1.5; color: var(--ink-3); max-width: 30ch; text-wrap: balance; }
.entry__what { grid-column: 4 / -1; }
.entry__role { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.625rem); font-weight: 470; letter-spacing: -.024em; line-height: 1.2; }
.entry__desc { margin-top: 12px; color: var(--ink-2); line-height: 1.7; max-width: 64ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tags li { padding: 5px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); font-size: .75rem; font-weight: 500; color: var(--ink-2); }
@media (max-width: 720px) {
  .entry__when, .entry__what { grid-column: 1 / -1; }
  .entry__what { margin-top: 14px; }
}

.academic__intro { margin-bottom: clamp(48px, 6vw, 80px); max-width: 60ch; }
.interests { margin-top: clamp(56px, 7vw, 96px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 10px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); font-size: .9375rem; transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.chips li:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.skill { padding: 26px clamp(18px, 2vw, 30px) 8px; }
.skill__kicker { color: var(--ink-3); }
.skill__title { margin-top: 16px; font-size: clamp(1.1875rem, 1.02rem + .45vw, 1.4375rem); font-weight: 480; letter-spacing: -.02em; line-height: 1.2; }
.skill__list { margin-top: 26px; }
.skill__list li { padding: 12px 0; border-top: 1px solid var(--line-2); font-size: .9375rem; color: var(--ink-2); }
@media (min-width: 1001px) {
  .skill:first-child { padding-left: 0; }
  .skill + .skill { border-left: 1px solid var(--line-2); }
}
@media (max-width: 1000px) and (min-width: 601px) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill:nth-child(2n + 1) { padding-left: 0; }
  .skill:nth-child(2n) { border-left: 1px solid var(--line-2); }
  .skill:nth-child(n + 3) { border-top: 1px solid var(--line-2); margin-top: 24px; }
}
@media (max-width: 600px) {
  .skills { grid-template-columns: 1fr; }
  .skill { padding-left: 0; padding-right: 0; }
  .skill + .skill { border-top: 1px solid var(--line-2); margin-top: 24px; }
}

/* ---------- Ledger (awards, certifications) ---------- */
.ledger { border-top: 1px solid var(--ink); }
.ledger__row { display: grid; grid-template-columns: 64px minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(14px, 2vw, 32px); align-items: baseline; padding: 19px 0; border-bottom: 1px solid var(--line); }
.ledger--links .ledger__row { grid-template-columns: 64px minmax(0, 1.5fr) minmax(0, 1fr) 118px; }
.ledger__year { font-size: .9375rem; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ledger__title { font-size: 1.0625rem; font-weight: 500; letter-spacing: -.012em; line-height: 1.42; text-wrap: pretty; }
.ledger__by { font-size: .875rem; line-height: 1.55; color: var(--ink-3); }
.ledger__link { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.ledger__link .arrow { width: 15px; height: 15px; }
.ledger__link:hover .arrow--ne { transform: rotate(-45deg) translateX(3px); }
.ledger.is-collapsed .is-extra { display: none; }
.ledger-toggle { margin-top: 28px; }
.ledger-toggle .arrow { transform: rotate(90deg); }
.ledger-toggle[aria-expanded="true"] .arrow { transform: rotate(-90deg); }
@media (max-width: 760px) {
  .ledger__row, .ledger--links .ledger__row { grid-template-columns: 48px minmax(0, 1fr); row-gap: 6px; }
  .ledger__by, .ledger__link { grid-column: 2; }
  .ledger__link { justify-self: start; margin-top: 4px; }
}

/* ---------- Gallery ---------- */
.rail__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(232px, 21vw, 300px); gap: clamp(14px, 1.6vw, 24px);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__item { scroll-snap-align: start; }
.frame__link { display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--black-2); }
.frame__link img {
  position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain;
  filter: grayscale(1) brightness(.84) contrast(1.06);
  transition: filter .8s var(--ease), transform 1s var(--ease-out);
}
.frame__link:hover img, .frame__link:focus-visible img { filter: none; transform: scale(1.035); }
.frame__link:focus-visible { outline-offset: -2px; }
.frame__zoom { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; display: grid; place-items: center; background: rgba(10, 10, 11, .6); color: var(--on-dark); opacity: 0; transition: opacity .4s var(--ease); }
.frame__link:hover .frame__zoom, .frame__link:focus-visible .frame__zoom { opacity: 1; }
.frame__cap { margin-top: 16px; }
.frame__cap .label { color: var(--on-dark-3); }
.frame__cap p { margin-top: 8px; font-size: .875rem; line-height: 1.5; color: var(--on-dark-2); text-wrap: pretty; }
.rail__controls { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); margin-top: clamp(28px, 3vw, 40px); }
.rail__count { color: var(--on-dark-2); min-width: 72px; }
.rail__count b { color: var(--on-dark); font-weight: 600; }
.rail__progress { position: relative; flex: 1; height: 1px; background: var(--line-dark-2); }
.rail__bar { position: absolute; left: 0; top: -1px; height: 3px; width: 20%; background: var(--on-dark); }
.rail__btns { display: flex; gap: 8px; }
.icon-btn { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line-dark-2); border-radius: var(--radius); transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), opacity .3s; }
.icon-btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.icon-btn:disabled { opacity: .28; pointer-events: none; }
.icon-btn .arrow { width: 18px; height: 18px; }
.icon-btn--back .arrow { transform: rotate(180deg); }

/* Lightbox */
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 10, 11, .97); color: var(--on-dark); overflow: hidden; }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px var(--gutter); }
.lightbox__count { color: var(--on-dark-2); }
.lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 calc(var(--gutter) + 56px); }
.lightbox__img { max-width: 100%; max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: var(--gutter); }
.lightbox__next { right: var(--gutter); }
.lightbox__cap { padding: 18px var(--gutter) 26px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: center; text-align: center; }
.lightbox__cap .label { color: var(--on-dark-3); }
.lightbox__cap p { color: var(--on-dark-2); font-size: .9375rem; }
@media (max-width: 640px) {
  .lightbox__stage { padding: 0 12px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: -64px; transform: none; }
  .lightbox[open] { grid-template-rows: auto minmax(0, 1fr) auto; }
  .lightbox__cap { padding-bottom: 88px; }
}

/* ---------- Services ---------- */
.services__lead { max-width: 34ch; margin-bottom: clamp(48px, 6vw, 88px); }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; margin-top: clamp(40px, 5vw, 64px); padding: clamp(28px, 4vw, 56px); }
.cta-band__title { font-size: clamp(1.5rem, 1.05rem + 1.3vw, 2.375rem); font-weight: 420; letter-spacing: -.03em; line-height: 1.1; }

/* ---------- Contact ---------- */
.contact__statement { font-size: clamp(2.5rem, 1.2rem + 4.2vw, 5.75rem); font-weight: 420; line-height: .98; letter-spacing: -.045em; text-wrap: balance; max-width: 14ch; }
.contact__lead { margin-top: 28px; max-width: 46ch; color: var(--on-dark-2); font-size: clamp(1.0625rem, .98rem + .35vw, 1.25rem); line-height: 1.6; }
.contact-list { margin-top: clamp(48px, 6vw, 88px); border-top: 1px solid var(--on-dark); }
.contact-list a {
  display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 2.4fr) auto; align-items: center; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid var(--line-dark);
  transition: padding .55s var(--ease-out), color .3s;
}
.contact-list a:hover { padding-left: 12px; }
.contact-list .k { color: var(--on-dark-3); }
.contact-list .v { font-size: clamp(1.0625rem, .95rem + .45vw, 1.375rem); font-weight: 450; letter-spacing: -.015em; overflow-wrap: anywhere; }
.contact-list .is-primary .v { font-size: clamp(1.375rem, 1rem + 1.4vw, 2.25rem); font-weight: 420; letter-spacing: -.03em; }
.contact-list a:hover .arrow--ne { transform: rotate(-45deg) translateX(3px); }

.reach { margin-top: clamp(80px, 10vw, 140px); }
.reach__intro { max-width: 62ch; color: var(--on-dark-2); line-height: 1.7; margin-bottom: 32px; }
.reach__title { font-size: clamp(1.5rem, 1.1rem + 1.1vw, 2.25rem); font-weight: 450; letter-spacing: -.03em; line-height: 1.1; margin: 14px 0 18px; }
.faq { border-top: 1px solid var(--line-dark-2); }
.faq details { border-bottom: 1px solid var(--line-dark); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 22px 0; font-size: clamp(1.0625rem, .98rem + .35vw, 1.25rem); font-weight: 450; letter-spacing: -.012em; line-height: 1.35; transition: color .3s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 13px; height: 13px; margin-top: .42em;
  background: linear-gradient(currentColor, currentColor) center / 13px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 13px no-repeat;
  transition: transform .45s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: #fff; }
.faq details p { padding: 0 0 26px; max-width: 74ch; color: var(--on-dark-2); line-height: 1.75; }
.faq details::details-content { block-size: 0; overflow-y: clip; transition: block-size .5s var(--ease-out), content-visibility .5s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.callout-dark { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 28px; margin-top: 36px; padding: clamp(22px, 2.6vw, 32px); border: 1px solid var(--line-dark-2); }
.callout-dark .label { color: var(--on-dark-3); padding-top: 4px; }
.callout-dark p { color: var(--on-dark-2); line-height: 1.7; }
.callout-dark b { color: var(--on-dark); font-weight: 600; }
.reach__note { margin-top: 28px; max-width: 80ch; color: var(--on-dark-3); font-size: .9375rem; line-height: 1.72; }
@media (max-width: 640px) {
  .contact-list a { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .contact-list .k { grid-column: 1 / -1; }
  .callout-dark { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer { padding-top: clamp(72px, 8vw, 120px); overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 44px; padding: 32px 0 clamp(56px, 7vw, 96px); border-top: 1px solid var(--line-dark-2); }
.footer__brand { grid-column: 1 / span 5; }
.footer__brand .brand { margin: 0; }
.footer__brand p { margin-top: 18px; max-width: 36ch; color: var(--on-dark-3); font-size: .9375rem; line-height: 1.65; }
.footer__col { grid-column: span 2; }
.footer__col:first-of-type { grid-column: 7 / span 2; }
.footer__col .label { color: var(--on-dark-3); margin-bottom: 18px; }
.footer__col a { display: block; width: fit-content; padding: 5px 0; color: var(--on-dark-2); font-size: .9375rem; transition: color .3s; }
.footer__col a:hover { color: var(--on-dark); }
.footer__word { display: block; width: 100%; height: auto; color: #232327; user-select: none; }
.footer__word text { font-family: var(--font); font-weight: 600; font-stretch: 125%; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding: 22px 0 30px; border-top: 1px solid var(--line-dark); color: var(--on-dark-3); font-size: .8125rem; }
.footer__bottom a { transition: color .3s; }
.footer__bottom a:hover { color: var(--on-dark); }
@media (max-width: 1000px) {
  .footer__brand { grid-column: 1 / -1; }
  .footer__col, .footer__col:first-of-type { grid-column: span 4; }
}
@media (max-width: 560px) { .footer__col, .footer__col:first-of-type { grid-column: span 6; } }

/* ---------- Scroll reveal (enabled by JS only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: calc(var(--d, 0) * 70ms); }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ==========================================================================
   Inner pages: writing index, articles, 404
   ========================================================================== */
.page-head { padding-top: calc(var(--nav-h) + clamp(56px, 8vw, 128px)); padding-bottom: clamp(48px, 6vw, 88px); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--ink-3); }
.crumbs li { display: inline-flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: "/"; color: var(--line-2); font-stretch: 100%; letter-spacing: 0; }
.crumbs a { transition: color .3s; }
.crumbs a:hover { color: var(--ink); }
.page-title { margin-top: clamp(28px, 4vw, 48px); font-size: clamp(3rem, 1.5rem + 5.2vw, 7.5rem); font-weight: 420; letter-spacing: -.05em; line-height: .94; }
.page-intro { margin-top: clamp(24px, 3vw, 36px); max-width: 52ch; }

/* writing index */
.post-list { border-top: 1px solid var(--ink); }
.post-row { border-bottom: 1px solid var(--line); }
.post-row__link { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 24px; padding: clamp(28px, 3.4vw, 48px) 0; align-items: center; }
.post-row__media { grid-column: 1 / span 5; aspect-ratio: 16 / 10; overflow: hidden; background: var(--black); }
.post-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.post-row__link:hover .post-row__media img { transform: scale(1.04); }
.post-row__body { grid-column: 7 / -1; }
.post-row__title { margin-top: 16px; font-size: clamp(1.625rem, 1.15rem + 1.4vw, 2.625rem); font-weight: 440; letter-spacing: -.034em; line-height: 1.06; text-wrap: balance; }
.post-row__title span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease-out); }
.post-row__link:hover .post-row__title span { background-size: 100% 1px; }
.post-row__text { margin-top: 16px; color: var(--ink-2); line-height: 1.65; max-width: 52ch; }
.post-row__meta { color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.post-row__cta { margin-top: 24px; display: inline-flex; align-items: center; gap: 10px; font-size: .9375rem; font-weight: 500; }
.post-row__link:hover .post-row__cta .arrow { transform: translateX(4px); }
@media (max-width: 860px) { .post-row__media, .post-row__body { grid-column: 1 / -1; } }

/* article */
.progress { position: fixed; left: 0; right: 0; top: 0; z-index: 70; height: 2px; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.article-head { padding-top: calc(var(--nav-h) + clamp(48px, 7vw, 112px)); }
.article-head__kicker { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: clamp(28px, 4vw, 48px); color: var(--ink-3); }
.article-title { margin-top: 20px; max-width: 18ch; font-size: clamp(2.5rem, 1.25rem + 4vw, 5.5rem); font-weight: 430; letter-spacing: -.047em; line-height: .98; text-wrap: balance; }
.article-standfirst { margin-top: clamp(24px, 3vw, 36px); max-width: 50ch; font-size: clamp(1.1875rem, 1rem + .6vw, 1.5rem); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: clamp(36px, 4vw, 56px); padding-top: 22px; border-top: 1px solid var(--line); }
.byline__who { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.byline__who img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.byline__name { font-weight: 500; line-height: 1.3; }
.byline__role { font-size: .875rem; color: var(--ink-3); line-height: 1.3; }
.byline .tags { margin-top: 0; }
.article-cover { margin-top: clamp(40px, 5vw, 72px); background: var(--black); }
.article-cover img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
@media (max-width: 760px) { .article-cover img { aspect-ratio: 16 / 10; } }

.article-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-block: clamp(56px, 7vw, 112px) clamp(48px, 6vw, 88px); }
.toc { grid-column: 1 / span 3; }
.toc__sticky { position: sticky; top: calc(var(--nav-h) + 32px); }
.toc .label { color: var(--ink-3); margin-bottom: 16px; }
.toc ol { border-top: 1px solid var(--ink); counter-reset: toc; }
.toc li { border-bottom: 1px solid var(--line); counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 12px 0; font-size: .875rem; line-height: 1.4; color: var(--ink-2); transition: color .3s; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-size: .6875rem; font-weight: 600; font-stretch: 125%; letter-spacing: .1em; color: var(--ink-3); padding-top: 2px; }
.toc a:hover, .toc a[aria-current] { color: var(--ink); }
.article-main { grid-column: 4 / span 7; min-width: 0; }
@media (max-width: 1100px) { .toc { display: none; } .article-main { grid-column: 1 / -1; max-width: 720px; margin-inline: auto; } }

.prose { counter-reset: sec; font-size: clamp(1.0625rem, .99rem + .3vw, 1.1875rem); line-height: 1.75; color: var(--ink-body); }
.prose > * + * { margin-top: 1.35em; }
.prose > p:first-child { font-size: 1.16em; line-height: 1.62; color: var(--ink); }
.prose h2 { counter-increment: sec; margin-top: 2.7em; font-size: clamp(1.5rem, 1.2rem + .9vw, 2.125rem); font-weight: 470; letter-spacing: -.028em; line-height: 1.14; color: var(--ink); text-wrap: balance; }
.prose h2::before { content: counter(sec, decimal-leading-zero); display: block; margin-bottom: 16px; padding-top: 18px; border-top: 1px solid var(--ink); font-size: .6875rem; font-weight: 600; font-stretch: 125%; letter-spacing: .15em; color: var(--ink-3); }
.prose h2 + * { margin-top: .95em; }
.prose strong { color: var(--ink); }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.prose ul li { position: relative; padding-left: 1.7em; }
.prose ul li + li { margin-top: .8em; }
.prose ul li::before { content: ""; position: absolute; left: .1em; top: .68em; width: .34em; height: .34em; background: var(--ink); }
.prose blockquote { margin-block: 2.4em; padding: 1.4em 0 1.5em; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); font-size: clamp(1.375rem, 1.08rem + .95vw, 2rem); font-weight: 420; letter-spacing: -.024em; line-height: 1.28; color: var(--ink); text-wrap: balance; }
.prose pre { margin-block: 2em; padding: 24px 26px; overflow-x: auto; background: var(--black); color: #e6e6e3; border-radius: var(--radius); font-family: var(--mono); font-size: .8em; line-height: 1.75; tab-size: 2; }
.prose pre .c { color: #808087; }
.prose pre .a { color: var(--signal); }
.prose code { font-family: var(--mono); font-size: .88em; }
.callout { margin-block: 2.2em; padding: clamp(22px, 2.6vw, 32px); background: var(--paper-2); border-left: 2px solid var(--ink); }
.callout .label { display: block; margin-bottom: 12px; color: var(--ink-3); }
.callout p { font-size: .95em; line-height: 1.7; color: var(--ink-2); }

.author { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 24px; margin-top: clamp(56px, 6vw, 80px); padding: 28px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.author img { width: 88px; height: 88px; object-fit: cover; }
.author__kicker { color: var(--ink-3); }
.author__name { margin-top: 8px; font-size: 1.25rem; font-weight: 500; letter-spacing: -.018em; }
.author__role { margin-top: 2px; font-size: .9375rem; color: var(--ink-3); }
.author__bio { margin-top: 14px; color: var(--ink-2); font-size: .9375rem; line-height: 1.65; max-width: 60ch; }
.author__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: .875rem; }
@media (max-width: 560px) { .author { grid-template-columns: 1fr; } }

.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.pager a { display: block; padding: clamp(24px, 3vw, 40px) 0; }
.pager a + a { padding-left: var(--gap); border-left: 1px solid var(--line); text-align: right; }
.pager .label { color: var(--ink-3); }
.pager__title { margin-top: 12px; font-size: clamp(1.125rem, 1rem + .5vw, 1.5rem); font-weight: 470; letter-spacing: -.022em; line-height: 1.22; }
.pager__title span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease-out); }
.pager a:hover .pager__title span { background-size: 100% 1px; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .pager a + a { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); text-align: left; } }

.more-writing { padding-block: clamp(72px, 8vw, 120px); }

/* 404 */
.notfound { min-height: 100svh; display: flex; flex-direction: column; }
.notfound__main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--nav-h) + 48px); padding-bottom: 72px; }
.notfound__code { font-size: clamp(6rem, 3rem + 14vw, 18rem); font-weight: 200; font-stretch: 125%; letter-spacing: -.06em; line-height: .8; color: #2a2a2f; }
.notfound__title { margin-top: 32px; font-size: clamp(1.75rem, 1.2rem + 1.8vw, 3rem); font-weight: 430; letter-spacing: -.035em; }
.notfound p { margin-top: 16px; color: var(--on-dark-2); max-width: 46ch; }
.notfound .hero__actions { margin-top: 36px; }

/* ==========================================================================
   Home: live visuals and motion
   ========================================================================== */

/* hero globe */
.hero__visual { position: absolute; z-index: 0; top: 47%; right: calc(-1.2 * var(--gutter)); width: min(860px, 56vw, 88svh); aspect-ratio: 1 / 1; transform: translateY(-50%); pointer-events: none; }
.hero__visual canvas { display: block; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, var(--black) 0%, rgba(10, 10, 11, .82) 34%, rgba(10, 10, 11, 0) 62%); }
.hero__grid, .specs, .scroll-cue { position: relative; z-index: 2; }
.scroll-cue { position: absolute; }
.hero__copy { grid-column: 1 / span 7; }
.globe-legend { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 28px; margin-top: 28px; color: var(--on-dark-3); }
.globe-legend span { display: inline-flex; align-items: center; gap: 10px; }
.globe-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--on-dark); }
.globe-legend i.is-threat { background: var(--signal); box-shadow: 0 0 0 3px rgba(255, 90, 78, .2); }
@media (max-width: 960px) {
  .hero::after { background: linear-gradient(180deg, rgba(10, 10, 11, 0) 40%, var(--black) 100%); }
  .hero__visual { position: relative; top: auto; right: auto; transform: none; width: min(560px, 100%); margin: 24px auto -24px; }
  .hero__copy { grid-column: 1 / -1; }
  .globe-legend { justify-content: center; gap: 8px 20px; margin-top: 8px; }
}

/* venues marquee */
.venues { position: relative; overflow: hidden; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.venues::before, .venues::after { content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 9%; pointer-events: none; }
.venues::before { left: 0; background: linear-gradient(90deg, var(--black), rgba(10, 10, 11, 0)); }
.venues::after { right: 0; background: linear-gradient(270deg, var(--black), rgba(10, 10, 11, 0)); }
.venues__track { display: flex; width: max-content; animation: marquee 56s linear infinite; }
.venues:hover .venues__track { animation-play-state: paused; }
.venues__list { display: flex; align-items: center; flex: none; }
.venues__list li { display: inline-flex; align-items: center; gap: 28px; padding: 24px 28px 24px 0; white-space: nowrap; font-size: clamp(.9375rem, .85rem + .3vw, 1.125rem); font-weight: 420; letter-spacing: -.01em; color: var(--on-dark-2); }
.venues__list li::after { content: ""; width: 5px; height: 5px; background: var(--on-dark-3); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .venues__track { animation: none; flex-wrap: wrap; width: auto; } .venues__list[aria-hidden] { display: none; } }

/* about with portrait */
.about { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.about__portrait { grid-column: 1 / span 5; position: sticky; top: calc(var(--nav-h) + 28px); }
.about__portrait-frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--black-3); }
.about__portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; filter: grayscale(1) contrast(1.05); }
.about__portrait figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--ink-3); }
.about__content { grid-column: 7 / -1; }
.about__content .about__cols { display: block; }
.about__content .facts { margin: 48px 0 0; }
@media (max-width: 1000px) {
  .about__portrait { grid-column: 1 / -1; position: static; max-width: 520px; }
  .about__content { grid-column: 1 / -1; margin-top: 48px; }
}
@media (max-width: 560px) { .about__portrait figcaption { flex-direction: column; gap: 4px; } }

/* masked image reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal.reveal--mask { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1.5s var(--ease-out); }
  .reveal.reveal--mask.is-in { clip-path: inset(0 0 0 0); }
  .reveal--mask img { transition: transform 2.2s var(--ease-out); }
  .reveal.reveal--mask:not(.is-in) img { transform: scale(1.14); }
}

/* focus band visuals */
.focus__viz { position: relative; aspect-ratio: 4 / 3; margin-bottom: clamp(26px, 3vw, 40px); background: #0d0d0f; border: 1px solid var(--line-dark); overflow: hidden; }
.focus__viz canvas { display: block; width: 100%; height: 100%; }
.focus__index { color: var(--on-dark-3); }
.focus .focus__title { margin-top: 14px; }

/* research showcase */
.rgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(20px, 2vw, 28px); }
.rgrid > .rpub { grid-column: span 2; }
.rgrid > .rpub--half { grid-column: span 3; }
.is-dark .rpub { border-color: var(--line-dark); background: var(--black); }
.is-dark .rpub:hover { border-color: var(--on-dark-2); }
.is-dark .rpub__meta, .is-dark .rpub__authors, .is-dark .rpub__paper { color: var(--on-dark-3); }
.is-dark .rpub__paper:hover { color: var(--on-dark); }
.rgrid .rpub__title { margin-bottom: 24px; }
.rgrid .rpub__links { margin-top: 0; }
.rpub__key, .rcard__key { display: flex; align-items: baseline; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.is-dark .rpub__key { border-top-color: var(--line-dark); }
.rpub__key b, .rcard__key b { flex: none; font-size: clamp(1.75rem, 1.3rem + 1vw, 2.375rem); font-weight: 250; font-stretch: 110%; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
/* hyphenated compounds in display text never break at the hyphen (a line-end hyphen reads as a dash) */
.nw { white-space: nowrap; }
/* Archivo's multiplication sign breaks at the thinnest weights of the light display numerals */
.mul { font-style: normal; font-weight: 300; font-stretch: 100%; letter-spacing: 0; margin-left: .04em; }
.rpub__key span, .rcard__key span { font-size: .8125rem; line-height: 1.4; color: var(--ink-2); }
.is-dark .rpub__key span { color: var(--on-dark-2); }
.rgrid > .rpub--wide { grid-column: span 4; }
.rpub--wide { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.rpub--wide .rpub__media { aspect-ratio: auto; height: 100%; min-height: 320px; }
.rpub--wide .rpub__title { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.625rem); }
@media (max-width: 1100px) { .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rgrid > .rpub, .rgrid > .rpub--half { grid-column: auto; } .rgrid > .rpub--wide { grid-column: 1 / -1; } }
@media (max-width: 760px) { .rpub--wide { grid-template-columns: 1fr; } .rpub--wide .rpub__media { aspect-ratio: 16 / 9; height: auto; min-height: 0; } }
@media (max-width: 640px) { .rgrid { grid-template-columns: 1fr; } }

/* publication list links */
.pub__links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; font-size: .875rem; }
.pub__links a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.pub__links .arrow { width: 14px; height: 14px; }
.pub__sim::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
.pub__ext { color: var(--ink-3); transition: color .3s; }
.pub__ext:hover { color: var(--ink); }

/* career timeline (dark) */
.gantt { --glabel: 300px; margin-bottom: clamp(56px, 7vw, 96px); }
.gantt__axis { position: relative; height: 26px; margin-left: var(--glabel); }
.gantt__axis span { position: absolute; left: calc(var(--x) * 100%); bottom: 8px; transform: translateX(-50%); font-size: .6875rem; font-weight: 500; color: var(--on-dark-3); font-variant-numeric: tabular-nums; }
.gantt__rows { position: relative; border-top: 1px solid var(--on-dark); }
.gantt__grid { position: absolute; top: 0; bottom: 0; left: var(--glabel); right: 0; pointer-events: none; }
.gantt__grid span { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 100%); width: 1px; background: rgba(255, 255, 255, .06); }
.gantt__row { display: grid; grid-template-columns: var(--glabel) minmax(0, 1fr); align-items: center; min-height: 52px; border-bottom: 1px solid var(--line-dark); }
.gantt__label { padding: 10px 20px 10px 0; font-size: .8125rem; line-height: 1.35; color: var(--on-dark-3); }
.gantt__label b { display: block; font-size: .9375rem; font-weight: 500; color: var(--on-dark); }
.gantt__track { position: relative; align-self: stretch; }
.gantt__bar { position: absolute; top: 50%; height: 8px; margin-top: -4px; left: calc(var(--s) * 100%); width: calc((var(--e) - var(--s)) * 100%); background: #5f5f66; transform-origin: left center; transition: transform 1.5s var(--ease-out), background-color .3s; transition-delay: calc(var(--i, 0) * 110ms); }
.gantt__row.is-current .gantt__bar { background: var(--on-dark); }
.gantt__row.is-current .gantt__bar::after { content: ""; position: absolute; right: -5px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px rgba(53, 201, 125, .2); }
.gantt__row:hover .gantt__bar { background: var(--paper); }
.gantt.reveal .gantt__bar { transform: scaleX(0); }
.gantt.reveal.is-in .gantt__bar { transform: none; }
@media (max-width: 760px) {
  .gantt { --glabel: 0px; }
  .gantt__row { grid-template-columns: 1fr; padding: 12px 0 14px; }
  .gantt__label { padding: 0 0 10px; }
  .gantt__track { min-height: 14px; }
}

/* dark variants for entries */
.is-dark .entries { border-top-color: var(--on-dark); }
.is-dark .entry { border-bottom-color: var(--line-dark); }
.is-dark .entry__date { color: var(--on-dark); }
.is-dark .entry__place { color: var(--on-dark-3); }
.is-dark .entry__desc { color: var(--on-dark-2); }
.is-dark .tags li { border-color: var(--line-dark-2); color: var(--on-dark-2); }

/* academic path */
.path { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: clamp(56px, 7vw, 96px); }
.path::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--ink); transform-origin: left center; transition: transform 1.6s var(--ease-out); }
.path.reveal::before { transform: scaleX(0); }
.path.reveal.is-in::before { transform: none; }
.path li { position: relative; padding-right: 20px; }
.path__dot { position: relative; z-index: 1; display: block; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--ink); background: var(--paper); }
.path li:last-child .path__dot { background: var(--ink); }
.path li:last-child .path__dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--ink); opacity: 0; animation: ping 2.6s var(--ease-out) infinite; }
.path .label { display: block; margin-top: 20px; color: var(--ink-3); }
.path__title { margin-top: 8px; font-size: 1.0625rem; font-weight: 500; letter-spacing: -.014em; line-height: 1.3; }
.path__note { margin-top: 6px; font-size: .875rem; line-height: 1.5; color: var(--ink-3); }
@media (max-width: 760px) {
  .path { grid-template-columns: 1fr; row-gap: 24px; }
  .path::before { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; transform-origin: top center; }
  .path.reveal::before { transform: scaleY(0); }
  .path li { display: grid; grid-template-columns: 15px minmax(0, 1fr); column-gap: 20px; padding-right: 0; }
  .path .label { margin-top: 0; }
}

/* awards by year */
.years { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); margin-bottom: clamp(36px, 4vw, 56px); }
.years__stack { display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; height: 84px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.years__stack i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transition: transform .7s var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.years.reveal .years__stack i { transform: scale(0); }
.years.reveal.is-in .years__stack i { transform: none; }
.years__col span { display: block; margin-top: 10px; text-align: center; font-size: .6875rem; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.years__col.is-empty span { color: var(--line-2); }
@media (max-width: 640px) { .years__col:nth-child(even) span { visibility: hidden; } .years__stack i { width: 8px; height: 8px; } }

/* section rules draw in (enabled by JS) */
.lines-on .section:not(.is-visible) .section__grid::before,
.lines-on .section:not(.is-visible) .section__bar::before { transform: scaleX(0); }
.section__grid::before, .section__bar::before { transform-origin: left center; transition: transform 1.4s var(--ease-out); }
.section__bar { position: relative; border-top: 0; }
.section__bar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); }
.is-dark .section__bar::before { background: var(--on-dark); }

/* ==========================================================================
   Research pages: paper hero, simulation instrument, results, method, citation
   ========================================================================== */
.is-dark .crumbs ol { color: var(--on-dark-3); }
.is-dark .crumbs li + li::before { color: var(--line-dark-2); }
.is-dark .crumbs a:hover { color: var(--on-dark); }

.paper-hero { padding-top: calc(var(--nav-h) + clamp(44px, 6vw, 96px)); padding-bottom: clamp(48px, 6vw, 88px); }
.paper-kicker { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: clamp(28px, 4vw, 48px); color: var(--on-dark-3); }
.paper-kicker .is-on { color: var(--on-dark); }
.paper-title { margin-top: 20px; max-width: 24ch; font-size: clamp(2.125rem, 1.1rem + 3.3vw, 4.5rem); font-weight: 430; line-height: 1.02; letter-spacing: -.044em; text-wrap: balance; }
.paper-lead { margin-top: clamp(22px, 3vw, 32px); max-width: 62ch; font-size: clamp(1.0625rem, .98rem + .4vw, 1.3125rem); line-height: 1.6; color: var(--on-dark-2); text-wrap: pretty; }
.paper-lead strong { color: var(--on-dark); font-weight: 500; }
.paper-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; margin-top: clamp(32px, 4vw, 52px); padding-top: 22px; border-top: 1px solid var(--line-dark); }
.paper-authors { font-size: 1.0625rem; font-weight: 450; line-height: 1.5; }
.paper-authors sup { font-size: .6em; color: var(--on-dark-3); margin-left: 1px; }
.paper-affil { margin-top: 6px; color: var(--on-dark-3); font-size: .875rem; line-height: 1.5; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.paper-actions .btn { height: 48px; padding: 0 20px; }
@media (max-width: 860px) { .paper-meta { grid-template-columns: 1fr; } }

/* simulation instrument */
.sim { padding-bottom: clamp(72px, 8vw, 128px); }
.sim__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 48px; padding: 22px 0 22px; border-top: 1px solid var(--on-dark); }
.sim__head .label { color: var(--on-dark-3); }
.sim__title { margin-top: 10px; font-size: clamp(1.375rem, 1.1rem + .9vw, 2rem); font-weight: 440; letter-spacing: -.03em; line-height: 1.15; }
.sim__hint { max-width: 54ch; color: var(--on-dark-2); font-size: .9375rem; line-height: 1.6; }
.sim__frame { position: relative; background: #0d0d0f; border: 1px solid var(--line-dark); overflow: hidden; }
.sim__canvas { display: block; width: 100%; height: clamp(460px, 50vw, 720px); touch-action: pan-y; }
.sim__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding: 14px 16px; border: 1px solid var(--line-dark); border-top: 0; background: var(--black-2); }
.sim__group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.sim__group > .label { color: var(--on-dark-3); margin-right: 4px; }
.seg { display: inline-flex; border: 1px solid var(--line-dark-2); border-radius: var(--radius); overflow: hidden; }
.seg button { height: 36px; padding: 0 14px; font-size: .8125rem; font-weight: 500; color: var(--on-dark-2); transition: background-color .25s var(--ease), color .25s var(--ease); }
.seg button + button { border-left: 1px solid var(--line-dark-2); }
.seg button:hover { color: var(--on-dark); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.sim-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; font-size: .8125rem; font-weight: 500; color: var(--on-dark); border: 1px solid var(--line-dark-2); border-radius: var(--radius); transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.sim-btn:hover, .sim-btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.sim-btn--signal { border-color: rgba(255, 90, 78, .55); color: #ffb4ae; }
.sim-btn--signal:hover, .sim-btn--signal[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: #fff; }
.sim-btn:disabled { opacity: .35; pointer-events: none; }
.sim-range { display: inline-flex; align-items: center; gap: 12px; color: var(--on-dark-2); font-size: .8125rem; }
.sim-range input { width: 140px; accent-color: var(--paper); }
.sim-range output { min-width: 3.4em; color: var(--on-dark); font-variant-numeric: tabular-nums; }
.readouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-dark); border-top: 0; }
.readout { padding: 16px 18px 18px; min-width: 0; }
.readout + .readout { border-left: 1px solid var(--line-dark); }
.readout dt { color: var(--on-dark-3); }
.readout dd { margin-top: 8px; font-size: clamp(1.375rem, 1.1rem + .8vw, 1.875rem); font-weight: 300; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.readout dd small { font-size: .5em; color: var(--on-dark-3); letter-spacing: 0; margin-left: 4px; }
.readout .is-alarm { color: var(--signal); }
.readout .is-ok { color: var(--live); }
.sim__note { margin-top: 14px; color: var(--on-dark-3); font-size: .8125rem; line-height: 1.6; }
@media (max-width: 760px) {
  .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout:nth-child(3) { border-left: 0; }
  .readout:nth-child(n + 3) { border-top: 1px solid var(--line-dark); }
  .sim__canvas { height: 560px; }
}

/* reported results */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.figure { padding: 26px 24px 0 0; min-width: 0; }
.figure + .figure { padding-left: 24px; border-left: 1px solid var(--line); }
.figure__value { font-size: clamp(2.5rem, 1.5rem + 2.8vw, 4.5rem); font-weight: 250; font-stretch: 110%; letter-spacing: -.045em; line-height: .95; font-variant-numeric: tabular-nums; }
.figure__value small { font-size: .4em; font-weight: 400; letter-spacing: -.01em; margin-left: .14em; }
.figure__label { margin-top: 16px; max-width: 30ch; color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }
.figures-note { margin-top: 28px; color: var(--ink-3); font-size: .875rem; line-height: 1.6; max-width: 80ch; }
@media (max-width: 1000px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; } .figure:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 560px) { .figures { grid-template-columns: 1fr; } .figure + .figure { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 22px; } }

/* method steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.step { padding: 24px 24px 8px 0; min-width: 0; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step__num { color: var(--ink-3); }
.step__title { margin-top: 32px; font-size: 1.25rem; font-weight: 480; letter-spacing: -.02em; line-height: 1.22; }
.step__text { margin-top: 12px; color: var(--ink-2); font-size: .9375rem; line-height: 1.65; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; } .step:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step + .step { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 22px; } }

/* citation */
.cite__tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.cite__tabs button { height: 48px; padding: 0 18px; margin-bottom: -1px; font-size: .875rem; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid transparent; transition: color .25s var(--ease), border-color .25s var(--ease); }
.cite__tabs button:first-child { padding-left: 0; }
.cite__tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.cite__body { position: relative; margin-top: 20px; }
.cite__pre { margin: 0; padding: 26px 120px 26px 28px; background: var(--black); color: #e6e6e3; font-family: var(--mono); font-size: .8125rem; line-height: 1.75; overflow-x: auto; border-radius: var(--radius); white-space: pre; tab-size: 2; }
.cite__pre--wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.cite__copy { position: absolute; top: 14px; right: 14px; height: 34px; padding: 0 14px; font-size: .6875rem; font-weight: 600; font-stretch: 125%; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark); border: 1px solid var(--line-dark-2); border-radius: var(--radius); transition: background-color .25s var(--ease), color .25s var(--ease); }
.cite__copy:hover { background: var(--paper); color: var(--ink); }
.cite__links { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 28px; }
@media (max-width: 560px) { .cite__pre { padding: 64px 20px 22px; } }

/* related research */
.rcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.rcard { min-width: 0; }
.rcard__link { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line-2); transition: border-color .35s var(--ease); }
.rcard__link:hover { border-color: var(--ink); }
.rcard__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--black); }
.rcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.rcard__link:hover .rcard__media img { transform: scale(1.04); }
.rcard__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.rcard__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-3); }
.rcard__title { margin-top: 14px; font-size: 1.1875rem; font-weight: 480; letter-spacing: -.02em; line-height: 1.24; text-wrap: balance; }
.rcard__text { margin-top: 10px; color: var(--ink-2); font-size: .9375rem; line-height: 1.6; }
.rcard__cta { margin-top: auto; padding-top: 22px; display: inline-flex; align-items: center; gap: 10px; font-size: .875rem; font-weight: 500; }
.rcard__link:hover .rcard__cta .arrow { transform: translateX(4px); }
.rcards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* featured card across the row: the image covers two columns, so its text lines up with the cards below */
.rcards > .rcard--wide { grid-column: 1 / -1; }
.rcard--wide .rcard__link { display: grid; grid-template-columns: calc((200% - var(--gap)) / 3) minmax(0, 1fr); }
.rcard--wide .rcard__media { aspect-ratio: auto; height: 100%; }
.rcard--wide .rcard__body { padding: 28px 22px 26px calc(var(--gap) + 23px); }
.rcard--wide .rcard__title { margin-bottom: 26px; font-size: clamp(1.25rem, 1.05rem + .6vw, 1.625rem); line-height: 1.22; }
.rcard--wide .rcard__cta { margin-top: 0; }
@media (max-width: 1000px) { .rcards, .rcards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rcard--wide .rcard__link { grid-template-columns: calc((100% - var(--gap)) / 2) minmax(0, 1fr); } }
@media (max-width: 760px) { .rcard--wide .rcard__link { display: flex; } .rcard--wide .rcard__media { aspect-ratio: 16 / 9; height: auto; } .rcard--wide .rcard__body { padding: 22px 22px 24px; } .rcard--wide .rcard__title { margin-bottom: 20px; } }
@media (max-width: 640px) { .rcards, .rcards--4 { grid-template-columns: 1fr; } }

/* ---------- Print ---------- */
@media print {
  .nav, .menu, .progress, .rail__controls, .footer__word, .skip-link, .toc { display: none !important; }
  .is-dark { background: #fff !important; color: #000 !important; }
  .section { padding-block: 32px; }
  a { text-decoration: underline; }
}
