/*
Theme Name: Çizmecioğlu Lab
Theme URI: https://cizmecioglulab.bilkent.edu.tr
Author: Çizmecioğlu Lab
Description: A purpose-built WordPress theme for the Çizmecioğlu Lab at Bilkent University. Ships editable Team and Publications content types, a research-focused front page, and an interactive PI3K/AKT signalling schematic. No page builder required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cizmecioglu-lab
Tags: education, portfolio, one-column, custom-colors, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
  /* Brand — deep navy for structure, teal for signal, amber for intervention */
  --c-navy-950: #060f1d;
  --c-navy-900: #0b1628;
  --c-navy-800: #12233f;
  --c-navy-700: #1b3157;
  --c-navy-600: #254470;
  --c-navy-200: #c3d2e8;
  --c-navy-100: #e2eaf6;

  --c-teal-700: #0f766e;
  --c-teal-600: #0d9488;
  --c-teal-500: #14b8a6;
  --c-teal-400: #2dd4bf;
  --c-teal-100: #d6f5f0;

  --c-cyan-600: #0891b2;
  --c-amber-600: #d97706;
  --c-amber-500: #f59e0b;
  --c-amber-100: #fef3c7;
  --c-rose-600: #e11d48;
  --c-rose-100: #ffe4e9;

  /* Semantic — light theme */
  --bg: #ffffff;
  --bg-sunken: #f5f8fc;
  --bg-raised: #ffffff;
  --bg-inverse: var(--c-navy-900);
  --text: #101a2b;
  --text-muted: #55627a;
  /* 4.9:1 on white — the faint tone still has to clear AA for small text. */
  --text-faint: #66718a;
  --text-inverse: #eef3fa;
  --accent: var(--c-teal-700);
  --accent-hover: var(--c-teal-600);
  --accent-soft: var(--c-teal-100);
  --line: #e2e8f2;
  --line-strong: #cbd5e6;
  --shadow-sm: 0 1px 2px rgba(11, 22, 40, .06), 0 1px 3px rgba(11, 22, 40, .05);
  --shadow-md: 0 4px 6px -2px rgba(11, 22, 40, .05), 0 12px 24px -6px rgba(11, 22, 40, .10);
  --shadow-lg: 0 8px 12px -4px rgba(11, 22, 40, .06), 0 24px 48px -12px rgba(11, 22, 40, .16);

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Scale */
  /* The two smallest steps carry most of the page — captions, card text, the
     body copy — so the floor is set where it is comfortable to read rather
     than where it merely fits. */
  --step--1: clamp(.9rem, .86rem + .16vw, .98rem);
  --step-0: clamp(1.02rem, .98rem + .18vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.13rem + .34vw, 1.42rem);
  --step-2: clamp(1.38rem, 1.24rem + .64vw, 1.79rem);
  --step-3: clamp(1.66rem, 1.42rem + 1.07vw, 2.36rem);
  --step-4: clamp(1.99rem, 1.6rem + 1.71vw, 3.11rem);
  --step-5: clamp(2.39rem, 1.76rem + 2.63vw, 4.1rem);

  /* Layout */
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --wrap-wide: 1400px;
  --gutter: clamp(1.15rem, .8rem + 1.6vw, 2.5rem);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 68px;

  --ease: cubic-bezier(.2, .7, .3, 1);
  color-scheme: light;
}

