/* ==========================================================================
   Adaptive Intelligence Lab - Soongsil University
   Design system. Plain CSS, no build step.

   COLOR ARCHITECTURE
   The --ssu-* ramp is anchored on Soongsil University's official CI colors:
     --ssu-700    #006794  SSU Dark Blue    (Pantone 308)
     --ssu-500    #009BCB  SSU Medium Blue  (Pantone 3135)
     --accent-400 #5EC1C3  SSU Light Blue   (Pantone 325)

   In dark mode the ramp INVERTS (50 becomes darkest, 900 becomes lightest),
   so every component keeps using the same token names with no dark overrides.

   >>> RULE: only steps 700-900 are safe as TEXT. <<<
   The inversion is asymmetric - dark mode is generous, light mode is not.
   Measured against --paper/--surface, worst case across both themes:
       400 -> 2.50    500 -> 2.99    600 -> 4.10       (fail 4.5:1)
       700 -> 5.16    800 -> 7.99    900 -> 12.9       (pass)
   So 400-600 are for FILLS, BORDERS and DECORATION only. Hover states move
   UP the ramp (700 -> 800), never down.
   ========================================================================== */

/* --------------------------------------------------------------- 1. TOKENS */
:root {
  /* Soongsil blue ramp - light */
  --ssu-50:  #eff8fb;
  --ssu-100: #d5edf5;
  --ssu-200: #abdcea;
  --ssu-300: #74c6dd;
  --ssu-400: #33abcd;
  --ssu-500: #009bcb;
  --ssu-600: #0082ac;
  --ssu-700: #006794;
  --ssu-800: #005273;
  --ssu-900: #003b54;
  --ssu-950: #002331;

  /* Accent - SSU Light Blue. -500 is darkened to clear 4.5:1 on white. */
  --accent-400: #5ec1c3;
  --accent-500: #226568;
  --alert-500:  #c0524a;

  /* ---- The one accent the figures use besides the brand blue: "look again"
     (a feedback loop, a truncated rollout). A FILL or a STROKE, never text:
     on --surface in light mode it measures 4.04:1, under the 4.5:1 text needs. */
  --fig-orange: #b85c22;

  /* Region bands. A pale tint (1.2:1 against the card, as in the figure) with
     the contrast carried entirely by the ink on it: 5.6:1 warm, 7.7:1 cool. */
  --band-warm:     #f7e7d8;
  --band-warm-ink: #8a4b1e;
  --band-cool:     #ddeaf2;
  --band-cool-ink: #0f4c63;

  /* The mat every picture in a diagram sits on. It stays LIGHT in dark mode
     on purpose: the thumbnails are light renders, and a white figure floating
     on a near-black panel reads as a hole punched in the page. */
  --fig-mat:     #ffffff;
  --fig-mat-ink: #5b6a74;

  /* Neutrals. --subtle is darkened from #83919b (3.24:1) to clear 4.5:1. */
  --ink:     #0f1e28;
  --muted:   #55646e;
  --subtle:  #5e6a72;   /* 4.95:1 on --surface; #67737a was 4.30:1 there */
  --line:    #c5d6e0;
  --surface: #eaf2f6;   /* a real tonal step from --paper, not 1.07:1 */
  --paper:   #ffffff;

  /* Borders that are a control's ONLY boundary need 3:1; no ramp step both
     clears that and stays quiet, so these are separate. */
  --border-strong: #5590ab;
  --hero-wash:     #d3e7f1;   /* the page-hero tint, masked to a soft pool */

  /* Theme-dependent values that used to live in `[data-theme=dark] X` rules.
     They are tokens so that EVERY dark value sits in the one block below,
     which is duplicated for prefers-color-scheme. Adding a dark rule outside
     that block is the bug this prevents. */
  --on-brand:        #ffffff;   /* text on a solid --ssu-700/800 or accent fill */
  --mark-img:        url("../img/brand/logo.png");
  --logo-filter:     none;
  --map-filter:      none;   /* the embed has no dark tiles of its own */
  --card-bg:         #ffffff;
  --card-ring:       transparent;
  --card-hover-ring: transparent;


  /* Type */
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font-sans);

  /* Shape and motion */
  --container: 1040px;
  --header-h: 4rem;
  --header-h-lg: 4.5rem;
  --frost: 88%;
  --radius-lg: .5rem;
  --radius-xl: .75rem;
  --radius-2xl: 1rem;
  --shadow-card: 0 1px 2px rgba(16,30,40,.04),
                 0 4px 10px -2px rgba(16,30,40,.07),
                 0 12px 24px -8px rgba(16,30,40,.06);
  --shadow-card-hover: 0 1px 2px rgba(16,30,40,.05),
                       0 6px 14px -2px rgba(16,30,40,.09),
                       0 20px 36px -12px rgba(16,30,40,.12);
  --ease-out-expo: cubic-bezier(.19, 1, .22, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ssu-50:  #0a1a24;
  --ssu-100: #102a38;
  --ssu-200: #1a3f54;
  --ssu-300: #245a76;
  --ssu-400: #3e90b6;
  --ssu-500: #5cb3d4;
  --ssu-600: #4fabd0;
  --ssu-700: #3a97c2;
  --ssu-800: #8ecbe3;
  --ssu-900: #d8eef8;
  /* In dark, --surface is already near black, so a footer *below* it cannot
     read as a band - #04101a measured 1.00:1 against it. The footer lifts
     instead, and .site-footer carries a strong top border as well. */
  --ssu-950: #15293a;

  --accent-400: #7fd2d4;
  --accent-500: #72cbcd;

  --fig-orange: #e4a06a;
  --band-warm:     #3a2a1e;
  --band-warm-ink: #e7b98c;
  --band-cool:     #14303f;
  --band-cool-ink: #8fc6e0;
  --fig-mat:     #f2f5f7;
  --fig-mat-ink: #5b6a74;
  --ink:     #e6eef3;
  --muted:   #98a8b3;
  --subtle:  #8a99a5;
  --line:    #2b4a60;   /* raised: at #1e3446 a card edge was 1.32:1 */
  --surface: #061017;
  --paper:   #0e1e29;

  --border-strong: #3d6f8c;
  --hero-wash:     #122c3c;
  --on-brand:        #04101a;
  --mark-img:        url("../img/brand/logo-dark.png");
  --logo-filter:     brightness(1.75) saturate(1.1);
  --map-filter:      invert(.92) hue-rotate(180deg) saturate(.85);
  --card-bg:         #182735;
  --card-ring:       rgba(255,255,255,.06);
  --card-hover-ring: #2f7ba1;

  --shadow-card: 0 1px 2px rgba(0,0,0,.30),
                 0 4px 10px -2px rgba(0,0,0,.35),
                 0 12px 24px -8px rgba(0,0,0,.30);
  --shadow-card-hover: 0 1px 2px rgba(0,0,0,.35),
                       0 6px 14px -2px rgba(0,0,0,.40),
                       0 20px 36px -12px rgba(0,0,0,.45);
  color-scheme: dark;
}

/* Same tokens, for visitors with JavaScript disabled. The boot script sets
   data-theme before first paint, so this only ever applies without JS. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ssu-50:  #0a1a24;
    --ssu-100: #102a38;
    --ssu-200: #1a3f54;
    --ssu-300: #245a76;
    --ssu-400: #3e90b6;
    --ssu-500: #5cb3d4;
    --ssu-600: #4fabd0;
    --ssu-700: #3a97c2;
    --ssu-800: #8ecbe3;
    --ssu-900: #d8eef8;
    /* In dark, --surface is already near black, so a footer *below* it cannot
       read as a band - #04101a measured 1.00:1 against it. The footer lifts
       instead, and .site-footer carries a strong top border as well. */
    --ssu-950: #15293a;

    --accent-400: #7fd2d4;
    --accent-500: #72cbcd;

  --fig-orange: #e4a06a;
  --band-warm:     #3a2a1e;
  --band-warm-ink: #e7b98c;
  --band-cool:     #14303f;
  --band-cool-ink: #8fc6e0;
  --fig-mat:     #f2f5f7;
  --fig-mat-ink: #5b6a74;
    --ink:     #e6eef3;
    --muted:   #98a8b3;
    --subtle:  #8a99a5;
    --line:    #2b4a60;   /* raised: at #1e3446 a card edge was 1.32:1 */
    --surface: #061017;
    --paper:   #0e1e29;

    --border-strong: #3d6f8c;
    --hero-wash:     #122c3c;
    --on-brand:        #04101a;
    --mark-img:        url("../img/brand/logo-dark.png");
    --logo-filter:     brightness(1.75) saturate(1.1);
    --map-filter:      invert(.92) hue-rotate(180deg) saturate(.85);
    --card-bg:         #182735;
    --card-ring:       rgba(255,255,255,.06);
    --card-hover-ring: #2f7ba1;

    --shadow-card: 0 1px 2px rgba(0,0,0,.30),
                   0 4px 10px -2px rgba(0,0,0,.35),
                   0 12px 24px -8px rgba(0,0,0,.30);
    --shadow-card-hover: 0 1px 2px rgba(0,0,0,.35),
                         0 6px 14px -2px rgba(0,0,0,.40),
                         0 20px 36px -12px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}

/* --------------------------------------------------------------- 1b. FONTS
   The display face is self-hosted - one 27 KB variable file - so the lab's
   name never waits on a third party. The body face (Pretendard) still comes
   from a CDN because its Korean glyphs are served in on-demand slices, but
   its stylesheet is loaded without blocking the first paint: see <head>. */
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ----------------------------------------------------------- 2. BASE RESET */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;     /* the sticky header must not eat the focus ring */
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
/* Headings default to the BODY face. The display face is applied explicitly,
   and only to: the wordmark, nav, page/hero titles, numerals, dates,
   uppercase micro-labels and buttons. */
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--ssu-700); color: var(--on-brand); }

