/* ============================================================
   Cheadle Lab — site styles, built on HHMI design tokens
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--fg-1);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

:root {
  --shell: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  /* active palette — overridable by Tweaks */
  --lab-accent: var(--hhmi-deep-teal);
  --lab-accent-hover: var(--hhmi-deep-teal-700);

  /* ===== DARK THEME — override HHMI semantic tokens ===== */
  --bg-1: #23262a;            /* page */
  --bg-2: #2b2f34;            /* alt sections / tint */
  --bg-3: #32373d;            /* cards / surfaces */
  --surface-hover: rgba(5,141,150,0.16);
  --fg-1: rgba(255,255,255,0.92);
  --fg-2: rgba(255,255,255,0.62);
  --fg-3: rgba(255,255,255,0.44);
  --border-1: rgba(255,255,255,0.13);
  --border-2: rgba(255,255,255,0.22);
  --border-strong: rgba(255,255,255,0.72);
  /* brighter accents read better on dark */
  --lab-accent: #1FB6BE;
  --lab-accent-hover: #57C9CF;
  --accent-soft: rgba(138,195,65,0.9);
}

.shell { max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------------- Signature four-color bar ---------------- */
.gradbar { height: 5px; width: 100%; background: var(--hhmi-gradient); }

/* ---------------- Brand mark ---------------- */
.mark { display: inline-flex; align-items: center; gap: 12px; }
.mark__cells { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5px; }
.mark__cells span { width: 9px; height: 9px; border-radius: 999px; display: block; }
.mark__cells span:nth-child(1) { background: var(--hhmi-deep-teal); }
.mark__cells span:nth-child(2) { background: var(--hhmi-saturated-green); }
.mark__cells span:nth-child(3) { background: var(--hhmi-medium-green); }
.mark__cells span:nth-child(4) { background: var(--hhmi-light-green); }
.mark__wordmark { display: flex; flex-direction: column; line-height: 1; }
.mark__name {
  font-weight: var(--fw-heavy);
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--fg-1);
  text-transform: lowercase;
}
.mark__logo { height: 42px; width: auto; display: block; }
.nav .mark__logo { width: 149px; height: 74px; }
.footer .mark__logo { width: 138px; height: 66px; }
.mark__sub {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: var(--fw-medium);
  margin-top: 5px;
}

/* ---------------- Top nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 60; isolation: isolate; overflow: hidden;
  background: #23262a;
  border-bottom: 1px solid var(--border-1);
}
.nav::before { content: ""; position: absolute; inset: -40px; background: url("img/hero.jpg") center 22% / cover no-repeat; filter: blur(22px) saturate(1.05); transform: scale(1.06); z-index: 0; }
.nav::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,31,35,0.72), rgba(28,31,35,0.82)); z-index: 0; }
.nav > * { position: relative; z-index: 1; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  font-size: 15px; font-weight: var(--fw-medium);
  color: var(--fg-2); padding: 9px 12px; border-radius: var(--radius-md);
  position: relative; transition: color var(--dur-fast) var(--ease-standard);
}
.nav__link:hover { color: var(--fg-1); }
.nav__link.is-active { color: var(--lab-accent); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--lab-accent);
}
.nav__menu-btn { display: none; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  font-size: 16px; font-weight: var(--fw-medium);
  padding: 13px 24px; border-radius: var(--radius-md); border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease-standard);
}
.btn--primary { background: var(--lab-accent); color: #fff; }
.btn--primary:hover { background: var(--lab-accent-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--fg-1); border-color: var(--border-2); }
.btn--ghost:hover { border-color: var(--fg-1); }
.btn--on-dark { background: #fff; color: var(--hhmi-ink); }
.btn--on-dark:hover { background: rgba(255,255,255,0.88); color: var(--hhmi-ink); }
.btn--ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn--ghost-dark:hover { border-color: #fff; }
.btn .ico { width: 18px; height: 18px; }

/* ---------------- Eyebrow ---------------- */
.eyebrow {
  font-size: 13px; font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--lab-accent); margin: 0 0 18px;
}
.eyebrow--dark { color: var(--hhmi-light-green); }

