/* ============================================================================
   HUBS — Human Building Synergy Laboratory
   Design system for the 2026 site.

   Three parties, three hues, used consistently everywhere:
     amber = human      cyan = AI      violet = building

   Form encodes commitment:
     outline = reversible talk   dotted = telemetry   solid = physical act
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Warm graphite ground — lab bench, not architectural render */
  --ground:    #131210;
  --surface:   #1c1a17;
  --surface-2: #26231f;
  --hairline:  #38342e;

  --ink:   #f0ece5;
  --ink-2: #a8a196;
  --ink-3: #756f66;

  --human: #e8a04c;
  --ai:    #3ecfd4;
  --bldg:  #ab8df0;

  /* University of Arizona, used sparingly for institutional moments */
  --az-red: #d4213c;

  /* Four further accents, used only for the title-card payoff. Chosen to sit
     clear of amber / cyan / violet so the closing phrase never repeats a
     colour already used earlier in the same sentence. */
  --accent-gold: #e3c24a;
  --accent-grn:  #63c98d;
  --accent-rose: #ef7fae;
  --accent-sky:  #5fa8ef;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --container: 1240px;
  --measure: 62ch;

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

  --t: 220ms cubic-bezier(.22,.61,.36,1);
}

/* ---------------------------------------------------------------------------
   LIGHT THEME — disabled. The site commits to the dark "lab bench" palette.

   To bring the light theme back:
     1. delete the opening and closing comment markers around the block below
     2. un-comment the theme toggle button in src/_includes/base.njk
   The JavaScript that drives the toggle is still in place and will pick it up.
   --------------------------------------------------------------------------- */

/*
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ground: #e9eaec; --surface: #ffffff; --surface-2: #dfe2e6;
    --hairline: #c3c8ce; --ink: #16181c; --ink-2: #4a4f57; --ink-3: #767c85;
    --human: #a85f14; --ai: #0d6f78; --bldg: #5b3ca8; --az-red: #ab0520;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --ground: #e9eaec; --surface: #ffffff; --surface-2: #dfe2e6;
  --hairline: #c3c8ce; --ink: #16181c; --ink-2: #4a4f57; --ink-3: #767c85;
  --human: #a85f14; --ai: #0d6f78; --bldg: #5b3ca8; --az-red: #ab0520;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #131210; --surface: #1c1a17; --surface-2: #26231f;
  --hairline: #38342e; --ink: #f0ece5; --ink-2: #a8a196; --ink-3: #756f66;
  --human: #e8a04c; --ai: #3ecfd4; --bldg: #ab8df0; --az-red: #d4213c;
}
*/

/* ---------------------------------------------------------------------------
   2. Reset
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* height:auto matters — width/height attributes are set on images to reserve
   layout space, and without this any CSS width would stretch them. */
img, svg, picture, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  text-wrap: balance;
}
p { margin: 0; }
p, li { text-wrap: pretty; }

a { color: var(--ai); text-underline-offset: .18em; transition: color var(--t); }
a:hover { color: var(--human); }

:focus-visible { outline: 2px solid var(--ai); outline-offset: 3px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------------------------------------------------------------------------
   3. Layout primitives
   ------------------------------------------------------------------------- */
.wrap { width: min(100% - (var(--gutter) * 2), var(--container)); margin-inline: auto; }
.measure { max-width: var(--measure); }

.band { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.band--tight { padding-block: clamp(2.5rem, 6vw, 4rem); }
.band--rule { border-top: 1px solid var(--hairline); }
.band--alt { background: var(--surface); }

.band__head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.band__head h2 { font-size: clamp(1.55rem, 3.6vw, 2.5rem); max-width: 24ch; margin-top: .75rem; }
.band__head p.lede { color: var(--ink-2); margin-top: 1rem; }

.label {
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-3);
}

/* Party colours — the one system that runs through the whole site */
.c-hu { color: var(--human); }
.c-ai { color: var(--ai); }
.c-bl { color: var(--bldg); }

/* Payoff accents. Each title-card variant ends on a different one, so the
   closing phrase is always a fourth colour alongside the three parties.
   Only one card is ever on screen, so these are never seen together. */
.c-ac   { color: var(--az-red); }      /* red   — Synergy */
.c-gold { color: var(--accent-gold); } /* gold  — Conversation */
.c-grn  { color: var(--accent-grn); }  /* green — the Loop */
.c-rose { color: var(--accent-rose); } /* rose  — Collaboration */
.c-sky  { color: var(--accent-sky); }  /* sky   — Learning Each Other */

.muted { color: var(--ink-3); }

.skip-link {
  position: absolute; top: -100%; left: var(--gutter); z-index: 200;
  padding: .75rem 1.25rem; background: var(--ai); color: var(--ground);
  font-weight: 700; text-decoration: none; border-radius: 0 0 4px 4px;
}
.skip-link:focus { top: 0; color: var(--ground); }

/* ---------------------------------------------------------------------------
   4. Title card
   The content beneath is always in the DOM; JS only *adds* the curtain.
   ------------------------------------------------------------------------- */
#card {
  position: fixed; inset: 0; z-index: 100;
  display: grid; align-content: end;
  padding: var(--gutter) var(--gutter) clamp(3rem, 10vh, 7rem);
  background: var(--ground);
  pointer-events: none; opacity: 0; visibility: hidden;
}
.curtain body { overflow: hidden; }
.curtain #card { opacity: 1; visibility: visible; pointer-events: auto; }
.curtain-out #card {
  opacity: 0; visibility: hidden; transform: scale(1.04);
  transition: opacity 700ms cubic-bezier(.4,0,.2,1),
              transform 900ms cubic-bezier(.4,0,.2,1), visibility 700ms;
}