:focus-visible {
  outline: 2px solid var(--ssu-700);
  outline-offset: 3px;
}
/* The skip link targets <main tabindex="-1">; do not draw a ring on it. */
main:focus { outline: none; }
/* The footer ground is dark in both themes; the ramp ring vanishes on it. */
.site-footer :focus-visible { outline-color: #ffffff; }
/* The full-card overlay anchor must show focus at the card's own radius. */
/* Inset: these links fill a box that clips its overflow, so a ring drawn
   outside the box is cut off and the control looks unfocused. */
.card-link:focus-visible { border-radius: var(--radius-2xl); outline-offset: -3px; }

.skip-link {
  position: absolute; left: 50%; top: 0; z-index: 100;
  transform: translate(-50%, -140%);
  padding: .7rem 1.2rem;
  background: var(--ssu-800); color: var(--on-brand);
  font-family: var(--font-display); font-size: .875rem; font-weight: 600;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transition: transform .2s;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* -------------------------------------------------------------- 3. LAYOUT */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 40em) { .container { padding-inline: 1.5rem; } }
@media (min-width: 64em) { .container { padding-inline: 2rem; } }

.section { padding-block: 4rem; }
@media (min-width: 40em) { .section { padding-block: 5rem; } }
.section--surface { background: var(--surface); }

.section-title {
  font-size: 1.5rem; font-weight: 700; color: var(--ssu-900);
  letter-spacing: -.02em;
}
@media (min-width: 40em) { .section-title { font-size: 1.875rem; } }
.section-sub {
  margin-top: .75rem; max-width: 34rem;
  color: var(--muted); line-height: 1.625;
}
.eyebrow {
  display: inline-flex; align-items: center;
  padding: .3125rem .75rem; border-radius: 999px;
  background: var(--band-cool); color: var(--band-cool-ink);
  font-family: var(--font-display);
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em;
}
.eyebrow--warm { background: var(--band-warm); color: var(--band-warm-ink); }
.eyebrow + .section-title { margin-top: .875rem; }

/* Small layout utilities, so the HTML carries no inline styles. */
.section-actions { margin-top: 1.5rem; }
.card-actions { margin-top: 1rem; }
.stack-lg { display: flex; flex-direction: column; gap: 3.5rem; }
.link-inline {
  color: var(--ssu-700); font-weight: 500;
  text-decoration: underline; text-underline-offset: 2px;
}
.link-inline:hover { color: var(--ssu-900); }

/* -------------------------------------------------------------- 4. HEADER */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) var(--frost), transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--paper); } }
.site-header.is-scrolled {
  border-bottom-color: color-mix(in srgb, var(--ssu-900) 14%, transparent);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: var(--header-h);
}
@media (min-width: 64em) { .site-header .container { height: var(--header-h-lg); } }

.brand {
  display: flex; align-items: center; gap: .625rem;
  font-family: var(--font-display);
  font-size: 1.0625rem; font-weight: 800; letter-spacing: -.025em;
  color: var(--ssu-900); transition: color .2s;
}
.brand:hover { color: var(--ssu-700); }
@media (min-width: 40em) { .brand { font-size: 1.25rem; } }
/* At 360 the wordmark wrapped to two lines and filled the sticky bar. */
@media (max-width: 23.4375em) { .brand { font-size: .9375rem; gap: .5rem; } }
/* The lab mark. Two files rather than one recoloured by CSS, because the
   artwork is a three-colour glyph: in dark mode the blue is lightened and the
   counter is knocked out, which no filter can do faithfully. */
.brand-mark {
  width: 1.875rem; height: 1.875rem; flex: none;
  background: var(--mark-img) center / contain no-repeat;
}

.nav { display: none; align-items: center; gap: .125rem; }
@media (min-width: 64em) { .nav { display: flex; } }
.nav-link {
  position: relative; display: block;
  padding: .5rem .875rem;
  font-family: var(--font-display);
  font-size: .875rem; font-weight: 600;
  color: var(--muted); border-radius: var(--radius-lg);
  transition: color .2s;
}
.nav-link:hover { color: var(--ssu-800); }
.nav-link[aria-current] { color: var(--ssu-800); }
.nav-link::after {
  content: ""; display: block; height: 2px; margin-top: .25rem;
  border-radius: 999px; background: var(--ssu-500);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-out-expo);
}
.nav-link:hover::after,
.nav-link[aria-current]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: .25rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  color: var(--ssu-800); border-radius: var(--radius-lg);
  transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: var(--ssu-50); }
.menu-btn { display: inline-flex; }
@media (min-width: 64em) { .menu-btn { display: none; } }
/* Without JavaScript the drawer cannot open: the menu button would be a dead
   control and a narrow screen would have no navigation at all. The links wrap
   onto a second row instead. The same goes for the topic filter, which is all
   buttons. (.no-js is removed by the boot script in <head>, so none of this
   applies when scripts run.) */
.no-js .menu-btn { display: none; }
.no-js .nav { display: flex; flex-wrap: wrap; }
@media (max-width: 63.99em) {
  .no-js .site-header .container { height: auto; flex-wrap: wrap; padding-block: .5rem; }
  .no-js .nav { order: 3; width: 100%; }
}
.no-js .pub-filter, .no-js .pub-tags { display: none; }

/* Theme toggle: both icons ship, CSS picks one. JS only sets data-theme-state.
   aria-pressed is deliberately avoided - it would contradict the aria-label. */
/* The boot script in <head> drops .no-js before first paint. Without it the
   toggle cannot do anything - and on a dark OS it would also show the wrong
   icon and announce the wrong action - so it is hidden rather than left lying. */
.no-js [data-theme-toggle] { display: none; }

/* Show the DESTINATION, matching the aria-label: a moon in light mode means
   "switch to dark". */
[data-theme-toggle] .icon-sun { display: none; }
[data-theme-toggle][data-theme-state="dark"] .icon-sun { display: block; }
[data-theme-toggle][data-theme-state="dark"] .icon-moon { display: none; }

/* Mobile drawer */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 20, 32, .5);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.drawer-scrim.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; inset-block: 0; right: 0; z-index: 70;
  width: 82%; max-width: 22rem;
  display: flex; flex-direction: column;
  background: var(--paper);
  box-shadow: -12px 0 40px rgba(0,0,0,.18);
  transform: translateX(100%);
  visibility: hidden;
  /* visibility flips INSTANTLY on open (0s 0s) and only after the slide on
     close (0s .3s). A plain `.3s` here made the drawer still `hidden` at the
     moment setDrawer() called focus(), so focus never entered it. */
  transition: transform .3s var(--ease-out-expo), visibility 0s .3s;
  overflow-y: auto;
}
.drawer.is-open {
  transform: translateX(0); visibility: visible;
  transition: transform .3s var(--ease-out-expo), visibility 0s 0s;
}
/* `inert` is what actually removes the links from the tab order (set in JS);
   visibility keeps them out of it in browsers without inert support. */
.drawer[inert] { visibility: hidden; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); padding-inline: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.drawer-nav { padding: 1rem 1.25rem; display: flex; flex-direction: column; }
.drawer-nav a {
  padding: .8rem .25rem;
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  color: var(--muted); border-bottom: 1px solid var(--line);
  transition: color .2s;
}
.drawer-nav a:hover, .drawer-nav a[aria-current] { color: var(--ssu-800); }
.drawer-foot {
  margin-top: auto; padding: 1.25rem;
  font-size: .75rem; line-height: 1.6; color: var(--muted);
}

/* ---------------------------------------------------------------- 5. HERO
   A photograph of the lab leads the page, and it OVERLAPS the copy instead of
   sitting in a column beside it.

     >= 56em   copy on the left; the photograph WHOLE (4:3, uncropped) on the
               right, reaching past the column toward the window. Its left quarter
               dissolves under the copy, so the part at full strength is
               about square. The wider the window, the larger the picture
               (up to 40rem tall) and the taller the hero. Past that size it
               stays beside the copy rather than drifting to the window's edge.
     narrower  there is less room beside the text, so the picture shrinks;
               below a floor it slides further under the copy instead
     < 56em    no overlap: text, then the photograph at 3:2
               (cropped to its "strip" point in photos.json), then the
               buttons BELOW the picture

   Everything is derived from a few lengths, measured against the hero's own
   width (container query units, so the page gutters do not matter):

     --bleed    how far the photograph reaches past the column's right edge
                (at most --reach: 2.5rem short of the window)
     --copy     the width of the text column
     --seen     the width left for the photograph at full strength
     --photo-h  its height: as tall as --seen is wide (a square), within limits
     --photo    its width (4:3)
     --overlap  how far the photograph runs under the text column

   LEGIBILITY is one rule, not a set of tuned scrims: the photograph is masked
   so that it is at most 6% visible wherever body text can be, and only reaches
   full strength 4.5rem to the right of the text column. Body text is held 3.5rem
   inside the column's edge and display text 1.5rem inside it, so the worst case
   (a black or white pixel under the last character) still clears 4.5:1 and
   3:1. A mask, not a painted scrim: the page shows through, so one rule
   serves both themes. Change a width and the mask follows.
   ---------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  padding-block: 2.25rem 3.25rem;
}
@media (min-width: 48em) { .hero { padding-block: 3.5rem 4rem; } }
/* a full-height floor only where the hero fits in one: on a tall, narrow
   screen it would push the photograph off the fold and leave a gap under it */
@media (min-width: 64em) {
  .hero { min-height: calc(100svh - var(--header-h-lg)); padding-block: 4rem; }
}
.hero .container { position: relative; z-index: 1; }

.hero-grid { display: grid; container-type: inline-size; }
.hero-copy, .hero-media { min-width: 0; }
.hero-copy { position: relative; z-index: 1; }
.hero-media { position: relative; z-index: 0; display: flex; flex-direction: column; }

.hero-frame {
  position: relative; overflow: hidden;
  border-radius: var(--radius-2xl);
  /* let a vertical swipe scroll the page; only horizontal is ours */
  touch-action: pan-y;
  /* a drag across the picture must be OUR gesture, not the browser's native
     image drag - that one fires pointercancel and eats the swipe */
  user-select: none; -webkit-user-select: none;
}
.hero-slides { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-slide.is-current { opacity: 1; }
/* object-position comes from each photograph's "focus" and "strip" points
   (photos.json, written as --focus / --strip by build.py), so a crop keeps
   its subject in view */
.hero-slide img { width: 100%; height: 100%; object-fit: cover;
                  object-position: var(--strip, var(--focus, 50% 50%));
                  -webkit-user-drag: none; }
.hero-slide > .fig { width: 100%; height: 100%; }

/* ---- stacked: text, then a wide strip, then the buttons - nothing overlaps.
   The copy's children become rows of the grid (display: contents) so the
   picture can sit between the text and the buttons without being moved in
   the markup. ---- */
.hero-copy { display: contents; }
.hero-copy > * { position: relative; z-index: 1; }
.hero-media { order: 1; margin-top: 1.5rem; }
.hero-grid .hero-actions { order: 2; margin-top: 1.25rem; }
.hero-frame { aspect-ratio: 3 / 2; width: 100%; }

/* ---- side by side: both share one grid cell and overlap ---- */
@media (min-width: 56em) {
  .hero-grid {
    /* the furthest the photograph may reach: 2.5rem short of the window (less
       half a scrollbar), so the rounded corners have room; zero while the
       column fills the window */
    --reach: max(0px, calc((100vw - 100cqw) / 2 - 2.5rem));
    --copy: min(32.5rem, 62cqw);
    --seen: calc(100cqw + var(--reach) - var(--copy) - 4.5rem);
    --photo-h: clamp(20rem, var(--seen), 40rem);
    --photo: calc(var(--photo-h) * 4 / 3);
    /* once the height is capped, the photograph keeps the same footing beside
       the copy (its left quarter under the text) instead of riding out to the
       window and leaving a gap */
    --bleed: min(var(--reach), calc(var(--copy) + var(--photo-h) + 4.5rem - 100cqw));
    --overlap: calc(var(--copy) + var(--photo) - 100cqw - var(--bleed));
  }
  .hero-copy, .hero-media { grid-area: 1 / 1; }
  .hero-copy { display: block; max-width: var(--copy); align-self: center; }
  .hero-grid .hero-actions { margin-top: 2rem; }
  /* .hero clips what runs past the window (100vw counts the scrollbar) */
  .hero-media { margin-top: 0; margin-right: calc(-1 * var(--bleed));
                justify-self: end; align-self: center; width: var(--photo); }
  .hero-frame {
    aspect-ratio: 4 / 3;
    /* on a very wide window the picture no longer reaches the copy, and its
       left edge still dissolves over at least 6rem */
    -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.06) max(0px, calc(var(--overlap) - 2.5rem)), #000 max(6rem, calc(var(--overlap) + 4.5rem)));
            mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.06) max(0px, calc(var(--overlap) - 2.5rem)), #000 max(6rem, calc(var(--overlap) + 4.5rem)));
  }
  .hero-slide img { object-position: var(--focus, 50% 50%); }
  .hero-ctrl { margin-right: var(--bleed); }
  .hero-frame-link span { right: calc(var(--bleed) + .625rem); }
  /* The copy scales with the hero, not with the viewport, so the name still
     breaks after "Adaptive" and the claim still sets in two lines when the
     column is at its narrowest. */
  .hero-grid .hero-title { font-size: clamp(2.125rem, 7.2cqw, 4rem); }
  .hero-grid .hero-claim { max-width: calc(var(--copy) - 1.5rem); font-size: clamp(1.5rem, 3.5cqw, 2.125rem); }
  .hero-grid .hero-lede,
  .hero-grid .hero-dept { max-width: calc(var(--copy) - 3.5rem); }
}

