/* Swiss-inspired SPA shell — PBJ palette as disciplined accents */

:root {
  color-scheme: light;
  --ink: #1c1b19;
  --muted: #4a4844;
  --paper: #f4f2ed;
  --paper-deep: color-mix(in srgb, var(--wheat) 14%, var(--paper));
  --line: #c8c4bc;
  --ash: #9caa9c;
  --rose: #c4999b;
  --blue: #5171a5;
  --wheat: #e6d3a3;
  --rose-ink: color-mix(in srgb, var(--rose) 46%, var(--ink));
  --grid-gap: clamp(1rem, 2.5vw, 2rem);
  --page-pad: clamp(1.25rem, 4vw, 3.5rem);
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --max: 1200px;
  --radius: 14px;
  --radius-lg: 22px;
}

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

html {
  scroll-behavior: smooth;
}

body.spa {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

.skip-link {
  position: absolute;
  z-index: 1000;
  left: var(--page-pad);
  top: -4rem;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 1rem;
}

.spa-frame {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* —— Header —— */
.spa-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, white);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.spa-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem var(--page-pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.spa-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.spa-brand img {
  width: min(300px, 42vw);
  height: auto;
}

.spa-brand:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.spa-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.spa-nav button {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 0;
}

.spa-nav button:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ash) 22%, transparent);
}

.spa-nav button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.spa-nav button[aria-current="page"] {
  color: var(--ink);
  border-color: var(--ink);
  background: white;
}

.spa-rule {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--blue) 0 28%,
    var(--rose) 28% 52%,
    var(--wheat) 52% 72%,
    var(--ash) 72% 100%
  );
}

/* —— Main views —— */
main#main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

[data-page] {
  display: flex;
  flex-direction: column;
  flex: 1;
  animation: spa-in 0.35s ease-out;
}

.spa-main {
  flex: 1;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: clamp(1.75rem, 4vw, 3rem) var(--page-pad) clamp(3rem, 6vw, 5rem);
}

[data-page][hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  [data-page] {
    animation: none;
  }
}

@keyframes spa-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.view-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.view-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  max-width: 20ch;
}

/* Home */
.home-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2rem);
  align-items: stretch;
  width: 100%;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: clamp(360px, 48vh, 560px);
  }
}

.home-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.25rem, 5vw, 3.75rem) var(--page-pad);
  background: var(--paper);
}

@media (min-width: 900px) {
  .home-hero-copy {
    padding: clamp(2.5rem, 6vh, 4.5rem) clamp(2rem, 6vw, 5rem);
    border-right: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  }
}

.home-tagline {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
  color: var(--ink);
}

.home-hero-lead {
  margin: clamp(0.75rem, 1.5vw, 1rem) 0 0;
  max-width: 42ch;
  font-size: clamp(1.15rem, 1.65vw, 1.35rem);
  font-weight: 500;
  line-height: 1.45;
  text-wrap: balance;
  color: var(--ink);
}

.home-hero-intro {
  margin: clamp(1rem, 2vw, 1.35rem) 0 0;
  max-width: 48ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: var(--muted);
}

.home-hero-figure {
  margin: 0;
  min-height: clamp(220px, 52vw, 360px);
  display: flex;
  flex-direction: column;
}

@media (min-width: 900px) {
  .home-hero-figure {
    min-height: 0;
  }
}

.home-hero-figure-slot {
  flex: 1;
  min-height: inherit;
  border-radius: 0;
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 18% 12%, color-mix(in srgb, var(--wheat) 55%, white), transparent 62%),
    radial-gradient(70% 55% at 88% 78%, color-mix(in srgb, var(--rose) 28%, transparent), transparent),
    color-mix(in srgb, var(--paper-deep) 88%, white);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 75%, transparent);
}

@media (min-width: 900px) {
  .home-hero-figure-slot {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: none;
    height: 100%;
  }
}

.home-hero-figure img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center 42%;
  border-radius: inherit;
}

