/* =====================================================
   LAB WEBSITE — styles.css (Version 2)
   Palette & feel inspired by pear.no: dusty sky blue,
   warm cream, near-black ink, fine grid lines.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;1,8..60,400&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --bg:          #F2F1ED;   /* warm paper */
  --bg-alt:      #E8E5DC;
  --fg:          #0B0A09;   /* ink */
  --fg-muted:    #5C5850;
  --accent:      #2F5C8A;   /* dusty sky blue */
  --accent-lt:   #DCE5EE;
  --cream:       #FFFAEA;
  --brown:       #2E2109;
  --border:      rgba(46, 32, 15, 0.14);
  --line-light:  rgba(255, 250, 234, 0.22);
  --white:       #FFFFFF;

  --sky: radial-gradient(120% 90% at 78% 18%, rgba(255,250,234,0.28) 0%, rgba(255,250,234,0) 55%),
         radial-gradient(90% 80% at 10% 100%, rgba(11,10,9,0.35) 0%, rgba(11,10,9,0) 60%),
         linear-gradient(170deg, #5E86B0 0%, #3B6696 45%, #24476E 100%);

  /* type scale — the only font sizes used on the site */
  --fs-label:     0.9375rem;                      /* 15px: labels, nav, buttons, tags */
  --fs-small:     1rem;                                    /* 16px: captions, authors, meta */
  --fs-body:      1.125rem;                                /* 18px: body copy */
  --fs-title:     1.25rem;                                 /* 20px: list titles (publications, funders) */
  --fs-lead:      clamp(1.2rem, 1.0rem + 0.5vw, 1.25rem);   /* 20–24px: intro and lead text */
  --fs-h3:        1.375rem;                       /* 22px: card titles */
  --fs-h2:        clamp(1.875rem, 3vw, 2.5rem);   /* section titles */
  --fs-statement: clamp(1.625rem, 2.6vw, 2.125rem); /* mission statement */
  --fs-h1:        clamp(2.75rem, 5.5vw, 4.5rem);  /* page titles */

  --font-display: 'Source Serif 4', Georgia, serif;   /* large statements only */
  --font-body:    'DM Sans', 'Helvetica Neue', Arial, sans-serif; /* headings, text, UI */

  --nav-h:       64px;
  --max-w:       1180px;
  --radius:      2px;
  --trans:       0.3s cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--cream); }
img { display: block; max-width: 100%; height: auto; }
img:not([src]) { color: transparent; font-size: 0; }
a { color: var(--accent); text-decoration: none; transition: color var(--trans), opacity var(--trans); }
a:hover { opacity: 0.7; }
em { font-style: italic; }

/* Film grain used on blue bands */
.hero::before, .page-hero::before, .mission-band::before, .recruiting-band::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

/* ---------- Nav ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(11, 10, 9, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 250, 234, 0.1);
  display: flex;
  align-items: center;
}
.nav-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--cream);
  letter-spacing: -0.015em;
}
.nav-logo:hover { opacity: 0.8; }
.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 250, 234, 0.7);
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}
.nav-links a:hover { color: var(--cream); opacity: 1; border-color: rgba(255,250,234,0.25); }
.nav-links a.active { color: var(--fg); background: var(--cream); opacity: 1; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: 1px solid rgba(255,250,234,0.3);
  border-radius: var(--radius);
  padding: 9px 8px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--cream);
  transition: var(--trans);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
.section { padding: 112px 0; position: relative; }
.section-sm { padding: 64px 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--sky);
  color: var(--cream);
  isolation: isolate;
}
/* fine grid frame with + markers */
.hero::after, .page-hero::after {
  content: '';
  position: absolute;
  inset: 28px;
  pointer-events: none;
  border: 1px solid var(--line-light);
  background:
    linear-gradient(var(--cream), var(--cream)) left 0 top 66% / 15px 1px no-repeat,
    linear-gradient(var(--cream), var(--cream)) left 7px top calc(66% - 7px) / 1px 15px no-repeat,
    linear-gradient(var(--cream), var(--cream)) right 0 top 66% / 15px 1px no-repeat,
    linear-gradient(var(--cream), var(--cream)) right 7px top calc(66% - 7px) / 1px 15px no-repeat,
    linear-gradient(var(--line-light), var(--line-light)) left 0 top 66% / 100% 1px no-repeat;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 120px 72px 15vh;
}
.hero-eyebrow, .section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.hero-eyebrow::before, .section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.hero-eyebrow { color: rgba(255,250,234,0.85); margin-bottom: 28px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--cream);
  margin-bottom: 28px;
  max-width: 11ch;
}
.hero h1 em { font-style: italic; color: var(--cream); opacity: 0.88; }
.hero-lead {
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  font-weight: 400;
  color: rgba(255,250,234,0.9);
  line-height: 1.4;
  max-width: 520px;
  margin-bottom: 40px;
}
.hero-lead strong { font-weight: 500; color: var(--cream); }
.hero-img {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent !important;
  filter: blur(2px) saturate(0.8);
  opacity: 0.45;
  mix-blend-mode: luminosity;
}
.hero-img img:not([src]) { display: none; }
.hero-img::after { content: none; }
.hero-credit {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.01em;
  color: rgba(255,250,234,0.45);
  margin-top: 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--cream);
  border-radius: var(--radius);
  transition: background var(--trans), color var(--trans), border-color var(--trans);
}
.btn::after {
  content: '↗';
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: var(--fs-label);
  letter-spacing: 0;
  border-left: 1px solid rgba(255,250,234,0.3);
  padding-left: 10px;
  box-sizing: content-box;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--cream); opacity: 1; }