/* Dark theme — follows the OS unless the visitor picks one explicitly */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070e1a;
    --bg-sunken: #0b1424;
    --bg-raised: #101c30;
    --bg-inverse: #04090f;
    --text: #e8eef8;
    --text-muted: #9dabc2;
    --text-faint: #7b89a1;
    --text-inverse: #eef3fa;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-soft: #10312f;
    --line: #1d2b43;
    --line-strong: #2b3c58;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, .55);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .65);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #070e1a;
  --bg-sunken: #0b1424;
  --bg-raised: #101c30;
  --bg-inverse: #04090f;
  --text: #e8eef8;
  --text-muted: #9dabc2;
  --text-faint: #7b89a1;
  --text-inverse: #eef3fa;
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --accent-soft: #10312f;
  --line: #1d2b43;
  --line-strong: #2b3c58;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .65);
  color-scheme: dark;
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas, iframe { max-width: 100%; display: block; }
img { height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.18;
  letter-spacing: -.021em;
  margin: 0 0 .6em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p, ul, ol, dl, blockquote, figure, table, pre { margin: 0 0 1.15em; }
p { text-wrap: pretty; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: color .16s var(--ease);
}
a:hover { color: var(--accent-hover); }

strong, b { font-weight: 650; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

code, kbd, pre, samp { font-family: var(--font-mono); font-size: .9em; }

code {
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .12em .38em;
}

pre {
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  overflow-x: auto;
}
pre code { background: none; border: 0; padding: 0; }

/* Names, paper titles and chemical terms can be one very long unbroken string.
   Break them only when they would otherwise be clipped by a card. */
.member-card__name,
.member-card__bio,
.member-card__aside,
.pub-item__title,
.pub-item__authors,
.pub-item__venue,
.news-item__title,
.grant-card__id,
.grant-card__title,
.people-list__name,
.people-list__now,
.focus-card h2,
.focus-card h3,
.page-hero h1,
.hero h1 { overflow-wrap: anywhere; }

blockquote {
  border-left: 3px solid var(--accent);
  padding: .1rem 0 .1rem 1.25rem;
  color: var(--text-muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
th { font-weight: 650; color: var(--text); background: var(--bg-sunken); }

/* Focus — visible for keyboards, quiet for mice */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: var(--accent); color: #fff; }

.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: .5rem;
  transform: translate(-50%, -250%);
  z-index: 999;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: transform .18s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); color: #fff; }

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */

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

.section { padding-block: clamp(3.25rem, 2.2rem + 4.2vw, 6rem); }
.section--tight { padding-block: clamp(2.25rem, 1.6rem + 2.8vw, 3.75rem); }
.section--sunken { background: var(--bg-sunken); }
.section + .section--sunken, .section--sunken + .section { border-top: 1px solid var(--line); }

.stack > * + * { margin-top: var(--stack-gap, 1rem); }

.grid { display: grid; gap: clamp(1.15rem, .8rem + 1.2vw, 2rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr)); }

/* Section heading with an accent rule */
.section-head { max-width: 62ch; margin-bottom: clamp(1.75rem, 1.2rem + 1.8vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .83rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .85rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.section-head--center .eyebrow::before { display: none; }

.section-head h2 { margin-bottom: .45em; }

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-muted);
}

/* ==========================================================================
   4. Buttons & chips
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  /* A <button> without this keeps the browser's grey face. */
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s var(--ease), border-color .16s var(--ease),
    color .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; box-shadow: var(--shadow-md); }

/* Dark mode brightens --accent, so white-on-accent drops to ~1.9:1. Every
   control that fills itself with the accent switches to dark ink instead.
   Keep new accent-filled controls in this list. */
:root[data-theme="dark"] .btn--primary,
:root[data-theme="dark"] .btn--primary:hover,
:root[data-theme="dark"] .pub-filter[aria-pressed="true"],
:root[data-theme="dark"] .pathway__mode[aria-pressed="true"],
:root[data-theme="dark"] .pagination .page-numbers.current,
:root[data-theme="dark"] .skip-link,
:root[data-theme="dark"] .skip-link:focus-visible {
  color: var(--c-navy-950);
}
:root[data-theme="dark"] ::selection { background: var(--accent); color: var(--c-navy-950); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--primary,
  :root:not([data-theme="light"]) .btn--primary:hover,
  :root:not([data-theme="light"]) .pub-filter[aria-pressed="true"],
  :root:not([data-theme="light"]) .pathway__mode[aria-pressed="true"],
  :root:not([data-theme="light"]) .pagination .page-numbers.current,
  :root:not([data-theme="light"]) .skip-link,
  :root:not([data-theme="light"]) .skip-link:focus-visible {
    color: var(--c-navy-950);
  }
  :root:not([data-theme="light"]) ::selection { background: var(--accent); color: var(--c-navy-950); }
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--onDark {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
}
.btn--onDark:hover { background: rgba(255, 255, 255, .2); color: #fff; }

.btn--sm { padding: .45rem 1rem; font-size: .87rem; }

.chip {
  display: inline-block;
  padding: .34rem .78rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .83rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.35;
  border: 1px solid transparent;
}
.chip--outline { background: transparent; border-color: var(--line-strong); color: var(--text-muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; }

/* ==========================================================================
   5. Header & navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); }

@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--bg); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-right: auto;
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand__mark { flex: none; }
img.brand__mark { width: auto; height: 36px; max-width: 160px; object-fit: contain; }

/* The drawn mark is 100x115: the ring fills the top square and the arrowhead
   hangs below it, so the box is nudged down to sit the *ring* on the row's
   centre line rather than the box. */
svg.brand__mark {
  width: 36px;
  height: 41px;
  margin-top: 3px;
  margin-bottom: -3px;
  overflow: visible;
}

/* The ring ends in a deep navy blue that all but disappears against a dark
   header, so the whole mark is lifted a little there. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) svg.brand__mark { filter: brightness(1.2) saturate(1.05); }
}
:root[data-theme="dark"] svg.brand__mark { filter: brightness(1.2) saturate(1.05); }

/* One lap of the arrowhead, driven by a class so the lap finishes even when
   the pointer leaves halfway through. */
.brand__arrow {
  transform-box: view-box;
  transform-origin: 50px 50px;
}
.brand.is-spinning .brand__arrow {
  animation: brand-orbit .95s cubic-bezier(.62, 0, .3, 1);
}
@keyframes brand-orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}
.brand__text { display: flex; flex-direction: column; line-height: 1.12; }
.brand__name { font-size: 1.04rem; }
.brand__sub {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.nav { display: flex; align-items: center; }
.nav ul {
  display: flex;
  align-items: center;
  gap: .2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: block;
  padding: .5rem .8rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 550;
  white-space: nowrap;
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--bg-sunken); }
.nav .current-menu-item > a,
.nav .current_page_item > a,
.nav .current-menu-parent > a,
.nav .current-page-ancestor > a {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease), background-color .16s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: block;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: .6rem var(--gutter) 1.1rem;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    /* Visibility flips instantly on open — a panel still mid-transition cannot
       take keyboard focus — and is delayed on close so the fade is seen. */
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear .18s;
  }
  .nav.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear 0s;
  }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { padding: .8rem .6rem; font-size: 1rem; border-radius: var(--radius-sm); }
  .nav li + li { border-top: 1px solid var(--line); }
}

