/* ==========================================================================
   TaLE MKE: site styles
   Plain CSS, no build step. All brand colors live in :root below.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Brand tokens (swap these to rebrand the whole site)
   -------------------------------------------------------------------------- */
:root {
  /* Brand colors, sampled from the TaLE MKE logo (assets/img/brand/).
     tests/check_site.py verifies every text/background pair meets WCAG AA. */
  --color-primary: #0074c8;        /* logo blue: header, footer, buttons, links */
  --color-primary-dark: #005a9c;
  --color-primary-soft: #e8f2fb;

  --color-secondary: #007065;      /* logo green: trajectory line, accents */
  --color-secondary-dark: #00544c;
  --color-secondary-soft: #e3f1ef;

  --color-accent-light: #7eb8e0;   /* logo light-blue fan lines */
  --color-accent-pale: #c1ddf4;    /* logo pale-blue fan lines */
  --color-band: #f3f8fc;           /* alternating section background */

  /* Stroke color for the decorative trajectory fan (overridden on blue) */
  --traj-fan: var(--color-accent-light);

  /* Text and surfaces */
  --color-text: #1c2b2f;
  --color-text-muted: #4b5b61;
  --color-bg: #ffffff;
  --color-border: #dde5e3;
  --color-error: #b3261e;
  --color-success: #1e6b3a;

  /* Type */
  --font-heading: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* Shape and spacing */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(16, 40, 38, 0.06), 0 6px 20px rgba(16, 40, 38, 0.06);
  --shadow-hover: 0 2px 4px rgba(16, 40, 38, 0.08), 0 12px 32px rgba(16, 40, 38, 0.1);
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-space: clamp(56px, 8vw, 96px);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
  color: var(--color-secondary);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--color-secondary-dark); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

/* --------------------------------------------------------------------------
   3. Header and navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-primary);
  /* Two-tone bar under the header: white on top, MCW green below (mcw.edu uses #007066). */
  border-bottom: 3px solid #fff;
  box-shadow: 0 5px 0 var(--color-secondary);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 96px;
}

.brand { display: block; flex: none; line-height: 0; }
.brand-logo { width: 236px; height: auto; }
@media (max-width: 420px) { .brand-logo { width: 176px; } }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 6px 14px;
  border: 2px solid var(--color-secondary);  /* MCW green outline */
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.site-nav a[aria-current="page"] { background: #fff; color: var(--color-primary); }
.site-header :focus-visible { outline-color: #fff; }

/* Mobile nav below 1040px: seven nav items need room next to the logo. */
@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--color-primary);
    border-bottom: 3px solid #fff;
    box-shadow: 0 5px 0 var(--color-secondary), 0 12px 24px rgba(0, 40, 80, 0.2);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 12px var(--gutter) 20px; gap: 2px; }
  .site-nav a { padding: 10px 14px; border-radius: var(--radius-sm); }
  /* Without JS the toggle does nothing, so show the menu inline instead. */
  .no-js .nav-toggle { display: none; }
  .no-js .site-nav { display: block; position: static; box-shadow: none; border: 0; }
  .no-js .header-inner { flex-wrap: wrap; }
}

/* --------------------------------------------------------------------------
   4. Page sections
   -------------------------------------------------------------------------- */
.section { padding: var(--section-space) 0; }
.section-band { background: var(--color-band); }
.section-tint { background: var(--color-primary-soft); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  margin-bottom: 12px;
}

.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { color: var(--color-text-muted); font-size: 1.1rem; }

.lede { font-size: 1.2rem; color: var(--color-text-muted); max-width: 680px; }