.card__phrase {
  font-size: clamp(2.4rem, 10vw, 8rem);
  font-weight: 800; letter-spacing: -0.05em; line-height: .95; max-width: 14ch;
}
.card__phrase span { display: inline-block; opacity: 0; transform: translateY(.35em); }
.curtain .card__phrase span { animation: word 620ms cubic-bezier(.22,.61,.36,1) forwards; }
@keyframes word { to { opacity: 1; transform: none; } }

.card__rule {
  height: 1px; background: var(--hairline);
  margin: clamp(1.5rem, 4vh, 2.5rem) 0 1rem;
  transform: scaleX(0); transform-origin: left;
}
.curtain .card__rule { animation: rule 900ms 850ms cubic-bezier(.22,.61,.36,1) forwards; }
@keyframes rule { to { transform: scaleX(1); } }

.card__foot {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap; opacity: 0;
}
.curtain .card__foot { animation: word 600ms 1350ms forwards; }

/* ---------------------------------------------------------------------------
   5. Masthead
   ------------------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.top__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .85rem;
}
.mark { display: flex; align-items: baseline; gap: .65rem; text-decoration: none; color: var(--ink); }
.mark:hover { color: var(--ink); }
.mark b { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.04em; }

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-2); text-decoration: none;
  padding: .45rem .7rem; border-radius: 100px;
  transition: color var(--t), background-color var(--t);
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav a.cta { border: 1px solid var(--ai); color: var(--ai); }
.nav a.cta:hover { background: var(--ai); color: var(--ground); }

.navToggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; cursor: pointer;
  background: none; color: var(--ink); border: 1px solid var(--hairline); border-radius: 6px;
}
.navToggle span {
  display: block; position: relative; width: 17px; height: 1.5px; background: currentColor;
}
.navToggle span::before, .navToggle span::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 1.5px; background: currentColor;
  transition: transform var(--t);
}
.navToggle span::before { top: -5px; }
.navToggle span::after  { top: 5px; }
.navToggle[aria-expanded="true"] span { background: transparent; }
.navToggle[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.navToggle[aria-expanded="true"] span::after  { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 900px) {
  .navToggle { display: flex; }
  .nav {
    position: fixed; inset: 3.6rem 0 auto 0; flex-direction: column; align-items: stretch;
    gap: .2rem; padding: 1rem var(--gutter) 1.5rem;
    background: var(--ground); border-bottom: 1px solid var(--hairline);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform var(--t), opacity var(--t), visibility var(--t);
  }
  .nav[data-open="true"] { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: .75rem .8rem; font-size: .8rem; }
  .nav a.cta { text-align: center; margin-top: .4rem; }
}

.tbtn {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-2); background: none;
  border: 1px solid var(--hairline); border-radius: 100px;
  padding: .35rem .8rem; cursor: pointer;
  transition: color var(--t), border-color var(--t);
}
.tbtn:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---------------------------------------------------------------------------
   6. Hero + page hero
   ------------------------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3.6rem); max-width: 17ch; margin-bottom: 1.35rem; }

/* All headline variants ship in the markup and an inline script keeps one at
   random. Without JavaScript only the first is shown — and once the script has
   removed the others, whichever it kept has no preceding sibling, so it shows. */
.heroHeadline ~ .heroHeadline { display: none; }
.hero p.lede { color: var(--ink-2); max-width: 58ch; }

.pageHero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.pageHero h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); margin-top: .6rem; }
.pageHero p.lede { color: var(--ink-2); max-width: 58ch; margin-top: 1rem; font-size: 1.1rem; }

/* ---------------------------------------------------------------------------
   7. Exchange (Fig. 1)
   ------------------------------------------------------------------------- */
.stageWrap {
  margin-top: clamp(2rem, 5vw, 3.25rem);
  border: 1px solid var(--hairline); background: var(--surface); border-radius: 3px;
}
.stageBar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--hairline); background: var(--surface-2);
}
.controls { display: flex; align-items: center; gap: .5rem; }
.ctl {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  background: none; color: var(--ink-2); border: 1px solid var(--hairline);
  border-radius: 100px; padding: .45rem 1rem; cursor: pointer;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}
.ctl:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-3); }
.ctl:disabled { opacity: .35; cursor: default; }
.ctl--go { border-color: var(--ai); color: var(--ai); }
.ctl--go:hover:not(:disabled) { background: var(--ai); color: var(--ground); }