/* No photograph yet: the copy stands on its own. */
.hero-media:not(:has(.hero-frame)) { display: none; }

/* The "fade in" on arrival. A transition cannot do this: .is-current is in
   the markup, so the first slide is already opaque at first paint. */
.hero-frame { animation: hero-rise .7s var(--ease-out-expo) both; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Built by script, so it stays empty - and invisible - without JS. */
.hero-ctrl { display: flex; align-items: center; justify-content: flex-end;
             gap: .5rem; margin-top: .75rem; }
.hero-ctrl:empty { display: none; }
.hero-arrow {
  width: 1.75rem; height: 1.75rem; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--muted);
  cursor: pointer;
  transition: color .15s, border-color .15s, background-color .15s;
}
.hero-arrow:hover { color: var(--ssu-700); border-color: var(--border-strong); }
.hero-arrow svg { width: .6875rem; height: .6875rem; fill: none;
                  stroke: currentColor; stroke-width: 2.25;
                  stroke-linecap: round; stroke-linejoin: round; }
.hero-dots { display: flex; align-items: center; gap: .3125rem; }
.hero-dot {
  width: .4375rem; height: .4375rem; padding: 0;
  border: 0; border-radius: 999px;
  background: var(--line); cursor: pointer;
  transition: width .2s var(--ease-out-expo), background-color .2s;
}
.hero-dot[aria-current="true"] { width: 1.125rem; background: var(--ssu-700); }
/* 7px is a mark, not a target: the hit area is grown around it. (The arrows
   beside the dots are full-size and do the same job.) */
.hero-dot { position: relative; }
.hero-dot::after { content: ""; position: absolute; inset: -.5625rem -.125rem; }

@media (prefers-reduced-motion: reduce) {
  .hero-frame { animation: none; }
  .hero-slide { transition: none; }
  .hero-dot { transition: none; }
}

/* Screen-reader-only: announces the slide number on change. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-eyebrow {
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--font-display);
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .26em; color: var(--ssu-700);
}
@media (min-width: 40em) { .hero-eyebrow { font-size: .8125rem; } }
/* The SSU symbol mark is CI blue; --logo-filter brightens (never inverts) it
   on a dark ground so the mark keeps its hue. */
.hero-eyebrow img { height: 1.75rem; width: auto; filter: var(--logo-filter); }
.hero-title {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 9vw, 3.5rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.03;
  color: var(--ssu-900);
}
/* The department line belongs to the title, so it sits close to it and stays
   quiet. */
.hero-dept {
  margin-top: .5rem;
  font-size: 1rem; font-weight: 400; color: var(--muted);
}
.hero-lede {
  /* stacked, it spans the column like the photograph under it; side by side,
     section 5 holds it inside the text column */
  margin-top: 1rem;
  color: var(--muted); line-height: 1.7;
}
@media (min-width: 40em) { .hero-lede { font-size: 1.0625rem; } }
/* The lab's claim. It sits between the name and the explanation, and it is the
   one sentence a visitor should leave with, so it is set larger than the lede
   and the three adjectives carry the accent. */
.hero-claim {
  margin-top: 2rem; max-width: 30ch;
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700; line-height: 1.3;
  letter-spacing: -.02em; color: var(--ssu-900);
  text-wrap: balance;        /* otherwise "wild." lands alone at every width */
}
@media (min-width: 40em) { .hero-claim { font-size: 1.875rem; max-width: 26ch; } }
.hero-claim em { font-style: normal; color: var(--ssu-700); }
/* The lab's slogan. It stands on its own line above the claim rather than
   opening the sentence: as a clause, "Beyond chasing AGI, we build ..." can
   be read as "as well as chasing AGI". Set as a sign, not as prose. */
.hero-kicker {
  display: block; margin-bottom: .5rem;
  font-size: .875rem; font-weight: 800; line-height: 1.3;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ssu-700);
}
@media (min-width: 40em) { .hero-kicker { font-size: 1rem; } }

.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }

/* ------------------------------------------------------- 6. PAGE HERO (sub) */
.page-hero {
  position: relative; overflow: hidden;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
/* A soft pool of brand tint from the top edge - no graph paper. The grid this
   replaces pulled the eye to a texture instead of to the heading, and stopped
   mid-band where its mask ran out. The tint is a flat colour faded by a mask
   rather than a gradient to `transparent`, which would interpolate through
   transparent black and grey the midpoint. */
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--hero-wash);
  -webkit-mask-image: radial-gradient(ellipse 92% 88% at 50% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 92% 88% at 50% 0%, #000 0%, transparent 70%);
}
.page-hero .container { position: relative; padding-block: 3.5rem; }
@media (min-width: 40em) { .page-hero .container { padding-block: 5rem; } }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: 1.875rem; font-weight: 800; letter-spacing: -.025em; color: var(--ssu-900);
}
@media (min-width: 40em) { .page-hero h1 { font-size: 2.25rem; } }
.page-hero p { margin-top: 1rem; max-width: 34rem; color: var(--muted); }
.lang-switch { margin-bottom: 1.25rem; }
/* Korean does not break inside a word the way English does; keep-all stops
   mid-eojeol breaks. Scoped so it never touches the English pages. */
[lang="ko"] { word-break: keep-all; }
/* Korean takes no Latin tracking. --font-display carries no Hangul, so these
   labels fall back anyway, and the +0.2em that makes an English eyebrow read as
   a label prises Korean syllables apart into "지 원  방 법". uppercase is a
   no-op on Hangul. */
[lang="ko"] .eyebrow,
[lang="ko"] .contact-dl dt,
[lang="ko"] .spec-dl dt,
[lang="ko"] .pill,
[lang="ko"] .section-title,
[lang="ko"] .page-hero h1 {
  letter-spacing: 0; text-transform: none; font-family: var(--font-sans);
}

/* --------------------------------------------------------------- 7. ATOMS */
/* Outlined, like the chips in the diagrams and like .pub-tag, which was
   already drawn that way. Two chip systems on one site was one too many. */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .3125rem .625rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card-bg); color: var(--ssu-800);
  font-size: .75rem; font-weight: 500; line-height: 1.35;
  white-space: nowrap;
}
.pill--award {
  background: var(--accent-500); border-color: var(--accent-500); color: var(--on-brand);
  font-family: var(--font-display); font-weight: 700;
}
.pill--status {
  background: var(--ssu-700); border-color: var(--ssu-700); color: var(--on-brand);
  font-family: var(--font-display); font-weight: 700;
}
.pill-row { display: flex; flex-wrap: wrap; gap: .375rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-size: .875rem; font-weight: 600;
  color: var(--ssu-700); transition: color .2s;
}
.link-arrow:hover { color: var(--ssu-900); }
.link-arrow .arrow { transition: transform .3s var(--ease-out-expo); }
.link-arrow:hover .arrow, .card:hover .arrow { transform: translateX(.25rem); }
/* A back link points the other way, so its arrow must travel the other way. */
.link-back .arrow { order: -1; }
.link-back:hover .arrow { transform: translateX(-.25rem); }

/* The small line above a detail page's title. */
.eyebrow-text { margin-bottom: .75rem; }

.btn-solid {
  display: inline-flex; align-items: center; gap: .5rem; width: fit-content;
  padding: .625rem 1.25rem; border-radius: 999px;
  background: var(--ssu-800); color: var(--on-brand);
  font-family: var(--font-display); font-size: .875rem; font-weight: 600;
  transition: background-color .2s;
}
.btn-solid:hover { background: var(--ssu-900); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem; width: fit-content;
  padding: .625rem 1.25rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--paper);
  color: var(--ssu-700);
  font-family: var(--font-display); font-size: .875rem; font-weight: 600;
  transition: border-color .2s, background-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--ssu-700); background: var(--ssu-50); color: var(--ssu-900); }
.btn-ghost .arrow { transition: transform .3s var(--ease-out-expo); }
.btn-ghost:hover .arrow, .btn-solid:hover .arrow { transform: translateX(.25rem); }

/* --------------------------------------------------------------- 8. CARDS */
/* Text inside a card or panel runs to the card's inner edge. A paragraph held
   to a reading measure inside a wider box leaves a ragged empty strip down the
   right of the card and makes its inner rules shorter than its outer one; if a
   line is too long, the card is too wide - narrow the card, not the text.
   (website-source/figure-src/check_fill.py finds any cap that comes back.) */
.card p, .card li, .card h2, .card h3, .card h4, .card .section-sub,
.card .research-lead, .card .panel-body { max-width: none; }
.card {
  position: relative;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-2xl);
  background: var(--card-bg);
  box-shadow: 0 0 0 1px var(--card-ring), var(--shadow-card);
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
/* A black drop shadow is invisible on a dark ground, so --card-hover-ring
   carries the hover there and is transparent in light mode. */
.card--lift:hover {
  transform: translateY(-4px);
  border-color: var(--ssu-400);
  box-shadow: 0 0 0 1px var(--card-hover-ring), var(--shadow-card-hover);
}
.card--static:hover {
  border-color: var(--ssu-400);
  box-shadow: 0 0 0 1px var(--card-hover-ring), var(--shadow-card-hover);
}
.card--flat {
  border: 1px solid var(--ssu-200); border-left: 3px solid var(--ssu-600);
  border-radius: var(--radius-2xl);
  background: var(--surface); box-shadow: none;
  padding: 1.75rem;
}
@media (min-width: 40em) { .card--flat { padding: 2.25rem; } }
/* A --surface card on a --surface section is a 1.26:1 invisible box. */
.section--surface .card--flat,
.section--surface .empty-state { background: var(--paper); }
/* ...and so is a --surface figure panel inside a --surface card. The panel
   always has to take the OTHER tone from whatever card it lands in. */