/* Page title band on inner pages */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 80px) 0 clamp(40px, 6vw, 64px);
  background: linear-gradient(180deg, var(--color-primary-soft) 0%, #fff 100%);
  border-bottom: 1px solid var(--color-border);
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lede { margin: 0; }

/* Decorative "trajectory" lines used behind heroes */
.trajectories {
  position: absolute;
  right: -40px;
  top: 0;
  width: min(620px, 70%);
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
}

/* Home hero: logo blue with white type */
.hero {
  --traj-fan: var(--color-accent-pale);
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px);
  background: var(--color-primary);
  color: #fff;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 { margin-bottom: 8px; color: #fff; }
.hero .eyebrow { color: #fff; }
.hero-expansion {
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--color-accent-light);
  margin-bottom: 20px;
  max-width: 520px;
}
.hero .lede { margin-bottom: 28px; color: #fff; }
.hero .trajectories { opacity: 0.35; }
.hero .btn-primary { background: #fff; color: var(--color-primary); }
.hero .btn-primary:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }
.hero .btn-secondary { background: transparent; color: #fff; border-color: #fff; }
.hero .btn-secondary:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.hero :focus-visible { outline-color: #fff; }
.hero-media > img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}
.affiliations li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-primary { background: var(--color-primary); }
.dot-secondary { background: var(--color-secondary); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 560px; }
  .hero .trajectories { display: none; }
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--color-primary); border-color: var(--color-primary); }
.btn-secondary:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }

/* --------------------------------------------------------------------------
   6. Cards and grids
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

a.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
}
a.card-link:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); color: var(--color-text); }
a.card-link p { color: var(--color-text-muted); }
.card-cta {
  margin-top: auto;
  padding-top: 12px;
  font-weight: 700;
  color: var(--color-secondary);
}
.card-cta::after { content: " \2192"; }

.card-icon {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 16px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.card-icon.alt { background: var(--color-secondary-soft); color: var(--color-secondary); }
.card-icon svg { width: 24px; height: 24px; }

/* Research focus areas */
.focus-card { border-top: 5px solid var(--color-primary); }
.focus-card:nth-child(even) { border-top-color: var(--color-secondary); }
.focus-number {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
  display: block;
}
.focus-card:nth-child(even) .focus-number { color: var(--color-secondary); }

/* Mission block */
.mission {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  line-height: 1.45;
  color: var(--color-primary-dark);
  border-left: 5px solid var(--color-secondary);
  padding: 4px 0 4px 24px;
  margin: 0 0 24px;
  max-width: 820px;
}

/* PI bio */
.pi-bio {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.pi-bio img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.pi-title { color: var(--color-text-muted); font-weight: 600; margin-bottom: 20px; }
@media (max-width: 720px) {
  .pi-bio { grid-template-columns: 1fr; }
  .pi-bio img { max-width: 260px; }
}

/* Team cards */
.person-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.person-card img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; background: var(--color-primary-soft); }
.person-body { padding: 20px 22px 24px; }
.person-body h3 { margin-bottom: 4px; }
.person-role {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  background: var(--color-primary-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.person-card:nth-child(even) .person-role { color: var(--color-secondary-dark); background: var(--color-secondary-soft); }
.person-body p { color: var(--color-text-muted); margin: 0; font-size: 0.98rem; }
.person-card.is-pi { border: 2px solid var(--color-primary); }

.team-group { margin-bottom: 56px; }
.team-group:last-child { margin-bottom: 0; }
.team-group > h2 { font-size: 1.5rem; margin-bottom: 24px; }

/* --------------------------------------------------------------------------
   7. Publications
   -------------------------------------------------------------------------- */
.pub-year { margin-bottom: 48px; }
.pub-year:last-child { margin-bottom: 0; }
.pub-year h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.6rem;
  color: var(--color-primary);
  margin-bottom: 20px;
}
.pub-year h2::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }

.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.pub {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.pub-authors { color: var(--color-text-muted); font-size: 0.97rem; margin: 0 0 4px; }
.pub-authors .me { color: var(--color-text); font-weight: 700; }
.pub-title { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600; margin: 0 0 4px; line-height: 1.35; }
.pub-venue { margin: 0 0 12px; color: var(--color-text-muted); }
.pub-venue cite { font-style: italic; color: var(--color-text); }
.pub-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pub-links a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--color-secondary);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}
.pub-links a:hover { background: var(--color-secondary-soft); }

.note {
  background: var(--color-secondary-soft);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 40px;
  color: var(--color-text);
}
.note a { color: var(--color-primary-dark); }

/* --------------------------------------------------------------------------
   8. News
   -------------------------------------------------------------------------- */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; max-width: 820px; }