/* Before the visitor has pressed anything, this is the one control on the page
   we want noticed: it fills in, gains weight, and breathes. Once the exchange
   is running it drops back to the quiet outlined style of its siblings. */
.ctl--go[data-primary="true"] {
  background: var(--ai);
  color: var(--ground);
  font-weight: 700;
  padding-inline: 1.3rem;
  animation: ctlPulse 2.6s ease-out infinite;
}
.ctl--go[data-primary="true"]:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ground);
  animation: none;
}

@keyframes ctlPulse {
  0%        { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ai) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--ai) 0%, transparent); }
}

.dots { display: flex; gap: 5px; align-items: center; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hairline); transition: background-color var(--t); }
.dot[data-on="true"] { background: var(--ink-3); }

.stage { display: grid; grid-template-columns: minmax(0,1fr) 14.5rem; }
@media (max-width: 940px) {
  /* minmax(0, 1fr) rather than 1fr: a plain fr track has min-width:auto, so a
     wide child stretches it and the whole page scrolls sideways. */
  .stage { grid-template-columns: minmax(0, 1fr); }
  .trace { grid-row: 2; min-width: 0; }

  /* Six stacked readouts pushed the exchange most of a screen down on a phone.
     Wrap them into a compact block instead — no horizontal scrolling, which
     nobody discovers, and no overflow. */
  .statePanel {
    grid-row: 1; position: static !important;
    border-left: 0 !important; border-bottom: 1px solid var(--hairline);
    padding: .8rem 1.1rem .9rem;
    min-width: 0;
  }
  .statePanel h2 { margin-bottom: .6rem; }
  .readout {
    grid-template-columns: repeat(auto-fit, minmax(5.25rem, 1fr));
    gap: .75rem 1rem;
    min-width: 0;
  }
  .ro { min-width: 0; }
  .ro__k { font-size: .58rem; }
  .ro__v { font-size: .95rem; white-space: nowrap; }
}

.trace { padding: 1.5rem clamp(.75rem, 1.6vw, 1.25rem) 2rem; }

.lanes { display: grid; grid-template-columns: 1fr 2rem 1fr 2rem 1fr; }
.lanes span {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; text-align: center;
}

.rows { display: grid; gap: .5rem; position: relative; margin-top: 1.1rem; }
.rows::before, .rows::after, .axisMid {
  content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--hairline);
}
.rows::before { left: calc((100% - 4rem) / 6); }
.axisMid { left: 50%; margin-left: -.5px; }
.rows::after { right: calc((100% - 4rem) / 6); }

.row {
  display: grid; grid-template-columns: 1fr 2rem 1fr 2rem 1fr;
  align-items: start; position: relative; z-index: 1;  /* above the axes */
  animation: rise var(--t) both;
}
.row[data-shown="false"] { display: none; }
/* Set by main.js on rows that were already on screen before this render, so a
   rebuilt transcript does not replay every entrance at once. */
.row--settled { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.bubble {
  border: 1px solid var(--hairline); border-radius: 3px;
  padding: .65rem .8rem; font-size: .9rem; line-height: 1.5; background: var(--ground);
}
.who {
  display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .15em;
  text-transform: uppercase; margin-bottom: .28rem;
}

.row[data-from="human"] .bubble { grid-column: 1; text-align: right; border-color: color-mix(in srgb, var(--human) 48%, transparent); }
.row[data-from="human"] .who    { color: var(--human); }
.row[data-from="ai"]    .bubble { grid-column: 3; border-color: color-mix(in srgb, var(--ai) 48%, transparent); }
.row[data-from="ai"]    .who    { color: var(--ai); }
.row[data-from="bldg"]  .bubble { grid-column: 5; border-color: color-mix(in srgb, var(--bldg) 48%, transparent); }
.row[data-from="bldg"]  .who    { color: var(--bldg); }

.arrow {
  display: grid; place-items: center; align-self: center;
  font-family: var(--mono); font-size: .8rem; color: var(--ink-3);
  background: var(--surface); padding-block: .15rem;
}
.arrow[data-gap="1"] { grid-column: 2; }
.arrow[data-gap="2"] { grid-column: 4; }
.row[data-from="human"] .arrow { color: var(--human); }
.row[data-from="ai"]    .arrow { color: var(--ai); }
.row[data-from="bldg"]  .arrow { color: var(--bldg); }

.row[data-kind="think"] .bubble {
  border-style: dashed; background: transparent; font-style: italic; color: var(--ink-2);
}
.row[data-kind="tele"] .bubble {
  border-style: dotted; background: transparent;
  font-family: var(--mono); font-size: .78rem;
}
.row[data-kind="act"] { grid-template-columns: 1fr; }
.row[data-kind="act"] .arrow { display: none; }
.row[data-kind="act"] .bubble {
  grid-column: 1; background: var(--bldg); color: var(--ground); border-color: var(--bldg);
  text-align: left; font-family: var(--mono); font-size: .78rem; line-height: 1.6;
}
.row[data-kind="act"] .who { color: var(--ground); opacity: .7; }

.pill {
  display: inline-block; font-family: var(--mono); font-size: .6rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
  border: 1px solid var(--hairline); border-radius: 100px;
  padding: .1rem .5rem; margin-top: .4rem;
}

.choice { grid-template-columns: 1fr !important; }
.choice__in {
  grid-column: 1; border: 1px dashed color-mix(in srgb, var(--human) 55%, transparent);
  border-radius: 3px; padding: .9rem;
}
.choice__q {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--human); margin-bottom: .7rem;
}
.choice__opts { display: grid; gap: .45rem; }
.opt {
  text-align: left; font-family: inherit; font-size: .9rem;
  background: var(--ground); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--human) 40%, transparent);
  border-radius: 3px; padding: .6rem .8rem; cursor: pointer;
  transition: background-color var(--t), border-color var(--t);
}
.opt:hover { background: var(--surface-2); border-color: var(--human); }
.opt b {
  display: block; font-weight: 400; color: var(--ink-3); font-family: var(--mono);
  font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; margin-top: .25rem;
}

