/* Self-hosted IBM Plex (SIL Open Font License), Latin subsets from Google Fonts.
   IBM Plex Sans is a variable font: one file covers weights 400-600. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/IBMPlexSans.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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/IBMPlexSans-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/IBMPlexSans-400i.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; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/IBMPlexMono-400.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; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/IBMPlexMono-500.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; }

/* ==========================================================================
   M-PRISM / Mascolino research site: design tokens, base, components
   Single drop-in stylesheet. No build step, no JS required.

   Fonts (put in <head> before this file):
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap" rel="stylesheet">

   Breakpoints (media queries cannot read custom properties, so they are
   literal): sm 40em (640px) · md 64em (1024px) · lg 80em (1280px).
   Theme: follows the OS; force with <html data-theme="light|dark">.
   Contrast ratios for every text/background pair: see specs/design.md.
   ========================================================================== */

/* ---------- 1. Tokens: light (default) ---------- */
:root {
  color-scheme: light dark;

  /* Surfaces */
  --bg:            #F7F7F4;  /* warm paper; nod to the old site's beige band */
  --surface:       #FFFFFF;  /* cards */
  --surface-sunk:  #EFF1F3;  /* table stripes, code, quiet panels */
  --plate:         #EEF1F4;  /* neutral plate behind figures */
  --band:          #21314D;  /* Mines Dark Blue: footer + feature bands */

  /* Text */
  --text:          #1A2233;  /* 14.8:1 on bg */
  --heading:       #21314D;  /* Mines Dark Blue, 12.1:1 */
  --muted:         #475366;  /* metadata, captions, 7.4:1 on bg */
  --band-text:     #F2F4F7;
  --band-muted:    #B9C6D9;
  --band-link:     #F6CF5B;

  /* Lines */
  --border:        #D6DBE2;  /* decorative hairlines only */
  --border-strong: #7F8A9B;  /* input/control boundaries, 3.25:1 */

  /* Action */
  --primary:       #09396C;  /* Mines Blaster Blue */
  --on-primary:    #FFFFFF;
  --accent:        #F1B91A;  /* Mines Golden Tech: fills only, never text on light */
  --on-accent:     #21314D;
  --link:          #0B4A8B;
  --link-hover:    #09396C;
  --focus:         #0272DE;  /* Mines Earth Blue */
  --student:       #9A4A12;  /* student-author mark in citations */

  /* Heat-map (fission-matrix motif). Sequential, monotone in luminance,
     low -> high. --heat-hot is the single "transient" cell. Decorative only. */
  --heat-0: #E6EBF1;
  --heat-1: #D3DEEA;
  --heat-2: #AFC3DA;
  --heat-3: #879EC3;  /* Mines Light Blue */
  --heat-4: #5A7AA8;
  --heat-5: #2F5589;
  --heat-6: #09396C;  /* Mines Blaster Blue */
  --heat-hot: #E07A2E; /* from the M-PRISM logo's orange beam */

  /* Elevation (used sparingly; borders do the structural work) */
  --shadow-hover: 0 1px 2px rgb(16 28 48 / .06), 0 6px 18px -6px rgb(16 28 48 / .18);

  /* ---------- Typography ---------- */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* Fluid scale, 360px -> 1280px viewport. ~1.2 ratio on phones, ~1.33 on desktop. */
  --step-small: clamp(0.875rem, 0.8505rem + 0.1087vw, 0.9375rem);   /* 14 -> 15px */
  --step-body:  clamp(1.0625rem, 1.0380rem + 0.1087vw, 1.125rem);   /* 17 -> 18px */
  --step-lede:  clamp(1.1875rem, 1.1141rem + 0.3261vw, 1.375rem);   /* 19 -> 22px */
  --step-h4:    clamp(1.1875rem, 1.1141rem + 0.3261vw, 1.375rem);   /* 19 -> 22px */
  --step-h3:    clamp(1.375rem, 1.2283rem + 0.6522vw, 1.75rem);     /* 22 -> 28px */
  --step-h2:    clamp(1.625rem, 1.3560rem + 1.1957vw, 2.3125rem);   /* 26 -> 37px */
  --step-h1:    clamp(2.125rem, 1.5870rem + 2.3913vw, 3.5rem);      /* 34 -> 56px */

  --lh-tight: 1.15;   /* h1-h2 */
  --lh-snug:  1.3;    /* h3-h4, card titles */
  --lh-body:  1.6;    /* paragraphs */
  --lh-cite:  1.5;    /* publication lists */
  --measure:  68ch;   /* prose */
  --measure-wide: 80ch; /* citations */

  /* ---------- Space (4px base) ---------- */
  --space-3xs: 0.25rem;  /* 4  */
  --space-2xs: 0.5rem;   /* 8  */
  --space-xs:  0.75rem;  /* 12 */
  --space-s:   1rem;     /* 16 */
  --space-m:   1.5rem;   /* 24 */
  --space-l:   2rem;     /* 32 */
  --space-xl:  3rem;     /* 48 */
  --space-2xl: 4rem;     /* 64 */
  --space-3xl: 6rem;     /* 96 */
  --space-section: clamp(3rem, 1.4348rem + 6.9565vw, 7rem);   /* 48 -> 112px */
  --space-gutter:  clamp(1rem, 0.4130rem + 2.6087vw, 2.5rem);  /* page side padding */
  --space-gap:     clamp(1rem, 0.6087rem + 1.7391vw, 2rem);    /* grid gap */

  /* ---------- Layout ---------- */
  --container:      72rem;  /* 1152px content */
  --container-wide: 80rem;  /* 1280px header/footer/figure bleeds */
  --radius-s: 4px;          /* chips, buttons, inputs */
  --radius-m: 6px;          /* cards, figure plates, photos */
  --header-h: 4rem;
}