/* ---------------- Hero ---------------- */
.hero { position: relative; background: #2b2f34; color: #fff; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.62; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(3,7,9,0.94) 0%, rgba(3,7,9,0.7) 42%, rgba(3,7,9,0.25) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-block: clamp(80px, 13vw, 168px); }
.hero__content { max-width: 760px; }
.hero h1 {
  font-weight: var(--fw-heavy); letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(40px, 6.2vw, 78px); margin: 0 0 26px; color: #fff;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--hhmi-light-green); }
.hero__dek { font-size: clamp(18px, 2vw, 22px); line-height: 1.55; color: rgba(255,255,255,0.86); max-width: 600px; margin: 0 0 36px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__affil {
  position: relative; z-index: 2; border-top: 1px solid rgba(255,255,255,0.14);
  padding-block: 18px; display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
  font-size: 13px; letter-spacing: 0.04em; color: rgba(255,255,255,0.66);
}
.hero__affil strong { color: #fff; font-weight: var(--fw-medium); }

/* ---------------- Section scaffolding ---------------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section--tint { background: var(--bg-2); }
.section--ink { background: #34393f; color: #fff; }
.section__head { max-width: 720px; margin-bottom: 56px; }
.section__head h2 {
  font-weight: var(--fw-heavy); letter-spacing: -0.025em; line-height: 1.05;
  font-size: clamp(30px, 4vw, 46px); margin: 0 0 20px; color: inherit; text-wrap: balance;
}
.section__head p { font-size: var(--fs-body-l); line-height: 1.6; color: var(--fg-2); margin: 0; }
.section--ink .section__head p { color: rgba(255,255,255,0.74); }
.rule-top { border-top: 1px solid var(--border-strong); padding-top: 22px; }

/* ---------------- Mission statement ---------------- */
.mission { max-width: 940px; }
.mission p {
  font-size: clamp(24px, 3vw, 34px); line-height: 1.4; font-weight: var(--fw-regular);
  letter-spacing: -0.01em; color: var(--fg-1); margin: 0; text-wrap: pretty;
}
.mission .accent { color: var(--lab-accent); font-weight: var(--fw-medium); }
.accent { color: var(--lab-accent); font-weight: var(--fw-medium); }

/* ---------------- Pillars grid ---------------- */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border-1); border: 1px solid var(--border-1); }
.pillar {
  background: var(--bg-3); padding: 38px 34px 34px; cursor: pointer; position: relative;
  transition: background var(--dur-base) var(--ease-standard);
}
.pillar:hover { background: var(--surface-hover); }
.pillar__num { font-size: 13px; font-weight: var(--fw-bold); color: var(--lab-accent); letter-spacing: 0.1em; }
.pillar__tag { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-3); margin: 14px 0 0; font-weight: var(--fw-medium); }
.pillar h3 { font-size: 23px; font-weight: var(--fw-bold); letter-spacing: -0.01em; line-height: 1.18; margin: 8px 0 12px; color: var(--fg-1); }
.pillar p { font-size: 15.5px; line-height: 1.55; color: var(--fg-2); margin: 0 0 22px; }
.pillar__go { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: var(--fw-medium); color: var(--lab-accent); }
.pillar__go .ico { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease-standard); }
.pillar:hover .pillar__go .ico { transform: translateX(4px); }

/* ---------------- Imaging feature (GIF) ---------------- */
.feature { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.feature__media { position: relative; }
.feature__media img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border-1); }
.feature__media .badge {
  position: absolute; top: 16px; left: 16px; background: rgba(5,8,10,0.78); color: #fff;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 12px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 8px;
}
.feature__media .badge .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--hhmi-saturated-green); box-shadow: 0 0 0 4px rgba(0,164,80,0.22); }
.feature__caption { font-size: 13px; color: var(--fg-3); margin-top: 12px; line-height: 1.5; }