.news-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}
.news-date {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.95rem;
  padding-top: 3px;
}
.news-item h2, .news-item h3 { font-size: 1.25rem; margin-bottom: 6px; }
.news-item p { margin: 0; color: var(--color-text-muted); }
@media (max-width: 600px) {
  .news-item { grid-template-columns: 1fr; gap: 6px; padding: 20px; }
}

/* --------------------------------------------------------------------------
   9. Contact and join
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 16px; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.contact-list .card-icon { width: 44px; height: 44px; margin: 0; }
.contact-list strong { display: block; }

.position-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.position {
  border-left: 5px solid var(--color-secondary);
  background: #fff;
  border-radius: var(--radius-sm) var(--radius) var(--radius) var(--radius-sm);
  padding: 18px 22px;
  box-shadow: var(--shadow);
}
.position:nth-child(odd) { border-left-color: var(--color-primary); }
.position h3 { margin-bottom: 4px; font-size: 1.15rem; }
.position p { margin: 0; color: var(--color-text-muted); }

.form-card { padding: clamp(24px, 4vw, 36px); }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--color-text-muted); font-size: 0.9rem; }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--color-text);
  padding: 12px 14px;
  border: 1.5px solid #9aa9ad;
  border-radius: var(--radius-sm);
  background: #fff;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px var(--color-secondary-soft);
}
.field [aria-invalid="true"] { border-color: var(--color-error); }
.field-error { color: var(--color-error); font-size: 0.92rem; margin: 6px 0 0; font-weight: 600; }
.field-error:empty { display: none; }

.form-status { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-success { background: #e4f3e9; color: var(--color-success); }
.form-status.is-error { background: #fbe9e7; color: var(--color-error); }

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-primary);
  color: #fff;
  /* Two-tone bar mirroring the header: MCW green on the outside, white against the blue. */
  border-top: 3px solid #fff;
  box-shadow: 0 -5px 0 var(--color-secondary);
  padding: 56px 0 32px;
  font-size: 0.97rem;
}
.site-footer a { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-logo { width: 180px; height: auto; margin: -12px 0 8px -12px; }
.site-footer h2 { font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; opacity: 0.9; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer p { margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid var(--color-accent-light);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-size: 0.9rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.page-hero .container { position: relative; }
/* Keep the banner graphic inside the content column on wide screens. */
.page-hero .trajectories { right: max(-40px, calc((100% - var(--container)) / 2)); }
@media (max-width: 600px) { .page-hero .trajectories { opacity: 0.25; } }

/* --------------------------------------------------------------------------
   11. Build-out: home tagline, people, publications, participate, funding
   -------------------------------------------------------------------------- */
address { font-style: normal; }

.hero-tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.3;
  color: #fff;
  margin-bottom: 28px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }

.prose { max-width: 760px; }
.prose-wide { max-width: 820px; }

/* People */
.pi-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: center;
  max-width: 860px;
}
.pi-card img { border-radius: var(--radius); aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.pi-card h3 { font-size: 1.6rem; margin-bottom: 4px; }
@media (max-width: 640px) {
  .pi-card { grid-template-columns: 1fr; }
  .pi-card img { max-width: 220px; }
}

.team-subhead { font-size: 1.25rem; margin: 8px 0 16px; }
.alumni-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-bottom: 40px;
}
.alumni-grid:last-child { margin-bottom: 0; }
.alum {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.avatar {
  flex: none;
  width: 64px; height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.alum:nth-child(even) .avatar { background: var(--color-secondary); }
.avatar-photo {
  object-fit: cover;
  background: var(--color-primary-soft);
  box-shadow: 0 0 0 3px var(--color-primary-soft);  /* keeps white-background photos from blending into the card */
}
.alum h4 { font-size: 1.1rem; margin: 2px 0 4px; }
.alum p { margin: 0; font-size: 0.95rem; }
.alum-role { color: var(--color-text-muted); }
.alum-now { margin-top: 6px !important; }
.alum-now span { font-weight: 700; color: var(--color-secondary-dark); }

.collab-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px 32px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.collab-list li {
  padding: 14px 0 14px 18px;
  border-left: 4px solid var(--color-accent-light);
}
.collab-list li:nth-child(even) { border-left-color: var(--color-secondary); }
.collab-list strong { display: block; font-size: 1.05rem; }
.collab-list span { color: var(--color-text-muted); }

/* Publications */
.pub-selected { margin-bottom: 48px; }
.pub-selected > h2 { font-size: 1.8rem; margin-bottom: 8px; }
.pub-group {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary-dark);
  margin: 28px 0 12px;
}
.pub-all {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
}
.pub-all > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  list-style: none;
}
.pub-all > summary::-webkit-details-marker { display: none; }
.pub-all > summary::before { content: "+"; font-size: 1.2rem; line-height: 1; }
.pub-all[open] > summary::before { content: "\2212"; }
.pub-all > summary:hover { background: var(--color-primary-dark); }
.pub-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 24px 0 32px;
}
.pub-jump a {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}
.pub-jump a:hover { background: var(--color-accent-pale); }
/* Keep anchor targets clear of the sticky header. */
[id] { scroll-margin-top: 112px; }