/* ==========================================================================
   6. Hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  background: var(--bg-inverse);
  color: var(--text-inverse);
  overflow: hidden;
  padding-block: clamp(4rem, 2.5rem + 8vw, 8.5rem);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: .34;
  filter: saturate(.78);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 8% 0%, rgba(13, 148, 136, .34), transparent 58%),
    radial-gradient(90% 80% at 100% 100%, rgba(37, 68, 112, .55), transparent 62%),
    linear-gradient(180deg, rgba(6, 15, 29, .58), rgba(6, 15, 29, .9));
}

.hero__inner { position: relative; max-width: 45rem; }
.hero h1 {
  color: #fff;
  font-size: var(--step-5);
  margin-bottom: .5em;
}
.hero__lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: rgba(238, 243, 250, .84);
  margin-bottom: 2rem;
  max-width: 40rem;
}
.hero .eyebrow { color: var(--c-teal-500); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  margin-top: clamp(2.5rem, 1.8rem + 2.4vw, 4rem);
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
  position: relative;
}
.hero__stat { min-width: 6rem; }
.hero__stat dt {
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(238, 243, 250, .6);
  margin-bottom: .2rem;
}
.hero__stat dd {
  margin: 0;
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Compact page banner for interior pages */
.page-hero {
  position: relative;
  isolation: isolate;
  background: var(--bg-inverse);
  color: var(--text-inverse);
  overflow: hidden;
  padding-block: clamp(2.75rem, 2rem + 3.6vw, 5rem);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(13, 148, 136, .3), transparent 55%),
    linear-gradient(180deg, rgba(6, 15, 29, .55), rgba(6, 15, 29, .88));
}
.page-hero__media {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; opacity: .3;
}
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: rgba(238, 243, 250, .8); max-width: 55ch; font-size: var(--step-1); }
.page-hero .eyebrow { color: var(--c-teal-500); }

.breadcrumbs {
  font-size: .89rem;
  color: rgba(238, 243, 250, .6);
  margin-bottom: .9rem;
}
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.breadcrumbs span[aria-hidden] { padding-inline: .45rem; opacity: .6; }

/* ==========================================================================
   7. Cards
   ========================================================================== */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card__body { padding: clamp(1.1rem, .9rem + .7vw, 1.6rem); flex: 1; }
.card__title { font-size: var(--step-1); margin-bottom: .45rem; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__meta { font-size: .87rem; color: var(--text-faint); margin-bottom: .5rem; }
.card__text { color: var(--text-muted); font-size: var(--step--1); }

/* Research focus card */
.focus-card { padding: clamp(1.4rem, 1.1rem + 1vw, 2.1rem); }
.focus-card__num {
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: .9rem;
  display: block;
}
.focus-card h3 { font-size: var(--step-1); margin-bottom: .6rem; }
/* A card heading, not a link inside a paragraph — the underline made it read
   like body copy. It comes back on hover, same as the team cards. */
.focus-card h3 a { color: inherit; text-decoration: none; }
.focus-card h3 a:hover,
.focus-card h3 a:focus-visible { color: var(--accent); text-decoration: underline; }
.focus-card p { color: var(--text-muted); font-size: var(--step--1); margin-bottom: 1.1rem; }
.focus-card .chip-row { margin-top: auto; }

.focus-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity .18s var(--ease);
}
.focus-card:hover::before { opacity: 1; }