/* ---------------- Stats ---------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,0.14); }
.stat { padding: 6px 4px; }
.stat__num { font-size: clamp(40px, 5vw, 58px); font-weight: var(--fw-heavy); letter-spacing: -0.03em; line-height: 1; }
.stat__num .unit { font-size: 0.5em; font-weight: var(--fw-bold); margin-left: 3px; }
.stat__label { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 12px; line-height: 1.4; max-width: 200px; }
.stat:nth-child(1) .stat__num { color: var(--hhmi-deep-teal); }
.stat:nth-child(2) .stat__num { color: var(--hhmi-saturated-green); }
.stat:nth-child(3) .stat__num { color: var(--hhmi-medium-green); }
.stat:nth-child(4) .stat__num { color: var(--hhmi-light-green); }
.section--ink .stat__num { filter: saturate(1.15) brightness(1.18); }

/* ---------------- Research project rows ---------------- */
.proj { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(32px, 5vw, 64px); align-items: center; padding-block: clamp(48px, 6vw, 84px); border-top: 1px solid var(--border-1); }
.proj:first-of-type { border-top: none; }
.proj--flip .proj__media { order: 2; }
.proj__media img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border-1); background: var(--bg-2); }
.proj__caption { font-size: 13px; color: var(--fg-3); margin-top: 12px; line-height: 1.5; }
.proj__num { font-size: 14px; font-weight: var(--fw-bold); color: var(--lab-accent); letter-spacing: 0.12em; }
.proj__kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-3); font-weight: var(--fw-bold); margin-left: 14px; }
.proj h3 { font-size: clamp(24px, 2.8vw, 32px); font-weight: var(--fw-bold); letter-spacing: -0.02em; line-height: 1.15; margin: 18px 0 18px; color: var(--fg-1); text-wrap: balance; }
.proj p { font-size: 16.5px; line-height: 1.62; color: var(--fg-2); margin: 0 0 16px; }
.proj p.proj__detail { font-size: 15.5px; color: var(--fg-2); }

/* ---------------- Home ---------------- */
.home-bleed { position: relative; background: #23262a; color: rgba(255,255,255,0.92); }
.home-hero { position: relative; padding-block: clamp(96px, 16vh, 200px) clamp(56px, 9vw, 104px); background-color: #2b2f34; background-image: linear-gradient(180deg, rgba(30,34,38,var(--home-scrim-a,0.5)) 0%, rgba(30,34,38,calc(var(--home-scrim-a,0.5) + 0.12)) 100%), url("img/hero.jpg"); background-size: cover, cover; background-position: center, center; background-repeat: no-repeat, no-repeat; }
.home-hero h1 { font-size: clamp(46px, 8vw, 104px); font-weight: var(--fw-heavy); letter-spacing: -0.045em; line-height: 0.96; margin: 0; color: #fff; }
.home-hero__affil { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 22px 0 0; font-size: 13.5px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.home-hero__sep { width: 4px; height: 4px; border-radius: 999px; background: var(--hhmi-light-green); }
.home-hero__line { max-width: 620px; margin: 34px 0 0; font-size: clamp(18px, 2.1vw, 23px); line-height: 1.45; color: rgba(255,255,255,0.92); font-weight: var(--fw-medium); letter-spacing: -0.015em; text-wrap: pretty; }
.home-body { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(80px, 12vw, 150px); }
.home-block { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); padding-block: clamp(40px, 6vw, 68px); border-top: 1px solid rgba(255,255,255,0.14); }
.home-body .home-block:first-child { border-top: 0; }
.home-block__label { margin: 0; font-size: 12px; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: 0.14em; color: var(--hhmi-light-green, #8AC341); padding-top: 6px; }
.home-prose { max-width: 680px; }
.home-prose p { font-size: 17px; line-height: 1.7; color: rgba(255,255,255,0.82); margin: 0 0 18px; text-wrap: pretty; }
.home-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 15px; font-weight: var(--fw-medium); color: #fff; border-bottom: 1px solid rgba(255,255,255,0.32); padding-bottom: 3px; }
.home-link .ico { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease-standard); }
.home-link:hover { color: var(--hhmi-light-green, #8AC341); border-bottom-color: var(--hhmi-light-green, #8AC341); }
.home-link:hover .ico { transform: translateX(4px); }

/* ---------------- Single-cell database ---------------- */
.scdb { border-top: 1px solid var(--border-1); padding-top: clamp(48px, 6vw, 84px); }
.scdb__intro { max-width: 720px; margin-bottom: 28px; }
.scdb__frame { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-1); background: var(--bg-2); }
.scdb__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.scdb__note { font-size: 13.5px; color: var(--fg-3); margin-top: 14px; }
.scdb__note a { color: var(--lab-accent); font-weight: var(--fw-medium); }
.scdb__note a:hover { color: var(--fg-1); }
@media (max-width: 720px) { .scdb__frame { aspect-ratio: 4 / 5; } }

/* ---------------- People ---------------- */
.pi { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.pi__photo { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-1); }
.pi__photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.pi h2 { font-size: clamp(30px, 4vw, 44px); font-weight: var(--fw-heavy); letter-spacing: -0.025em; margin: 0 0 6px; }
.pi__role { font-size: 17px; color: var(--lab-accent); font-weight: var(--fw-medium); margin: 0 0 24px; }
.pi__bio { font-size: 17px; line-height: 1.6; color: var(--fg-2); margin: 0 0 24px; max-width: 560px; }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; }
.member { }
.member__photo { aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-3); border: 1px solid var(--border-1); }
.member__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-standard); }
.member:hover .member__photo img { transform: scale(1.04); }
.member__name { font-size: 16.5px; font-weight: var(--fw-bold); margin: 14px 0 2px; letter-spacing: -0.01em; color: var(--fg-1); }
.member__pronouns { font-size: 12px; color: var(--fg-3); font-weight: var(--fw-regular); margin-left: 6px; }
.member__role { font-size: 13.5px; color: var(--lab-accent); font-weight: var(--fw-medium); }

.alumni { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border-1); border: 1px solid var(--border-1); }
.alum { background: var(--bg-3); padding: 22px 24px; }
.alum__name { font-size: 16px; font-weight: var(--fw-bold); color: var(--fg-1); }
.alum__role { font-size: 13px; color: var(--fg-3); margin-top: 2px; }
.alum__now { font-size: 13.5px; color: var(--fg-2); margin-top: 10px; line-height: 1.45; }
.alum__now span { color: var(--lab-accent); }