/* ---------- 1b. Tokens: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1522; --surface: #131E30; --surface-sunk: #0A111C; --plate: #E6EAF0; --band: #080E18;
    --text: #E6EBF2; --heading: #F2F5F9; --muted: #A6B3C6;
    --band-text: #E6EBF2; --band-muted: #A6B3C6; --band-link: #F6CF5B;
    --border: #26344B; --border-strong: #6B7C96;
    --primary: #F1B91A; --on-primary: #14213A; --accent: #F1B91A; --on-accent: #14213A;
    --link: #8DB9F2; --link-hover: #B5D2F7; --focus: #6CB4FF; --student: #F0B27A;
    --heat-0: #17233A; --heat-1: #1F3456; --heat-2: #2B4A78; --heat-3: #46689A;
    --heat-4: #6D8DBC; --heat-5: #9DB6D9; --heat-6: #CFDCE9; --heat-hot: #F0A050;
    --shadow-hover: 0 0 0 1px var(--border-strong), 0 8px 24px -8px rgb(0 0 0 / .6);
  }
}
:root[data-theme="dark"] {
  --bg: #0D1522; --surface: #131E30; --surface-sunk: #0A111C; --plate: #E6EAF0; --band: #080E18;
  --text: #E6EBF2; --heading: #F2F5F9; --muted: #A6B3C6;
  --band-text: #E6EBF2; --band-muted: #A6B3C6; --band-link: #F6CF5B;
  --border: #26344B; --border-strong: #6B7C96;
  --primary: #F1B91A; --on-primary: #14213A; --accent: #F1B91A; --on-accent: #14213A;
  --link: #8DB9F2; --link-hover: #B5D2F7; --focus: #6CB4FF; --student: #F0B27A;
  --heat-0: #17233A; --heat-1: #1F3456; --heat-2: #2B4A78; --heat-3: #46689A;
  --heat-4: #6D8DBC; --heat-5: #9DB6D9; --heat-6: #CFDCE9; --heat-hot: #F0A050;
  --shadow-hover: 0 0 0 1px var(--border-strong), 0 8px 24px -8px rgb(0 0 0 / .6);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--space-s)); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-body);
  line-height: var(--lh-body);
  font-kerning: normal;
  font-variant-numeric: proportional-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4 { color: var(--heading); font-weight: 600; margin: 0 0 var(--space-xs); text-wrap: balance; }
h1 { font-size: var(--step-h1); line-height: var(--lh-tight); letter-spacing: -0.02em; }
h2 { font-size: var(--step-h2); line-height: var(--lh-tight); letter-spacing: -0.015em; }
h3 { font-size: var(--step-h3); line-height: var(--lh-snug);  letter-spacing: -0.01em; }
h4 { font-size: var(--step-h4); line-height: var(--lh-snug); font-weight: 500; }
p, ul, ol, dl { margin: 0 0 var(--space-s); }
p, li { max-width: var(--measure); text-wrap: pretty; }
small, .small { font-size: var(--step-small); }
.lede { font-size: var(--step-lede); line-height: 1.5; color: var(--text); max-width: 60ch; }
.muted { color: var(--muted); }
.mono, code, kbd { font-family: var(--font-mono); font-size: 0.92em; }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--step-small); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 var(--space-xs);
}
sub, sup { line-height: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-xl) 0; }

a { color: var(--link); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { color: var(--link-hover); text-decoration-color: currentColor; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); color: inherit; }

.skip-link { position: absolute; left: var(--space-s); top: -10rem; z-index: 100; background: var(--surface); color: var(--link); padding: var(--space-2xs) var(--space-s); border: 2px solid var(--focus); border-radius: var(--radius-s); }
.skip-link:focus { top: var(--space-s); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- 3. Layout ---------- */
.container { width: min(100% - 2 * var(--space-gutter), var(--container)); margin-inline: auto; }
.container--wide { width: min(100% - 2 * var(--space-gutter), var(--container-wide)); margin-inline: auto; }
.section { padding-block: var(--space-section); }
.section + .section { padding-top: 0; }
.section--band { background: var(--band); color: var(--band-text); --heading: var(--band-text); --muted: var(--band-muted); --link: var(--band-link); --link-hover: #FFFFFF; --focus: var(--band-link); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-xs) var(--space-l); margin-bottom: var(--space-l); }
.section__head > :last-child:not(:first-child) { font-size: var(--step-small); }

/* 12-col grid; children span via utility classes. Collapses to 1 col < 40em. */
.grid { display: grid; gap: var(--space-gap); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid > * { grid-column: 1 / -1; }
@media (min-width: 40em) { .grid > .sm-6 { grid-column: span 6; } }
@media (min-width: 64em) {
  .grid > .md-4 { grid-column: span 4; } .grid > .md-5 { grid-column: span 5; }
  .grid > .md-6 { grid-column: span 6; } .grid > .md-7 { grid-column: span 7; } .grid > .md-8 { grid-column: span 8; }
}
/* Auto-fill card grid (projects, people, courses) */
.cards { display: grid; gap: var(--space-gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.cards--people { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.stack > * + * { margin-top: var(--space-s); }

/* ---------- 4. Signature motif: fission-matrix heat-map ----------
   Pure CSS, one empty element: <div class="fm-matrix" aria-hidden="true"></div>
   8x8 diagonal-dominant matrix (a_ij ~ exp(-|i-j|/1.25), slightly stronger
   downstream coupling) with one "hot" cell = a local transient.
   Gutters are drawn by the last two layers in the page background colour. */
.fm-matrix {
  --fm-gap: 3px;
  --fm-gap-color: var(--bg);
  aspect-ratio: 1;
  width: 100%;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(12.5% - var(--fm-gap)), var(--fm-gap-color) 0 12.5%),
    repeating-linear-gradient(180deg, transparent 0 calc(12.5% - var(--fm-gap)), var(--fm-gap-color) 0 12.5%),
    linear-gradient(90deg, var(--heat-6) 0 12.5%, var(--heat-3) 0 25%, var(--heat-1) 0 50%, var(--heat-0) 0),
    linear-gradient(90deg, var(--heat-2) 0 12.5%, var(--heat-6) 0 25%, var(--heat-3) 0 37.5%, var(--heat-1) 0 62.5%, var(--heat-0) 0),
    linear-gradient(90deg, var(--heat-1) 0 12.5%, var(--heat-2) 0 25%, var(--heat-6) 0 37.5%, var(--heat-3) 0 50%, var(--heat-1) 0 75%, var(--heat-0) 0),
    linear-gradient(90deg, var(--heat-0) 0 12.5%, var(--heat-1) 0 25%, var(--heat-2) 0 37.5%, var(--heat-6) 0 50%, var(--heat-3) 0 62.5%, var(--heat-1) 0 87.5%, var(--heat-0) 0),
    linear-gradient(90deg, var(--heat-0) 0 25%, var(--heat-1) 0 37.5%, var(--heat-2) 0 50%, var(--heat-6) 0 75%, var(--heat-1) 0),
    linear-gradient(90deg, var(--heat-0) 0 37.5%, var(--heat-1) 0 50%, var(--heat-5) 0 62.5%, var(--heat-hot) 0 75%, var(--heat-3) 0 87.5%, var(--heat-1) 0),
    linear-gradient(90deg, var(--heat-0) 0 50%, var(--heat-1) 0 62.5%, var(--heat-2) 0 75%, var(--heat-6) 0 87.5%, var(--heat-3) 0),
    linear-gradient(90deg, var(--heat-0) 0 62.5%, var(--heat-1) 0 75%, var(--heat-2) 0 87.5%, var(--heat-6) 0);
  background-size: 100% 100%, 100% 100%, 100% 12.5%, 100% 12.5%, 100% 12.5%, 100% 12.5%, 100% 12.5%, 100% 12.5%, 100% 12.5%, 100% 12.5%;
  background-position: 0 0, 0 0, 0 0%, 0 14.2857%, 0 28.5714%, 0 42.8571%, 0 57.1429%, 0 71.4286%, 0 85.7143%, 0 100%;
  background-repeat: no-repeat;
}
/* Single-row strip: section divider / card top rule. Reads as one matrix row. */
.fm-strip {
  height: 6px; width: 100%; border: 0; margin: 0;
  background: linear-gradient(90deg, var(--heat-1) 0 12.5%, var(--heat-2) 0 25%, var(--heat-3) 0 37.5%, var(--heat-6) 0 50%, var(--heat-hot) 0 62.5%, var(--heat-4) 0 75%, var(--heat-2) 0 87.5%, var(--heat-1) 0);
}
/* 3x3 mark for the header lockup and favicon-like uses. */
.fm-mark {
  --s: 1.5rem; width: var(--s); height: var(--s); flex: none; border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(33.333% - 2px), var(--fm-gap-color, var(--bg)) 0 33.333%),
    repeating-linear-gradient(180deg, transparent 0 calc(33.333% - 2px), var(--fm-gap-color, var(--bg)) 0 33.333%),
    linear-gradient(90deg, var(--heat-6) 0 33.333%, var(--heat-3) 0 66.666%, var(--heat-1) 0) 0 0 / 100% 33.333% no-repeat,
    linear-gradient(90deg, var(--heat-3) 0 33.333%, var(--heat-hot) 0 66.666%, var(--heat-3) 0) 0 50% / 100% 33.333% no-repeat,
    linear-gradient(90deg, var(--heat-1) 0 33.333%, var(--heat-3) 0 66.666%, var(--heat-6) 0) 0 100% / 100% 33.333% no-repeat;
}

/* ---------- 5. Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-l); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: var(--space-xs); color: var(--heading); text-decoration: none; padding-block: var(--space-2xs); }
.brand:hover { color: var(--heading); }
.brand__name { font-weight: 600; font-size: 1.0625rem; letter-spacing: 0.01em; line-height: 1.1; }
.brand__sub { display: block; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; color: var(--muted); letter-spacing: 0.02em; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: var(--space-3xs); list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: var(--space-2xs) var(--space-xs);
  color: var(--text); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  border-radius: var(--radius-s); min-height: 44px; line-height: 28px;
  box-shadow: inset 0 -2px 0 transparent;
}
.nav a:hover { background: var(--surface-sunk); color: var(--heading); }
.nav a[aria-current="page"] { color: var(--heading); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
/* < 64em: nav becomes a full-width, horizontally scrollable row (no JS). */
@media (max-width: 39.99em) { .brand__sub { display: none; } .site-header { position: static; } }
@media (max-width: 63.99em) {
  .nav { margin-left: 0; width: 100%; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--space-xs)); }
  .nav::-webkit-scrollbar { display: none; }
  .nav ul { width: max-content; }
}

/* ---------- 6. Hero ---------- */
.hero { padding-block: var(--space-section) calc(var(--space-section) * .75); }
.hero__grid { display: grid; gap: var(--space-xl) var(--space-gap); align-items: center; }
@media (min-width: 64em) { .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.hero__title { max-width: 18ch; margin-bottom: var(--space-m); }
.hero__title em { font-style: normal; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 55%, transparent) 0); }
.hero__lede { margin-bottom: var(--space-l); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.hero__meta { margin-top: var(--space-l); display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-m); font-family: var(--font-mono); font-size: var(--step-small); color: var(--muted); }
/* Portrait sits on the fission matrix, offset down-right by exactly two
   matrix cells (20% of the figure = 2/8 of an 80%-wide matrix), so the
   visible L shows whole cells: the dominant diagonal and its first couplings. */