.btn-filled { background: var(--accent); border-color: var(--accent); }
.hero .btn { background: var(--fg); border-color: rgba(255,250,234,0.2); }
.hero .btn:hover { background: var(--cream); color: var(--fg); }
.hero .btn:hover::after { border-color: rgba(11,10,9,0.25); }

/* ---------- Section Titles ---------- */
.section-label { color: var(--accent); margin-bottom: 18px; }
.section-title {
  font-family: var(--font-body);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: var(--fs-lead);
  color: var(--fg-muted);
  max-width: 800px;
  line-height: 1.7;
}
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 28px 0;
  position: relative;
}
.divider::before {
  content: '+';
  position: absolute;
  left: -4px;
  top: -11px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1;
  color: var(--fg);
  background: var(--bg);
  padding: 4px 0;
}
.bg-white .divider::before { background: var(--white); }

/* ---------- Mission Band ---------- */
.mission-band {
  position: relative;
  background: var(--fg);
  color: var(--cream);
  padding: 120px 0;
  overflow: hidden;
}
.mission-band p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  max-width: 900px;
  color: rgba(255,250,234,0.88);
}
.mission-band em { font-style: italic; color: var(--cream); }

/* ---------- Highlights ---------- */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.highlight-card {
  background: transparent;
  padding: 40px 36px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background var(--trans);
}
.highlight-card:hover { background: var(--cream); }
.highlight-date {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.01em;
  color: var(--accent);
  font-weight: 500;
}
.highlight-card h3 {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.highlight-card p {
  font-size: var(--fs-body);
  color: var(--fg-muted);
  line-height: 1.65;
  flex: 1;
}
.highlight-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.highlight-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--fg);
  color: var(--cream);
  padding: 5px 9px;
  border-radius: var(--radius);
  align-self: flex-start;
}

/* ---------- Research Areas ---------- */
.research-areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 64px;
  margin-top: 56px;
  counter-reset: area;
}
.research-area {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  position: relative;
  counter-increment: area;
}
.research-area::before {
  content: counter(area, decimal-leading-zero);
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.01em;
  color: var(--accent);
  margin-bottom: 18px;
}
.research-area::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--fg);
  transition: width 0.6s cubic-bezier(.2,.7,.2,1);
}
.research-area:hover::after { width: 100%; }
.research-area h3 {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.research-area p { font-size: var(--fs-body); color: var(--fg-muted); line-height: 1.7; }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 40px 28px;
  margin-top: 48px;
}
.team-card { text-align: left; }
.team-card-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
  background: linear-gradient(170deg, #8FA9C4, #4F749B) !important;
}
.team-card h3 { font-family: var(--font-body); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.team-card .role {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.01em;
  font-weight: 500;
  color: var(--accent);
  margin-top: 6px;
}
.team-card .education { font-size: var(--fs-small); color: var(--fg-muted); margin-top: 6px; line-height: 1.5; }

.pi-section {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: start;
  margin-bottom: 96px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--border);
}
.pi-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius);
  background: linear-gradient(170deg, #8FA9C4, #4F749B) !important;
}
.pi-info h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 14px;
}
.pi-info .pi-title {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.7;
  margin-bottom: 28px;
}
.pi-info p { color: var(--fg-muted); line-height: 1.75; margin-bottom: 14px; }

