/* ——— Quantitative Imaging · Homepage styles ——— */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Deck palette */
  --bg: #0B141F;
  --bg-2: #101C2B;
  --bg-3: #17273B;
  --ink: #E9E3D2;
  --ink-dim: rgba(233, 227, 210, 0.68);
  --ink-faint: rgba(233, 227, 210, 0.38);
  --rule: rgba(233, 227, 210, 0.14);
  --rule-strong: rgba(233, 227, 210, 0.28);
  --accent: #7FB8D9;
  --accent-strong: #4A90B8;
  --accent-warm: #D9A66B;
  --danger: #D98A7F;

  --cream-bg: #ECECE8;
  --cream-ink: #15202F;
  --cream-rule: rgba(21, 32, 47, 0.14);
  --cream-rule-strong: rgba(21, 32, 47, 0.28);
  --cream-ink-dim: rgba(21, 32, 47, 0.66);
  --cream-ink-faint: rgba(21, 32, 47, 0.42);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Typography */
.serif { font-family: 'IBM Plex Serif', Georgia, serif; }
.sans { font-family: 'IBM Plex Sans', system-ui, sans-serif; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
}
.eyebrow .num { color: var(--ink-faint); margin-right: 10px; }

.display {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 300;
  letter-spacing: -0.022em;
  line-height: 0.95;
  margin: 0;
  text-wrap: pretty;
  font-size: clamp(56px, 9vw, 148px);
}
.display em { font-style: italic; color: var(--ink-dim); font-weight: 300; }

.title {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: pretty;
}
.title em { font-style: italic; color: var(--accent); font-weight: 300; }

.subtitle {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.4;
  color: var(--ink-dim);
  margin: 0;
  text-wrap: pretty;
}

.small { font-size: 14px; line-height: 1.55; color: var(--ink-dim); }
.tiny-mono { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); }

hr.rule { border: 0; height: 1px; background: var(--rule); margin: 0; }
hr.rule-strong { border: 0; height: 1px; background: var(--rule-strong); margin: 0; }

.accent { color: var(--accent); }
.muted { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }

/* Fluorescence plates (hero + gallery) */
.fluor {
  position: relative;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}
.fluor::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.fluor-hero {
  background:
    radial-gradient(ellipse 55% 45% at 22% 38%, rgba(127, 184, 217, 0.55), transparent 65%),
    radial-gradient(ellipse 45% 55% at 72% 58%, rgba(236, 72, 153, 0.32), transparent 65%),
    radial-gradient(ellipse 35% 35% at 50% 80%, rgba(217, 166, 107, 0.22), transparent 65%),
    radial-gradient(ellipse 28% 28% at 85% 18%, rgba(168, 85, 247, 0.28), transparent 65%),
    #000;
}
.fluor-a {
  background:
    radial-gradient(circle at 30% 40%, rgba(127, 184, 217, 0.6), transparent 55%),
    radial-gradient(circle at 72% 62%, rgba(236, 72, 153, 0.42), transparent 55%),
    radial-gradient(circle at 50% 82%, rgba(217, 166, 107, 0.25), transparent 50%),
    #000;
}
.fluor-b {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(74, 144, 184, 0.62), transparent 55%),
    radial-gradient(ellipse at 80% 72%, rgba(127, 184, 217, 0.5), transparent 55%),
    radial-gradient(ellipse at 60% 40%, rgba(239, 68, 68, 0.25), transparent 45%),
    #000;
}
.fluor-c {
  background:
    radial-gradient(circle at 50% 48%, rgba(168, 85, 247, 0.5), transparent 50%),
    radial-gradient(circle at 25% 72%, rgba(127, 184, 217, 0.45), transparent 50%),
    radial-gradient(circle at 78% 25%, rgba(217, 166, 107, 0.35), transparent 45%),
    #000;
}
.fluor-d {
  background:
    radial-gradient(circle at 40% 50%, rgba(244, 114, 182, 0.45), transparent 50%),
    radial-gradient(circle at 65% 60%, rgba(127, 184, 217, 0.55), transparent 50%),
    radial-gradient(circle at 30% 25%, rgba(74, 144, 184, 0.4), transparent 45%),
    #000;
}
.fluor-e {
  background:
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(127, 184, 217, 0.5), transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(217, 166, 107, 0.35), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.25), transparent 45%),
    #000;
}