.hero__figure { position: relative; width: min(100%, 26rem); justify-self: center; margin: 0; }
.hero__figure .fm-matrix { position: absolute; top: 0; left: 0; width: 80%; }
/* margins (not padding on the figure) so % resolves against the figure width */
.hero__photo { position: relative; aspect-ratio: 4 / 5; width: 80%; margin: 20% 0 0 20%; object-fit: cover; object-position: 50% 25%; border-radius: var(--radius-m); background: var(--plate); }
@media (max-width: 39.99em) { .hero__figure { width: min(100%, 18rem); } }

/* ---------- 7. Buttons / CTA ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs);
  min-height: 44px; padding: 0.625rem 1.125rem;
  font: 500 0.9375rem/1.2 var(--font-sans); letter-spacing: 0.01em;
  border-radius: var(--radius-s); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: color-mix(in srgb, var(--primary) 86%, var(--text)); color: var(--on-primary); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 85%, #000); color: var(--on-accent); }
.btn--ghost { background: transparent; color: var(--heading); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-sunk); color: var(--heading); border-color: var(--heading); }
.btn__arrow { font-family: var(--font-mono); transition: transform .15s; }
.btn:hover .btn__arrow { transform: translateX(3px); }
/* Inline text CTA, e.g. "All publications ->" */
.cta-link { font-weight: 500; text-decoration: none; }
.cta-link::after { content: " \2192"; font-family: var(--font-mono); }
.cta-link:hover { text-decoration: underline; }