table th { font-family: var(--font-body); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.01em; 
  font-weight: 600; }

/* ---------- Publications ---------- */
.pub-list { margin-top: 48px; }
.pub-year-group { margin-bottom: 64px; }
.pub-year {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--fg);
}
.pub-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  transition: background var(--trans), padding var(--trans), margin var(--trans);
}
.pub-item:hover { background: var(--cream); padding-left: 20px; padding-right: 20px; margin: 0 -20px; }
.pub-item h3 {
  font-family: var(--font-body);
  font-size: var(--fs-title);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.pub-authors { font-size: var(--fs-small); color: var(--fg-muted); margin-bottom: 4px; }
.pub-journal {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-style: italic;
  color: var(--accent);
}
.pub-link {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--fg);
  white-space: nowrap;
  border: 1px solid var(--fg);
  padding: 7px 12px;
  border-radius: var(--radius);
  align-self: center;
  transition: background var(--trans), color var(--trans);
}
.pub-link:hover { background: var(--fg); color: var(--cream); opacity: 1; }

/* ---------- Resources ---------- */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.resource-card {
  background: transparent;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 36px 32px;
  transition: background var(--trans);
}
.bg-white .resource-card:hover, .resource-card:hover { background: var(--cream); }
.resource-card h3 {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}
.resource-card p { font-size: var(--fs-body); color: var(--fg-muted); line-height: 1.65; margin-bottom: 22px; }
.resource-type {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 4px 8px;
  border-radius: var(--radius);
  margin-bottom: 18px;
}

/* ---------- Recruiting Banner ---------- */
.recruiting-band {
  position: relative;
  background: var(--sky);
  color: var(--cream);
  padding: 120px 0;
  overflow: hidden;
}
.recruiting-band h2 {
  font-family: var(--font-body);
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
  margin-bottom: 24px;
}
.recruiting-band p { font-size: var(--fs-lead); color: rgba(255,250,234,0.88); max-width: 720px; margin-bottom: 36px; line-height: 1.5; }
.btn-white { background: var(--fg); border-color: rgba(255,250,234,0.2); color: var(--cream); }
.btn-white:hover { background: var(--cream); color: var(--fg); border-color: var(--cream); }
.btn-white:hover::after { border-color: rgba(11,10,9,0.25); }

/* ---------- Funders ---------- */
.funders { background: var(--bg-alt); }
.funders-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin-top: 28px;
}
.funders-list li {
  list-style: none;
  font-family: var(--font-body);
  font-size: var(--fs-title);
  font-weight: 400;
  color: var(--fg);
}
.funders-list li::before { content: '+  '; font-family: var(--font-body); font-size: var(--fs-small); color: var(--accent); }

/* ---------- Footer ---------- */
footer {
  background: var(--fg);
  color: rgba(255,250,234,0.72);
  padding: 56px 0 48px;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,250,234,0.12);
}
.footer-logo {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  letter-spacing: -0.015em;
  color: var(--cream);
  font-weight: 600;
}
footer a { color: rgba(255,250,234,0.75); }
footer a:hover { color: var(--cream); opacity: 1; }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  position: relative;
  padding: 140px 0 72px;
  background: var(--sky);
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
.page-hero::after {
  background:
    linear-gradient(var(--cream), var(--cream)) left 0 bottom 0 / 15px 1px no-repeat,
    linear-gradient(var(--cream), var(--cream)) right 0 bottom 0 / 15px 1px no-repeat;
  border-bottom: none;
  inset: 20px 28px 0;
}
.page-hero .container { padding-left: 72px; padding-right: 72px; }
.page-hero .section-label { color: rgba(255,250,234,0.85); margin-bottom: 20px; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
}
.page-hero h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.page-hero .section-subtitle { color: rgba(255,250,234,0.8); }
.page-hero + .section { padding-top: 72px; }
.page-hero + .section .pub-list { margin-top: 0; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-center .section-subtitle { margin-left: auto; margin-right: auto; }
.bg-white { background: var(--white); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 56px; }
.section-label.mt-40 { display: flex; }

/* ---------- Fade-in animation ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-content { padding: 96px 48px 12vh; }
  .highlights-grid { grid-template-columns: 1fr; }
  .research-areas { grid-template-columns: 1fr; }
  .pi-section { grid-template-columns: 1fr; gap: 40px; }
  .pi-photo { max-width: 300px; }
  .pub-item { grid-template-columns: 1fr; gap: 14px; }
  .pub-link { justify-self: start; }
  .page-hero .container { padding-left: 48px; padding-right: 48px; }
}
@media (max-width: 640px) {
  :root { --nav-h: 58px; }
  .nav-links { display: none; flex-direction: column; gap: 0; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--fg);
    border-bottom: 1px solid rgba(255,250,234,0.1);
    padding: 12px 20px 20px;
  }
  .nav-links.open a { padding: 14px 4px; border: none; border-bottom: 1px solid rgba(255,250,234,0.1); border-radius: 0; }
  .nav-links.open a.active { background: transparent; color: var(--cream); }
  .nav-toggle { display: flex; }
  .nav-inner, .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .hero::after, .page-hero::after { inset: 12px; }
  .hero-content { padding: 80px 32px 10vh; }
  .page-hero { padding: 96px 0 48px; }
  .page-hero .container { padding-left: 32px; padding-right: 32px; }
  .highlight-card, .resource-card { padding: 32px 24px; }
  .mission-band, .recruiting-band { padding: 80px 0; }
  table { display: block; overflow-x: auto; }
}

/* ---------- Hero animation: Cu brings life ---------- */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero-canvas { width: 100%; opacity: 0.4; pointer-events: none; }
}