/* ---------------- Join / culture ---------------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.value { }
.value__ico { width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--surface-hover); color: var(--lab-accent); margin-bottom: 18px; }
.value__ico .ico { width: 22px; height: 22px; }
.value h3 { font-size: 19px; font-weight: var(--fw-bold); margin: 0 0 8px; color: var(--fg-1); }
.value p { font-size: 15px; line-height: 1.55; color: var(--fg-2); margin: 0; }

.positions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.position { border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: 28px; background: var(--bg-3); transition: border-color var(--dur-fast) var(--ease-standard); }
.position:hover { border-color: var(--lab-accent); }
.position__role { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--lab-accent); font-weight: var(--fw-bold); }
.position h3 { font-size: 21px; font-weight: var(--fw-bold); margin: 12px 0 10px; color: var(--fg-1); letter-spacing: -0.01em; }
.position p { font-size: 14.5px; line-height: 1.55; color: var(--fg-2); margin: 0; }

.contact-card { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-list { font-size: 17px; line-height: 1.85; color: var(--fg-1); }
.contact-list .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-3); font-weight: var(--fw-bold); display: block; margin-top: 22px; margin-bottom: 4px; }
.contact-list .lbl:first-child { margin-top: 0; }

.section--ink, .section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: #fff; }
.cta-band h2 { color: #fff; }

/* ---------------- CTA band ---------------- */
.cta-band { background: var(--hhmi-ink); color: #fff; position: relative; overflow: hidden; }
.cta-band__inner { padding-block: clamp(56px, 8vw, 96px); position: relative; z-index: 2; max-width: 760px; }
.cta-band h2 { font-size: clamp(30px, 4.5vw, 52px); font-weight: var(--fw-heavy); letter-spacing: -0.03em; line-height: 1.04; margin: 0 0 22px; text-wrap: balance; }
.cta-band p { font-size: var(--fs-body-l); line-height: 1.6; color: rgba(255,255,255,0.76); margin: 0 0 32px; }
.cta-band__glow { position: absolute; right: -120px; top: -120px; width: 480px; height: 480px; border-radius: 999px; background: radial-gradient(circle, rgba(82,180,72,0.5), transparent 65%); z-index: 1; filter: blur(8px); }

/* ---------------- Footer ---------------- */
.footer {
  position: relative; overflow: hidden;
  background:
    radial-gradient(135% 95% at 50% 6%, rgba(138,195,65,0.13), rgba(0,164,80,0.06) 42%, rgba(5,141,150,0.05) 64%, transparent 80%),
    #2a2e33 url('img/footer-bg.webp') center top / cover no-repeat;
  color: rgba(255,255,255,0.78); padding-block: 26px 16px;
}
.footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--hhmi-gradient); }
.footer > .shell { position: relative; z-index: 1; }
.footer__top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,0.09); }
.footer .mark__name { color: #fff; }
.footer .mark__sub { color: rgba(255,255,255,0.55); }
.footer__cols { display: flex; gap: 44px; flex-wrap: wrap; }
.footer__col h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--hhmi-light-green); margin: 0 0 9px; font-weight: var(--fw-bold); }
.footer__col a, .footer__col span { display: block; font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.84); margin-bottom: 4px; transition: color var(--dur-fast); }
.footer__col a:hover { color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 13px; font-size: 12px; color: rgba(255,255,255,0.55); }