/* ==========================================================================
   8. Team
   ========================================================================== */

.member-card { text-align: left; }

/* The lab portraits are waist-up shots with a lot of garden behind them, so
   the card crops in on the face. Both knobs are per-person, set inline from
   the member's own fields. */
.member-card__figure {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-sunken);
  overflow: hidden;
  --photo-focus: 50% 55%;
  --photo-zoom: 1.8;
  --zoom-factor: 1;
}
.member-card__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-focus);
  transform: scale(calc(var(--photo-zoom) * var(--zoom-factor)));
  transform-origin: var(--photo-focus);
  transition: transform .5s var(--ease), filter .35s var(--ease);
  filter: saturate(.92);
}
.member-card:hover .member-card__figure img {
  transform: scale(calc(var(--photo-zoom) * var(--zoom-factor) * 1.04));
  filter: saturate(1.04);
}

.member-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--c-navy-700), var(--c-navy-900));
  color: #fff;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.member-card__role {
  display: inline-block;
  font-size: .81rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .35rem;
}
.member-card__name { font-size: var(--step-1); margin-bottom: .5rem; letter-spacing: -.02em; }
.member-card__name a { color: inherit; text-decoration: none; }
.member-card__name a:hover { color: var(--accent); }
/* The whole card becomes the hit area for the name link. */
.member-card__name a::after { content: ""; position: absolute; inset: 0; }
.member-card { position: relative; }
.member-card__links, .member-card__name { position: relative; z-index: 1; }
.member-card__bio { font-size: var(--step--1); color: var(--text-muted); margin-bottom: .6rem; }
.member-card__aside {
  font-size: .89rem;
  color: var(--text-faint);
  font-style: italic;
  padding-top: .6rem;
  border-top: 1px dashed var(--line);
}
.member-card__links { display: flex; gap: .5rem; margin-top: .85rem; flex-wrap: wrap; }
.member-card__links a {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-faint);
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.member-card__links a:hover { color: var(--accent); border-color: var(--accent); }
.member-card__links svg { width: 15px; height: 15px; }

/* The PI gets a wider, horizontal card */
.member-card--lead { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .member-card--lead { flex-direction: row; }
  .member-card--lead .member-card__figure {
    flex: 0 0 clamp(14rem, 30%, 20rem);
    aspect-ratio: auto;
    /* A tall side panel already shows more of the frame than a square card,
       so ease off the zoom rather than crop into the face. */
    --zoom-factor: .72;
  }
  .member-card--lead .card__body { display: flex; flex-direction: column; justify-content: center; }
  .member-card--lead .member-card__name { font-size: var(--step-2); }
  .member-card--lead .member-card__bio { font-size: var(--step-0); }
}

/* Undergraduates and alumni share one list. Same family, same size and the
   same row rhythm for every name, so no group reads as the more important
   one; only colour separates a name from where that person went next. */
.people-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.people-list__head,
.people-list__row {
  display: grid;
  grid-template-columns: minmax(11rem, 1.05fr) minmax(0, 1fr) minmax(0, 1.05fr);
  gap: .15rem 1.4rem;
  align-items: baseline;
  padding: .78rem .3rem;
  border-bottom: 1px solid var(--line);
}
.people-list__head {
  padding-bottom: .5rem;
  font-size: .81rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.people-list__head + .people-list { border-top: 0; }
.people-list__row:hover { background: var(--bg-sunken); }
.people-list__name,
.people-list__meta,
.people-list__now {
  font-size: var(--step-0);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.people-list__name { font-weight: 600; color: var(--text); }
.people-list__meta { color: var(--text-muted); }
.people-list__now { color: var(--accent); font-weight: 550; }

@media (max-width: 640px) {
  .people-list__row { grid-template-columns: 1fr; gap: .1rem; }
  /* Stacked rows read as name / role / destination on their own; column
     labels above a single column would only confuse. */
  .people-list__head { display: none; }
  .people-list__head + .people-list { border-top: 1px solid var(--line); }
  /* Empty cells would otherwise leave a gap under every name-only row. */
  .people-list__meta:empty,
  .people-list__now:empty { display: none; }
}

.team-group { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.team-group__label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .85rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.35rem;
}
.team-group__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ==========================================================================
   8b. Photo slideshow
   ========================================================================== */

/* The lab's event photos are a mix of landscape and portrait. Rather than pick
   a crop that would cut people out of the tall ones, every photo is shown whole
   and the space around it is filled with a blurred copy of itself. */
.gallery {
  --gallery-bg: #0a1220;
  --gallery-dur: 6s;
  margin: 0;
}

.gallery__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  /* The cap keeps the frame on screen without scrolling. It also narrows the
     box, since the ratio is held — hence the auto margins. */
  max-height: min(66vh, 640px);
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--gallery-bg);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.gallery__track {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translate3d(calc(var(--gallery-index, 0) * -100%), 0, 0);
  transition: transform .62s var(--ease);
}
.gallery__track > .gallery__slide { margin: 0; }

.gallery__slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
}