/* Narrow screens: collapse three lanes into one, colour-coded down the side */
@media (max-width: 720px) {
  .lanes { display: none; }
  .rows::before, .rows::after, .axisMid { display: none; }
  .row, .row[data-kind="act"] { grid-template-columns: 1fr !important; }
  .row .arrow { display: none; }
  .row .bubble { grid-column: 1 !important; text-align: left !important; border-left-width: 3px; }
  .row[data-from="human"] .bubble { border-left-color: var(--human); }
  .row[data-from="ai"]    .bubble { border-left-color: var(--ai); }
  .row[data-from="bldg"]  .bubble { border-left-color: var(--bldg); }
}

.statePanel {
  border-left: 1px solid var(--hairline); padding: 1.5rem 1.15rem;
  position: sticky; top: 4.5rem; align-self: start;
}
.statePanel h2 {
  margin: 0 0 1.1rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--bldg); font-weight: 400;
}
.readout { display: grid; gap: .8rem; }
.ro { display: grid; gap: .1rem; }
.ro__k { font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.ro__v {
  font-family: var(--mono); font-size: 1.1rem; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em; transition: color var(--t);
}
.ro__v.flash { color: var(--bldg); }
.ro__v u { text-decoration: none; font-size: .6em; color: var(--ink-3); }

/* ---------------------------------------------------------------------------
   8. Three edges
   ------------------------------------------------------------------------- */
.edges { display: grid; gap: 1px; background: var(--hairline); border-block: 1px solid var(--hairline); }
.edge { background: var(--ground); display: grid; grid-template-columns: 1fr 8.5rem 1fr; align-items: center; }
@media (max-width: 880px) { .edge { grid-template-columns: 1fr; } }

.edge__side { padding: 1.7rem 1.4rem; }
.edge__side.right { text-align: right; }
@media (max-width: 880px) { .edge__side.right { text-align: left; } }

.edge__t { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .45rem; }
.edge__d { font-size: .9rem; color: var(--ink-2); }

.edge__mid {
  display: grid; place-items: center; gap: .3rem; padding: 1.7rem .5rem;
  border-inline: 1px solid var(--hairline); font-family: var(--mono);
}
/* On narrow screens the "Edge 01" divider sat *inside* each edge, so the two
   halves of adjacent edges ran together — "Human → Building" from edge 01 read
   as a pair with "Human → AI" from edge 02. Promote the label to a heading at
   the top of each block so every edge is a self-contained, labelled unit. */
@media (max-width: 880px) {
  .edge > :nth-child(1) { grid-row: 2; }   /* first direction  */
  .edge > :nth-child(2) { grid-row: 1; }   /* the label        */
  .edge > :nth-child(3) { grid-row: 3; }   /* second direction */

  .edge__mid {
    place-items: initial;
    grid-auto-flow: column;
    justify-content: start;
    align-items: baseline;
    gap: .6rem;
    border-inline: 0;
    border-bottom: 1px solid var(--hairline);
    padding: 1rem 1.4rem .7rem;
  }
  .edge__mid i { order: 1; font-size: .68rem; color: var(--ink-2); }
  .edge__mid b { order: 2; font-size: 1rem; }

  .edge__side { padding-block: 1.15rem; }
  .edge__side:nth-child(1) { padding-bottom: .4rem; }
}
.edge__mid b { font-size: 1.15rem; font-weight: 400; color: var(--ink-3); letter-spacing: .1em; }
.edge__mid i { font-style: normal; font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

.punchline {
  margin-top: clamp(2rem, 4vw, 3rem);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 700; letter-spacing: -0.025em; max-width: 38ch; text-wrap: balance;
}

/* ---------------------------------------------------------------------------
   9. Scale explorer
   ------------------------------------------------------------------------- */
.segmented {
  display: flex; gap: 2px; padding: 3px; background: var(--surface-2);
  border: 1px solid var(--hairline); border-radius: 100px;
  margin-bottom: 2.25rem; overflow-x: auto;
}
.seg {
  flex: 1; white-space: nowrap; font-family: var(--mono); font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  background: none; border: 0; border-radius: 100px; padding: .55rem .5rem;
  cursor: pointer; transition: color var(--t), background-color var(--t);
}
.seg:hover { color: var(--ink); }
.seg[aria-selected="true"] { background: var(--ground); color: var(--ink); }

.scales { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
@media (max-width: 880px) { .scales { grid-template-columns: 1fr; } }

.scaleViz {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background: var(--surface);
  overflow: hidden;
}
.scaleViz canvas { width: 100%; height: 100%; display: block; }

.panel h3 { font-size: clamp(1.25rem, 2.7vw, 1.8rem); margin-bottom: .7rem; }
.panel > p { color: var(--ink-2); }
.panel ul { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .5rem; }
.panel li { padding-left: 1.2rem; position: relative; font-size: .9rem; color: var(--ink-2); }
.panel li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--ai);
}
.scaleMeta { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .9rem; }
.triangleNote {
  display: block; margin-top: 1.3rem; padding: .55rem .85rem;
  border-left: 2px solid var(--ai); background: var(--surface);
  font-size: .875rem; color: var(--ink-2);
}

/* ---------------------------------------------------------------------------
   10. Cards, lists, grids
   ------------------------------------------------------------------------- */
.grid { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }

.card { background: var(--surface); padding: clamp(1.35rem, 3vw, 2rem); }
.card__head {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; margin-bottom: 1.1rem;
}
.card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.card li { padding-left: 1.15rem; position: relative; font-size: .9rem; color: var(--ink-2); }
.card li::before { content: "+"; position: absolute; left: 0; color: var(--ink-3); font-family: var(--mono); }

/* Project rows */
.project { padding-block: 1.1rem; border-bottom: 1px solid var(--hairline); }
.project:last-child { border-bottom: 0; padding-bottom: 0; }
.project:first-child { padding-top: 0; }
.project h3, .project h4 { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }
.project h3 a, .project h4 a { color: inherit; }
.project h3 a:hover, .project h4 a:hover { color: var(--ai); }
.project__meta { margin-top: .3rem; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }
.project__role { margin-top: .15rem; font-size: .85rem; color: var(--ink-2); }

/* Link list — publications, papers */
.linkList { display: grid; gap: 1px; background: var(--hairline); border-block: 1px solid var(--hairline); }
.linkList a {
  background: var(--ground); padding: 1.15rem 0; display: grid;
  grid-template-columns: 4.5rem minmax(0,1fr) auto; gap: 1.35rem; align-items: baseline;
  text-decoration: none; color: var(--ink);
  transition: background-color var(--t), padding-inline var(--t);
}
.linkList a:hover { background: var(--surface); padding-inline: 1rem; color: var(--ink); }
.linkList .yr { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.linkList .ti { font-size: 1rem; line-height: 1.45; }
.linkList .vn { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); text-align: right; }
@media (max-width: 760px) {
  .linkList a { grid-template-columns: 1fr; gap: .3rem; }
  .linkList .vn { text-align: left; }
}

/* News */
.news { list-style: none; padding: 0; margin: 0; }
.news li {
  display: grid; grid-template-columns: 5.5rem minmax(0,1fr); gap: 1.35rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--hairline);
}
.news li:last-child { border-bottom: 0; }
.news .date { font-family: var(--mono); font-size: .78rem; color: var(--human); font-variant-numeric: tabular-nums; padding-top: .1rem; }
.news .kind {
  display: inline-block; margin-top: .4rem; font-family: var(--mono); font-size: .6rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
@media (max-width: 620px) { .news li { grid-template-columns: 1fr; gap: .3rem; } }

.yearHead { display: flex; align-items: center; gap: 1.35rem; margin: clamp(2.5rem, 5vw, 4rem) 0 .25rem; }
.yearHead:first-child { margin-top: 0; }
.yearHead b { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -0.04em; }
.yearHead hr { flex: 1; height: 1px; border: 0; background: var(--hairline); }
.yearHead span { font-family: var(--mono); font-size: .68rem; color: var(--ink-3); }

/* People */
.person {
  display: grid; grid-template-columns: 9.5rem minmax(0,1fr); gap: clamp(1.5rem,4vw,2.5rem);
  align-items: start; padding-block: clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--hairline);
}
.person:last-child { border-bottom: 0; }
.person img { width: 9.5rem; height: 9.5rem; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.person h3 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); }
.person h3 a { color: inherit; text-decoration: none; }
.person h3 a:hover { color: var(--ai); }
.person .role { margin-top: .3rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--human); }
.person .affil { font-size: .875rem; color: var(--ink-3); margin-top: .2rem; }
.person .bio { margin-top: 1rem; color: var(--ink-2); font-size: .95rem; }
@media (max-width: 700px) {
  .person { grid-template-columns: 1fr; justify-items: start; }
  .person img { width: 7rem; height: 7rem; }
}