/* ---------- 8. Figures: neutral plate, fixed aspect, never cropped ---------- */
.plate {
  position: relative; margin: 0;
  aspect-ratio: var(--ratio, 16 / 10);
  background: var(--plate);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: block;
}
/* Absolutely placed so the image can never stretch the fixed-ratio box. */
.plate > img {
  position: absolute; inset: var(--plate-pad, var(--space-xs));
  width: calc(100% - 2 * var(--plate-pad, var(--space-xs)));
  height: calc(100% - 2 * var(--plate-pad, var(--space-xs)));
  object-fit: contain; object-position: center;
}
.plate--auto > img { position: static; width: 100%; height: auto; margin: 0 auto; }
.plate--auto { padding: var(--plate-pad, var(--space-xs)); }
.plate--square { --ratio: 1; }
.plate--wide   { --ratio: 16 / 9; }
.plate--flush  { --plate-pad: 0px; }      /* AI illustrations already have a margin */
.plate--auto   { aspect-ratio: auto; }  /* detail pages: natural height */
.figure { margin: 0 0 var(--space-l); }
.figure figcaption { margin-top: var(--space-2xs); font-size: var(--step-small); color: var(--muted); line-height: 1.45; max-width: var(--measure); }
.figure figcaption b { color: var(--text); font-weight: 600; }
/* Click-to-enlarge (plain link to the full-size file). */
a.plate:hover { border-color: var(--border-strong); }