.card--flat .research-fig { background: var(--paper); --fig-bg: var(--paper); }
.section--surface .card--flat .research-fig {
  background: var(--surface); --fig-bg: var(--surface);
}

.card-rule {
  position: absolute; inset-inline: 0; top: 0; height: 2px;
  background: var(--ssu-500);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-out-expo);
}
.card:hover .card-rule { transform: scaleX(1); }
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

.empty-state {
  margin-top: 2rem;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-2xl);
  background: var(--surface);
  padding: 3.5rem 1.5rem; text-align: center;
}
.empty-state strong {
  display: block;
  font-family: var(--font-display); font-size: .875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ssu-700);
}
.empty-state p { margin-top: .5rem; font-size: .875rem; color: var(--muted); }

/* ----------------------------------------------------- 9. RESEARCH PIECES
   The parts a project is built from (section 20 lays them out): the numbered
   disc, the module's short name, the figure panel, the prose. */
.research-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.875rem; height: 1.875rem; border-radius: 999px;
  background: var(--ssu-700); color: var(--on-brand);
  font-family: var(--font-display); font-size: .8125rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
/* The number stacks above the title rather than beside it, so the heading,
   the figure and the prose share one left edge. */
.research-item-head > .research-num { margin-bottom: .5rem; line-height: 1; }
/* The module's short name, as it is written in the figures (Twin, World,
   Ground, Policy), above its title. */
.research-tag {
  display: block; margin-bottom: .25rem;
  font-family: var(--font-display); font-size: .75rem; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ssu-700);
}
/* The lab's three words, each tied to something in the loop above it. */
.claim-row { margin-top: 1.5rem; display: grid; gap: 1rem 2rem; }
@media (min-width: 48em) { .claim-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.claim-row dt {
  font-family: var(--font-display); font-size: .75rem; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ssu-700);
}
.claim-row dd { margin-top: .25rem; font-size: .875rem; line-height: 1.55; color: var(--muted); }
/* The panel a figure sits in. The figures themselves are inline SVG - see
   section 18. */
.research-fig {
  position: relative;
  margin-top: 1.5rem;
  border: 1px solid var(--line); border-radius: var(--radius-xl);
  overflow: hidden; background: var(--surface); --fig-bg: var(--surface);
}
.research-fig figcaption {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: .5rem 1rem;
  padding: .75rem 1rem 1rem;
  border-top: 1px solid var(--line);
  font-size: .8125rem; line-height: 1.6; color: var(--subtle);
}
.research-body {
  margin-top: 1.5rem;
  font-size: .9375rem; line-height: 1.7; color: var(--muted);
}
.research-body + .research-body { margin-top: 1rem; }
/* ---------------------------------------------------------------- 10. NEWS
   Both views are generated from one list (website-source/news.json):

     home page   .news-tiles  - the newest four as tiles: category, thumbnail,
                 headline, date. A row of four on a wide screen; below that
                 the row scrolls sideways inside itself.
     news.html   .news-cards  - every item: the same thumbnail on the left,
                 category and date, headline, an optional sentence and link.

   A thumbnail is a logo on a white mat, or - when there is no logo file - a
   typeset badge on the same mat, so a row never has a hole in it. The mat is
   light in both themes (logos are drawn for white), which is why the badge's
   ink is fixed rather than a theme token.
   ---------------------------------------------------------------------- */
.news-thumb {
  container-type: inline-size;
  display: grid; place-items: center;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--line); border-radius: var(--radius-xl);
  background: var(--fig-mat); overflow: hidden;
}
/* a logo's width follows its shape (set by build.py from the file's proportions), so a
   wide wordmark and a square emblem carry about the same weight in the row */
.news-thumb img { width: 62%; height: auto; }
.news-thumb[data-shape="wide"] img   { width: 78%; }
.news-thumb[data-shape="mid"] img    { width: 70%; }
.news-thumb[data-shape="square"] img { width: 45%; }
.news-thumb--dark { background: #000; }
.news-thumb--dark[data-shape] img { width: 88%; }
.news-thumb--badge { padding: .25rem; }
/* the lab's lockup: its mark beside its name. Light artwork on the light mat in
   both themes, so the ink is fixed, as on the badges. */
/* news page: a logo and a lab photograph taking turns, fading like the
   publication teasers; the tile is a link that opens the photograph. The
   script (main.js, "newsswap") toggles .is-alt: under the pointer on a screen
   that has one, while in view on a touch screen. */
.news-thumb--swap { position: relative; }
.news-thumb.news-thumb--swap img.news-thumb-alt {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: var(--focus, 50% 50%);
}
.news-thumb-alt { opacity: 0; transition: opacity .45s ease; }
.news-thumb--swap.is-alt .news-thumb-alt { opacity: 1; }
a.news-thumb--swap:hover { border-color: var(--ssu-400); }
a.news-thumb--swap:focus-visible { outline: 3px solid var(--ssu-700); outline-offset: 2px; }
/* a lab photograph fills its tile edge to edge */
.news-thumb--photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
/* two marks (a joint award, say) side by side with a hairline between them */
.news-thumb--pair { display: flex; align-items: center; justify-content: center; }
.news-thumb--pair img { width: 37cqw; flex: none; }
.news-thumb--pair i { flex: none; width: 1px; height: 30cqw; margin-inline: 5cqw; background: #c9d3da; }
.news-thumb--lab { display: flex; align-items: center; justify-content: center; }
.news-thumb--lab img { width: 22cqw; flex: none; }
.news-thumb--lab span {
  margin-left: 5cqw;    /* not a gap on the tile: cqw there would measure the tile's parent */
  font-family: var(--font-display); font-size: 7.4cqw; font-weight: 800;
  line-height: 1.08; letter-spacing: -.025em; color: #003b54;
}
/* badge type is sized from the tile's own width (cqw), so the same badge is right
   in a 14rem tile on the home page and a 5.5rem one on a phone's news page */
.news-badge { display: flex; flex-direction: column; align-items: center; gap: 2.5cqw; line-height: 1; }
.news-badge b {
  font-family: var(--font-display); font-size: clamp(.875rem, 11.5cqw, 1.625rem); font-weight: 800;
  letter-spacing: -.02em; color: #003b54;
}
.news-badge--sm b { font-size: clamp(.6875rem, 9cqw, 1.25rem); }
.news-badge i {
  font-style: normal;
  font-family: var(--font-display); font-size: clamp(.5625rem, 5.4cqw, .75rem); font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: #006794;
}
.news-cat {
  font-family: var(--font-display); font-size: .75rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--subtle);
}
.news-date, .news-tile-date {
  font-family: var(--font-display); font-size: .8125rem; font-weight: 600;
  color: var(--subtle); font-variant-numeric: tabular-nums;
}

/* ---- home: tiles ---- */
.news-tiles {
  margin-top: 2rem;
  display: grid; gap: 1.5rem;
  grid-auto-flow: column; grid-auto-columns: min(72%, 15rem);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; padding-bottom: .75rem;
}
.news-tiles > li { scroll-snap-align: start; }
/* With the script, the row's own scrollbar gives way to previous / next buttons
   over its ends, and the end that still hides tiles fades out. Without it the
   scrollbar stays: it is then the only way across with a mouse. */
.news-rail { position: relative; }
.news-tiles.is-stepped { scrollbar-width: none; }
.news-tiles.is-stepped::-webkit-scrollbar { display: none; }
.news-rail.more-right .news-tiles {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3.5rem), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 3.5rem), transparent);
}
.news-rail.more-left .news-tiles {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3.5rem);
          mask-image: linear-gradient(to right, transparent, #000 3.5rem);
}
.news-rail.more-left.more-right .news-tiles {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3.5rem, #000 calc(100% - 3.5rem), transparent);
          mask-image: linear-gradient(to right, transparent, #000 3.5rem, #000 calc(100% - 3.5rem), transparent);
}
.news-step {
  position: absolute; z-index: 2; top: var(--step-y, 6rem);
  width: 2.5rem; height: 2.5rem; margin-top: -1.25rem; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ssu-900);
  box-shadow: var(--shadow-card-hover);
  cursor: pointer; opacity: .94;
  transition: color .15s, border-color .15s, opacity .15s;
}
.news-step[hidden] { display: none; }
.news-step--prev { left: -.5rem; }
.news-step--next { right: -.5rem; }
.news-step:hover { opacity: 1; color: var(--ssu-700); border-color: var(--ssu-400); }
.news-step svg { width: .75rem; height: .75rem; fill: none; stroke: currentColor;
  stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 64em) {
  .news-tiles {
    grid-auto-flow: row; grid-auto-columns: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible; padding-bottom: 0;
  }
}
.news-tile { display: flex; flex-direction: column; gap: .625rem; height: 100%; }
.news-tile .news-thumb {
  box-shadow: var(--shadow-card);
  transition: transform .25s var(--ease-out-expo), box-shadow .25s, border-color .25s;
}
.news-tile:hover .news-thumb {
  transform: translateY(-3px); border-color: var(--ssu-400);
  box-shadow: var(--shadow-card-hover);
}
.news-tile-title {
  margin-top: .25rem;
  font-size: 1rem; font-weight: 600; line-height: 1.375; color: var(--ssu-900);
  transition: color .2s;
}
.news-tile:hover .news-tile-title { color: var(--ssu-700); text-decoration: underline; text-underline-offset: 3px; }
.news-tile-date { margin-top: auto; padding-top: .125rem; }
.news-tile:focus-visible { outline-offset: 6px; border-radius: var(--radius-lg); }
@media (prefers-reduced-motion: reduce) { .news-tile .news-thumb { transition: none; } }

/* ---- news page: rows ---- */
.news-cards { display: flex; flex-direction: column; gap: 1.25rem; }
.news-card {
  display: grid; grid-template-columns: clamp(5.5rem, 22vw, 11rem) minmax(0, 1fr);
  gap: clamp(.875rem, 3vw, 1.75rem); align-items: start; padding: 1.125rem;
  scroll-margin-top: calc(var(--header-h-lg) + 1.5rem);
}
@media (min-width: 40em) { .news-card { padding: 1.5rem; align-items: center; } }
.news-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .875rem; }
.news-card-body h2 {
  margin-top: .375rem;
  font-size: 1.125rem; font-weight: 700; line-height: 1.375; color: var(--ssu-900);
}
.news-card-body > p:not(.news-meta):not(.card-actions) {
  margin-top: .5rem;
  font-size: .875rem; line-height: 1.65; color: var(--muted);
}
.news-card-body .card-actions { margin-top: .75rem; }

/* -------------------------------------------------------- 11. PUBLICATIONS */