/* ---------------- Microglia artwork backgrounds ---------------- */
.section--art { position: relative; overflow: hidden; }
.section--art::before {
  content: ""; position: absolute; inset: 0;
  background: url('img/microglia-logo.png') center / cover no-repeat;
  opacity: 0.5; z-index: 0; pointer-events: none;
}
.section--art > * { position: relative; z-index: 1; }

.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: url('img/microglia-logo.png') center / cover no-repeat;
  opacity: 0.55; z-index: 0; pointer-events: none;
}

/* Fluorescence microglia background \u2014 the home "immune & glial mechanisms" motif, reused */
.section--micro { position: relative; overflow: hidden; background: #07090c; color: #fff; }
.micro-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.micro-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.96; filter: brightness(1.42) saturate(1.08); }
.micro-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(7,9,12,0.72) 0%, rgba(7,9,12,0.55) 34%, rgba(7,9,12,0.20) 72%, rgba(7,9,12,0.04) 100%);
}
.section--micro > *:not(.micro-bg) { position: relative; z-index: 1; }
.section--micro .mission p, .section--micro .section__head, .section--micro .stat__label { text-shadow: 0 1px 14px rgba(0,0,0,0.55); }
.section--micro, .section--micro h1, .section--micro h2, .section--micro h3, .section--micro h4 { color: #fff; }
.section--micro .mission p { color: #fff; }
.section--micro .stat__num { filter: saturate(1.15) brightness(1.18); }

/* scientific figures sit on their own light matte so they read on dark */
.proj__media img, .feature__media img { background: #fff; }

/* ---------------- People: click-to-open bio ---------------- */
.member { cursor: pointer; }
.member__photo { position: relative; }
.member__photo::after {
  content: "View bio"; position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(0deg, rgba(5,8,10,0.78), rgba(5,8,10,0.35));
  color: #fff; font-size: 13px; font-weight: var(--fw-bold); letter-spacing: 0.06em; text-transform: uppercase;
  opacity: 0; transition: opacity var(--dur-base) var(--ease-standard);
}
.member:hover .member__photo::after, .member:focus-visible .member__photo::after { opacity: 1; }
.member__photo .plus {
  position: absolute; right: 10px; bottom: 10px; width: 28px; height: 28px; border-radius: 999px;
  background: var(--lab-accent); color: #23262a; display: grid; place-items: center; z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.member__photo .plus svg { width: 16px; height: 16px; }

/* Modal */
.modal-scrim {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 1; animation: modalfade var(--dur-base) var(--ease-standard);
}
@keyframes modalfade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-3); border: 1px solid var(--border-1); border-radius: var(--radius-lg);
  max-width: 620px; width: 100%; max-height: 88vh; overflow: auto;
  display: grid; grid-template-columns: 220px 1fr; box-shadow: var(--shadow-3);
}
.modal__media { background: var(--bg-2); }
.modal__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.modal__body { padding: 30px 30px 32px; position: relative; }
.modal__close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-1); color: var(--fg-2);
  display: grid; place-items: center; transition: all var(--dur-fast);
}
.modal__close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.modal__close svg { width: 18px; height: 18px; }
.modal h3 { font-size: 24px; font-weight: var(--fw-heavy); letter-spacing: -0.02em; margin: 0 0 2px; color: var(--fg-1); padding-right: 36px; }
.modal__pronouns { font-size: 13px; color: var(--fg-3); }
.modal__role { font-size: 15px; color: var(--lab-accent); font-weight: var(--fw-medium); margin: 6px 0 16px; }
.modal__bio { font-size: 15.5px; line-height: 1.62; color: var(--fg-2); margin: 0; }
@media (prefers-reduced-motion: reduce) { .modal-scrim { animation: none; opacity: 1; } }
@media (max-width: 560px) {
  .modal { grid-template-columns: 1fr; max-height: 92vh; }
  .modal__media img { aspect-ratio: 16/10; }
}