/* Hatched placeholder (deck-style) */
.hatch {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(127, 184, 217, 0.06) 0px,
      rgba(127, 184, 217, 0.06) 10px,
      transparent 10px,
      transparent 20px
    ),
    var(--bg-3);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-faint);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
}
.hatch .ph-label { color: var(--ink-dim); font-size: 13px; letter-spacing: 0.1em; }
.hatch .ph-sub { color: var(--ink-faint); font-size: 10px; letter-spacing: 0.22em; margin-top: 2px; }

/* Cream inversion */
.cream-section {
  background: var(--cream-bg);
  color: var(--cream-ink);
}
.cream-section .eyebrow { color: var(--cream-ink); }
.cream-section .eyebrow .num { color: var(--cream-ink-faint); }
.cream-section .subtitle { color: var(--cream-ink-dim); }
.cream-section .small { color: var(--cream-ink-dim); }
.cream-section .tiny-mono { color: var(--cream-ink-faint); }
.cream-section .muted { color: var(--cream-ink-dim); }
.cream-section .faint { color: var(--cream-ink-faint); }
.cream-section .accent { color: var(--cream-ink); }
.cream-section .title em { color: var(--cream-ink); font-style: italic; }
.cream-section .display em { color: var(--cream-ink-dim); }
.cream-section hr.rule { background: var(--cream-rule); }
.cream-section hr.rule-strong { background: var(--cream-rule-strong); }
.cream-section .lede { color: var(--cream-ink); }
.cream-section .lede em { color: var(--cream-ink); font-style: italic; }
.cream-section .btn { border-color: var(--cream-rule-strong); }
.cream-section .btn:hover { border-color: var(--cream-ink); }
.cream-section .hatch {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(21, 32, 47, 0.05) 0px,
      rgba(21, 32, 47, 0.05) 10px,
      transparent 10px,
      transparent 20px
    ),
    rgba(21, 32, 47, 0.02);
  border-color: var(--cream-rule);
  color: var(--cream-ink-faint);
}
.cream-section .hatch .ph-label { color: var(--cream-ink-dim); }
.cream-section .hatch .ph-sub { color: var(--cream-ink-faint); }

/* Container */
.container { max-width: 1440px; margin: 0 auto; padding: 0 56px; }
@media (max-width: 900px) { .container { padding: 0 24px; } }

/* Top bar / nav */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(11, 20, 31, 0.72);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  gap: 24px;
}
.topbar .container.topbar-inner { max-width: 1440px; }
@media (min-width: 901px) { .topbar-inner { padding: 18px 40px; } }
.brand { display: flex; align-items: center; gap: 14px; }
.brand .logo-mark,
.brand img.logo-mark { width: 52px !important; height: 52px !important; max-width: 52px !important; max-height: 52px !important; object-fit: contain; flex: 0 0 auto; display: block; }
.brand .logo-mark.is-light { display: none !important; }
.cream-section .brand .logo-mark.is-dark { display: none !important; }
.cream-section .brand .logo-mark.is-light { display: block !important; }
/* Inline mini-logo when used inside frame-chrome (smaller, single variant only) */
.frame-chrome .logo-mark,
.frame-chrome img.logo-mark { width: 22px !important; height: 22px !important; max-width: 22px !important; max-height: 22px !important; vertical-align: middle; margin-right: 10px; }
.brand-name { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 300; font-size: 27px; line-height: 1.1; letter-spacing: -0.01em; }
.brand-sub { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); margin-left: 6px; }
@media (max-width: 760px) { .brand-sub { display: none; } }
@media (max-width: 760px) { .brand-name { font-size: 21px; } }
@media (max-width: 760px) { .brand .logo-mark, .brand img.logo-mark { width: 40px !important; height: 40px !important; max-width: 40px !important; max-height: 40px !important; } }