/* ---------- 9. Project card ---------- */
.project-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.project-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.project-card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.project-card .plate { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
.project-card__body { display: flex; flex-direction: column; gap: var(--space-2xs); padding: var(--space-m); flex: 1; }
.project-card__title { font-size: var(--step-h4); font-weight: 600; line-height: var(--lh-snug); margin: 0; }
.project-card__title a { color: var(--heading); text-decoration: none; }
.project-card__title a::after { content: ""; position: absolute; inset: 0; } /* stretched link */
.project-card__title a:focus-visible { outline: none; }
.project-card__tagline { color: var(--text); margin: 0; font-size: 1rem; }
.project-card__foot { margin-top: auto; padding-top: var(--space-xs); display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-xs); font-size: var(--step-small); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-3xs); list-style: none; margin: 0; padding: 0; }
.tag {
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.5; letter-spacing: 0.01em;
  padding: 0.0625rem 0.4375rem; border-radius: var(--radius-s);
  background: var(--surface-sunk); color: var(--muted); border: 1px solid var(--border);
}
/* Featured variant: horizontal on wide screens */
@media (min-width: 64em) {
  .project-card--feature { flex-direction: row; grid-column: 1 / -1; }
  .project-card--feature .plate { flex: 0 0 55%; border-bottom: 0; border-right: 1px solid var(--border); }
  .project-card--feature .project-card__body { padding: var(--space-xl); justify-content: center; }
  .project-card--feature .project-card__title { font-size: var(--step-h3); }
}

/* ---------- 10. Publication item (citation) ----------
   <li class="pub">
     <span class="pub__year">2026</span>
     <div>
       <span class="pub__type">Journal</span>
       <cite class="pub__title"><a href="https://doi.org/...">Title</a></cite>
       <p class="pub__authors">D. S. Yoon, ..., <b class="pub__me">V. Mascolino</b>, <span class="pub__student">S. Balouza</span></p>
       <p class="pub__venue"><i>Nuclear Engineering and Design</i>, vol. 455, p. 114930</p>
       <p class="pub__links"><a class="pub__doi" href="https://doi.org/...">doi:10.1016/...</a></p>
     </div>
   </li>                                                                     */
.pubs { list-style: none; margin: 0; padding: 0; max-width: var(--measure-wide); }
.pub {
  display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: 0 var(--space-s);
  padding-block: var(--space-m); border-top: 1px solid var(--border);
  line-height: var(--lh-cite);
}
.pub:last-child { border-bottom: 1px solid var(--border); }
.pub p { margin: 0; max-width: none; }
.pub__year { font-family: var(--font-mono); font-size: var(--step-small); font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 0.2em; }
.pub__type {
  display: inline-block; margin-bottom: var(--space-3xs);
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.pub__type::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .45em; background: var(--heat-4); vertical-align: 0.05em; }
.pub[data-type="journal"]    .pub__type::before { background: var(--heat-6); }
.pub[data-type="conference"] .pub__type::before { background: var(--heat-4); }
.pub[data-type="preprint"]   .pub__type::before { background: var(--heat-hot); }
.pub[data-type="report"]     .pub__type::before { background: var(--heat-2); }
.pub__title { display: block; font-style: normal; font-weight: 500; font-size: 1.0625rem; color: var(--heading); margin-bottom: var(--space-3xs); text-wrap: pretty; }
.pub__title a { color: inherit; text-decoration: none; }
.pub__title a:hover { color: var(--link-hover); text-decoration: underline; }
.pub__authors { font-size: var(--step-small); color: var(--text); }
.pub__me { font-weight: 600; }
.pub__student { text-decoration: underline dotted var(--student) 2px; text-underline-offset: 0.22em; }
.pub__venue { font-size: var(--step-small); color: var(--muted); }
.pub__venue i { font-style: italic; color: var(--text); }
.pub__links { margin-top: var(--space-3xs) !important; display: flex; flex-wrap: wrap; gap: var(--space-xs); font-family: var(--font-mono); font-size: 0.8125rem; }
.pub__doi { overflow-wrap: anywhere; }
.pubs-legend { font-size: var(--step-small); color: var(--muted); }
.pubs-legend .pub__student { color: var(--text); }
@media (max-width: 39.99em) {
  .pub { grid-template-columns: 1fr; }
  .pub__year { padding: 0 0 var(--space-3xs); }
}