/* =====================================================
   FX LAYER — motion, interaction, copper accents
   (driven by fx.js; inert without it)
   ===================================================== */
:root {
  --copper:    #9A5530;   /* Cu accent on light paper */
  --copper-lt: #E8A867;   /* Cu glow on dark / blue */
  --ease-out:  cubic-bezier(.16, 1, .3, 1);
}

/* Smooth page-to-page transitions (Chrome / Safari 18+) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.35s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 0.6s var(--ease-out) both; }
nav { view-transition-name: site-nav; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(16px); } }

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }

/* ---------- Word-mask reveals ---------- */
.fx .split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.08em 0.14em 0;
  margin: 0 -0.08em -0.14em 0;
}
.fx .split .wi {
  display: inline-block;
  transform: translate3d(0, 110%, 0) rotate(4deg);
  transform-origin: 0 100%;
  transition: transform 1.2s var(--ease-out);
  transition-delay: calc(var(--i) * 45ms + 80ms);
  will-change: transform;
}
.fx .split.in .wi { transform: none; }
.fx-reduced .split .wi { transform: none !important; }

/* Hero intro: secondary lines follow the headline */
.fx .hero-content > :not(h1),
.fx .page-hero .container > :not(h1):not(h2) {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
}
.fx .hero-eyebrow, .fx .page-hero .section-label { transition-delay: 0.05s !important; }
.fx .hero-lead, .fx .page-hero .section-subtitle { transition-delay: 0.55s !important; }
.fx .hero-content > .btn { transition-delay: 0.75s !important; }
.fx .hero-credit { transition-delay: 0.9s !important; }
.fx.is-loaded .hero-content > :not(h1),
.fx.is-loaded .page-hero .container > :not(h1):not(h2) { opacity: 1; transform: none; }
.fx-reduced .hero-content > *, .fx-reduced .page-hero .container > * { opacity: 1 !important; transform: none !important; }
.hero-content { will-change: transform, opacity; }

/* Hero h1: copper-tinted italic */
.hero h1 em { opacity: 1; }
.hero h1 em, .hero h1 em .wi {
  background: linear-gradient(100deg, #FFFAEA 5%, #F3C79A 50%, #E8A867 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 em .wi { padding-right: 0.08em; }
.hero h1 em:has(.wi) { background: none; }

/* Section labels: line draws in */
.fx .section-label::before { transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--ease-out) 0.1s; }
.fx .section-label.in::before, .fx.is-loaded .page-hero .section-label::before, .fx.is-loaded .hero-eyebrow::before { transform: none; }
.section-label { color: var(--copper); }
.page-hero .section-label { color: rgba(255,250,234,0.85); }
.hero-eyebrow::before, .page-hero .section-label::before { background: var(--copper-lt); opacity: 1; }

/* Dividers draw across */
.fx .divider { transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-out); }
.fx .divider.in { transform: none; }
.fx-reduced .divider, .fx-reduced .section-label::before { transform: none !important; }