.nav-links { display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a { font-size: 17px; color: var(--ink); position: relative; transition: color 0.2s; font-weight: 400; }
.nav-links a:hover { color: var(--accent); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px; background: currentColor;
  transition: width 0.3s cubic-bezier(.2,.8,.2,1);
}
.nav-links a:hover::after { width: 100%; }
.nav-join {
  padding: 8px 16px; border: 1px solid var(--accent); color: var(--ink);
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.nav-join:hover { background: var(--accent); color: var(--bg); }
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after { width: 100%; }
.nav-join.is-active { background: var(--accent); color: var(--bg); }

/* Mobile burger nav */
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--rule);
  background: var(--bg);
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  padding: 0;
  position: relative;
  z-index: 51;
}
.nav-burger:hover { border-color: var(--accent); }
.nav-burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform 0.25s, opacity 0.2s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-panel {
  display: none;
  position: fixed; left: 0; right: 0; top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 96px 56px 32px;
  z-index: 49;
  max-height: 100vh;
  overflow-y: auto;
}
.nav-panel.is-open { display: block; }
.nav-panel a {
  display: block;
  padding: 16px 0;
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 300;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.nav-panel a:last-child { border-bottom: 0; }
.nav-panel a.is-active { color: var(--accent); }
@media (max-width: 760px) { .nav-panel { padding: 88px 24px 32px; } }

@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}
/* Tool cards (homepage) */
.tool-card {
  display: block;
  padding: 28px 24px 24px;
  background: var(--bg);
  border: 1px solid var(--rule);
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-thumb {
  width: 100%;
  height: 120px;
  margin-bottom: 18px;
  background: #0E1922;
  border: 1px solid var(--rule);
  overflow: hidden;
  display: block;
}
.tool-thumb svg { width: 100%; height: 100%; display: block; }
.cream-section .tool-thumb { background: rgba(21,32,47,0.06); border-color: var(--cream-rule); }
.tool-name {
  font-family: 'Cormorant Garamond', 'EB Garamond', serif;
  font-weight: 300;
  font-size: 32px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.tool-tagline {
  font-size: 14px;
  color: var(--ink-dim);
  margin-bottom: 18px;
  line-height: 1.45;
}
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-tags span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--rule-soft, rgba(255,255,255,0.04));
  border: 1px solid var(--rule);
  color: var(--ink-dim);
}
/* Tool cards on cream sections: keep cream-styled so heads remain readable */
.cream-section .tool-card { background: rgba(255,255,255,0.5); border-color: var(--cream-rule); }
.cream-section .tool-card:hover { border-color: var(--accent); }
.cream-section .tool-name { color: var(--cream-ink); }
.cream-section .tool-tagline { color: var(--cream-ink-dim); }
.cream-section .tool-tags span { background: rgba(255,255,255,0.6); border-color: var(--cream-rule); color: var(--cream-ink-dim); }

/* People bio cards (People.html) */
.bio-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  padding: 56px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.bio-row:last-child { border-bottom: 1px solid var(--rule); }
.bio-photo {
  width: 100%;
  aspect-ratio: 1/1;
  background-size: cover;
  background-position: center top;
  background-color: var(--rule);
}
/* Modifier for non-square portraits — sets aspect-ratio to match the image's natural proportions so cover doesn't crop. Inline-set the matching aspect-ratio per image (e.g. style="aspect-ratio: 609/720"). */
.bio-photo.is-portrait { aspect-ratio: auto; background-position: center; }
.bio-name {
  font-family: 'Cormorant Garamond', 'EB Garamond', serif;
  font-weight: 300;
  font-size: 36px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.bio-role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.bio-text p { margin-bottom: 14px; line-height: 1.65; }
.bio-text p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .bio-row { grid-template-columns: 1fr; gap: 24px; }
  .bio-photo { max-width: 220px; }
}
/* Research / About page threads — equal-height columns with image card aligned to the bottom across all three. Uses a 4-row grid (eyebrow, title, paragraph=1fr, image) so paragraph absorbs extra height; image sits in its own bottom row. Avoids the inline-style trap where margin-top: auto on the image div was overridden by per-card inline margin-top values. */
.threads-row > div { display: grid; grid-template-rows: auto auto 1fr auto; }

/* Home page About section — 2-column grid (mark + copy). Collapses at 900px (matches the site-wide .cols-3 + hamburger breakpoints) so it never forces horizontal overflow on tablet-portrait or phone. Stacked logo capped at 160px so the copy stays the dominant content on mobile. */
.home-about-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 64px;
  align-items: center;
  max-width: 1280px;
}
.home-about-mark { display: flex; justify-content: center; }
.home-about-mark img { max-width: 320px; }
@media (max-width: 900px) {
  .home-about-grid { grid-template-columns: 1fr; gap: 32px; }
  .home-about-mark img { max-width: 160px; }
}