/* ---------- 11. Person card ----------
   Photos are pre-cropped to 4:5; --focus-y fine-tunes if a raw image is used. */
.person { display: flex; flex-direction: column; gap: var(--space-2xs); }
.person__photo {
  aspect-ratio: 4 / 5; width: 100%; object-fit: cover;
  object-position: var(--focus-x, 50%) var(--focus-y, 30%);
  border-radius: var(--radius-m); background: var(--plate);
  border: 1px solid var(--border);
}
.person__name { font-size: var(--step-h4); font-weight: 600; margin: var(--space-2xs) 0 0; }
.person__role { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); margin: 0; }
.person__bio { font-size: 0.9375rem; line-height: 1.55; margin: var(--space-3xs) 0 0; }
.person__project { font-size: var(--step-small); margin: 0; }
.person__award { font-size: var(--step-small); border-left: 3px solid var(--accent); padding-left: var(--space-xs); margin: var(--space-2xs) 0 0; }
/* No-photo members: a monogram on a mini matrix, never a grey silhouette. */
.person__monogram {
  display: grid; align-content: start; justify-items: start; padding: var(--space-m);
  aspect-ratio: 4 / 5; border-radius: var(--radius-m);
  border: 1px solid var(--border); background: var(--surface); position: relative; overflow: hidden;
}
.person__monogram .fm-matrix { position: absolute; inset: auto -10% -10% auto; width: 70%; opacity: .55; --fm-gap-color: var(--surface); }
.person__monogram span { position: relative; font-weight: 600; font-size: 2rem; color: var(--heading); letter-spacing: 0.02em; }
/* Compact roster row for members without bios */
.roster { list-style: none; padding: 0; margin: 0; columns: 16rem; column-gap: var(--space-gap); }
.roster li { break-inside: avoid; padding: var(--space-2xs) 0; border-top: 1px solid var(--border); }
.roster small { display: block; color: var(--muted); }

/* ---------- 12. Footer ---------- */
.site-footer {
  background: var(--band); color: var(--band-text);
  --heading: var(--band-text); --muted: var(--band-muted); --link: var(--band-link); --link-hover: #FFFFFF; --focus: var(--band-link);
  --fm-gap-color: var(--band);
  padding-block: var(--space-2xl) var(--space-l); font-size: var(--step-small);
}
.site-footer .fm-strip { margin-bottom: var(--space-xl); }
.site-footer__grid { display: grid; gap: var(--space-l) var(--space-gap); }
@media (min-width: 40em) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h2 { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--band-muted); margin-bottom: var(--space-xs); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: var(--space-3xs); }
.site-footer address { font-style: normal; color: var(--band-muted); }
.site-footer__logos { display: flex; align-items: center; gap: var(--space-m); }
.site-footer__logos img { height: 3rem; width: auto; }
.site-footer__legal { margin-top: var(--space-xl); padding-top: var(--space-m); border-top: 1px solid rgb(255 255 255 / .14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs); color: var(--band-muted); }

/* ---------- 13. Motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .hero__figure, .fm-matrix, .fm-strip, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; }
  .pub__doi::after { content: ""; }
}

/* ==========================================================================
   Page-level additions on top of specs/design-tokens.css
   ========================================================================== */

/* Header lockup */
.brand__text { display: flex; flex-direction: column; }

/* Page intro (non-home pages) */
.page-head { padding-block: var(--space-2xl) var(--space-xl); border-bottom: 1px solid var(--border); }
.page-head h1 { margin-bottom: var(--space-s); }
.page-head .lede { margin: 0; }

/* Hero extras */
.hero__role { font-size: var(--step-lede); color: var(--heading); font-weight: 500; margin-bottom: var(--space-s); max-width: 36ch; }
.hero__links { margin-top: var(--space-m); display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-m); font-size: var(--step-small); }
.hero__links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Facts row */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--space-gap); margin: 0; padding: 0; list-style: none; }
.facts li { border-top: 2px solid var(--heading); padding-top: var(--space-xs); max-width: none; }
.facts b { display: block; font-size: var(--step-h2); line-height: 1.1; color: var(--heading); font-weight: 600; letter-spacing: -0.015em; }
.facts span { font-size: var(--step-small); color: var(--muted); }