/* ---------- Scroll cue ---------- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 1px;
  height: 64px;
  z-index: 3;
  overflow: hidden;
  background: rgba(255,250,234,0.18);
}
.scroll-cue::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 40%;
  background: linear-gradient(transparent, var(--copper-lt));
  animation: cue 2.2s var(--ease-out) infinite;
}
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

/* ---------- Nav ---------- */
nav { transition: transform 0.6s var(--ease-out), background 0.4s; }
nav.nav-hidden { transform: translateY(-100%); }
.nav-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--copper-lt) 30%, #FFE3C2);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.nav-links a { position: relative; }
.nav-links a:not(.active)::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: 4px;
  height: 1px;
  background: var(--copper-lt);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.nav-links a:hover { border-color: transparent; }
.nav-links a:not(.active):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; }
.nav-logo::before {
  content: '';
  width: 9px; height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF0D7 0%, var(--copper-lt) 45%, rgba(232,168,103,0) 75%);
  box-shadow: 0 0 14px 3px rgba(232,168,103,0.55);
  animation: cu-pulse 3.2s ease-in-out infinite;
}
@keyframes cu-pulse { 50% { box-shadow: 0 0 6px 1px rgba(232,168,103,0.35); transform: scale(0.85); } }

/* ---------- Buttons ---------- */
.btn-fx { position: relative; overflow: hidden; isolation: isolate;
  transition: transform 0.5s var(--ease-out), background var(--trans), color var(--trans), border-color var(--trans); }
.btn-fx::after { display: none; }
.btn-fx::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--copper);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease-out);
}
.btn-fx:hover::before { transform: none; }
.btn-fx:hover, .hero .btn-fx:hover, .btn-white.btn-fx:hover { background: var(--fg); color: var(--cream); border-color: var(--copper); }
.btn-arrow {
  position: relative;
  display: inline-block;
  width: 20px; height: 20px;
  overflow: hidden;
  border-left: 1px solid rgba(255,250,234,0.3);
  padding-left: 10px;
  box-sizing: content-box;
  line-height: 20px;
}
.btn-arrow span { position: absolute; left: 10px; top: 0; width: 20px; text-align: center; transition: transform 0.55s var(--ease-out); }
.btn-arrow span + span { transform: translate(-120%, 120%); }
.btn-fx:hover .btn-arrow span:first-child { transform: translate(120%, -120%); }
.btn-fx:hover .btn-arrow span + span { transform: none; }

/* ---------- Spotlight cards ---------- */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(232,168,103,0.16), rgba(47,92,138,0.06) 40%, transparent 70%);
}
.spot:hover::before { opacity: 1; }
.team-card.spot::before { inset: -14px; border-radius: 6px; }

.highlights-grid { counter-reset: hl; }
.highlight-card { counter-increment: hl; position: relative; transition: background 0.5s var(--ease-out); }
.highlight-card::after {
  content: counter(hl, decimal-leading-zero);
  position: absolute;
  top: 40px; right: 36px;
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--fg);
  opacity: 0.12;
  transition: opacity 0.5s, color 0.5s;
}
.highlight-card:hover::after { opacity: 1; color: var(--copper); }
.highlight-card, .resource-card { box-shadow: inset 0 0 0 0 var(--copper); }
.highlight-card:hover, .resource-card:hover { background: var(--cream); box-shadow: inset 0 2px 0 0 var(--copper); }
.highlight-tag { background: transparent; color: var(--fg); border: 1px solid var(--border); }
.highlight-card:hover .highlight-tag { border-color: var(--copper); color: var(--copper); }
.highlight-date { color: var(--accent); }

.research-area::after { background: var(--copper); height: 2px; top: -1px; }
.research-area::before { color: var(--copper); font-family: var(--font-display); font-size: 1.5rem; }
.research-area h3 { transition: transform 0.5s var(--ease-out); }
.research-area:hover h3 { transform: translateX(8px); }

/* Publications: arrow nudge + copper rule */
.pub-item { position: relative; }
.pub-link { transition: background var(--trans), color var(--trans), border-color var(--trans), transform 0.5s var(--ease-out); }
.pub-item:hover .pub-link { background: var(--fg); color: var(--cream); transform: translateX(-4px); }
.pub-item:hover { box-shadow: inset 2px 0 0 0 var(--copper); }
.pub-year { color: var(--fg); }
.pub-year-group .pub-year { border-bottom-color: var(--copper); }