/* Section frames */
section.block {
  padding: 120px 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
section.block:first-of-type { border-top: 0; }
@media (max-width: 760px) { section.block { padding: 72px 0; } }

.section-head {
  display: grid; grid-template-columns: 1fr 3fr; gap: 48px;
  margin-bottom: 64px;
  align-items: baseline;
}
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 40px; } }

/* Grid helpers */
.row { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-12 { grid-template-columns: repeat(12, 1fr); }
@media (max-width: 900px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-12 { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 500px) {
  .cols-4 { grid-template-columns: 1fr; }
}

/* Frame top/bot chrome (echo of deck) */
.frame-chrome {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-faint);
}
.frame-chrome .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: middle; }

/* Publication rows */
.pub-row {
  display: grid;
  grid-template-columns: 64px 1fr 120px 24px;
  gap: 24px;
  padding: 24px 4px;
  border-top: 1px solid var(--rule);
  cursor: pointer;
  transition: background 0.2s, padding 0.2s;
  align-items: baseline;
}
.pub-row:hover { background: rgba(127,184,217,0.04); padding-left: 12px; padding-right: 12px; }
.pub-row .year { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent); letter-spacing: 0.1em; }
.pub-row .pub-title { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 300; font-size: 20px; line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 6px; }
.pub-row .pub-meta { font-size: 13px; color: var(--ink-dim); }
.pub-row .pub-meta em { font-style: italic; color: var(--ink); }
.pub-row .pub-tag { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); }
.pub-row .arrow { color: var(--ink-faint); transition: color 0.2s, transform 0.2s; text-align: right; }
.pub-row:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }
@media (max-width: 760px) {
  .pub-row { grid-template-columns: 48px 1fr; }
  .pub-row .pub-tag, .pub-row .arrow { display: none; }
}

/* Software card */
.sw-card {
  border-top: 1px solid var(--rule);
  padding: 32px 4px;
  display: grid;
  grid-template-columns: 1fr 2fr 160px;
  gap: 40px;
  align-items: start;
  transition: background 0.2s, padding 0.2s;
}
.sw-card:hover { background: rgba(127,184,217,0.04); padding-left: 16px; padding-right: 16px; }
.sw-card .sw-status { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.sw-card .sw-name { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 300; font-size: 42px; letter-spacing: -0.015em; line-height: 1; margin-bottom: 6px; }
.sw-card .sw-tagline { font-family: 'IBM Plex Serif', Georgia, serif; font-style: italic; font-size: 15px; color: var(--ink-dim); line-height: 1.4; }
.sw-card .sw-desc { font-size: 14px; line-height: 1.6; color: var(--ink-dim); margin-bottom: 14px; }
.sw-card .sw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-card .sw-tags span { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--rule-strong); color: var(--ink-dim); }
.sw-card .sw-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-dim); white-space: nowrap; }
.sw-card .sw-link:hover { color: var(--accent); }
@media (max-width: 900px) {
  .sw-card { grid-template-columns: 1fr; gap: 18px; }
}

.person .photo {
  aspect-ratio: 4/5;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.person:hover .photo { transform: translateY(-4px); }
.person .photo::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.4));
  z-index: 1;
}
.person .name { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 300; font-size: 17px; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 4px; }
.person .role { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); }
.person .photo.photo--img { background-size: cover; background-position: center; background-color: #1a2332; }
.person .photo.photo--img::after { display: none; }

/* Full-bleed hero (homepage) */
.hero-full { position: relative; }
.hero-image {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 150px);
  background-size: cover;
  background-position: center 15%;
  background-color: #000;
  overflow: hidden;
}
/* Soft global wash — barely there, just to lift edges */
.hero-image .hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,20,31,0.22) 0%, rgba(11,20,31,0) 18%, rgba(11,20,31,0) 78%, rgba(11,20,31,0.55) 100%);
  pointer-events: none;
}
/* Localized scrim BEHIND the headline only — radial focused on bottom-left where the type sits */
.hero-image::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  background: radial-gradient(
    ellipse 65% 90% at 25% 75%,
    rgba(11,20,31,0.82) 0%,
    rgba(11,20,31,0.55) 38%,
    rgba(11,20,31,0.18) 70%,
    rgba(11,20,31,0) 100%
  );
  pointer-events: none;
  z-index: 1;
}
.hero-image > .hero-frame,
.hero-image > .hero-overlay,
.hero-image > .hero-caption { z-index: 2; }
.hero-image .hero-frame {
  position: absolute; top: 24px; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 56px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(233,227,210,0.78);
  z-index: 2;
}
.hero-image .hero-overlay {
  position: absolute; left: 0; right: 0; bottom: 66px;
  z-index: 2;
}
.hero-image .hero-caption {
  position: absolute; left: 56px; bottom: 24px;
  z-index: 2;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(233,227,210,0.6);
}
@media (max-width: 760px) {
  .hero-image .hero-frame, .hero-image .hero-caption { padding: 0 24px; left: 0; right: 0; }
  .hero-image .hero-overlay { bottom: 26px; }
  .hero-image { min-height: 76vh; }
}