/* Highlights (student achievements) */
.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.highlight { border-left: 3px solid var(--accent); padding: var(--space-2xs) 0 var(--space-2xs) var(--space-s); max-width: none; }
.highlight__when { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); display: block; margin-bottom: var(--space-3xs); }
.highlight p { margin: 0; font-size: 1rem; }

/* Tabs-free two-column recent publications */
.pub-cols { display: grid; gap: var(--space-xl) var(--space-gap); }
@media (min-width: 64em) { .pub-cols { grid-template-columns: 1fr 1fr; } .pub-cols .pub { grid-template-columns: 1fr; } .pub-cols .pub__year { padding: 0 0 var(--space-3xs); } }
.pub-cols h3 { font-size: var(--step-h4); }
.pub__project { font-family: var(--font-sans); }

/* Team strip on home */
.team-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); gap: var(--space-s); list-style: none; padding: 0; margin: 0 0 var(--space-l); }
.team-strip li { max-width: none; }
.team-strip img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--plate); }
.team-strip b { display: block; font-size: 0.9375rem; color: var(--heading); margin-top: var(--space-2xs); line-height: 1.3; }
.team-strip span { font-size: 0.8125rem; color: var(--muted); }

/* Callout band */
.callout { display: grid; gap: var(--space-l) var(--space-gap); align-items: center; }
@media (min-width: 64em) { .callout { grid-template-columns: 7fr 5fr; } }
.callout .fm-matrix { max-width: 16rem; justify-self: center; --fm-gap-color: var(--band); }
.callout p { color: var(--band-text); }

/* Partners */
.partners { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-l); font-weight: 500; color: var(--heading); }
.partners li { max-width: none; }

/* In-page jump nav */
.jump { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-xs); border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); text-decoration: none; font-size: var(--step-small); }
.jump a:hover { border-color: var(--border-strong); }

/* Research page: one section per project */
.project { padding-block: var(--space-2xl); border-top: 1px solid var(--border); scroll-margin-top: var(--space-l); }
.project:first-of-type { border-top: 0; }
.project__grid { display: grid; gap: var(--space-l) var(--space-gap); }
@media (min-width: 64em) { .project__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } }
.project__figs { display: grid; gap: var(--space-s); }
.project__meta { display: grid; gap: var(--space-m); margin-top: var(--space-l); }
.project__meta h3 { font-size: var(--step-small); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; margin-bottom: var(--space-2xs); }
.project__meta ul { padding-left: 1.1em; margin: 0; }
.project__meta li { margin-bottom: var(--space-3xs); }
.project__people { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-m); }
.project__subtitle { font-size: var(--step-small); color: var(--muted); margin-top: calc(-1 * var(--space-2xs)); }

/* Join page */
.topics { counter-reset: none; list-style: none; padding: 0; margin: 0; display: grid; gap: 0 var(--space-gap); }
@media (min-width: 64em) { .topics { grid-template-columns: 1fr 1fr; } }
.topics li { display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--space-xs); padding-block: var(--space-s); border-top: 1px solid var(--border); max-width: none; }
.topics__n { font-family: var(--font-mono); color: var(--muted); font-size: var(--step-small); padding-top: .15em; }
.topics__link { display: block; font-size: var(--step-small); margin-top: var(--space-3xs); }
.steps { padding-left: 1.25em; }
.steps li { margin-bottom: var(--space-2xs); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: var(--space-l); }
.panel h3 { margin-top: 0; }

/* About page */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 9rem 1fr; gap: var(--space-s); padding-block: var(--space-xs); border-top: 1px solid var(--border); max-width: none; }
@media (max-width: 39.99em) { .timeline li { grid-template-columns: 1fr; gap: 0; } }
.timeline__when { font-family: var(--font-mono); font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline b { color: var(--heading); font-weight: 600; }
.course { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; }
.course img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.course__body { padding: var(--space-s) var(--space-m) var(--space-m); }
.course__code { font-family: var(--font-mono); font-size: var(--step-small); color: var(--muted); display: block; }
.course h3 { font-size: var(--step-h4); margin: var(--space-3xs) 0 0; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding-block: var(--space-2xs); border-top: 1px solid var(--border); max-width: none; }
.link-list a { display: inline-flex; min-height: 32px; align-items: center; }
.contact-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-m); }
.contact-actions .btn { flex: 1 1 15rem; }

/* External link marker */
.ext::after { content: " \2197"; font-family: var(--font-mono); font-size: 0.85em; }

/* Section spacing helper when a band follows a band */
.section--tight { padding-block: var(--space-xl); }