/* Participate */
.grid-involve {
  list-style: none;
  padding: 0;
  margin: 0;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 960px) { .grid-involve { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid-involve { grid-template-columns: 1fr; } }
.involve-card h3 { font-size: 1.1rem; }
.involve-card p { color: var(--color-text-muted); font-size: 0.97rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.two-col > div > .card-icon { margin-bottom: 16px; }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.check-list li { position: relative; padding-left: 34px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.form-intro { color: var(--color-text-muted); }
.field-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
}
.field-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--color-primary); }
.field-check label { font-weight: 400; margin: 0; }
.field-check .field-error { grid-column: 2; }

/* Funding */
.grant-list { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 16px; }
.grant {
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-primary);
  border-radius: var(--radius-sm) var(--radius) var(--radius) var(--radius-sm);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.grant-list:nth-of-type(2) .grant { border-left-color: var(--color-accent-light); }
.grant h3 { font-size: 1.15rem; margin-bottom: 6px; line-height: 1.35; }
.grant-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; font-size: 0.88rem; font-weight: 700; }
.grant-meta span {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}
.grant-meta .grant-id { background: var(--color-primary-dark); color: #fff; }
.grant-funder { margin: 0; color: var(--color-text-muted); }
.grant-heading { margin-top: 8px; }
.funding-note { font-size: 0.95rem; margin: 0; }

/* Footer extras */
.site-footer address { line-height: 1.5; }
.footer-links { display: flex !important; flex-wrap: wrap; gap: 6px 20px !important; }

/* Home hero art: two illustrations crossfade under the transparent logo.
   12s cycle, 6s per image with a 1s crossfade. The first image stays in flow to size the box. */
.hero-art {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), var(--shadow-hover);
}
.hero-slide {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  opacity: 0;
  animation: hero-fade 12s linear infinite;
}
.hero-slide + .hero-slide { position: absolute; inset: 0; }
.hero-slide:nth-of-type(1) { animation-delay: -1s; }
.hero-slide:nth-of-type(2) { animation-delay: 5s; }
@keyframes hero-fade {
  0% { opacity: 0; }
  8.33% { opacity: 1; }   /* 1s fade in */
  50% { opacity: 1; }     /* hold to 6s */
  58.33% { opacity: 0; }  /* 1s fade out */
  100% { opacity: 0; }
}
.hero-art.is-paused .hero-slide { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; }
  .hero-slide:nth-of-type(1) { opacity: 1; }
  .hero-art-toggle { display: none; }
}

.hero-art-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(0, 79, 138, 0.55);
  color: #fff;
  cursor: pointer;
}
.hero-art-toggle:hover { background: rgba(0, 79, 138, 0.85); }
.icon-pause { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.hero-art.is-paused .icon-pause {
  width: 0; height: 0;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 3px;
}
.hero-art-logo {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 78%;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 8px rgba(0, 40, 80, 0.35));
}

/* Collaborator cards: name links to the faculty page */
.collab-card h4 a { color: var(--color-text); text-decoration: none; }
.collab-card h4 a:hover { color: var(--color-primary); text-decoration: underline; }
.collab-card h4 a::after { content: " \2197"; font-size: 0.8em; color: var(--color-primary); }