/* Page hero — short banner used on inner pages */
.footer-col { display: flex; flex-direction: column; gap: 6px; }

/* Footer text scale-up for legibility */
.site-footer .tiny-mono { font-size: 16px; }
.site-footer .small { font-size: 16px; line-height: 1.5; }
.site-footer .frame-chrome { font-size: 11px; }
.hero-page {
  position: relative;
  width: 100%;
  height: 480px;
  background-size: cover;
  background-position: center 35%;
  background-color: #000;
  overflow: hidden;
}
.hero-page::before {
  content: '';
  position: absolute; inset: 0;
  /* Stronger bottom darkening to anchor the text — fades from 0% top to opaque at bottom */
  background: linear-gradient(180deg, rgba(11,20,31,0.35) 0%, rgba(11,20,31,0.0) 22%, rgba(11,20,31,0.0) 42%, rgba(11,20,31,0.55) 70%, rgba(11,20,31,0.92) 100%);
  z-index: 1;
}
/* Localized scrim BEHIND the headline only — radial focused on bottom-left where the text sits */
.hero-page::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 100%;
  background:
    radial-gradient(ellipse 60% 65% at 22% 95%, rgba(11,20,31,0.85) 0%, rgba(11,20,31,0.55) 30%, rgba(11,20,31,0.20) 55%, rgba(11,20,31,0) 75%);
  z-index: 1;
  pointer-events: none;
}
.hero-page > .container {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 96px;
  padding-bottom: 40px;
}
.hero-page .eyebrow,
.hero-page .display {
  color: var(--ink);
  text-shadow: 0 2px 24px rgba(11,20,31,0.85), 0 2px 6px rgba(11,20,31,0.7), 0 1px 1px rgba(11,20,31,0.6);
}
.hero-page .display em {
  color: var(--accent);
  text-shadow: 0 2px 24px rgba(11,20,31,0.85), 0 2px 6px rgba(11,20,31,0.7), 0 1px 1px rgba(11,20,31,0.6);
}
@media (max-width: 760px) {
  .hero-page { height: 384px; }
  .hero-page > .container { padding-bottom: 32px; }
}

/* Lede paragraph (intro) */
.lede {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 300;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
}
.lede em { font-style: italic; color: var(--accent); }

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 56px;
}
@media (max-width: 760px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  display: block;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  color: inherit;
  transition: padding 0.2s;
}
.news-card:first-child,
.news-card:nth-child(2) { border-top: 0; padding-top: 8px; }
.news-card.is-page-leader { border-top: 0; padding-top: 8px; }
.news-card .news-date { font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--accent); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 12px; }
.news-card .news-title { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 300; font-size: 26px; line-height: 1.25; margin-bottom: 12px; letter-spacing: -0.012em; max-width: 32ch; }
.news-card .news-body { font-size: 15px; color: var(--ink-dim); line-height: 1.6; max-width: 56ch; margin-bottom: 18px; }
.news-card .read-more { font-family: 'IBM Plex Mono', monospace; font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; transition: gap 0.2s; }
.news-card:hover .read-more { gap: 14px; color: var(--ink); }