/* Nav wraps instead of scrolling on narrow screens, so "Join" and "Contact" stay visible (UX spec) */
@media (max-width: 63.99em) {
  .nav { overflow-x: visible; }
  .nav ul { width: auto; flex-wrap: wrap; }
  .nav a { padding-inline: var(--space-2xs); }
}
.nav a[href$="#contact"] { border: 1px solid var(--border-strong); border-radius: var(--radius-s); box-shadow: none; }
.hero__lede em { font-style: normal; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 55%, transparent) 0); }

/* --- a11y/perf review fixes --- */
main:focus { outline: none; }
.brand { min-height: 44px; }
/* Sticky header is taller when the nav wraps (40em-64em): keep anchor targets clear of it (WCAG 2.4.11) */
@media (min-width: 40em) and (max-width: 63.99em) { html { scroll-padding-top: 7.5rem; } }
/* Dark mode: lighter highlight keeps the hero text >= 4.5:1 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__lede em { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 35%, transparent) 0); }
}
:root[data-theme="dark"] .hero__lede em { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 35%, transparent) 0); }

/* --- design QA fixes --- */
/* 1. Bands keep their own top padding, and so does the section after a band */
.section--band, .section--band + .section { padding-top: var(--space-section); }
/* 2. Hero: matrix bottom-right so the diagonal emerges from under the portrait */
.hero__figure .fm-matrix { top: auto; left: auto; right: 0; bottom: 0; }
.hero__photo { margin: 0 20% 20% 0; }
.hero__role { font-size: var(--step-h4); }
.hero__meta { font-family: var(--font-sans); }
.hero__glance { margin-top: var(--space-s); font-size: var(--step-small); color: var(--muted); }
.hero__glance b { color: var(--heading); font-weight: 600; }
/* 4. Paper lists align with the column; dates fit on one line */
.project__meta .pubs { padding-left: 0; }
.pub { grid-template-columns: 5.5rem minmax(0, 1fr); }
/* 5. A leftover last project card spans the row */
@media (min-width: 64em) {
  .cards > .project-card:last-child:nth-child(3n+1) { grid-column: 1 / -1; flex-direction: row; }
  .cards > .project-card:last-child:nth-child(3n+1) .plate { flex: 0 0 calc((100% - 2 * var(--space-gap)) / 3); border-bottom: 0; border-right: 1px solid var(--border); }
  .cards > .project-card:last-child:nth-child(3n+1) .project-card__body { justify-content: center; }
}
@media (min-width: 40em) and (max-width: 63.99em) {
  .cards > .project-card:last-child:nth-child(2n+1) { grid-column: 1 / -1; }
}
/* 6. One white plate for every figure; dim slightly in dark mode */
.plate { --plate: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plate img { filter: brightness(.9) contrast(1.05); } }
:root[data-theme="dark"] .plate img { filter: brightness(.9) contrast(1.05); }
/* 7. A person alone in a section gets a horizontal card */
@media (min-width: 40em) {
  .cards--people:has(> .person:only-child) { grid-template-columns: 1fr; }
  .cards--people > .person:only-child { display: grid; grid-template-columns: 15rem minmax(0, 40rem); column-gap: var(--space-l); align-items: start; }
  .cards--people > .person:only-child > img { grid-row: 1 / span 8; }
  .cards--people > .person:only-child > :not(img) { grid-column: 2; }
}
/* 9. Metadata on the type scale */
:root { --step-xs: 0.8125rem; }
.pub__type, .tag, .person__role, .highlight__when, .pub__links, .team-strip span { font-size: var(--step-xs); }
.pub__title { font-size: var(--step-body); }
.project-card__tagline { font-size: var(--step-small); }
/* 10. Team strip fills its row */
.team-strip { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 12rem)); gap: var(--space-gap); }
/* Footer motif sits on the footer edge */
.site-footer { padding-top: 0; }
.site-footer .fm-strip { margin-bottom: var(--space-2xl); }
/* Single-column callout now that the band has no matrix */
.callout { grid-template-columns: 1fr !important; }

/* Join: position availability, right under the intro */
.join-availability { margin: var(--space-m) 0 0; max-width: 60ch; padding: var(--space-s) var(--space-m); border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-m) var(--radius-m) 0; }
.join-availability b { color: var(--heading); }

/* Team: group logo beside the intro (stacks under the lede below 64em) */
.page-head__grid { display: grid; gap: var(--space-l) var(--space-gap); align-items: center; }
.group-logo { width: 12.5rem; margin: 0; }
@media (min-width: 40em) { .group-logo { width: 15rem; } }
@media (min-width: 64em) {
  .page-head__grid { grid-template-columns: minmax(0, 1fr) 20rem; }
  .group-logo { width: 20rem; justify-self: end; }
}