/* Flex rather than grid: an auto grid row would size itself to the photo's own
   height, which makes the photo's max-height:100% resolve against that same
   height and stop constraining anything. */
.gallery__media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Decorative backdrop: the same picture, blurred past recognition. */
.gallery__blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(34px) saturate(1.35) brightness(.62);
  transform: scale(1.22);
  opacity: .9;
}

.gallery__photo {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, .5);
}

/* A very slow drift on the photo that is currently showing. */
.gallery__slide[data-current] .gallery__photo {
  animation: gallery-drift calc(var(--gallery-dur) * 2.4) ease-out both;
}
@keyframes gallery-drift {
  from { transform: scale(1); }
  to   { transform: scale(1.045); }
}

.gallery__caption {
  position: absolute;
  inset: auto 0 0;
  margin: 0;
  padding: 3.4rem 1.4rem 1.1rem;
  background: linear-gradient(to top, rgba(4, 9, 18, .88), rgba(4, 9, 18, .55) 45%, transparent);
  color: #fff;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: .01em;
  text-align: center;
  pointer-events: none;
}
.gallery__caption span {
  display: inline-block;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.gallery__slide:not([data-current]) .gallery__caption span {
  opacity: 0;
  transform: translateY(8px);
}

/* Arrows */
.gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(7, 13, 24, .72);
  color: #fff;
  cursor: pointer;
  opacity: .75;
  backdrop-filter: blur(10px);
  transition: opacity .18s var(--ease), background-color .18s var(--ease),
    transform .18s var(--ease);
}
.gallery__nav--prev { left: clamp(.5rem, 1.6vw, 1rem); }
.gallery__nav--next { right: clamp(.5rem, 1.6vw, 1rem); }
.gallery__nav:hover,
.gallery__nav:focus-visible {
  opacity: 1;
  background: rgba(7, 13, 24, .9);
  transform: scale(1.06);
}
.gallery__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gallery__frame:hover .gallery__nav { opacity: 1; }

/* Dots and the pause control */
.gallery__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.gallery__dots {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.gallery__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: width .24s var(--ease), background-color .24s var(--ease);
}
.gallery__dot:hover { background: var(--text-muted); }
.gallery__dot[aria-current="true"] {
  width: 26px;
  background: var(--accent);
}
.gallery__dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.gallery__play { width: 32px; height: 32px; }
.gallery__play svg { width: 15px; height: 15px; }
.gallery__play[aria-pressed="false"] .gallery__ico--play { display: none; }
.gallery__play[aria-pressed="true"] .gallery__ico--pause { display: none; }

/* The progress line doubles as the timer: JS advances the slide when it ends,
   so the bar and the slide can never drift apart. */
.gallery__progress {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 3px;
  background: rgba(255, 255, 255, .16);
}
.gallery__progress span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--c-teal-400, #2dd4bf);
}
.gallery[data-playing="true"] .gallery__progress span {
  animation: gallery-fill var(--gallery-dur) linear;
}
.gallery[data-paused="true"] .gallery__progress span,
.gallery[data-paused="true"] .gallery__slide[data-current] .gallery__photo {
  animation-play-state: paused;
}
.gallery:not([data-playing="true"]) .gallery__progress { display: none; }
@keyframes gallery-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Before the script runs, only the first photo should be visible. */
.gallery:not([data-ready]) .gallery__slide + .gallery__slide { display: none; }
.gallery:not([data-ready]) .gallery__nav,
.gallery:not([data-ready]) .gallery__bar { visibility: hidden; }