/* News type chips */
.news-type {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  margin-bottom: 14px;
  color: var(--ink-dim);
}
.news-type[data-type="Publication"]      { color: #7FB8D9; border-color: #7FB8D9; }
.news-type[data-type="New Member"]       { color: #B8D97F; border-color: #B8D97F; }
.news-type[data-type="Grant"]            { color: #FF6B35; border-color: #FF6B35; }
.news-type[data-type="Award"]            { color: #E8C547; border-color: #E8C547; }
.news-type[data-type="Software Release"] { color: #C49BD9; border-color: #C49BD9; }
.news-type[data-type="Preprint"]         { color: #D97FB8; border-color: #D97FB8; }
.cream-section .news-type { background: rgba(255,255,255,0.4); }

/* Collaborator card (clickable) */
.collab-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}
.collab-card:hover { opacity: 0.7; }
.collab-card:hover .serif { color: var(--accent); }

/* News filter pills */
.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.news-filter {
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-dim);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.news-filter:hover:not(.is-active) {
  border-color: var(--accent);
  color: var(--accent);
}
.news-filter.is-active { color: #fff; }
.news-filter[data-filter="all"].is-active         { background: var(--accent); border-color: var(--accent); }
.news-filter[data-filter="preprint"].is-active    { background: #D97FB8; border-color: #D97FB8; }
.news-filter[data-filter="publication"].is-active { background: #7FB8D9; border-color: #7FB8D9; }
.news-filter[data-filter="award"].is-active       { background: #E8C547; border-color: #E8C547; color: var(--ink); }
.news-filter[data-filter="grant"].is-active       { background: #FF6B35; border-color: #FF6B35; }
.news-filter[data-filter="new-member"].is-active  { background: #B8D97F; border-color: #B8D97F; color: var(--ink); }

/* News pagination */
.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}
.news-pagination button {
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-dim);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  min-width: 42px;
}
.news-pagination button:hover:not(:disabled):not(.is-current) {
  border-color: var(--accent);
  color: var(--accent);
}
.news-pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.news-pagination .is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.news-pagination .news-page-arrow {
  font-size: 16px;
  letter-spacing: 0;
}

/* News row (legacy) */
.news-row {
  display: grid; grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  cursor: pointer;
  transition: background 0.2s, padding 0.2s;
}
.news-row:hover { background: rgba(127,184,217,0.04); padding-left: 12px; }
.news-row .news-date { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent); letter-spacing: 0.14em; padding-top: 4px; }
.news-row .news-title { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 300; font-size: 20px; line-height: 1.35; margin-bottom: 6px; letter-spacing: -0.01em; }
.news-row .news-body { font-size: 13px; color: var(--ink-dim); line-height: 1.55; }
@media (max-width: 760px) {
  .news-row { grid-template-columns: 1fr; gap: 6px; }
}

/* Button */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  border: 1px solid var(--rule-strong);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }

/* Tweaks panel */
#tweaks-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 100;
  background: rgba(16, 28, 43, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rule-strong);
  padding: 20px 22px;
  min-width: 260px;
  display: none;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
#tweaks-panel.visible { display: block; }
#tweaks-panel .tweak-head {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
  display: flex; justify-content: space-between; align-items: center;
}
#tweaks-panel .tweak-close { color: var(--ink-faint); cursor: pointer; font-size: 14px; }
#tweaks-panel .tweak-close:hover { color: var(--ink); }
#tweaks-panel .tweak {
  margin-bottom: 16px;
}
#tweaks-panel .tweak-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 8px;
}
#tweaks-panel .tweak-opts { display: flex; gap: 6px; flex-wrap: wrap; }
#tweaks-panel .tweak-btn {
  padding: 7px 11px;
  border: 1px solid var(--rule-strong);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-dim); cursor: pointer;
  transition: all 0.15s;
}
#tweaks-panel .tweak-btn:hover { color: var(--ink); border-color: var(--ink-dim); }
#tweaks-panel .tweak-btn.active {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
}

/* Layout switcher (top-right pill, always visible) */
#layout-switcher {
  position: fixed; top: 80px; right: 24px; z-index: 40;
  background: rgba(16, 28, 43, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rule-strong);
  padding: 4px;
  display: flex;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
}
#layout-switcher button {
  padding: 8px 14px;
  color: var(--ink-dim);
  transition: all 0.15s;
}
#layout-switcher button.active {
  background: var(--accent); color: var(--bg);
}
#layout-switcher button:hover:not(.active) { color: var(--ink); }
@media (max-width: 760px) { #layout-switcher { top: 72px; right: 12px; } }

/* Hide/show layouts */
.layout { display: none; }
.layout.active { display: block; }