.social { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin-top: 1rem; }
.social a {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--hairline); border-radius: 50%; color: var(--ink-2);
  transition: background-color var(--t), color var(--t), border-color var(--t);
}
.social a:hover { background: var(--ai); border-color: var(--ai); color: var(--ground); }
.social svg { width: 15px; height: 15px; }

.alumniGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.alum { background: var(--surface); padding: 1.75rem 1.25rem; text-align: center; display: grid; justify-items: center; }
.alum img { width: 6rem; height: 6rem; border-radius: 50%; object-fit: cover; background: var(--surface-2); margin-bottom: .9rem; }
.alum h3 { font-size: 1rem; }
.alum .role { margin-top: .25rem; font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--human); }
.alum .affil, .alum .period { margin-top: .2rem; font-size: .78rem; color: var(--ink-3); }

/* Prose */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); margin-top: 2.25rem; }
.prose h3 { font-size: 1.15rem; margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--ink-2); }
.prose li + li { margin-top: .3rem; }

/* The About vision. Set above body copy — it is the one block on the site meant
   to be read slowly, so the size is the signal rather than a heading. */
.visionBody p { font-size: 1.15rem; color: var(--ink-2); }
.visionBody p + p { margin-top: 1rem; }

.callout { padding: 1.1rem 1.4rem; border-left: 2px solid var(--ai); background: var(--surface); }