@media (max-width: 640px) {
  /* Square, because a phone-width frame is limited by its width: a wider ratio
     would only shrink the portrait photo, not enlarge the landscape ones. */
  .gallery__frame { aspect-ratio: 1 / 1; max-height: 70vh; }
  .gallery__nav { width: 38px; height: 38px; margin-top: -19px; }
  .gallery__nav svg { width: 18px; height: 18px; }
  .gallery__caption { padding: 2.6rem 1rem .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery__track { transition: none; }
  .gallery__slide[data-current] .gallery__photo,
  .gallery__progress span { animation: none; }
  .gallery__caption span { transition: none; }
}

/* ==========================================================================
   9. Publications
   ========================================================================== */

.pub-search { margin-bottom: 1.25rem; }
.pub-search input[type="search"] {
  width: 100%;
  max-width: 30rem;
  padding: .6rem .95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: var(--step--1);
}
.pub-search input[type="search"]::placeholder { color: var(--text-faint); }
.pub-search input[type="search"]:focus-visible { border-color: var(--accent); }
.pub-search__status {
  margin: .5rem 0 0;
  font-size: .87rem;
  color: var(--text-faint);
  min-height: 1.2em;
}

.pub-item[hidden] { display: none; }

.pub-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* Shown only when the browser refuses a silent clipboard write. */
.pub-citation-fallback {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: .6rem;
  padding: .6rem .8rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  color: var(--text);
  font: inherit;
  font-size: .89rem;
  resize: vertical;
}

.pub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.pub-toolbar__label {
  font-size: .85rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-right: .3rem;
}
.pub-filter {
  padding: .4rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  /* Named properties only: "all" also transitions custom properties, which
     leaves the theme tokens stale for a frame when dark mode is switched on. */
  transition: color .16s var(--ease), border-color .16s var(--ease), background-color .16s var(--ease);
}
.pub-filter:hover { border-color: var(--accent); color: var(--accent); }
.pub-filter[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pub-year {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 2.5rem 0 1.1rem;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-faint);
}
.pub-year:first-child { margin-top: 0; }
.pub-year::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.pub-list { list-style: none; margin: 0; padding: 0; }

/* The year filter hides whole groups; be explicit so no later rule wins. */
.pub-group[hidden] { display: none; }

.pub-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1.15rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.pub-item:last-child { border-bottom: 0; }

.pub-item__index {
  font-family: var(--font-mono);
  font-size: .87rem;
  color: var(--text-faint);
  padding-top: .28rem;
  font-variant-numeric: tabular-nums;
}
.pub-item__title {
  font-size: var(--step-0);
  font-weight: 620;
  line-height: 1.42;
  margin-bottom: .3rem;
  letter-spacing: -.01em;
}
.pub-item__authors { font-size: var(--step--1); color: var(--text-muted); margin-bottom: .18rem; }
.pub-item__authors .is-lab { color: var(--text); font-weight: 650; }
.pub-item__venue {
  font-size: var(--step--1);
  color: var(--text-faint);
  font-style: italic;
  margin-bottom: .55rem;
}
.pub-item__links { display: flex; flex-wrap: wrap; gap: .4rem; }
.pub-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .81rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .16s var(--ease), border-color .16s var(--ease), background-color .16s var(--ease);
}
.pub-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pub-link svg { width: 12px; height: 12px; flex: none; }

/* A <button> keeps the browser's grey face unless it is cleared, which in dark
   mode leaves muted text on a light pill. */