.pub-groups {
  display: flex; flex-direction: column; gap: 3rem;
  scroll-margin-top: calc(var(--header-h-lg) + 1.5rem);
}
/* the section heading must not sit on its first year */
.section-title + .pub-groups { margin-top: 1.5rem; }
.pub-year-head { display: flex; align-items: center; gap: 1rem; }
.pub-year {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 800;
  letter-spacing: -.025em; color: var(--ssu-700);
  font-variant-numeric: tabular-nums;
}
.pub-year-head .rule { flex: 1; height: 1px; background: var(--line); }
.pub-year-head .count {
  font-family: var(--font-display); font-size: .75rem; font-weight: 600;
  color: var(--subtle); font-variant-numeric: tabular-nums;
}
.pub-list { margin-top: .5rem; border-bottom: 1px solid var(--line); }
.pub-list > li { padding-block: 1.5rem; }
.pub-list > li + li { border-top: 1px solid var(--line); }
.pub-item { display: grid; gap: 1.125rem; }
/* The teaser is the entry's picture, so it gets real room: 22.5rem is the
   width at which the smallest label drawn into a teaser (28px on an 800px
   canvas) still lands above 12px. Every teaser is 16:10 - see section 19. */
@media (min-width: 48em) {
  .pub-item--media {
    grid-template-columns: minmax(0, 22.5rem) minmax(0, 1fr);
    gap: 1.75rem; align-items: start;
  }
  /* An entry with no picture (the thesis, the patent) keeps the text column
     of the entries that have one, so every title on the page starts on one
     line instead of jumping back to the left edge. */
  .pub-item:not(.pub-item--media) { padding-left: calc(22.5rem + 1.75rem); }
}
/* ---------------------------------------------------------- GALLERY
   One card per event: its cover photograph, a count when the event has more
   than one, then title, date and place. The title is the link, stretched over
   the whole card; the script opens the event's photographs in a viewer
   (the .lightbox of section 19, with one <img> in its stage).
   ---------------------------------------------------------------------- */
.gal-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .875rem; margin-top: .75rem; }
.gal-stats:not(:has(strong)) { display: none; }
.gal-stats strong { font-family: var(--font-display); font-size: .9375rem; font-weight: 700; color: var(--ssu-700); }
.gal-stats span { font-size: .875rem; color: var(--subtle); }

.gal-grid {
  display: grid; gap: 1.5rem; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.gal-empty { grid-column: 1 / -1; }
.gal-empty .empty-state { margin-top: 0; }
.gal-card { height: 100%; overflow: hidden; }
.gal-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--fig-mat); }
.gal-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%);
  transition: transform .6s var(--ease-out-expo);
}
.gal-card:hover .gal-photo img { transform: scale(1.035); }
.gal-count {
  position: absolute; right: .75rem; bottom: .75rem;
  min-width: 2.25rem; height: 2.25rem; padding: 0 .5rem;
  display: grid; place-items: center;
  border: 2px solid rgba(255, 255, 255, .92); border-radius: 999px;
  background: rgba(15, 30, 40, .84); color: #fff;
  font-family: var(--font-display); font-size: .875rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.gal-body { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.125rem 1.25rem; }
.gal-title {
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700;
  line-height: 1.35; letter-spacing: -.01em; color: var(--ssu-900);
}
.gal-open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.gal-open:focus-visible { outline: none; }
.gal-open:focus-visible::after { outline: 3px solid var(--ssu-700); outline-offset: -3px; border-radius: var(--radius-2xl); }
.gal-date { font-family: var(--font-display); font-size: .875rem; font-weight: 600; color: var(--ssu-700); }
.gal-place { font-size: .875rem; line-height: 1.5; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .gal-photo img { transition: none; } .gal-card:hover .gal-photo img { transform: none; } }

/* the viewer: one photograph, as large as the window allows */
/* the panel is exactly as wide as the photograph (--ar, its aspect ratio, is set by the
   script), so the title above and the note below line up with its edges */
.lightbox--photo .lightbox-panel {
  width: min(68rem, 100%, calc((100vh - 12rem) * var(--ar, 1.3333)));
  width: min(68rem, 100%, calc((100dvh - 12rem) * var(--ar, 1.3333)));
}
.lightbox--photo .lightbox-stage { touch-action: pan-y; }
.lightbox-photo {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-lg); background: rgba(255, 255, 255, .06);
}
.lightbox--photo .lightbox-cap { font-size: .9375rem; line-height: 1.6; color: rgba(255, 255, 255, .9); }
.lightbox-title small { margin-left: .625rem; font-size: .875rem; font-weight: 500; color: rgba(255, 255, 255, .7); }

/* The hero picture is a doorway to the gallery. The link is a sibling that
   covers the frame rather than a wrapper, so it cannot swallow the swipe
   handler's pointer events; main.js cancels its click when the gesture was
   a drag. */
.hero-frame-link {
  position: absolute; inset: 0; z-index: 4;
  display: block; border-radius: inherit;
  -webkit-user-drag: none;
}
.hero-frame-link span {
  position: absolute; right: .625rem; bottom: .625rem;
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .75rem; font-weight: 600; color: var(--ink);
  padding: .25rem .5rem; border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border: 1px solid var(--line);
  opacity: 0; transition: opacity .18s;
}
.hero-frame:hover .hero-frame-link span,
.hero-frame-link:focus-visible span { opacity: 1; }
.hero-frame-link:focus-visible { outline: 2px solid var(--ssu-700); outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) { .hero-frame-link span { transition: none; } }

/* ---- topic tags and the filter bar ---- */
.section--tight { padding-block: 2rem 0; }
.pub-filter {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--line);
}
.pub-filter-label {
  font-family: var(--font-display); font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--subtle);
}
.pub-filter-tags { display: flex; flex-wrap: wrap; gap: .375rem; }
.pub-tag {
  display: inline-block;
  font-size: .75rem; line-height: 1.5;
  padding: .1875rem .5rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--muted);
  white-space: nowrap;
}
.pub-tag--btn { cursor: pointer; font-family: inherit; transition: background-color .15s, color .15s, border-color .15s; }
.pub-tag--btn:hover { border-color: var(--border-strong); color: var(--ssu-700); }
.pub-tag--btn[aria-pressed="true"] {
  background: var(--ssu-700); border-color: var(--ssu-700); color: var(--on-brand);
}
/* Pause / play for the moving teasers. Built by main.js, so it only exists
   when there is something to pause. */
.pub-motion {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .1875rem .625rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper);
  font-family: inherit; font-size: .75rem; line-height: 1.5; color: var(--muted);
  cursor: pointer; transition: border-color .15s, color .15s;
}
.pub-motion:hover { border-color: var(--border-strong); color: var(--ssu-700); }
.pub-motion svg { width: .625rem; height: .625rem; fill: currentColor; }
.pub-filter-clear {
  font-size: .75rem; color: var(--ssu-700); background: none;
  border: 0; cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px; font-family: inherit;
}
/* the chips printed on each entry are shortcuts into the same filter */
.pub-tags { display: flex; flex-wrap: wrap; gap: .3125rem; margin-top: .5rem; }
.pub-tags .pub-tag { cursor: pointer; font-family: inherit; }
.pub-tags .pub-tag:hover { border-color: var(--border-strong); color: var(--ssu-700); }

.pub-title { max-width: 46rem; font-size: 1.0625rem; font-weight: 700; line-height: 1.35; color: var(--ssu-900); }
/* one plain sentence: what the paper does. It is the line most visitors read. */
.pub-tldr { margin-top: .375rem; max-width: 40rem; font-size: .9375rem; line-height: 1.55; color: var(--muted); }
.pub-tldr + .pub-authors { margin-top: .625rem; }
.pub-authors { margin-top: .25rem; font-size: .875rem; color: var(--subtle); }
.pub-authors .me { color: var(--ink); font-weight: 600; }
.pub-venue { margin-top: .375rem; max-width: 46rem; font-size: .875rem; color: var(--muted); }
.pub-item .pill-row { margin-top: .75rem; }
.pub-links { margin-top: .75rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.pub-links a {
  display: inline-flex; align-items: center; gap: .25rem;
  font-family: var(--font-display); font-size: .75rem; font-weight: 600;
  color: var(--ssu-700); text-underline-offset: 2px; transition: color .2s;
}
.pub-links a:hover { color: var(--ssu-900); text-decoration: underline; }

/* ------------------------------------------------------------- 12. PEOPLE */
.member-grid { display: grid; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 48em) { .member-grid { grid-template-columns: repeat(2, 1fr); } }
.member-card { flex-direction: row; gap: 1.25rem; padding: 1.25rem; }
@media (max-width: 26em) { .member-card { flex-direction: column; } }
.member-photo {
  position: relative; flex: none;
  width: 5.5rem; height: 7rem;
  border-radius: var(--radius-xl); overflow: hidden; background: var(--surface);
}
.member-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.member-info { flex: 1; min-width: 0; }
.member-info h3 { font-size: 1rem; font-weight: 700; color: var(--ssu-900); }
.member-role {
  margin-top: .125rem;
  font-family: var(--font-display); font-size: .875rem; font-weight: 600; color: var(--ssu-700);
}
.member-affil { margin-top: .5rem; font-size: .875rem; line-height: 1.6; color: var(--muted); }
.member-info .pill-row { margin-top: .75rem; }
/* The PI card stands alone, so it spans the row instead of leaving a hole
   beside it. Its portrait is not an inset thumbnail: it fills the card's left
   side edge to edge (top, bottom, left) and the text gets the padding instead.
   On a phone the portrait becomes a square across the top of the card. The
   photo's corners follow the card's, less its 1px border. */
.member-grid--lead { grid-template-columns: minmax(0, 1fr); }
.member-card--lead { padding: 0; gap: 0; }
.member-card--lead .member-photo {
  width: clamp(10rem, 34%, 15rem); height: auto; min-height: 17rem;
  border-radius: calc(var(--radius-2xl) - 1px) 0 0 calc(var(--radius-2xl) - 1px);
}
.member-card--lead .member-photo img { object-position: 50% 30%; }
.member-card--lead .member-info { align-self: center; padding: 2rem 2.5rem; }
.member-card--lead .member-info h3 { font-size: 1.5rem; line-height: 1.25; }
.member-card--lead .member-role { margin-top: .25rem; font-size: .9375rem; }
@media (max-width: 40em) {
  .member-card--lead .member-photo { min-height: 14rem; }
  .member-card--lead .member-info { padding: 1.5rem 1.25rem; }
}
@media (max-width: 30em) {
  .member-card--lead { flex-direction: column; }
  .member-card--lead .member-photo {
    width: 100%; min-height: 0; aspect-ratio: 1 / 1;
    border-radius: calc(var(--radius-2xl) - 1px) calc(var(--radius-2xl) - 1px) 0 0;
  }
}
.member-bio { margin-top: .75rem; font-size: .9375rem; line-height: 1.7; }
.member-card .section-actions { margin-top: 1rem; }
.social-row { margin-top: .875rem; display: flex; flex-wrap: wrap; gap: .375rem; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem;
  border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted);
  transition: border-color .2s, background-color .2s, color .2s;
}
.social-row a:hover { border-color: var(--ssu-400); background: var(--ssu-50); color: var(--ssu-800); }
.social-row svg { width: 1rem; height: 1rem; }