/* Director CV — portrait beside the lists, stacked on narrow screens.
   This lived as an inline style on the div, which no media query could reach:
   on a 390px phone the portrait still claimed its full 17rem, leaving the CV a
   ~54px track that its own words then overflowed off the side of the screen. */
.cvGrid {
  display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 3.5rem); align-items: start;
}
@media (max-width: 700px) {
  .cvGrid { grid-template-columns: 1fr; }
  /* Keep the portrait at the size it has on desktop rather than letting it go
     full-bleed and push the CV a screen and a half down the page. */
  .cvGrid > :first-child { max-width: 17rem; }
}

.defList { display: grid; gap: 1.5rem; }
.defList__item { padding-bottom: 1.5rem; border-bottom: 1px solid var(--hairline); }
.defList__item:last-child { border-bottom: 0; padding-bottom: 0; }
.defList__term { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.defList__meta { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); margin-top: .2rem; }

/* Courses */
.course { padding-block: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--hairline); }
.course:first-child { padding-top: 0; }
.course:last-child { border-bottom: 0; }
.course__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.course__code { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.course__title { font-size: clamp(1.3rem, 3vw, 1.95rem); margin-top: .35rem; max-width: 24ch; }
.course__levels { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.course__levels li {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--hairline); border-radius: 100px; padding: .2rem .7rem;
}
.course__facts {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin: 0 0 1.5rem;
  padding: 1rem 0; border-block: 1px solid var(--hairline);
}
.course__facts div { display: grid; gap: .15rem; }
.course__facts dt { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.course__facts dd { margin: 0; font-size: .9rem; }
.course__body { max-width: 68ch; }
.course__summary { font-size: 1.05rem; color: var(--ink-2); }
.course__structure { margin-top: .9rem; font-size: .95rem; color: var(--ink-2); }
.course__topics { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.course__topics li { position: relative; padding-left: 1.2rem; font-size: .9rem; color: var(--ink-2); }
.course__topics li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--ai);
}
.course__detail { margin-top: 1.5rem; font-size: .95rem; color: var(--ink-2); }

/* Facility — capability cards: plain-language summary, specs behind a toggle.
   Native <details> so it works without JS, is keyboard- and screen-reader
   friendly, and stays indexable while collapsed. */
.cap__summary { color: var(--ink-2); font-size: .95rem; }

.cap { margin-top: 1.1rem; border-top: 1px solid var(--hairline); padding-top: .9rem; }
.cap > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
  transition: color var(--t);
}
.cap > summary::-webkit-details-marker { display: none; }
.cap > summary::before {
  content: "▸"; display: inline-block; font-size: .8em;
  transition: transform var(--t);
}
.cap[open] > summary::before { transform: rotate(90deg); }
.cap > summary:hover { color: var(--ink); }
.cap > summary:focus-visible { outline: 2px solid var(--ai); outline-offset: 3px; }
.cap[open] > summary { color: var(--ink-2); margin-bottom: .9rem; }
.cap ul { margin-top: .9rem; }