/* ---------------- Publications / Awards / News / Culture ---------------- */
.placeholder-note {
  font-size: 13.5px; color: var(--fg-2); background: var(--surface-hover);
  border: 1px solid var(--border-1); border-radius: var(--radius-md);
  padding: 12px 16px; display: flex; gap: 10px; align-items: center; margin-bottom: 30px; max-width: 760px;
}
.placeholder-note .ico { width: 17px; height: 17px; color: var(--lab-accent); flex: none; }

.pub-list, .award-list { border-top: 1px solid var(--border-1); }
.pub, .award { display: grid; gap: 8px 24px; padding: 22px 0; border-bottom: 1px solid var(--border-1); align-items: baseline; }
.pub { grid-template-columns: 80px 1fr auto; }
.award { grid-template-columns: 80px 1fr; }
.pub__year, .award__year { font-weight: var(--fw-bold); color: var(--lab-accent); font-size: 15px; letter-spacing: 0.04em; }
.pub__title, .award__title { font-size: 17.5px; font-weight: var(--fw-medium); color: var(--fg-1); line-height: 1.38; margin: 0 0 5px; }
.pub__meta, .award__who { font-size: 14px; color: var(--fg-2); }
.pub__tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-3); white-space: nowrap; font-weight: var(--fw-bold); }
.pub__link { color: inherit; text-decoration: none; transition: color var(--dur-fast) var(--ease-standard); }
.pub__link:hover { color: var(--lab-accent); }
.award__title { padding-right: 12px; }

.fund-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.fund { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: var(--fg-2); line-height: 1.45; padding: 12px 0; border-bottom: 1px solid var(--border-1); }
.fund .ico { width: 16px; height: 16px; color: var(--lab-accent); flex: none; margin-top: 2px; }

.news-list { border-top: 1px solid var(--border-1); }
.news-item { display: grid; grid-template-columns: 150px 1fr; gap: 8px 28px; padding: 24px 0; border-bottom: 1px solid var(--border-1); align-items: start; color: inherit; }
.news-item__meta { display: flex; flex-direction: column; gap: 4px; }
.news-item__date { font-size: 14px; font-weight: var(--fw-bold); color: var(--lab-accent); letter-spacing: 0.04em; }
.news-item__source { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); font-weight: var(--fw-bold); }
.news-item__title { font-size: 19px; font-weight: var(--fw-medium); color: var(--fg-1); line-height: 1.32; margin: 0 0 6px; transition: color var(--dur-fast) var(--ease-standard); }
.news-item__arrow { width: 15px; height: 15px; margin-left: 6px; vertical-align: -1px; color: var(--fg-3); transition: transform var(--dur-fast) var(--ease-standard), color var(--dur-fast); }
.news-item:hover .news-item__title { color: var(--lab-accent); }
.news-item:hover .news-item__arrow { color: var(--lab-accent); transform: translate(3px, -3px); }
.news-item__body { font-size: 15px; line-height: 1.55; color: var(--fg-2); margin: 0; }

.culture-lead { font-size: clamp(24px, 3vw, 34px); line-height: 1.4; color: var(--fg-1); max-width: 900px; }

.culture-feature { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.culture-feature__media img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border-1); display: block; background: #23262a; }