/* PI profile: sticky sidebar + panels */
.profile-layout { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
@media (min-width: 64em) {
  .profile-layout { grid-template-columns: 19rem minmax(0, 1fr); gap: 3rem; }
}
.profile-aside { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 64em) {
  .profile-aside { position: sticky; top: calc(var(--header-h-lg) + 2rem); align-self: start; }
}
.profile-photo {
  width: 100%; max-width: 15rem; aspect-ratio: 3 / 4;
  border: 1px solid var(--line); border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card); overflow: hidden; background: var(--surface);
}
@media (min-width: 64em) { .profile-photo { max-width: none; } }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Under the portrait: the address written out, then CV, Scholar, GitHub and
   LinkedIn as round icon buttons in one row (the same look as .social-row on
   the People page, a little larger: 2.5rem, a size a thumb can hit). Each has
   an aria-label and a title, so the name is read out and shown on hover. */
.profile-contact { display: flex; flex-direction: column; align-items: flex-start; gap: .875rem; }
.profile-email {
  font-size: .9375rem; color: var(--ssu-700); overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color .2s;
}
.profile-email:hover { color: var(--ssu-900); }
.profile-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.profile-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--card-bg);
  color: var(--ssu-700);
  transition: border-color .2s, background-color .2s, color .2s;
}
.profile-links a:hover { border-color: var(--ssu-400); background: var(--ssu-50); color: var(--ssu-900); }
.profile-links svg { width: 1.125rem; height: 1.125rem; }
/* Research interests: one row per theme - a square thumbnail, then the theme
   and its topics - divided by the same hairline as the panel's heading. On a
   phone the thumbnail is left out (and, being lazy, never loaded), so the
   topics take the whole width. */
.interest { padding: 1.25rem 0; }
.interest-thumb { display: none; }
.interest + .interest { border-top: 1px solid var(--line); }
.interest:last-child { padding-bottom: 0; }
@media (min-width: 40em) {
  .interest {
    display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.75rem;
    align-items: start; padding: 1.5rem 0;
  }
  .interest-thumb { display: block; }
}
.interest-thumb {
  aspect-ratio: 1 / 1; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-xl); background: #fff;
}
.interest-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.interest h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.35; color: var(--ssu-900); }
.interest-points { margin-top: .5rem; display: flex; flex-direction: column; gap: .25rem; }
.interest-points li {
  position: relative; padding-left: 1rem;
  font-size: .9375rem; line-height: 1.6; color: var(--muted);
}
.interest-points li::before {
  content: ""; position: absolute; left: .125rem; top: .66em;
  width: .3125rem; height: .3125rem; border-radius: 50%; background: var(--ssu-400);
}
.profile-aside .name { font-size: 1.375rem; font-weight: 700; color: var(--ssu-900); }
.profile-aside .role {
  font-family: var(--font-display); font-size: .875rem; font-weight: 600; color: var(--ssu-700);
}
.profile-aside .affil { margin-top: .5rem; font-size: .875rem; line-height: 1.6; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .375rem .75rem;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--paper);
  font-family: var(--font-display); font-size: .75rem; font-weight: 600; color: var(--ssu-700);
  transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--ssu-400); background: var(--ssu-50); color: var(--ssu-900); }

.panel-stack { display: flex; flex-direction: column; gap: 1.5rem; }
.panel { padding: 1.5rem; }
@media (min-width: 40em) { .panel { padding: 1.75rem; } }
.panel > h2 {
  padding-bottom: 1rem; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: .8125rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: var(--ssu-700);
}
.panel-body { margin-top: 1rem; font-size: .9375rem; line-height: 1.75; color: var(--muted); }
.panel-body p + p { margin-top: .875rem; }
.panel-body strong { color: var(--ink); }
.panel-body a {
  color: var(--ssu-700); font-weight: 500;
  text-decoration: underline; text-underline-offset: 2px;
}
.panel-body a:hover { color: var(--ssu-900); }
.timeline { margin-top: .25rem; }
.timeline > li { padding-block: .875rem; display: grid; gap: .25rem; }
@media (min-width: 40em) {
  .timeline > li { grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.25rem; }
}
.timeline > li + li { border-top: 1px solid var(--line); }
.timeline .when {
  font-family: var(--font-display); font-size: .75rem; font-weight: 600;
  color: var(--ssu-700); font-variant-numeric: tabular-nums; padding-top: .125rem;
}
.timeline .what { font-size: .9375rem; line-height: 1.6; color: var(--ink); }
.timeline .where { margin-top: .25rem; font-size: .875rem; color: var(--muted); }
/* One line per entry: what, then where in the quieter tone. The profile page
   used a two-line row for everything and ran to nine cards; a CV is scanned,
   not read, and one line scans. */
.timeline--compact > li { padding-block: .625rem; }
@media (min-width: 40em) {
  .timeline--compact > li { grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; }
}
.timeline--compact .line { font-size: .9375rem; line-height: 1.5; }
.timeline--compact .what { color: var(--ink); font-weight: 500; }
.timeline--compact a.what:hover { color: var(--ssu-700); text-decoration: underline; text-underline-offset: 2px; }
.timeline--compact .where { margin: 0; font-size: inherit; color: var(--muted); }
.timeline--compact .where::before { content: "\00b7"; margin-inline: .375rem; color: var(--subtle); }
/* the note at the foot of the About panel */
.panel-body .panel-aside {
  margin-top: 1.125rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: .875rem;
}
/* the folded panel */
details.panel--more > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  cursor: pointer; list-style: none;
}
details.panel--more > summary::-webkit-details-marker { display: none; }
details.panel--more > summary h2 {
  font-family: var(--font-display); font-size: .8125rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: var(--ssu-700);
}
details.panel--more > summary:focus-visible { outline: 3px solid var(--ssu-700); outline-offset: 4px; border-radius: var(--radius-lg); }
details.panel--more[open] .thread-mark { transform: rotate(180deg); }
details.panel--more > summary:hover .thread-mark { border-color: var(--border-strong); }
.panel-more { margin-top: 1rem; padding-top: .25rem; border-top: 1px solid var(--line); }
.panel-more h3 {
  margin-top: 1.25rem; font-size: .8125rem; font-weight: 700; color: var(--subtle);
}
.panel-more .timeline { margin-top: .125rem; }
.panel-more-note { margin-top: .5rem; font-size: .9375rem; line-height: 1.6; color: var(--ink); }

/* --------------------------------------------------------- 13. JOIN/CONTACT */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 64em) {
  /* The map wants the wider column. */
  .contact-grid { grid-template-columns: 1.35fr 1fr; align-items: stretch; }
}
.map-frame {
  border: 1px solid var(--line); border-radius: var(--radius-2xl);
  overflow: hidden; box-shadow: var(--shadow-card);
}
/* display:block kills the inline baseline gap that left a sliver of frame
   under the map, and on a wide screen the map matches the panel beside it
   instead of stopping short. Google's attribution strip must not be clipped:
   it is a condition of using the embed. */