/* Spec table — the one place a list of figures beats prose */
.tableWrap { overflow-x: auto; }
.specTable { width: 100%; border-collapse: collapse; font-size: .82rem; }
.specTable th {
  text-align: left; font-family: var(--mono); font-size: .62rem; font-weight: 400;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  padding: 0 .8rem .5rem 0; border-bottom: 1px solid var(--hairline); white-space: nowrap;
}
.specTable td {
  padding: .45rem .8rem .45rem 0; border-bottom: 1px solid var(--hairline);
  color: var(--ink-2); vertical-align: baseline;
}
.specTable tr:last-child td { border-bottom: 0; }
.specTable td:nth-child(2), .specTable td:nth-child(3) {
  font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.specTable td:first-child { color: var(--ink); }

/* Floor plan, linked both ways to the zone cards beside it */
.planLayout {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
}
@media (max-width: 900px) { .planLayout { grid-template-columns: 1fr; } }

.planWrap { position: sticky; top: 5rem; }
@media (max-width: 900px) { .planWrap { position: static; } }
.plan { width: 100%; height: auto; }
.planHint {
  margin-top: .9rem; font-family: var(--mono); font-size: .62rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}

.plan__shell { fill: none; stroke: var(--hairline); stroke-width: 3; }
.plan__wall  { stroke: var(--hairline); stroke-width: 3; }

.plan__room rect {
  fill: var(--surface); stroke: var(--hairline); stroke-width: 2;
  transition: fill var(--t), stroke var(--t);
}
.plan__room text {
  fill: var(--ink-2); font-family: var(--mono); font-size: 19px;
  letter-spacing: .1em; text-anchor: middle;
  transition: fill var(--t);
  pointer-events: none;
}
.plan__room .plan__dim { font-size: 15px; fill: var(--ink-3); letter-spacing: .04em; }
.plan__room { cursor: pointer; outline: none; }

/* active — set by hovering either the room or its card */
.plan__room.is-on rect { fill: color-mix(in srgb, var(--bldg) 22%, var(--surface)); stroke: var(--bldg); }
.plan__room.is-on text { fill: var(--ink); }
.plan__room:focus-visible rect { stroke: var(--ai); stroke-width: 3; }

.plan__fold  { fill: none; stroke: var(--ai); stroke-width: 2.5; }
.plan__glass { fill: var(--ground); stroke: var(--ink-3); stroke-width: 2; }
.plan__door  { fill: none; stroke: var(--ink-3); stroke-width: 2; }
.plan__note text {
  fill: var(--ink-3); font-family: var(--mono); font-size: 13px; letter-spacing: .12em;
}

.zoneCards { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.zoneCard { transition: background-color var(--t); outline: none; }
.zoneCard.is-on { background: var(--surface-2); }
.zoneCard:focus-visible { outline: 2px solid var(--ai); outline-offset: -2px; }

.zoneHead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.zoneSize {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}

/* Column flow rather than a grid: the photographs are a mix of portrait and
   landscape, and forcing a single aspect ratio would crop the tall ones badly. */
.photoGrid { columns: 1; column-gap: 1.25rem; }
@media (min-width: 620px) { .photoGrid { columns: 2; } }
@media (min-width: 1000px) { .photoGrid { columns: 3; } }
.photoGrid figure { break-inside: avoid; margin: 0 0 1.5rem; }
.photoGrid img {
  width: 100%; height: auto;
  border: 1px solid var(--hairline); border-radius: 3px; background: var(--surface);
}
.photoGrid figcaption {
  margin-top: .6rem; font-family: var(--mono); font-size: .68rem;
  letter-spacing: .06em; color: var(--ink-3); line-height: 1.5;
}

.modes { display: grid; gap: 1px; background: var(--hairline); border-block: 1px solid var(--hairline); }
.modes article {
  background: var(--ground); padding: 1.4rem 0;
  display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 1.5rem; align-items: baseline;
}
.modes h3 {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ai); font-weight: 400;
}
.modes p { font-size: .95rem; color: var(--ink-2); }
@media (max-width: 700px) { .modes article { grid-template-columns: 1fr; gap: .4rem; } }

/* Code releases and datasets — each is a citable object with its own DOI */
.release { display: grid; gap: 1px; background: var(--hairline); border-block: 1px solid var(--hairline); }
.release article {
  background: var(--ground); padding: 1.4rem 0;
  display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.5rem; align-items: start;
}
.release__id { display: grid; gap: .2rem; align-content: start; }
.release__name {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase;
}
.release__yr { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.release h3 { font-size: 1.05rem; }
.release__desc { margin-top: .4rem; font-size: .9rem; color: var(--ink-2); }
.release__links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .8rem; }
/* Anchors and plain spans share the treatment — a release without a DOI still
   names its venue, and it should sit in line with the links beside it. */
.release__links a,
.release__links span {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em;
  color: var(--ink-2); text-decoration: none;
}
.release__links a:hover { color: var(--ai); }
/* Slightly quieter, so "not a link" reads without looking broken. */
.release__links span { color: var(--ink-3); }
.release__links svg { width: 1em; height: 1em; flex-shrink: 0; }
@media (max-width: 700px) {
  .release article { grid-template-columns: 1fr; gap: .5rem; }
  .release__id { grid-auto-flow: column; justify-content: start; gap: .75rem; }
}

/* Sponsors and partners, set as type rather than logos */
.nameList { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.nameList li {
  padding: .8rem 0; border-bottom: 1px solid var(--hairline);
  font-size: .95rem; color: var(--ink-2); line-height: 1.45;
}
.nameList li:last-child { border-bottom: 0; padding-bottom: 0; }
.nameList li:first-child { padding-top: 0; }
.nameList li::before { content: none; }   /* .card li adds a "+" we don't want here */
.nameList a { color: var(--ink); text-decoration: none; }
.nameList a:hover { color: var(--ai); }

/* ---------------------------------------------------------------------------
   11. CTA + footer
   ------------------------------------------------------------------------- */
.cta { border: 1px solid var(--hairline); padding: clamp(2rem, 6vw, 3.5rem); background: var(--surface); border-radius: 3px; }
.cta h2 { font-size: clamp(1.5rem, 3.6vw, 2.4rem); max-width: 22ch; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .75rem;
  letter-spacing: .16em; text-transform: uppercase; padding: .85rem 1.6rem;
  border: 1px solid var(--ai); color: var(--ai); border-radius: 100px;
  text-decoration: none; cursor: pointer; background: none;
  transition: background-color var(--t), color var(--t);
}

/* Inline icons track the text they sit in. Without this the SVGs have a
   viewBox but no intrinsic size and balloon to the browser default. */
.btn svg, .linkList svg, p svg, li svg, h1 svg, h2 svg, h3 svg {
  width: 1em; height: 1em; flex-shrink: 0;
  display: inline-block; vertical-align: -0.1em;
}
.btn:hover { background: var(--ai); color: var(--ground); }
.btn--quiet { border-color: var(--hairline); color: var(--ink-2); }
.btn--quiet:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.btnRow { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

.foot { border-top: 1px solid var(--hairline); padding-block: 3rem 3.5rem; color: var(--ink-2); font-size: .9rem; }
.foot__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.foot h2 { font-size: 1.1rem; color: var(--ink); margin-bottom: .6rem; }
.foot h3 { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .7rem; font-weight: 400; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
/* The Explore list is long, so it runs in two columns at every width — the page
   names are short enough to fit even on the narrowest phone. Qualified with ul
   so it outranks the single-column `.foot ul` grid above. */
.foot ul.foot__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ai); }
.foot__bottom {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-family: var(--mono); font-size: .68rem; color: var(--ink-3);
}
/* Qualified with ul so it outranks the `.foot ul` grid above — otherwise the
   three legal links stack vertically instead of sitting in a row. */
.foot ul.foot__legal { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }

.disclaimer { border-left: 2px solid var(--hairline); padding-left: 1rem; max-width: 64ch; margin-bottom: 2rem; font-size: .85rem; color: var(--ink-3); }

.toTop {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--hairline); border-radius: 50%;
  background: var(--surface); color: var(--ink); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--t), transform var(--t), visibility var(--t), background-color var(--t);
}
.toTop[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.toTop:hover { background: var(--ai); color: var(--ground); border-color: var(--ai); }
.toTop svg { width: 16px; height: 16px; }

/* News item pages (proof of concept) */
.postTitle { font-size: clamp(1.6rem, 4vw, 2.6rem); max-width: 24ch; }
.postVenue { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: .6rem; }
.postNote { margin-top: 1.5rem; padding-left: 1rem; border-left: 2px solid var(--hairline); color: var(--ink-3); font-size: .95rem; }
.newsMeta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .5rem; }
.newsMore {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ai); text-decoration: none;
  display: inline-flex; align-items: center; gap: .35rem;
}
.newsMore:hover { color: var(--human); }
.newsMore svg { width: .8em; height: .8em; }