/* Home — content sections below the hero */
.home-areas,
.home-featured,
.home-news,
.home-lead {
  padding-block: clamp(2.5rem, 6.5vw, 4.5rem);
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.home-areas:first-child {
  border-top: 0;
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.home-areas-intro h2,
.home-section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.18;
  color: var(--ink);
}

.home-areas-lead {
  margin: clamp(0.85rem, 1.6vw, 1.15rem) 0 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.6;
}

/* Section head with a trailing "see all" link */
.home-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

a.linkish {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 45%, transparent);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

a.linkish:hover {
  color: var(--ink);
  border-color: var(--ink);
}

a.linkish:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Research focus areas */
.home-area-grid {
  list-style: none;
  margin: clamp(1.75rem, 3.5vw, 2.75rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (min-width: 720px) {
  .home-area-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.home-area-card {
  display: flex;
}

.home-area-link {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
  text-decoration: none;
  color: inherit;
  background: color-mix(in srgb, var(--paper-deep) 80%, white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.2s ease;
}

.home-area-link::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--rose);
}

.home-area-card:nth-child(2) .home-area-link::before {
  background: var(--blue);
}

.home-area-card:nth-child(3) .home-area-link::before {
  background: var(--ash);
}

.home-area-link:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
  box-shadow: 0 12px 28px -18px color-mix(in srgb, var(--ink) 55%, transparent);
}

.home-area-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.home-area-title {
  margin: 0;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.home-area-blurb {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.home-area-meta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}

.home-area-arrow {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-area-link:hover .home-area-arrow {
  transform: translateX(3px);
}

/* Featured publications */
.home-pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.home-pub-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(0.85rem, 2.5vw, 2rem);
  padding: clamp(1.1rem, 2.2vw, 1.5rem) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.home-pub-year {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.2;
  color: color-mix(in srgb, var(--blue) 55%, var(--line));
  min-width: 4ch;
  font-variant-numeric: tabular-nums;
}

.home-pub-body {
  min-width: 0;
}

.home-pub-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.15rem);
  font-weight: 600;
  line-height: 1.35;
}

.home-pub-title a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.home-pub-title a:hover {
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 45%, transparent);
}

.home-pub-title a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.home-pub-source {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.home-pub-authors {
  margin-right: 0.4rem;
}

.home-pub-journal {
  color: color-mix(in srgb, var(--muted) 80%, var(--ink));
}

/* Latest news */
.home-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.home-news-item {
  padding: clamp(1.1rem, 2.2vw, 1.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.home-news-date {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose);
}

.home-news-body {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 70ch;
}

/* Meet the team teaser */
.home-lead {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
}

@media (min-width: 760px) {
  .home-lead {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  }
}

.home-lead-portrait {
  margin: 0;
  max-width: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

.home-lead-portrait img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
}

.home-lead-name {
  margin: 0.85rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 0.9vw, 1.5rem);
  font-weight: 600;
  color: var(--ink);
}

.home-lead-role {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose);
}

.home-lead-bio {
  margin: 0 0 1.25rem;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.65;
}

/* Get involved (reuses .team-cta visual) */
.home-recruit {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.home-recruit-lead {
  font-weight: 500;
  color: var(--ink) !important;
  margin-bottom: 0.75rem !important;
}

.home-recruit-options {
  margin: 0 0 1.5rem;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.6;
}

.home-recruit-options li {
  margin-bottom: 0.4rem;
}

.home-recruit-options li:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .home-area-link,
  .home-area-arrow {
    transition: none;
  }

  .home-area-link:hover {
    transform: none;
  }

  .home-area-link:hover .home-area-arrow {
    transform: none;
  }
}

/* Swiss blocks */
.swiss-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.swiss-grid.cols-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .swiss-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.swiss-block h2 {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.swiss-block p,
.swiss-block li {
  color: var(--muted);
}

.swiss-block p {
  margin: 0 0 1rem;
}

.swiss-block p:last-child {
  margin-bottom: 0;
}

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

.swiss-list li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.swiss-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  width: 6px;
  height: 6px;
  background: var(--wheat);
  border: 1px solid var(--ink);
}

/* Pillars */
.pillar-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .pillar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pillar {
  background: white;
  padding: 1.25rem 1.35rem;
  min-height: 7rem;
}

.pillar span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: color-mix(in srgb, var(--ash) 55%, var(--ink));
  margin-bottom: 0.5rem;
}

.pillar p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Methods */
.method-row {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 1rem;
}

