/* ==========================================================================
   Mair Lab — themairlab.com
   ========================================================================== */

:root {
  --ink: #0b1620;
  --ink-2: #33414d;
  --muted: #6b7782;
  --line: #e4e2dc;
  --paper: #faf9f6;
  --white: #ffffff;
  --night: #0B1218;
  --night-2: #121C25;
  --glow: #7FE3C6;        /* homeodynamics mint (on dark) */
  --glow-2: #EBA43C;      /* homeodynamics amber */
  --accent: #2E7D72;      /* readable teal on light backgrounds */
  --grad: linear-gradient(90deg, #7FE3C6, #55B4EA 22%, #6E8DF0 45%, #A27DF0 65%, #D39A8A 82%, #EBA43C);
  --grad-light: linear-gradient(90deg, #3E9A8D, #3F7FD6 22%, #4E62E0 45%, #7A50DF 65%, #A5687A 82%, #C9762E);

  --serif: "Poppins", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--glow); color: var(--night); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.015em; }
.display {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7.4vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.display em { font-style: italic; color: var(--glow); }
.h2 { font-family: var(--serif); font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.05; }
.h2 em { font-style: italic; color: var(--accent); }
.h3 { font: 600 1.15rem/1.35 var(--sans); letter-spacing: -0.01em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 0.74rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, border-color .3s, color .3s;
  border-bottom: 1px solid transparent;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-size: 1.02rem; }
.brand-name span { font-weight: 400; opacity: .6; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  text-decoration: none; font-size: 0.93rem; padding: 8px 14px; border-radius: 999px;
  opacity: .8; transition: opacity .2s, background .2s;
}
.nav a:hover { opacity: 1; background: rgba(127,127,127,.12); }
.nav a[aria-current="page"] { opacity: 1; background: rgba(127,127,127,.16); }
.nav a.nav-cta { background: var(--glow); color: var(--night); opacity: 1; font-weight: 600; margin-left: 6px; }
.nav a.nav-cta:hover { background: #6af0c0; }
.nav-toggle { display: none; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }

/* header over dark hero vs light page */
.on-dark .site-header { color: #fff; }
.site-header.scrolled, .on-light .site-header {
  background: rgba(250,249,246,.86); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-color: var(--line); color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  background: radial-gradient(120% 90% at 75% 20%, #142338 0%, var(--night) 62%);
  color: #fff; overflow: hidden; padding: 140px 0 72px;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7,18,27,0) 40%, rgba(7,18,27,.85) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero .eyebrow { color: rgba(255,255,255,.65); margin-bottom: 28px; }
.hero .lede { color: rgba(255,255,255,.78); margin-top: 28px; }
.hero-meta {
  margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: 12px 40px; font-size: .9rem; color: rgba(255,255,255,.6);
}
.hero-meta strong { color: #fff; font-weight: 500; }
.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 72px; z-index: 2;
  writing-mode: vertical-rl; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.5); text-decoration: none;
}

/* Page hero (interior pages) */
.page-hero { padding: 168px 0 64px; border-bottom: 1px solid var(--line); }
.page-hero .display { font-size: clamp(2.6rem, 6vw, 5rem); margin-top: 18px; }
.page-hero .display em { color: var(--accent); }
.page-hero .lede { margin-top: 24px; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 136px) 0; }
.section-head { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 56px; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 5fr 6fr; align-items: end; gap: 64px; }
}
.section-dark { background: var(--night); color: #fff; }
.section-dark .eyebrow { color: rgba(255,255,255,.55); }
.section-dark .lede, .section-dark .muted { color: rgba(255,255,255,.7); }
.section-dark .h2 em { color: var(--glow); }
.section-white { background: var(--white); }

/* Big statement */
.statement {
  font-family: var(--serif); font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.18;
  letter-spacing: -0.01em; max-width: 24ch;
}
.statement-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .statement-grid { grid-template-columns: 7fr 5fr; gap: 80px; } }
.statement-grid p { margin: 0 0 1.1em; color: var(--ink-2); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); margin-top: 72px; }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 28px 20px 0 0; }
.stat b { display: block; font: 400 clamp(2.4rem, 4vw, 3.4rem)/1 var(--serif); }
.stat span { font-size: .9rem; color: var(--muted); }

/* Theme cards */
.themes { display: grid; gap: 1px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 720px) { .themes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .themes { grid-template-columns: repeat(4, 1fr); } }
.theme {
  background: var(--night); padding: 34px 28px 30px; display: flex; flex-direction: column; gap: 14px;
  text-decoration: none; transition: background .3s; min-height: 320px;
}
.theme:hover { background: var(--night-2); }
.theme-num { font: 500 .8rem/1 var(--sans); color: var(--glow); letter-spacing: .1em; }
.theme-icon { width: 56px; height: 56px; margin: 6px 0 10px; color: var(--glow); }
.theme p { margin: 0; color: rgba(255,255,255,.66); font-size: .95rem; }
.theme .more { margin-top: auto; font-size: .88rem; color: #fff; opacity: .8; }

/* Papers list */
.paper-list { border-top: 1px solid var(--line); }
.paper {
  display: grid; grid-template-columns: 1fr; gap: 6px 32px; padding: 26px 0;
  border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .25s;
}
@media (min-width: 800px) { .paper { grid-template-columns: 90px 1fr 200px; align-items: baseline; } }
.paper:hover { padding-left: 10px; }
.paper:hover .paper-title { color: var(--accent); }
.paper-year { font: 400 1.5rem/1 var(--serif); color: var(--muted); }
.paper-title { font: 500 1.12rem/1.4 var(--sans); letter-spacing: -.01em; transition: color .2s; }
.paper-authors { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.paper-authors b { color: var(--ink); font-weight: 600; }
.paper-journal { font-size: .9rem; font-style: italic; color: var(--ink-2); }
@media (min-width: 800px) { .paper-journal { text-align: right; } }
.tag {
  display: inline-block; font: 600 .66rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 7px; border-radius: 5px; margin-left: 8px; vertical-align: 2px;
  background: #e8f4ef; color: var(--accent);
}
.tag.preprint { background: #fde9ef; color: #c0265a; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 600 .95rem/1 var(--sans); padding: 15px 22px; border-radius: 999px;
  border: 1px solid currentColor; transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn-glow { background: var(--glow); color: var(--night); border-color: var(--glow); }
.btn-glow:hover { background: #fff; border-color: #fff; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* CTA band */
.cta {
  position: relative; overflow: hidden; border-radius: 22px; padding: clamp(40px, 7vw, 88px);
  background: radial-gradient(90% 120% at 100% 0%, #172a40 0%, var(--night) 65%); color: #fff;
}
.cta .h2 { max-width: 16ch; }
.cta .h2 em { color: var(--glow); }
.cta p { color: rgba(255,255,255,.72); max-width: 52ch; margin: 22px 0 34px; }
.cta-art { position: absolute; right: -60px; top: -60px; width: 420px; opacity: .55; pointer-events: none; }

/* ---------- Research page ---------- */
.research-block { display: grid; gap: 36px; padding: 72px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .research-block { grid-template-columns: 4fr 7fr; gap: 80px; } }
.research-block:last-child { border-bottom: 0; }
.research-block .theme-num { color: var(--accent); }
.research-block .h2 { margin-top: 14px; font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.research-art {
  margin-top: 28px; aspect-ratio: 4/3; border-radius: var(--radius); background: var(--night);
  display: grid; place-items: center; color: var(--glow); overflow: hidden;
}
.research-art svg { width: 70%; height: 70%; }
.research-body p { margin: 0 0 1.1em; color: var(--ink-2); }
.research-body p:first-child { font-size: 1.2rem; color: var(--ink); }
.key-papers { margin-top: 28px; padding: 22px 24px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.key-papers h4 { margin: 0 0 10px; font: 600 .74rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.key-papers ul { margin: 0; padding: 0; list-style: none; }
.key-papers li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .94rem; }
.key-papers li:first-child { border-top: 0; }
.key-papers a { text-decoration: none; }
.key-papers a:hover { color: var(--accent); }
.key-papers i { color: var(--muted); }

.approach { display: grid; gap: 20px; }
@media (min-width: 800px) { .approach { grid-template-columns: repeat(3, 1fr); } }
.approach-card { padding: 30px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); }
.approach-card .h3 { margin: 18px 0 10px; }
.approach-card p { margin: 0; color: rgba(255,255,255,.66); font-size: .95rem; }
.approach-card .theme-icon { margin: 0; }

/* ---------- People ---------- */
.pi { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .pi { grid-template-columns: 5fr 7fr; gap: 80px; } }
.portrait {
  aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; position: relative;
  background: linear-gradient(160deg, #163a40, var(--night));
  display: grid; place-items: center; color: rgba(255,255,255,.4); font-size: .85rem;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.pi-body .h2 { margin: 14px 0 6px; }
.pi-role { color: var(--muted); margin-bottom: 28px; }
.pi-body p { color: var(--ink-2); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.links a {
  font-size: .88rem; text-decoration: none; padding: 9px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--white); transition: border-color .2s;
}
.links a:hover { border-color: var(--ink); }
.timeline { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.timeline span { color: var(--muted); }

.team { display: grid; gap: 28px 22px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .team { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .team { grid-template-columns: repeat(4, 1fr); } }
.member .portrait { aspect-ratio: 1; margin-bottom: 14px; }
.member-name { font-weight: 600; letter-spacing: -.01em; }
.member-role { font-size: .88rem; color: var(--muted); }
.member-focus { font-size: .88rem; color: var(--ink-2); margin-top: 6px; }
.placeholder { outline: 1.5px dashed #c9c5ba; outline-offset: -1.5px; background: #f1efe9; color: var(--muted); }

.alumni { columns: 1; column-gap: 40px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .alumni { columns: 2; } }
@media (min-width: 1040px) { .alumni { columns: 3; } }
.alumni li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.alumni span { color: var(--muted); font-size: .86rem; display: block; }

/* ---------- Publications ---------- */
.pub-tools {
  position: sticky; top: 72px; z-index: 10; background: rgba(250,249,246,.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 18px 0; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white);
}
.search input { border: 0; outline: 0; font: inherit; font-size: .95rem; padding: 12px 0; width: 100%; background: transparent; color: var(--ink); }
.search:focus-within { border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 500 .86rem/1 var(--sans); padding: 10px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-2);
}
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pub-count { font-size: .88rem; color: var(--muted); margin: 26px 0 0; }
.year-group h2 { font: 400 2.2rem/1 var(--serif); margin: 52px 0 6px; color: var(--muted); }
.year-group .paper { grid-template-columns: 1fr; }
@media (min-width: 800px) { .year-group .paper { grid-template-columns: 1fr 220px; } }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- Join ---------- */
.positions { display: grid; gap: 20px; }
@media (min-width: 800px) { .positions { grid-template-columns: repeat(3, 1fr); } }
.position { padding: 32px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; }
.position .h3 { margin: 16px 0 10px; font-size: 1.3rem; }
.position p { margin: 0 0 24px; color: var(--ink-2); font-size: .96rem; }
.position a { margin-top: auto; font-weight: 600; text-decoration: none; color: var(--accent); }
.values { display: grid; gap: 40px 60px; }
@media (min-width: 800px) { .values { grid-template-columns: repeat(2, 1fr); } }
.value .h3 { margin-bottom: 8px; }
.value p { margin: 0; color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: rgba(255,255,255,.7); padding: 80px 0 40px; font-size: .94rem; }
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer .brand { color: #fff; margin-bottom: 18px; }
.site-footer h4 { margin: 0 0 14px; font: 600 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--glow); }
.footer-base {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .84rem; color: rgba(255,255,255,.45);
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); color: var(--ink); padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid var(--line); display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 16px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:hover, .nav a[aria-current="page"] { background: none; }
  .nav a.nav-cta { margin: 16px 0 0; text-align: center; border-radius: 999px; border: 0; }
  .scroll-cue { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Avatars, member links ---------- */
.avatar span { font: 400 clamp(2.4rem, 5vw, 3.4rem)/1 var(--serif); color: var(--glow); letter-spacing: .02em; }
.member-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: .82rem; }
.member-links a { color: var(--accent); text-decoration: none; }

/* ---------- News ---------- */
.news-grid { display: grid; gap: 20px; }
@media (min-width: 800px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-item {
  display: flex; flex-direction: column; gap: 12px; padding: 28px; text-decoration: none;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .25s;
}
.news-item:hover { border-color: var(--ink); transform: translateY(-2px); }
.news-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.news-type { font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-size: .72rem; }
.news-title { font: 400 1.55rem/1.2 var(--serif); }
.news-blurb { margin: 0; font-size: .93rem; color: var(--ink-2); }
.news-source { margin-top: auto; padding-top: 10px; font-size: .86rem; color: var(--muted); }
.news-list { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 720px) { .news-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .news-list { grid-template-columns: repeat(3, 1fr); } }

/* Section header with trailing link */
.row-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 40px; }
.text-link { font-weight: 600; text-decoration: none; color: var(--accent); white-space: nowrap; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.section-dark .text-link { color: var(--glow); }

/* Quote */
.quote { font: 400 clamp(1.7rem, 3.4vw, 2.7rem)/1.22 var(--serif); max-width: 30ch; margin: 0; }
.quote em { color: var(--glow); }
.quote-by { margin-top: 26px; color: rgba(255,255,255,.6); font-size: .95rem; }
.awards { list-style: none; margin: 0; padding: 0; }
.awards li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
@media (max-width: 719px) { .theme { min-height: 0; } }

/* Brand: short name + full lab name */
.brand-name { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.brand-name .brand-full { font-size: .82rem; font-weight: 400; opacity: .6; }
@media (max-width: 1080px) { .site-header .brand-full { display: none; } }
.site-footer .brand-name { flex-direction: column; gap: 2px; white-space: normal; }
.site-footer .brand-full { font-size: .86rem; }


/* ==========================================================================
   Brand (2026): Poppins headings, homeodynamics gradient, MAIR Lab logo
   ========================================================================== */
.display { font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(2.5rem, 6.4vw, 5.4rem); }
.page-hero .display { font-size: clamp(2.3rem, 5.4vw, 4.4rem); }
.h2 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; font-size: clamp(1.8rem, 3.8vw, 2.9rem); }
.statement { font-weight: 500; letter-spacing: -0.02em; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.25; }
.quote, .news-title { font-weight: 500; letter-spacing: -0.02em; }
.news-title { font-size: 1.2rem; line-height: 1.3; }
.stat b, .paper-year, .year-group h2 { font-weight: 500; letter-spacing: -0.02em; }
.avatar span { font-weight: 500; }

/* emphasis = gradient text */
.display em, .h2 em, .cta .h2 em, .page-hero .display em, .section-dark .h2 em {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero .display em, .section:not(.section-dark) .h2 em { background-image: var(--grad-light); }
.section-dark .h2 em, .cta .h2 em { background-image: var(--grad); }

/* logo */
.brand { gap: 14px; }
.brand-logo { height: 36px; width: auto; display: block; }
.logo-on-dark { display: none; }
.on-dark .site-header:not(.scrolled) .logo-on-dark { display: block; }
.on-dark .site-header:not(.scrolled) .logo-on-light { display: none; }
.site-header .brand-full {
  font-size: .72rem; line-height: 1.25; font-weight: 500; opacity: .6; padding-left: 14px;
  border-left: 1px solid currentColor; white-space: nowrap;
}
@media (max-width: 1080px) { .site-header .brand-full { display: none; } }
.footer-brand img { height: 64px; width: auto; display: block; }
.nav a.nav-cta { background: var(--glow); }
.nav a.nav-cta:hover { background: #fff; }
.theme-icon, .theme-num { color: var(--glow); }

@media (max-width: 700px) { .br-wide { display: none; } }

/* Homeodynamics feature */
.homeo { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .homeo { grid-template-columns: 5fr 6fr; gap: 72px; } }
.homeo p { color: var(--ink-2); margin: 18px 0 0; }
.homeo-fig { margin: 0; }
.homeo-fig svg { width: 100%; height: auto; display: block; }
.homeo-fig figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; text-align: center; }

/* Geroscience page */
.compare { display: grid; gap: 20px; }
@media (min-width: 900px) { .compare { grid-template-columns: repeat(3, 1fr); } }
.compare-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; }
.compare-card .h3 { margin: 14px 0 10px; font-size: 1.2rem; }
.compare-card p { margin: 0 0 20px; color: var(--ink-2); font-size: .96rem; }
.compare-card dl { margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9rem; }
.compare-card dt { font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.compare-card dd { margin: 4px 0 0; color: var(--ink); }
.compare-tag { font: 600 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.compare-card.is-ours { background: var(--night); border-color: var(--night); color: #fff; }
.compare-card.is-ours p, .compare-card.is-ours dd { color: rgba(255,255,255,.78); }
.compare-card.is-ours dl { border-color: rgba(255,255,255,.14); }
.compare-card.is-ours dt { color: rgba(255,255,255,.5); }
.compare-card.is-ours .compare-tag { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tree-fig { margin: 0; }
.tree-fig svg { width: 100%; height: auto; display: block; }
.tree-fig figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; }
@media (max-width: 1100px) and (min-width: 861px) { .nav a { padding: 8px 10px; } }

/* Support / giving */
.support { display: grid; gap: 28px; }
@media (min-width: 900px) { .support { grid-template-columns: 5fr 6fr; gap: 72px; align-items: start; } }
.support .lede { margin: 0; }
.support-note { margin: 22px 0 28px; color: var(--ink-2); }
.support-note span { display: block; margin-top: 4px; font-size: .88rem; color: var(--muted); }

/* inline links in body copy */
.research-body p a, .lede a, .pi-role a, .approach-card p a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.research-body p a:hover, .lede a:hover, .pi-role a:hover { color: var(--accent); }
.section-dark .lede a:hover, .approach-card p a:hover { color: var(--glow); }

/* Contact */
.contact { display: grid; gap: 56px; }
@media (min-width: 900px) { .contact { grid-template-columns: 7fr 4fr; gap: 80px; } }
.contact-form { display: grid; gap: 20px; }
.field-row { display: grid; gap: 20px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 8px; }
.field label span { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,125,114,.15); }
.hint { margin: 8px 0 0; font-size: .85rem; color: var(--muted); min-height: 1em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form .btn { justify-self: start; cursor: pointer; }
.contact-form .btn:disabled { opacity: .6; cursor: wait; }
.form-status { margin: 0; font-size: .95rem; min-height: 1.4em; }
.form-status.ok { color: var(--accent); font-weight: 600; }
.form-status.err { color: #B4233C; }
.contact-aside p { color: var(--ink-2); margin: 12px 0 0; line-height: 1.7; }
.contact-aside a { color: var(--accent); text-decoration: none; }

/* Alumni groups */
.alumni-group + .alumni-group { margin-top: 48px; }
.alumni-head { font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.alumni-head span { color: var(--accent); margin-left: 6px; }

/* Lab age clock */
.age-hero { padding-top: 120px; }
.age-hero .display { font-size: clamp(2.2rem, 5.6vw, 4.6rem); }
.age-clock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 44px; max-width: 880px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; overflow: hidden;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@media (min-width: 760px) { .age-clock { grid-template-columns: repeat(6, 1fr); } }
.age-clock div { background: rgba(11,18,24,.72); padding: 22px 10px 18px; text-align: center; }
.age-clock b { display: block; font: 600 clamp(2rem, 5vw, 3.4rem)/1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: #fff; }
.age-clock div:first-child b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.age-clock span { display: block; margin-top: 10px; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.age-totals { margin-top: 32px; }
.age-totals b { color: #fff; font-variant-numeric: tabular-nums; font-weight: 600; }
.age-note { margin-top: 14px; font-size: .85rem; color: rgba(255,255,255,.45); }
.footer-base a { color: inherit; }
.footer-base a:hover { color: var(--glow); }
.stat a { color: inherit; text-decoration: none; }

/* Support us button (top menu) */
.nav a.nav-support { background: transparent; color: inherit; border: 1.5px solid currentColor; margin-left: 6px; padding: 6.5px 14px; }
.nav a.nav-support:hover { background: rgba(127,127,127,.14); }
.nav a.nav-cta + a.nav-cta { margin-left: 8px; }
@media (max-width: 1240px) { .site-header .brand-full { display: none; } }
@media (max-width: 1060px) and (min-width: 861px) { .nav a { font-size: .86rem; padding: 7px 9px; } }
@media (max-width: 860px) {
  .nav a.nav-support { margin: 16px 0 0; text-align: center; border-radius: 999px; border: 1.5px solid currentColor; padding: 14px; }
  .nav a.nav-cta + a.nav-cta { margin: 10px 0 0; }
}
/* two-up option cards */
@media (min-width: 800px) { .section-white .positions:has(> .position:nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); } }

.nav a { white-space: nowrap; }
@media (max-width: 1320px) and (min-width: 861px) { .site-header .brand-full { display: none; } .nav { gap: 2px; } .nav a { padding: 8px 10px; } }
/* The header is capped at the 1180px wrap, so the long lab name never fits beside the full nav: keep it for the footer only. */
.site-header .brand-full { display: none; }
.site-header .brand { margin-right: 24px; flex-shrink: 0; }

/* Podcast "Listen on" buttons */
div.news-item:hover { transform: none; border-color: var(--line); }
a.news-title { text-decoration: none; color: inherit; }
a.news-title:hover { color: var(--accent); }
.news-item .news-source { margin-top: auto; }
.listen-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 4px; }
.listen-row > span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.listen { font-size: .78rem; font-weight: 600; text-decoration: none; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); transition: border-color .2s, color .2s; }
.listen:hover { border-color: currentColor; }
.listen-spotify:hover { color: #1a9e4b; }
.listen-apple:hover { color: #8e44d6; }
.listen-youtube:hover { color: #d4202a; }

/* Featured listen */
.featured-listen { position: relative; overflow: hidden; display: grid; gap: 24px; align-items: center; padding: 34px;
  border-radius: 20px; color: #fff; background: radial-gradient(90% 140% at 100% 0%, #172a40 0%, var(--night) 65%); }
@media (min-width: 860px) { .featured-listen { grid-template-columns: 1.4fr 1fr; padding: 44px 48px; } }
.featured-listen .eyebrow { color: rgba(255,255,255,.6); }
.fl-title { font: 600 clamp(1.5rem, 3vw, 2.1rem)/1.15 var(--serif); letter-spacing: -0.02em; margin: 14px 0 12px; }
.featured-listen p { margin: 0 0 18px; color: rgba(255,255,255,.75); max-width: 56ch; }
.featured-listen .listen-row > span { color: rgba(255,255,255,.55); }
.featured-listen .listen { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); color: #fff; }
.featured-listen .listen:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.12); }
.fl-wave { width: 100%; height: auto; opacity: .9; }
@media (max-width: 859px) { .fl-wave { max-height: 90px; } }

.research-body p.note { font-size: .92rem; color: var(--muted); border-left: 2px solid var(--line); padding-left: 14px; }