button.pub-link {
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.35;
}
button.pub-link.is-copied {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ==========================================================================
   10. News & grants
   ========================================================================== */

.news-list { border-top: 1px solid var(--line); }

.news-item {
  display: grid;
  grid-template-columns: minmax(0, 8.5rem) 1fr;
  gap: 0 1.75rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.news-item:last-child { border-bottom: 0; }
.news-item__date {
  font-family: var(--font-mono);
  font-size: .87rem;
  color: var(--text-faint);
  padding-top: .3rem;
  letter-spacing: .01em;
}
.news-item__title { font-size: var(--step-1); margin-bottom: .4rem; }
.news-item__title a { color: inherit; text-decoration: none; }
.news-item__title a:hover { color: var(--accent); }
.news-item__excerpt { color: var(--text-muted); font-size: var(--step--1); }

/* Announcements that carry a photo get a third column for it; the rest of the
   list keeps the column empty so every title starts on the same line. */
.news-item--media,
.news-item--reserve { grid-template-columns: minmax(0, 8.5rem) 9rem 1fr; }
.news-item__thumb {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
}
.news-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.news-item:hover .news-item__thumb img { transform: scale(1.04); }

/* The spacer that keeps titles aligned must not look like a missing image. */
.news-item__thumb--empty { border: 0; background: none; }

@media (max-width: 900px) {
  .news-item--media,
  .news-item--reserve { grid-template-columns: minmax(0, 8.5rem) 1fr; }
  .news-item__thumb { display: none; }
}

@media (max-width: 640px) {
  .news-item,
  .news-item--media,
  .news-item--reserve { grid-template-columns: 1fr; gap: .35rem; }
  .news-item__date { padding-top: 0; }
  .pub-item { grid-template-columns: 1fr; }
  .pub-item__index { display: none; }
}

.grant-card {
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
}
.grant-card__id {
  font-family: var(--font-mono);
  font-size: .83rem;
  font-weight: 650;
  letter-spacing: .02em;
  color: var(--accent);
  margin-bottom: .4rem;
}
.grant-card__title { font-size: var(--step--1); font-weight: 550; line-height: 1.5; color: var(--text); margin-bottom: .45rem; }
.grant-card__date { font-size: .83rem; color: var(--text-faint); }

/* ==========================================================================
   11. Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 880px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

/* The page's own text, usually the recruitment line. Left on its own it read
   as an orphan paragraph under the profile links. */
.contact-note {
  /* Spans the grid rather than the prose measure, so its right edge lines up
     with the map above it instead of stopping somewhere arbitrary. */
  max-width: none;
  margin-top: clamp(2.25rem, 1.8rem + 1.8vw, 3.5rem);
  padding: 1.15rem 1.4rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
}
.contact-note > :first-child { margin-top: 0; }
.contact-note > :last-child { margin-bottom: 0; }

.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: .15rem; }
.contact-list a { color: var(--text); text-decoration: none; }
.contact-list a:hover { color: var(--accent); text-decoration: underline; }
.contact-list__label {
  display: block;
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: .1rem;
}

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--bg-sunken);
}
.map-frame iframe { width: 100%; height: clamp(300px, 42vh, 460px); border: 0; display: block; }

.profile-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }

/* ==========================================================================
   12. Footer
   ========================================================================== */

.site-footer {
  background: var(--bg-inverse);
  color: rgba(238, 243, 250, .72);
  padding-block: clamp(2.75rem, 2rem + 2.6vw, 4.25rem) 1.75rem;
  font-size: var(--step--1);
}
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer a { color: rgba(238, 243, 250, .8); text-decoration: none; }
.site-footer a:hover { color: var(--c-teal-500); text-decoration: underline; }