@media (min-width: 720px) {
  .method-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.method-cell {
  background: var(--paper);
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Team */
.team-intro {
  margin: 0.85rem 0 0;
  max-width: 54ch;
  font-size: clamp(1.05rem, 1rem + 0.45vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* —— Lab lead feature —— */
.team-feature {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
  .team-feature {
    grid-template-columns: minmax(260px, 360px) 1fr;
    align-items: start;
    gap: clamp(2rem, 5vw, 4rem);
  }
}

.team-feature-portrait {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--ash) 24%, white);
}

.team-feature-portrait::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--blue) 0 28%,
    var(--rose) 28% 52%,
    var(--wheat) 52% 72%,
    var(--ash) 72% 100%
  );
}

.team-feature-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.team-feature-body {
  padding-top: 0.15rem;
}

.team-feature .team-feature-role {
  margin: 0 0 0.55rem;
  max-width: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--rose-ink);
}

.team-feature h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.team-feature-creds {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.team-feature-creds li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.team-feature-creds li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ash);
}

.team-feature-creds li:nth-child(2)::before {
  background: var(--rose);
}

.team-feature-creds li:nth-child(3)::before {
  background: var(--blue);
}

.team-feature p {
  margin: 0;
  max-width: 62ch;
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--muted);
  text-wrap: pretty;
}

/* —— Section scaffolding —— */
.team-section {
  margin-bottom: clamp(2.75rem, 5.5vw, 4rem);
}

.team-section-title {
  margin: 0 0 clamp(1.5rem, 3vw, 2rem);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1vw, 1.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: balance;
}

/* —— Research trainee cards —— */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  align-items: start;
}

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

@media (min-width: 960px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--paper) 35%, white);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.45s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--ash) 55%, var(--line));
  box-shadow: 0 18px 40px -26px color-mix(in srgb, var(--ink) 60%, transparent);
}

.team-card-portrait {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: color-mix(in srgb, var(--ash) 26%, white);
}

.team-card:nth-child(4n + 2) .team-card-portrait {
  background: color-mix(in srgb, var(--wheat) 34%, white);
}

.team-card:nth-child(4n + 3) .team-card-portrait {
  background: color-mix(in srgb, var(--blue) 16%, white);
}

.team-card:nth-child(4n) .team-card-portrait {
  background: color-mix(in srgb, var(--rose) 22%, white);
}

.team-card-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.team-card-portrait--initials {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: color-mix(in srgb, var(--blue) 60%, var(--ink));
}

.team-card-body {
  display: flex;
  flex-direction: column;
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
}

.team-card .team-card-role {
  margin: 0 0 0.3rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--rose-ink);
}

.team-card h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.team-card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

/* —— Clinical & undergraduate roster —— */
.team-roster {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.25rem);
}

@media (min-width: 680px) {
  .team-roster {
    grid-template-columns: repeat(2, 1fr);
  }
}

.team-roster-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: clamp(1.15rem, 2.2vw, 1.45rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper) 35%, white);
}

.team-monogram {
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--ash) 50%, var(--ink));
  background: color-mix(in srgb, var(--ash) 22%, white);
}

.team-roster-item:nth-child(3n + 2) .team-monogram {
  color: var(--rose-ink);
  background: color-mix(in srgb, var(--rose) 20%, white);
}

.team-roster-item:nth-child(3n) .team-monogram {
  color: color-mix(in srgb, var(--blue) 62%, var(--ink));
  background: color-mix(in srgb, var(--blue) 14%, white);
}

.team-roster-head {
  margin-bottom: 0.5rem;
}

.team-roster-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.25;
}

.team-roster-role {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rose-ink);
}

.team-roster-bio {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* —— Previous students —— */
.team-alumni-note {
  margin: -0.75rem 0 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.team-alumni {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-alumni li {
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  background: color-mix(in srgb, var(--ash) 16%, white);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
}

/* —— Join the lab CTA —— */
.team-cta {
  position: relative;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.85rem, 4vw, 3rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--wheat) 36%, transparent), transparent 58%),
    radial-gradient(90% 90% at 0% 100%, color-mix(in srgb, var(--rose) 20%, transparent), transparent 55%),
    color-mix(in srgb, var(--ash) 12%, white);
}

.team-cta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--blue) 0 28%,
    var(--rose) 28% 52%,
    var(--wheat) 52% 72%,
    var(--ash) 72% 100%
  );
}