.map-frame { display: flex; }
.map-frame iframe {
  width: 100%; height: 20rem; border: 0; display: block;
  filter: var(--map-filter);
}
@media (min-width: 40em) { .map-frame iframe { height: 25rem; } }
@media (min-width: 64em) { .map-frame iframe { height: 100%; min-height: 25rem; } }
.contact-panel { padding: 1.75rem; }
/* .card is a flex column, which stretched this label into a bar the panel's width */
.contact-panel > .eyebrow { align-self: flex-start; }
@media (min-width: 40em) { .contact-panel { padding: 2rem; } }
.contact-panel h2 { margin-top: .625rem; font-size: 1.5rem; font-weight: 700; color: var(--ssu-900); }
.contact-panel > p { margin-top: .625rem; font-size: .9375rem; line-height: 1.7; color: var(--muted); }
.contact-dl { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 1.25rem; font-size: .875rem; }
.contact-dl dt {
  font-family: var(--font-display); font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em; color: var(--subtle);
}
.contact-dl dd { margin-top: .375rem; line-height: 1.65; color: var(--ink); }
.contact-dl .note { color: var(--muted); font-size: .8125rem; }
.contact-cta { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.contact-cta p { font-size: .875rem; color: var(--muted); }
.contact-cta .btn-solid { margin-top: .875rem; }


.recruit-grid { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 64em) {
  /* start, not stretch: an equal-height pair leaves the shorter card with a
     long empty tail, and these two are not the same length by nature. */
  .recruit-grid { grid-template-columns: repeat(2, 1fr); align-items: start; }
}
.recruit-card { padding: 1.75rem; }
@media (min-width: 40em) { .recruit-card { padding: 2rem; } }
.recruit-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.recruit-card h3 { font-size: 1.125rem; font-weight: 700; color: var(--ssu-900); }
.recruit-card > p { margin-top: .875rem; font-size: .9375rem; line-height: 1.7; color: var(--muted); }
/* keep-all stops Hangul breaking mid-eojeol but not a break at a Latin
   hyphen, which split "Real-to-Sim" across two lines in the Korean
   research-areas row. */
[lang="ko"] .spec-dl dd, [lang="ko"] .contact-dl dd {
  word-break: keep-all; hyphens: manual;
}
.spec-dl { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.spec-dl > div {
  display: grid; gap: .25rem; padding-block: .875rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 40em) {
  .spec-dl > div { grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; }
}
.spec-dl dt { font-size: .8125rem; font-weight: 600; color: var(--subtle); padding-top: .125rem; }
@media (min-width: 40em) { .spec-dl dt { font-size: .875rem; } }
.spec-dl dd { font-size: .875rem; line-height: 1.65; color: var(--ink); }
.spec-dl dd a {
  color: var(--ssu-700); font-weight: 500;
  text-decoration: underline; text-underline-offset: 2px;
}
.spec-dl dd a:hover { color: var(--ssu-900); }
.spec-dl .note, .contact-dl .note { display: block; margin-top: .25rem; color: var(--muted); font-size: .8125rem; }

/* -------------------------------------------------------------- 14. FOOTER */
.site-footer {
  background: var(--ssu-950); color: rgba(255,255,255,.75);
  border-top: 1px solid var(--border-strong);
}
.site-footer .container { padding-block: 2.5rem; }
.footer-top { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 48em) {
  .footer-top { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer-brand {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 800;
  letter-spacing: -.025em; color: #fff;
}
.footer-brand + p { margin-top: .375rem; font-size: .875rem; color: rgba(255,255,255,.82); }
/* Official Soongsil signature (white lockup). The footer ground is dark in both
   themes, so no theme handling is needed. */
.footer-logo { margin-top: 1.25rem; height: 1.75rem; width: auto; opacity: .85; }
.footer-dl { display: flex; flex-direction: column; gap: .5rem; font-size: .875rem; }
.footer-dl > div { display: flex; gap: .75rem; }
@media (min-width: 48em) { .footer-dl > div { justify-content: flex-end; } }
.footer-dl dt { width: 5rem; flex: none; color: rgba(255,255,255,.6); }
@media (min-width: 48em) { .footer-dl dt { width: auto; } }
.footer-dl dd a { text-decoration: underline; text-underline-offset: 2px; }
.footer-dl dd a:hover { color: #fff; }
.footer-bottom {
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.14);
  font-family: var(--font-display); font-size: .75rem; text-align: center;
  color: rgba(255,255,255,.6);
}
.footer-bottom p + p { margin-top: .25rem; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: #fff; }

/* ---------------------------------------------------------- 15. ERROR PAGE */
.error-page { min-height: calc(100svh - var(--header-h-lg) - 17rem); display: flex; align-items: center; }
.error-page .container { text-align: center; padding-block: 5rem; }
.error-page h1 {
  margin-top: 1rem; font-family: var(--font-display);
  font-size: clamp(1.875rem, 6vw, 3rem); font-weight: 800;
  letter-spacing: -.03em; color: var(--ssu-900);
}
.error-page > .container > p:not(.eyebrow) {
  margin: 1.25rem auto 0; max-width: 34rem; color: var(--muted); line-height: 1.7;
}
.error-page .pill-row { justify-content: center; margin-top: 2rem; }

/* ------------------------------------------------------------- 16. REVEAL */
/* Hidden ONLY under html.reveal-on. The boot script in <head> adds that class
   and takes it away again after three seconds unless main.js has reported in,
   so a script that is blocked, slow or broken costs the page its animation,
   never its content. */
.reveal-on .reveal { opacity: 0; transform: translateY(24px); }
.reveal.is-in, .reveal-on .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease-out-expo), transform .7s var(--ease-out-expo);
}

/* ====================================================== 16. FILLING THE PAGE
   Every prose block on this site was capped at a 34rem-58ch measure inside a
   1056px content box, and nothing sat beside it: 58 paragraphs across 9 pages
   ended between 400 and 512px short of their own container's right edge, so a
   wide window showed a column of text pinned left against an empty half.

   A measure has to stay near 65 characters, so the fix is NOT a longer line.
   It is to give the right-hand side something to hold - which is what the
   research diagrams do with the full width they are given: they divide it
   into named regions instead of leaving it blank.

   Each rule below names the dead space it closes. Measured at 1440px.
   -------------------------------------------------------------------------- */

/* Page masthead - title left, standfirst right.  (9 leads, ~512px each) */
@media (min-width: 64em) {
  .page-hero > .container {
    display: grid;
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    column-gap: 4rem; align-items: start;
  }
  /* the back-link and the language switch are full-width rows above the title */
  .page-hero > .container > .lang-switch,
  .page-hero > .container > .eyebrow-text { grid-column: 1 / -1; }
  .page-hero > .container > h1 { grid-column: 1; }
  .page-hero > .container > p:not(.lang-switch):not(.eyebrow-text) {
    grid-column: 2; margin-top: 0; max-width: 40rem;
  }
  /* these hold a single chip, so the 34rem cap only confuses a measurement */
  .page-hero > .container > .lang-switch,
  .page-hero > .container > .eyebrow-text { max-width: none; }
}

/* Research article title block - number and title left, lead right.
   Same device as the masthead above, one level down.  (4 leads, ~462px)
   The columns are proportional, not a fixed 20rem title: a fixed one left the
   lead on its 62ch cap inside a 903px card at tablet width, which is the gap
   that showed in the blue panel. Starts at 48em, where the card is wide
   enough for two columns at all. */
.research-top { display: grid; gap: .75rem; }
@media (min-width: 48em) {
  .research-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    column-gap: 2rem; align-items: start;
  }
  .research-top > .research-lead { margin-top: 0; max-width: 40rem; }
}
@media (min-width: 64em) { .research-top { column-gap: 3rem; } }

/* Section head - band + title left, standfirst right.  (4 subs, ~436px) */
.section-head { display: grid; gap: .75rem; }
@media (min-width: 64em) {
  .section-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    column-gap: 3rem; align-items: start;
  }
  .section-head > .section-sub { margin-top: 0; max-width: 38rem; }
}

/* Research article - prose left, the figure's own captions right. (8, ~464px)
   The rail says what the diagram says: what is published, what is being built.
   It is not new copy, it is the figure's status line moved out to where the
   reader is when they finish the paragraph. */
.research-foot { margin-top: 1.5rem; }
.research-foot > .research-prose > .research-body:first-child { margin-top: 0; }
@media (min-width: 48em) {
  .research-foot {
    display: grid; grid-template-columns: minmax(0, 1fr) 13rem;
    column-gap: 2rem; align-items: start;
  }
}
@media (min-width: 64em) {
  .research-foot { grid-template-columns: minmax(0, 1fr) 16rem; column-gap: 2.5rem; }
}
.research-rail { margin-top: 1.75rem; }
@media (min-width: 48em) { .research-rail { margin-top: .375rem; } }
.rail-label {
  font-family: var(--font-display); font-size: .6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--subtle);
}
.rail-label + * { margin-top: .5rem; }
* + .rail-label { margin-top: 1.25rem; }
.research-rail .pill-row { margin-top: .5rem; }

/* ================================================ 17. DISCLOSURE MARK
   The chevron used by a <details> card (the folded panel on the PI profile).
   -------------------------------------------------------------------- */
/* the chevron is the only thing that says "this opens" before it is tried */
.thread-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; flex: none;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ssu-700);
  transition: transform .25s var(--ease-out-expo), border-color .2s;
}
.thread-mark svg { width: .75rem; height: .75rem; fill: none;
  stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .thread-mark { transition: none; } }

/* ============================================================ 18. FIGURES
   The schematics are inline SVG, generated by website-source/figure-src/
   research-figs/figkit.py. The markup carries NO colour and NO stroke width:
   each mark has role classes and one tone class, and this block resolves them
   against the theme tokens. One drawing is therefore right in both themes,
   and there are exactly two line weights on the whole site.

     role   s   outline / connector, 2 units        s1  fine detail, 1.25
            f   solid fill      ft  tint fill       fm  mask fill (see-through)
            fp  the figure's own "paper"            tx  text
     tone   ink muted line brand orange paper on

   Accent tones are FILLS and STROKES. Text is ink, muted, brand, or `on`
   (white on a solid fill) - see the palette note in the token block.
   -------------------------------------------------------------------- */
.fig {
  display: block; width: 100%; height: auto; overflow: visible;
  font-family: var(--font-sans);
  --c: var(--ink);
  --fig-paper: var(--card-bg);
  --fig-rule: color-mix(in srgb, var(--ink) 22%, var(--fig-paper));
}
.fig .tone-ink    { --c: var(--ink); }
.fig .tone-muted  { --c: var(--muted); }
.fig .tone-line   { --c: var(--fig-rule); }
.fig .tone-brand  { --c: var(--ssu-700); }
.fig .tone-orange { --c: var(--fig-orange); }
.fig .tone-paper  { --c: var(--fig-paper); }
.fig .tone-on     { --c: var(--on-brand); }

.fig .s, .fig .s1 {
  stroke: var(--c); fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.fig .s  { stroke-width: 2; }
.fig .s1 { stroke-width: 1.25; }
/* fills come after the strokes so `class="s ft"` keeps its fill */
.fig .f  { fill: var(--c); }
.fig .ft { fill: color-mix(in srgb, var(--c) 13%, var(--fig-paper)); }
.fig .fm { fill: color-mix(in srgb, var(--c) 36%, transparent); }
.fig .fp { fill: var(--fig-paper); }
/* the mat under a photograph: stays light in both themes, like the teasers */
.fig .fmat { fill: var(--fig-mat); }
.fig .tx { fill: var(--c); stroke: none; }
.fig .t-display { font-family: var(--font-display); letter-spacing: -.005em; }
.fig .t-sans    { font-family: var(--font-sans); }
.fig .t-caps    { letter-spacing: .09em; }

/* A figure is drawn 1000 units wide for a ~976px column, so on a desktop one
   unit is one pixel and the smallest label (12) is 12px. Below that the
   drawing keeps a floor of 960px - where that label is still 11.5px - and its
   box pans sideways: a schematic shrunk to a phone's width is a thumbnail
   nobody can read. */
.fig-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.fig-scroll > .fig { min-width: 60rem; }
.fig-scroll:focus-visible { outline: 2px solid var(--ssu-700); outline-offset: -2px; }
/* While more of the drawing lies off an edge, that edge dissolves (main.js
   sets data-pan). A mask, not a painted gradient, so it works on any ground. */
.fig-scroll[data-pan="start"] {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
}
.fig-scroll[data-pan="end"] {
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 2.5rem), transparent);
          mask-image: linear-gradient(to left, #000 calc(100% - 2.5rem), transparent);
}
.fig-scroll[data-pan="middle"] {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
          mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
}

/* ============================================================ 19. TEASERS
   One slot for every paper's picture: 16:10, 1600x1000 WebP frames made to
   one spec (website-source/figure-src/teaser-kit/SPEC.md).

   A teaser is either FRAMES - 1 to 4 pictures that cross-fade - or a COMPARE
   pair with a draggable divider. Only ONE teaser on the page moves at a time:
   the one under the pointer, or failing that the one nearest the middle of
   the window. Ten slideshows running at once is the "busy" this avoids.

   The frames are light pictures on a white mat in both themes, so the chrome
   drawn over them (pips, tags, the divider) uses fixed colours, not tokens.
   Without script: the first frame shows, a compare sits at 50/50, and that
   is a complete figure either way.
   -------------------------------------------------------------------- */
.teaser {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 10; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line); border-radius: var(--radius-xl);
  background: var(--fig-mat);
}
.teaser-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
}
/* The incoming frame fades in OVER the outgoing one, which stays opaque
   until it is covered. Fading both at once dips through the mat and every
   photograph dims for half a second. */
.teaser-frame.is-current { opacity: 1; z-index: 2; transition: opacity .45s ease; }
.teaser-frame.is-prev { opacity: 1; z-index: 1; }

/* Every frame keeps a 24px white margin (the spec), which is ~11px at list
   size. The pips sit inside that margin, so they never cover the picture. */