.footer-grid {
  display: grid;
  gap: 2rem clamp(1.5rem, 1rem + 2vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer-col__title {
  font-size: .81rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(238, 243, 250, .5);
  margin-bottom: .9rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li + li { margin-top: .5rem; }

.footer-brand__name { color: #fff; font-size: var(--step-1); font-weight: 700; letter-spacing: -.02em; margin-bottom: .5rem; }
.footer-brand p { max-width: 34ch; color: rgba(238, 243, 250, .62); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: .87rem;
  color: rgba(238, 243, 250, .5);
}

/* ==========================================================================
   13. Editor content (the_content output)
   ========================================================================== */

.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2em; font-size: var(--step-2); }
.prose h3 { margin-top: 1.6em; font-size: var(--step-1); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose img, .prose figure { border-radius: var(--radius); }
.prose figcaption { font-size: .89rem; color: var(--text-faint); margin-top: .5rem; text-align: center; }
.prose .alignleft { float: left; margin: .4rem 1.5rem 1rem 0; }
.prose .alignright { float: right; margin: .4rem 0 1rem 1.5rem; }
.prose .aligncenter { margin-inline: auto; }
.prose .alignwide { max-width: min(var(--wrap), 100vw - 2 * var(--gutter)); margin-inline: auto; }

.wp-block-image img { border-radius: var(--radius); }
.wp-caption { max-width: 100%; }

/* ==========================================================================
   Comments
   ========================================================================== */

.comments { max-width: var(--wrap-narrow); }
.comments__title { font-size: var(--step-2); margin-bottom: 1.25rem; }
.comments__notes { font-size: .92rem; color: var(--text-faint); }
.comments__closed { color: var(--text-muted); font-size: var(--step--1); }

.comment-list { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.comment-list ol.children { list-style: none; margin: 1rem 0 0; padding-left: clamp(1rem, 4vw, 2.5rem); }
.comment-list li { margin-bottom: 1.25rem; }

.comment-body {
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.comment-author { display: flex; align-items: center; gap: .65rem; font-weight: 600; }
.comment-author img { border-radius: 999px; }
.comment-author .says { display: none; }
.comment-meta { font-size: .85rem; color: var(--text-faint); margin: .25rem 0 .75rem; }
.comment-meta a { color: inherit; text-decoration: none; }
.comment-meta a:hover { color: var(--accent); }
.comment-body p { font-size: var(--step--1); }
.comment-reply-link {
  display: inline-block;
  margin-top: .5rem;
  font-size: .87rem;
  font-weight: 600;
  text-decoration: none;
}
.comment-awaiting-moderation { font-size: .87rem; color: var(--c-amber-600); }
.bypostauthor > .comment-body { border-left: 3px solid var(--accent); }

.comment-form { display: grid; gap: 1rem; }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-size: .89rem; font-weight: 600; margin-bottom: .35rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: var(--step--1);
}
.comment-form textarea { min-height: 8rem; resize: vertical; }
.comment-form input:focus-visible,
.comment-form textarea:focus-visible { border-color: var(--accent); }
.comment-form .form-submit { margin-top: .25rem; }

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 3rem;
  justify-content: center;
}
.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 2.35rem;
  height: 2.35rem;
  padding-inline: .6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 600;
}
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Search form */
.search-form { display: flex; gap: .5rem; max-width: 30rem; }
.search-form input[type="search"] {
  flex: 1;
  padding: .6rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: var(--step--1);
}
.search-form input[type="search"]:focus-visible { border-color: var(--accent); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: clamp(2.5rem, 2rem + 3vw, 5rem) 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.empty-state h2 { font-size: var(--step-2); }

/* ==========================================================================
   14. Reveal-on-scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* No JS: never hide content */
.no-js .reveal { opacity: 1; transform: none; }

/* Back to top — the team page runs to twenty-odd people */
.back-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text-muted);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.back-to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.back-to-top[hidden] { display: none; }

/* ==========================================================================
   15. Print
   A publication list and a team roster both get printed; make them come out
   as documents rather than screenshots of a website.
   ========================================================================== */

@media print {
  :root {
    --bg: #fff;
    --bg-sunken: #fff;
    --bg-raised: #fff;
    --bg-inverse: #fff;
    --text: #000;
    --text-muted: #333;
    --text-faint: #555;
    --text-inverse: #000;
    --accent: #000;
    --line: #bbb;
    --line-strong: #999;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }

  @page { margin: 18mm 16mm; }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  /* Chrome that means nothing on paper */
  .site-header,
  .site-footer,
  .nav,
  .header-actions,
  .skip-link,
  .breadcrumbs,
  .pagination,
  .pub-toolbar,
  .pub-search,
  .pub-copy,
  .pathway__controls,
  .pathway__hint,
  .pathway__notes,
  .search-form,
  .comment-form,
  .member-card__links,
  .hero__actions,
  .back-to-top { display: none !important; }

  /* Banners become plain headings */
  .hero,
  .page-hero {
    padding-block: 0 1rem !important;
    background: none !important;
    color: #000 !important;
  }
  .hero::after,
  .page-hero::after { display: none !important; }
  .hero__media,
  .page-hero__media { display: none !important; }
  .hero h1,
  .page-hero h1 { color: #000 !important; }
  .hero__lede,
  .page-hero p { color: #333 !important; }

  .section { padding-block: .6rem !important; }
  .wrap { max-width: none !important; padding-inline: 0 !important; }

  .card,
  .grant-card,
  .people-list__row {
    border: 1px solid #bbb !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pub-item,
  .news-item,
  .member-card { break-inside: avoid; page-break-inside: avoid; }

  .pub-year,
  .team-group__label { break-after: avoid; page-break-after: avoid; }

  .reveal { opacity: 1 !important; transform: none !important; }

  /* A DOI is useless on paper unless the address comes with it */
  .pub-item__links a::after,
  .contact-list a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: .85em;
    color: #444;
    word-break: break-all;
  }
  .pub-link {
    border: 0 !important;
    padding: 0 !important;
    margin-right: .6rem;
  }
  .pub-link svg { display: none; }

  /* The figure prints as a still image */
  .pathway { border: 1px solid #bbb !important; break-inside: avoid; }
  .pathway__stage { overflow: visible !important; }
  .pathway__stage svg { min-width: 0 !important; width: 100% !important; }
  .pk-root .pk-anim,
  .pk-root .pk-cascade .pk-flow { animation: none !important; }
  .pk-root .pk-ligand,
  .pk-root .pk-rtk-p,
  .pk-root .pk-pip3,
  .pk-root .pk-phos-mark,
  .pk-root .pk-hub-on,
  .pk-root .pk-cascade,
  .pk-root .pk-outcome { opacity: 1 !important; transform: none !important; }
  .pk-root .pk-pip2,
  .pk-root .pk-catalysis,
  .pk-root .pk-pten-pulse { opacity: 0 !important; }
  .pk-root .pk-pi3k,
  .pk-root .pk-akt-travel { opacity: 1 !important; transform: none !important; }

  a { text-decoration: none; color: #000; }
}