.team-cta-body {
  max-width: 52ch;
}

.team-cta-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.team-cta p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  line-height: 1.6;
}

.team-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
  text-decoration: none;
  background: var(--blue);
  border-radius: 999px;
  transition:
    background 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.team-cta-button span {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.team-cta-button:hover {
  color: white;
  background: var(--ink);
  transform: translateY(-2px);
}

.team-cta-button:hover span {
  transform: translateX(3px);
}

.team-cta-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .team-card,
  .team-cta-button,
  .team-cta-button span {
    transition: none;
  }

  .team-card:hover,
  .team-cta-button:hover {
    transform: none;
  }

  .team-cta-button:hover span {
    transform: none;
  }
}

/* News */
.news-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.news-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.25rem, 2.5vw, 1.75rem) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.news-num {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1;
  color: color-mix(in srgb, var(--blue) 45%, var(--line));
  min-width: 2.5ch;
}

.news-date {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose);
}

.news-item p {
  margin: 0;
  color: var(--muted);
  max-width: 65ch;
}

/* Contact */
.contact-split {
  display: grid;
  gap: var(--grid-gap);
}

@media (min-width: 800px) {
  .contact-split {
    grid-template-columns: 1fr 0.9fr;
  }
}

.contact-panel {
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: white;
}

.contact-panel h2 {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.contact-panel ul {
  margin: 0 0 1.5rem;
  padding-left: 1.1rem;
  color: var(--muted);
}

.contact-cta {
  display: inline-block;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

.contact-cta:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.contact-cta:focus-visible {
  outline: 2px solid var(--wheat);
  outline-offset: 3px;
}

.contact-recruit-lead {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--ink);
}

.contact-email-line {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-fields {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-fields .field {
  margin: 0;
}

.contact-fields label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
}

.contact-fields .req {
  color: color-mix(in srgb, var(--rose) 70%, var(--ink));
  font-weight: 700;
}

.contact-fields .optional {
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
}

.contact-fields input,
.contact-fields select,
.contact-fields textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--line) 80%, var(--ink));
  background: white;
  color: var(--ink);
}

.contact-fields textarea {
  resize: vertical;
  min-height: 5rem;
  line-height: 1.5;
}

.contact-fields input:focus-visible,
.contact-fields select:focus-visible,
.contact-fields textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-color: color-mix(in srgb, var(--blue) 55%, var(--line));
}

.contact-form-actions {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}

.contact-form-actions .contact-cta {
  cursor: pointer;
  font: inherit;
  border: 1px solid transparent;
}

/* Footer */
.spa-footer {
  border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  background: color-mix(in srgb, white 92%, var(--paper-deep));
  margin-top: auto;
}

.spa-footer-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--page-pad);
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

@media (min-width: 720px) {
  .spa-footer-main {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 0.75fr) minmax(0, 1.3fr);
    align-items: start;
  }
}

.spa-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.spa-footer-logo {
  display: inline-block;
  width: fit-content;
  line-height: 0;
}

.spa-footer-logo img {
  width: clamp(5rem, 12vw, 7.5rem);
  height: auto;
}