/* Team photos: slow zoom */
.team-card-photo, .pi-photo {
  transition: transform 1.2s var(--ease-out), box-shadow 0.8s var(--ease-out);
}
.team-card:hover .team-card-photo {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(11,10,9,0.45);
}
.team-card h3 { transition: color 0.4s; }
.team-card:hover h3 { color: var(--copper); }
.team-card .role { color: var(--copper); }

/* ---------- Mission band: scroll-scrubbed words ---------- */
.mission-band { padding: 160px 0; }
.mission-band::after {
  content: '';
  position: absolute;
  width: 60vw; height: 60vw;
  right: -20vw; top: -25vw;
  background: radial-gradient(circle, rgba(232,168,103,0.12), transparent 60%);
  pointer-events: none;
}
.mission-band p.scrub { color: var(--cream); }
.mission-band p.scrub .sw { display: inline; }
.mission-band p.scrub .swi { opacity: 0.16; transition: opacity 0.5s ease, color 0.5s ease; }
.mission-band p.scrub .swi.lit { opacity: 0.86; }
.mission-band p.scrub em .swi.lit { opacity: 1; color: #F6D2AC; }

/* ---------- Ambient Cu fields ---------- */
.cu-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: field-in 2s var(--ease-out) 0.3s forwards;
}
@keyframes field-in { to { opacity: 1; } }
.page-hero { padding: 110px 0 95px; min-height: 50vh; display: flex; align-items: flex-end; }
.page-hero > .container { width: 100%; }
.recruiting-band { padding: 80px 0; }

/* ---------- Custom cursor ---------- */
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cursor-dot, .cursor-ring {
  position: fixed;
  left: 0; top: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor-on .cursor-dot, .cursor-on .cursor-ring { opacity: 1; }
.cursor-dot {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--copper-lt);
  box-shadow: 0 0 10px 2px rgba(232,168,103,0.6);
}
.cursor-ring {
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(255,255,255,0.9);
  mix-blend-mode: difference;
}
.cursor-ring::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  transition: transform 0.45s var(--ease-out), background 0.3s;
}
.cursor-ring { transition: opacity 0.3s, width 0.45s var(--ease-out), height 0.45s var(--ease-out), margin 0.45s var(--ease-out), background 0.3s; }
.cursor-hot .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255,255,255,1); }
.cursor-hot .cursor-dot { opacity: 0; }
.cursor-press .cursor-ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; }

/* ---------- FX responsive ---------- */
@media (max-width: 900px) {
  .highlight-card::after { top: 32px; right: 24px; }
  .page-hero { min-height: 40vh; padding: 140px 0 64px; }
}
@media (max-width: 640px) {
  .mission-band, .recruiting-band { padding: 96px 0; }
  .page-hero { padding: 112px 0 48px; }
  .scroll-cue { display: none; }
  nav.nav-hidden { transform: none; }
}

/* ---------- Research areas: one per row ---------- */
.research-areas--stacked { grid-template-columns: 1fr; }
.research-areas--stacked .research-area p { max-width: 670px; }

/* Anchor target offset for the fixed nav */
#join { scroll-margin-top: var(--nav-h); }

/* Page hero carrying a long statement rather than a short title */
.page-hero--statement h2 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.3;
  max-width: 46ch;
}

/* ---------- Inline pill links (e.g. fellowship schemes) ---------- */
.role-subhead {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  margin-top: 28px;
  margin-bottom: 12px;
}
.link-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.link-pill {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9375rem;
  line-height: 1.25;
  color: var(--fg);
  text-decoration: none;
  transition: background var(--trans), color var(--trans), border-color var(--trans);
}
.link-pill:hover {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--cream);
}

/* ---------- Open position card (team page) ---------- */
.team-card--open {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 22px;
  color: inherit;
  text-decoration: none;
}
.team-card--open .open-meta { display: block; }
.team-card--open .open-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 110px;
  aspect-ratio: 4/5;
  flex: 0 0 auto;
  margin-bottom: 0;
  font-size: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--fg-muted);
  transition: border-color var(--trans), color var(--trans), background var(--trans);
}
.team-card--open:hover .open-slot {
  border-color: var(--copper);
  color: var(--copper);
}
.team-card--open h3 { transition: color var(--trans); }
.team-card--open:hover h3 { color: var(--copper); }