.teaser-pips {
  position: absolute; left: 50%; bottom: .1875rem; z-index: 4;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: .1875rem;
}
.teaser-pip {
  width: .25rem; height: .25rem; border-radius: 999px;
  background: rgba(15, 30, 40, .26);
  transition: width .25s var(--ease-out-expo), background-color .25s;
}
.teaser-pip.is-on { width: .75rem; background: #006794; }

.teaser-zoom {
  position: absolute; right: .5rem; bottom: .5rem; z-index: 7;
  width: 2rem; height: 2rem; padding: 0;
  display: grid; place-items: center;
  border-radius: 999px; border: 1px solid rgba(15, 30, 40, .16);
  background: rgba(255, 255, 255, .94); color: #0f1e28;
  opacity: 0; transition: opacity .18s, transform .18s;
}
.teaser-zoom svg { width: .875rem; height: .875rem; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.teaser:hover .teaser-zoom, .teaser-zoom:focus-visible { opacity: 1; }
.teaser-zoom:hover { transform: scale(1.06); }
@media (hover: none) { .teaser-zoom { opacity: 1; } }

/* previous / next: a small translucent disc at each side, shown on hover */
.teaser-nav {
  position: absolute; top: 50%; z-index: 6;
  width: 1.75rem; height: 1.75rem; margin-top: -.875rem; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: rgba(15, 30, 40, .4); color: #fff;
  opacity: 0; transition: opacity .18s, background-color .18s;
}
.teaser-nav--prev { left: .375rem; }
.teaser-nav--next { right: .375rem; }
.teaser-nav svg { width: .625rem; height: .625rem; fill: none; stroke: currentColor;
  stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.teaser:hover .teaser-nav { opacity: 1; }
.teaser-nav:hover { background: rgba(15, 30, 40, .72); }
@media (hover: none) { .teaser-nav { opacity: .75; } }

/* ---- compare ---- */
.teaser--compare { --pos: 50%; touch-action: pan-y; cursor: ew-resize; }
.teaser--compare .teaser-frame { opacity: 1; transition: none; }
.teaser--compare .cmp-b { z-index: 1; }
.teaser--compare .cmp-a { z-index: 2; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-canvas {
  position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%;
  display: none; pointer-events: none;
}
.cmp-canvas.is-live { display: block; }
.cmp-tag {
  position: absolute; top: .5rem; z-index: 4;
  padding: .1875rem .5rem; border-radius: 999px;
  background: rgba(15, 30, 40, .78); color: #fff;
  font-family: var(--font-display); font-size: .6875rem; font-weight: 700;
  letter-spacing: .03em; line-height: 1.4; pointer-events: none;
}
.cmp-tag--a { left: .5rem; }
.cmp-tag--b { right: .5rem; }
.cmp-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 5;
  width: 2px; margin-left: -1px; background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 30, 40, .22); pointer-events: none;
}
.cmp-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 2rem; height: 2rem; transform: translate(-50%, -50%);
  border-radius: 999px; background-color: #fff;
  box-shadow: 0 1px 5px rgba(15, 30, 40, .38);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1e28' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 7.5 5 12l4.5 4.5M14.5 7.5 19 12l-4.5 4.5'/%3E%3C/svg%3E");
  background-size: 1.125rem; background-position: center; background-repeat: no-repeat;
}
/* The range input is the keyboard and screen-reader control; the pointer
   drags the picture itself. It keeps its box so it can take focus. */
.cmp-range {
  position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%;
  margin: 0; opacity: 0; pointer-events: none;
}
.cmp-range:focus-visible + .cmp-handle::after { outline: 3px solid var(--ssu-500); outline-offset: 2px; }

/* ---- lightbox ---- */
.lightbox {
  width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden;
  color: #fff;
}
.lightbox::backdrop { background: rgba(4, 16, 26, .94); }
.lightbox-inner {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 1rem; overflow-y: auto;
}
.lightbox-panel {
  width: min(60rem, 100%, calc((100vh - 12.5rem) * 1.6));
  width: min(60rem, 100%, calc((100dvh - 12.5rem) * 1.6));
  min-width: min(100%, 17.5rem);
  display: flex; flex-direction: column; gap: .75rem;
}
.lightbox-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
/* A short, wide screen (a phone on its side) has no height to spend on a
   title above the picture and a caption below it: 12.5rem of chrome left a
   picture SMALLER than the one in the list. The title goes, the caption
   scrolls into view below, and the picture takes the height. */
@media (max-height: 32em) and (orientation: landscape) {
  .lightbox-inner { place-items: start center; padding-block: .5rem; }
  .lightbox-panel {
    width: min(60rem, 100%, calc((100vh - 4.5rem) * 1.6));
    width: min(60rem, 100%, calc((100dvh - 4.5rem) * 1.6));
    gap: .5rem;
  }
  .lightbox-title { display: none; }
  .lightbox-head { justify-content: flex-end; }
}
.lightbox-title { font-size: 1rem; font-weight: 700; line-height: 1.4; color: #fff; }
.lightbox-close {
  flex: none; width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); color: #fff;
  transition: background-color .15s, border-color .15s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .6); }
.lightbox-close svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lightbox :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lightbox .teaser { border-color: transparent; cursor: default; }
.lightbox .teaser--compare { cursor: ew-resize; }
.lightbox .teaser-zoom, .lightbox .teaser-pips, .lightbox .teaser-nav { display: none; }
.lightbox .cmp-tag { font-size: .8125rem; padding: .25rem .625rem; top: .75rem; }
.lightbox .cmp-tag--a { left: .75rem; }
.lightbox .cmp-tag--b { right: .75rem; }
.lightbox-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.lightbox-cap { max-width: 44rem; font-size: .875rem; line-height: 1.55; color: rgba(255, 255, 255, .84); }
.lightbox-nav { flex: none; display: flex; align-items: center; gap: .5rem; }
.lightbox-nav[hidden] { display: none; }
.lightbox-step {
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); color: #fff;
  transition: background-color .15s, border-color .15s;
}
.lightbox-step:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .6); }
.lightbox-step svg { width: .75rem; height: .75rem; fill: none; stroke: currentColor;
  stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-count {
  min-width: 2.75rem; text-align: center;
  font-family: var(--font-display); font-size: .8125rem; font-weight: 700;
  font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .84);
}

/* ============================================================ 20. PROJECTS
   The research is one programme, so it is one entry: a card with a thumbnail
   on the left and a few lines on the right.

     home page       <article class="project project--link">  - the whole
                     card is a link to the project
     research page   <details class="project">  - the same card is the
                     <summary>; opening it reveals the project in place

   Inside an open project the modules are sections separated by hairlines,
   not cards: a card inside a card is a frame inside a frame.
   -------------------------------------------------------------------- */
.section-title + .project { margin-top: 2rem; }
.project { padding: 0; overflow: hidden; scroll-margin-top: calc(var(--header-h-lg) + 1.5rem); }
.project > summary { cursor: pointer; list-style: none; }
.project > summary::-webkit-details-marker { display: none; }
.project > summary:focus-visible { outline: 3px solid var(--ssu-700); outline-offset: -3px; border-radius: var(--radius-2xl); }
.project-head { display: grid; gap: 1.25rem; padding: 1.25rem; }
@media (min-width: 48em) {
  .project-head { grid-template-columns: 17rem minmax(0, 1fr); gap: 2.25rem; padding: 1.75rem; align-items: center; }
  .project-thumb { max-width: none; margin-inline: 0; }
}
/* A square: the drawing's own view is a square centred on its subject. On a
   phone it takes the card's width - a 240px thumbnail there left a dead strip
   beside it and its labels under 10px. */
.project-thumb {
  aspect-ratio: 1 / 1; width: 100%; max-width: 22rem; margin-inline: auto;
  border: 1px solid var(--line); border-radius: var(--radius-xl);
  background: var(--paper); overflow: hidden;
  transition: border-color .2s;
}
.project-thumb > .fig { width: 100%; height: 100%; }
.project > summary:hover .project-thumb, .project--link:hover .project-thumb { border-color: var(--ssu-400); }
.project-status {
  font-family: var(--font-display); font-size: .75rem; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ssu-700);
}
.project-text h2, .project-text h3 {
  margin-top: .375rem;
  font-size: 1.375rem; font-weight: 700; color: var(--ssu-900); letter-spacing: -.01em;
}
@media (min-width: 40em) { .project-text h2, .project-text h3 { font-size: 1.625rem; } }
.project-sum { margin-top: .625rem; font-size: .9375rem; line-height: 1.65; color: var(--muted); }
.project-text .pill-row { margin-top: 1rem; }
.pill--quiet { border-style: dashed; color: var(--muted); }
.project-more { margin-top: 1.125rem; }
.project-toggle {
  display: inline-flex; align-items: center; gap: .375rem;
  font-family: var(--font-display); font-size: .875rem; font-weight: 600; color: var(--ssu-700);
}
.project-toggle svg {
  width: .875rem; height: .875rem; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s var(--ease-out-expo);
}
.project > summary:hover .project-toggle { color: var(--ssu-900); }
.project .when-open, .project[open] .when-closed { display: none; }
.project[open] .when-open { display: inline; }
.project[open] .project-toggle svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .project-toggle svg { transition: none; } }

.project-body { padding: 0 1.25rem .5rem; border-top: 1px solid var(--line); }
@media (min-width: 48em) { .project-body { padding: 0 1.75rem .75rem; } }
.module { padding-block: 2rem; scroll-margin-top: calc(var(--header-h-lg) + 1rem); }
.module + .module { border-top: 1px solid var(--line); }
.module h3 { font-size: 1.25rem; font-weight: 700; color: var(--ssu-900); }
@media (min-width: 40em) { .module h3 { font-size: 1.375rem; } }
.module--first > .research-lead { margin-top: 0; max-width: none; }
/* figures run through the project's padding, edge to edge, like a plate in a book */
@media (min-width: 48em) {
  .project-body .research-fig { margin-inline: -1.75rem; border-inline: 0; border-radius: 0; }
}
.module--next .research-num {
  background: transparent; color: var(--ssu-700);
  box-shadow: inset 0 0 0 1.5px var(--ssu-700);
}

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

@media print {
  .site-header, .drawer, .drawer-scrim, .hero-ctrl, .map-frame,
  .skip-link, .site-footer, .teaser-zoom, .teaser-pips, .teaser-nav, .lightbox { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  /* Force the light token set, EVERY theme-dependent token, for EVERY way the
     page can have arrived at dark.
       - `:root:not([data-theme])` has to be in this list: with JS off there is
         no data-theme attribute, so dark comes from the prefers-color-scheme
         block at (0,2,0), which outranks a bare `:root` at (0,1,0). Without it
         a dark-OS visitor printed #e6eef3 text on #ffffff paper - 1.17:1.
       - the list must be COMPLETE: a half-reset leaves `background: --ssu-100`
         dark under `color: --ssu-800` light, which is worse than either theme.
     Greys are darkened past their screen values because toner is not a screen. */
  :root,
  :root:not([data-theme]),
  :root[data-theme="dark"],
  :root[data-theme="light"] {
    color-scheme: light;
    --ssu-50:  #eff8fb; --ssu-100: #d5edf5; --ssu-200: #abdcea;
    --ssu-300: #74c6dd; --ssu-400: #33abcd; --ssu-500: #009bcb;
    --ssu-600: #0082ac;
    --ssu-700: #005273; --ssu-800: #003b54; --ssu-900: #002331;
    --ssu-950: #002331;
    --accent-400: #5ec1c3; --accent-500: #226568; --alert-500: #c0524a;
    --ink: #0f1e28; --muted: #3f4c55; --subtle: #4a565e;
    --line: #9fb3bf; --border-strong: #7e95a3;
    --paper: #ffffff; --surface: #ffffff; --card-bg: #ffffff;
    --card-ring: transparent; --card-hover-ring: transparent;
    --on-brand: #ffffff;
    --hero-wash: #ffffff;
    --fig-orange: #b85c22;
    --band-warm: #f7e7d8; --band-warm-ink: #8a4b1e;
    --band-cool: #ddeaf2; --band-cool-ink: #0f4c63;
    --fig-mat: #ffffff; --fig-mat-ink: #5b6a74;
    --mark-img: url("../img/brand/logo.png");
    --logo-filter: none;
    --map-filter: none;
  }
  body { color: var(--ink); background: #fff; }
  .hero { min-height: 0; padding-block: 2rem; }
  .card { box-shadow: none; break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; color: #555; }
}