.spa-footer-name {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.spa-footer-tagline {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.spa-footer-mission {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 32ch;
}

.spa-footer-email {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
}

.spa-footer-email a {
  font-weight: 600;
}

.spa-footer-email--prominent {
  margin-top: 0.5rem;
  font-size: 1rem;
}

.spa-footer-heading {
  margin: 0 0 1rem;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.spa-footer-links .spa-footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.spa-footer-contact-lead {
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 42ch;
}

.footer-contact-form .contact-fields {
  gap: 0.85rem;
}

.footer-contact-form .contact-fields textarea {
  min-height: 4.5rem;
}

.footer-contact-note {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 38ch;
}

.spa-footer-contact-more {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.spa-footer-contact-more .linkish {
  display: inline;
  font: inherit;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  cursor: pointer;
  color: var(--blue);
  text-decoration: none;
}

.spa-footer-contact-more .linkish:hover {
  color: var(--ink);
}

.spa-footer-bar {
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.spa-footer-bar .spa-footer-copy {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--page-pad) 1.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.spa-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.spa-footer-nav button {
  font: inherit;
  font-size: inherit;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.spa-footer-nav button:hover {
  color: var(--ink);
}

/* Accessible hidden text */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Publication database */
.pub-db {
  margin-top: 2rem;
}

/* Toolbar: search + record count */
.pub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.pub-search {
  position: relative;
  flex: 1 1 18rem;
  max-width: 28rem;
}

.pub-search-icon {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.pub-search-input {
  width: 100%;
  padding: 0.7rem 0.9rem 0.7rem 2.5rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 60%, white);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pub-search-input::placeholder {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}

.pub-search-input:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent);
}

.pub-count {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Topic filter chips */
.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.pub-filter {
  padding: 0.35rem 0.85rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.pub-filter:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ash) 70%, var(--line));
}

.pub-filter.is-active {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}

.pub-filter:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Table */
.pub-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.pub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pub-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0;
  text-align: left;
  background: var(--paper-deep);
  border-bottom: 2px solid color-mix(in srgb, var(--ash) 55%, var(--line));
}

.pub-sort,
.pub-table thead th:not(:has(.pub-sort)) {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pub-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: inherit;
  transition: color 0.15s ease;
}

.pub-sort:hover {
  color: var(--ink);
}

.pub-sort.is-active {
  color: var(--ink);
}

.pub-sort:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pub-sort-arrow {
  width: 0;
  height: 0;
  opacity: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  transition: opacity 0.15s ease;
}

.pub-sort.is-active .pub-sort-arrow {
  opacity: 1;
}

.pub-sort.is-active[data-dir="asc"] .pub-sort-arrow {
  border-bottom: 5px solid currentColor;
}

.pub-sort.is-active[data-dir="desc"] .pub-sort-arrow {
  border-top: 5px solid currentColor;
}

.pub-table tbody tr {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  transition: background-color 0.12s ease;
}

.pub-table tbody tr:last-child {
  border-bottom: 0;
}

.pub-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--paper) 45%, white);
}

.pub-table tbody tr:hover {
  background: color-mix(in srgb, var(--wheat) 18%, white);
}

.pub-table td {
  padding: 0.9rem 1rem;
  vertical-align: top;
}

.pub-col-year {
  width: 4.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.pub-col-cite {
  width: 5.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.pub-table thead .pub-col-cite .pub-sort {
  justify-content: flex-end;
  width: 100%;
}

.pub-cite-zero {
  color: color-mix(in srgb, var(--muted) 60%, transparent);
}

.pub-col-topic {
  width: 11rem;
}

.pub-row-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

a.pub-row-title {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 40%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease;
}

a.pub-row-title:hover,
a.pub-row-title:focus-visible {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.pub-row-source {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--muted);
}

.pub-row-journal {
  color: var(--ink);
}

.pub-row-authors + .pub-row-journal::before {
  content: "·";
  margin: 0 0.4rem;
  color: color-mix(in srgb, var(--ink) 35%, transparent);
  font-style: normal;
}

.pub-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--rose-ink);
  background: color-mix(in srgb, var(--rose) 18%, white);
  border: 1px solid color-mix(in srgb, var(--rose) 35%, transparent);
  border-radius: 999px;
}

.pub-empty {
  margin: 0;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Responsive: collapse table into stacked cards */
@media (max-width: 760px) {
  .pub-table-wrap {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .pub-table,
  .pub-table tbody,
  .pub-table tr,
  .pub-table td {
    display: block;
    width: auto;
  }

  .pub-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .pub-table tbody tr {
    margin-bottom: 1rem;
    padding: 0.5rem 0.25rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .pub-table tbody tr:nth-child(even) {
    background: transparent;
  }

  .pub-table td {
    padding: 0.3rem 1rem;
    text-align: left;
  }

  .pub-col-title {
    order: -1;
  }

  .pub-col-year,
  .pub-col-topic,
  .pub-col-cite {
    width: auto;
    text-align: left;
  }

  .pub-col-year::before,
  .pub-col-cite::before {
    content: attr(data-label) ": ";
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .pub-col-cite {
    font-variant-numeric: tabular-nums;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pub-search-input,
  .pub-filter,
  .pub-sort,
  .pub-sort-arrow,
  .pub-table tbody tr,
  a.pub-row-title {
    transition: none;
  }
}