.year-gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.year-card { position: relative; margin: 0; aspect-ratio: 3 / 4; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-1); }
.year-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-standard); }
.year-card:hover img { transform: scale(1.05); }
.year-card__label { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 18px 16px 14px; font-size: 22px; font-weight: var(--fw-heavy); letter-spacing: -0.02em; color: #fff; background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent); }

/* ---------------- Candid gallery (by year) ---------------- */
.candid-year { margin-bottom: clamp(40px, 5vw, 64px); }
.candid-year:last-child { margin-bottom: 0; }
.candid-year__head { display: flex; align-items: baseline; gap: 16px; padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--border-1); }
.candid-year__num { font-size: clamp(28px, 3vw, 38px); font-weight: var(--fw-heavy); letter-spacing: -0.03em; color: var(--fg-1); line-height: 1; }
.candid-year__count { font-size: 12px; font-weight: var(--fw-bold); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lab-accent); }
.candid-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.candid { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-1); background: #23262a; cursor: pointer; }
.candid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-standard); }
.candid:hover img, .candid:focus-visible img { transform: scale(1.05); }
.candid__zoom { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; background: rgba(10,13,16,0.6); color: #fff; opacity: 0; transform: translateY(-4px); transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard); }
.candid__zoom .ico { width: 15px; height: 15px; }
.candid:hover .candid__zoom, .candid:focus-visible .candid__zoom { opacity: 1; transform: none; }
.candid:focus-visible { outline: 3px solid rgba(31,182,190,0.5); outline-offset: 2px; }

/* ---------------- Lightbox ---------------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: clamp(8px, 2vw, 24px); padding: clamp(16px, 4vw, 48px); background: rgba(0,0,0,0.84); animation: lb-in var(--dur-base) var(--ease-standard); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.lightbox__stage img { max-width: 100%; max-height: 78vh; width: auto; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-2); }
.lightbox__stage figcaption { max-width: 620px; text-align: center; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.82); display: flex; flex-direction: column; gap: 5px; }
.lightbox__count { font-size: 12px; font-weight: var(--fw-bold); letter-spacing: 0.14em; color: var(--lab-accent); }
.lightbox__nav, .lightbox__close { display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.24); background: rgba(255,255,255,0.06); color: #fff; border-radius: 999px; transition: background var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard); }
.lightbox__nav { width: 48px; height: 48px; }
.lightbox__nav:hover, .lightbox__close:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.5); }
.lightbox__close { position: fixed; top: 20px; right: 20px; width: 42px; height: 42px; }
.lightbox__nav .ico { width: 24px; height: 24px; }
.lightbox__close .ico { width: 20px; height: 20px; }

/* ---------------- Page entrance ---------------- */
.page { animation: pagein var(--dur-base) var(--ease-entrance); }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- Reveal on scroll ---------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease-standard), transform .5s var(--ease-standard); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .page { animation: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--radius-md); border: 1px solid var(--border-1); background: var(--bg-3); color: var(--fg-1); }
  .nav__mobile { display: flex; flex-direction: column; gap: 2px; padding: 12px var(--gutter) 20px; border-bottom: 1px solid var(--border-1); background: rgba(28,31,35,0.72); }
  .nav__mobile a { padding: 12px 4px; font-size: 17px; font-weight: var(--fw-medium); color: var(--fg-1); border-bottom: 1px solid var(--border-1); }
  .feature, .proj, .proj--flip, .pi, .contact-card, .culture-feature { grid-template-columns: 1fr; }
  .proj--flip .proj__media { order: 0; }
  .pillars { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 28px 1px; }
  .team-grid { grid-template-columns: repeat(4, 1fr); }
  .alumni, .values, .positions, .fund-list { grid-template-columns: 1fr; }
  .year-gallery { grid-template-columns: repeat(3, 1fr); }
  .candid-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1081px) {
  .nav__mobile { display: none; }
}
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; gap: 26px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .pub { grid-template-columns: 64px 1fr; }
  .pub__tag { grid-column: 2; }
  .year-gallery { grid-template-columns: repeat(2, 1fr); }
  .candid-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .lightbox { grid-template-columns: 1fr; padding: 16px; }
  .lightbox__nav { position: fixed; bottom: 20px; width: 44px; height: 44px; z-index: 2; }
  .lightbox__nav--prev { left: 24px; }
  .lightbox__nav--next { right: 24px; }
  .lightbox__stage img { max-height: 72vh; }
  .news-item { grid-template-columns: 1fr; gap: 4px; }
  .news-item__meta { flex-direction: row; gap: 12px; align-items: baseline; }
}

/* ---------------- Spotlight panels (research overview, PI) ---------------- */
.spotlight { position: relative; background: var(--bg-3); border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: clamp(24px, 3.4vw, 48px); overflow: hidden; }
.spotlight::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--hhmi-gradient); }