/* ---------- Funder logos ---------- */
.funder-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  margin-top: 32px;
}
.funder-logos img {
  height: 60px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}
@media (max-width: 640px) {
  .funder-logos { gap: 28px; }
  .funder-logos img { height: 44px; max-width: 180px; }
}

/* ---------- News list ---------- */
.news-list { list-style: none; margin: 32px 0 0; padding: 0; }
.news-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0 28px;
  padding: 15px 0;
  border-top: 1px solid var(--border);
}
.news-list li:last-child { border-bottom: 1px solid var(--border); }
.news-date {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  color: var(--copper);
  white-space: nowrap;
  padding-top: 2px;
}
.news-text { color: var(--fg); line-height: 1.6; }
.news-more { margin-top: 28px; }
.news-more > summary {
  cursor: pointer;
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color var(--trans);
}
.news-more > summary:hover { color: var(--copper); }
.news-more[open] > summary { margin-bottom: 4px; }
.news-more .news-list { margin-top: 16px; }
@media (max-width: 640px) {
  .news-list li { grid-template-columns: 1fr; gap: 4px; }
  .news-date { padding-top: 0; }
}

/* Inner-page titles sit below the homepage hero in the scale */
.page-hero h1 { font-size: clamp(2.5rem, 4.5vw, 4rem); }

/* Eyebrow and hero labels: carry real information, so slightly larger and brighter */
.hero-eyebrow { font-size: 1rem; color: rgba(255,250,234,0.95); }
.page-hero .section-label { font-size: 1rem; color: rgba(255,250,234,0.95); }

/* Measure caps: prose read linearly, not scanned */
.pi-info p:not(.pi-title) { max-width: 700px; }
.pub-item h3 { max-width: 800px; }

/* ---------- Evolution strip (inside the mission band) ---------- */
.evolution { margin-top: 80px; }
.evolution-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,250,234,0.16);
}
.evolution-row img {
  height: 104px;
  width: auto;
  opacity: 0.95;
  flex: 0 0 auto;
}
.mission-band .evolution-note {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0;
  color: rgba(255,250,234,0.74);
  max-width: 680px;
  margin-top: 30px;
}
.mission-band .evolution-enzymes {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: rgba(255,250,234,0.46);
  max-width: 680px;
  margin-top: 30px;
}
@media (max-width: 900px) {
  .evolution-row { flex-wrap: wrap; justify-content: flex-start; gap: 24px 32px; }
  .evolution-row img { height: 72px; }
}

/* Hero statements are the page's h1; keep their existing display size */
.page-hero--statement h1 { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.3; max-width: 46ch; }
.page-hero h1 { font-weight: 400; letter-spacing: -0.015em; }
.page-hero h1.statement { font-size: var(--fs-h2); line-height: 1.15; max-width: 22ch; }

@media (max-width: 640px) {
  .team-card--open { grid-column: span 1; gap: 16px; }
  .team-card--open .open-slot { width: 88px; }
}

/* Compact button variant (e.g. the PI email chip) */
.btn-sm { padding: 4px 10px 4px 14px; gap: 10px; }
.btn-sm::after { width: 16px; height: 16px; padding-left: 9px; font-size: 0.8125rem; }

/* ---------- Phone-only fixes (≤640px); desktop unaffected ---------- */
@media (max-width: 640px) {
  /* (1) Hero: animation sits below the text instead of behind it */
  .hero { flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .hero-canvas {
    position: relative;
    inset: auto;
    flex: none;
    width: 100%;
    height: 520px; /* room for the molecule + its captions drawn below it */
    opacity: 1;
    order: 2;
  }
  .hero-content { order: 1; padding: 80px 32px 8px; }
  /* no scroll parallax on phones, so the animation is never pushed out of view */
  .hero-canvas, .hero-content { transform: none !important; }

  /* (2) Team: two photos per row, smaller PI photo */
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .team-card h3 { font-size: 1.0625rem; }
  .team-card .role, .team-card .education { font-size: 0.8125rem; }
  .pi-photo { max-width: 200px; }

  /* (3) Publications: smaller type */
  .pub-item { padding: 18px 0; }
  .pub-item h3 { font-size: 1.0625rem; line-height: 1.35; }
  .pub-authors, .pub-journal { font-size: 0.875rem; }
  .pub-link { font-size: 0.8125rem; }
}