/* ---------------------------------------------------------------------------
   Publications — the /publications/ index and the per-paper pages.
   ------------------------------------------------------------------------- */
.pubs { list-style: none; padding: 0; margin: 0 0 clamp(2rem,4vw,3rem); display: grid; gap: 1.75rem; }
/* The number is decorative — it is the CV's numbering, oldest = 1, so the list
   counts down. Hidden from screen readers; the list order already says it. */
.pubs li { padding-bottom: 1.75rem; border-bottom: 1px solid var(--hairline);
           display: grid; grid-template-columns: 2.5rem minmax(0,1fr); align-items: start; }
.pubs li > :not(.pub__n) { grid-column: 2; }
.pub__n { grid-column: 1; grid-row: 1 / span 3; font-family: var(--mono);
          font-size: .78rem; color: var(--ink-3); padding-top: .15rem;
          font-variant-numeric: tabular-nums; }
@media (max-width: 620px) {
  .pubs li { grid-template-columns: 1.9rem minmax(0,1fr); }
  .pub__n { font-size: .68rem; }
}
.pubs li:last-child { border-bottom: 0; padding-bottom: 0; }
.pub__title {
  font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3;
  color: var(--ink); text-decoration: none; display: inline-block; max-width: 64ch;
}
.pub__title:hover { color: var(--ai); }
.pub__authors { color: var(--ink-2); font-size: .9rem; margin-top: .4rem; max-width: 64ch; }
.pub__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-top: .5rem;
             font-family: var(--mono); font-size: .68rem; color: var(--ink-3); }

.pubTitle { font-size: clamp(1.5rem, 3.6vw, 2.4rem); max-width: 26ch; }
.pubVenue { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
            text-transform: uppercase; color: var(--ink-3); margin-top: .6rem; }
.pub__cite { color: var(--ai); text-decoration: none; }
.pub__cite:hover { color: var(--human); }
/* A paper with no DOI has no link, so it must not look like one. */
.pub__title--plain { color: var(--ink); cursor: default; }
/* An archived repo should not look like a live one. */
.release__yr--warn { color: var(--human); }
