/* ═══════════════════════════════════════════════
   Base & Reset
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #001f13;       /* deep USF green */
  --navy2:   #002d1e;
  --accent:  #CFC493;       /* USF gold */
  --accent2: #006747;       /* USF green */
  --dark-bg: #001813;
  --mid-bg:  #003d28;
  --light-bg:#f8fafc;
  --white:   #ffffff;
  --text-d:  #111827;
  --text-m:  #374151;
  --text-l:  #f1f5f9;
  --text-dim:#94a3b8;
  --border:  #e2e8f0;
  --radius:  12px;
  --shadow:  0 4px 24px rgba(0,0,0,.08);
  --shadow-lg:0 12px 48px rgba(0,0,0,.14);
  --font:    'Inter', system-ui, sans-serif;
  --serif:   'Playfair Display', Georgia, serif;
  --nav-h:   64px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text-d);
  background: var(--navy);
  overflow: hidden;          /* body itself never scrolls */
  height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ═══════════════════════════════════════════════
   Navigation
═══════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background .3s, backdrop-filter .3s, box-shadow .3s;
}
#navbar.scrolled {
  background: rgba(0,31,19,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  height: 100%;
}
.nav-logo img {
  display: block;
  width: auto;
  height: 44px;
  max-width: 150px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,.75);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .02em;
  transition: color .2s;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: rgba(255,255,255,.85);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* ═══════════════════════════════════════════════
   Scroll Container
═══════════════════════════════════════════════ */
#scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
/* Hide scrollbar but keep functionality */
#scroll-container::-webkit-scrollbar { width: 5px; }
#scroll-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

/* ═══════════════════════════════════════════════
   Section Base
═══════════════════════════════════════════════ */
.section {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) 2rem 3rem;
  position: relative;
}

.section-inner {
  width: 100%;
  max-width: 1100px;
}

/* ── Section headers ── */
.section-header {
  margin-bottom: 3rem;
  text-align: center;
}
.section-header.light h2,
.section-header.light .section-lead { color: var(--text-l); }
.section-header.light .tag { background: rgba(255,255,255,.12); color: var(--accent); }

.tag {
  display: inline-block;
  background: rgba(0,103,71,.12);
  color: var(--accent2);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .3em .9em;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-d);
  line-height: 1.15;
  margin-bottom: .75rem;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-m);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}
.inline-link { color: var(--accent2); font-weight: 600; }
.inline-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════
   Section Themes
═══════════════════════════════════════════════ */
.s-hero  { background: var(--navy); }
.s-dark  { background: var(--dark-bg); }
.s-accent{ background: var(--mid-bg); }
.s-light { background: var(--light-bg); }

/* ═══════════════════════════════════════════════
   1. Hero Section
═══════════════════════════════════════════════ */
.s-hero {
  text-align: center;
  flex-direction: column;
  overflow: hidden;
}

/* Background video */
#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: grayscale(100%);
  /* shown only when a src is provided */
  opacity: 0;
  transition: opacity 1s ease;
}
#hero-video.loaded { opacity: 1; }

/* Green colorize layer — multiply over the grayscale video */
.hero-color-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 90, 45, 0.78);
  mix-blend-mode: multiply;
}

/* Animated glow mesh + subtle dark overlay */
.hero-bg-anim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(rgba(0,18,9,.35), rgba(0,18,9,.35)),
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(207,196,147,.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(0,103,71,.30) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 50% 90%, rgba(207,196,147,.10) 0%, transparent 70%);
  animation: heroShift 10s ease-in-out infinite alternate;
}
@keyframes heroShift {
  0%   { opacity: .8; transform: scale(1) translateY(0); }
  100% { opacity: 1;  transform: scale(1.06) translateY(-12px); }
}

/* Floating grid dots */
.hero-bg-anim::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 760px;
  padding: 0 1rem;
}
.overline {
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  margin-bottom: 2.25rem;
}
.hero-sub strong { color: rgba(255,255,255,.9); }

/* Acronym letters in the hero title */
.acr {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.hero-subtitle {
  display: block;
  font-family: var(--font);
  font-size: clamp(.9rem, 1.6vw, 1.15rem);
  font-weight: 400;
  letter-spacing: .03em;
  color: var(--accent);
  margin-top: .55rem;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; align-items: center; }

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.4);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  z-index: 3;
}
.scroll-chevron {
  width: 18px; height: 18px;
  border-right: 2px solid rgba(255,255,255,.35);
  border-bottom: 2px solid rgba(255,255,255,.35);
  transform: rotate(45deg);
  animation: bounce 1.6s ease-in-out infinite;
}
@keyframes bounce {
  0%,100% { transform: rotate(45deg) translateY(0); opacity: .4; }
  50%      { transform: rotate(45deg) translateY(5px); opacity: .8; }
}

/* ═══════════════════════════════════════════════
   Buttons
═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: all .22s;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-accent {
  background: var(--accent2);
  color: #fff;
  border-color: var(--accent2);
}
.btn-accent:hover { background: var(--accent); border-color: var(--accent); color: var(--navy); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(207,196,147,.35); }

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.3);
}
.btn-ghost:hover { background: var(--accent); border-color: var(--accent); color: var(--navy); }

.btn-outline-dark {
  background: transparent;
  color: var(--accent2);
  border-color: var(--accent2);
}
.btn-outline-dark:hover { background: var(--accent); border-color: var(--accent); color: var(--navy); transform: translateY(-1px); }

.btn-sm { padding: .55rem 1.25rem; font-size: .83rem; }

/* ═══════════════════════════════════════════════
   2. Research Grid
═══════════════════════════════════════════════ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.r-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  min-height: 360px;
  transition: transform .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.r-card.has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--r-img);
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  pointer-events: none;
  transition: opacity .3s;
}
.r-card.has-bg:hover::before { opacity: 0.16; }
.r-card > * { position: relative; }
.r-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.r-icon {
  font-size: 1.8rem;
  color: var(--accent2);
  margin-bottom: 1rem;
  line-height: 1;
}
.r-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .6rem;
  color: var(--text-d);
}
.r-card p { font-size: .9rem; color: var(--text-m); line-height: 1.65; }

/* Funding strip */
.funding-strip {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.funding-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}
.funding-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3rem;
}
.funding-logo img {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter .25s, opacity .25s;
}
.funding-logo:hover img { filter: grayscale(0%); opacity: 1; }

/* ═══════════════════════════════════════════════
   3. News
═══════════════════════════════════════════════ */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.news-item {
  display: flex;
  gap: 1.75rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  align-items: flex-start;
}
.news-item:last-child { border-bottom: none; }

.news-date {
  min-width: 56px;
  text-align: center;
  color: var(--text-dim);
  padding-top: .2rem;
}
.nm { display: block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.ny { display: block; font-size: .8rem; }

.news-body { flex: 1; }
.news-body h3 { font-size: 1rem; font-weight: 600; color: var(--text-l); margin: .4rem 0 .4rem; line-height: 1.4; }
.news-body p  { font-size: .875rem; color: rgba(255,255,255,.55); line-height: 1.6; }

.news-thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  align-self: flex-start;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2em .65em;
  border-radius: 4px;
  line-height: 1.6;
}
.badge-paper     { background: rgba(207,196,147,.2);  color: var(--accent); }
.badge-award     { background: rgba(207,196,147,.25); color: #e8d98a; }
.badge-talk      { background: rgba(0,103,71,.3);     color: #6dcfaa; }
.badge-grant     { background: rgba(0,103,71,.3);     color: #6dcfaa; }
.badge-milestone { background: rgba(255,255,255,.15); color: #fff; }
.badge-people    { background: rgba(207,196,147,.2);  color: var(--accent); }

.read-more {
  display: inline-block;
  margin-top: .5rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap .2s;
}
.read-more:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════
   4. Publications
═══════════════════════════════════════════════ */
.pub-list { display: flex; flex-direction: column; gap: 0; }
.pub-item {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.pub-item:last-child { border-bottom: none; }
.pub-year {
  min-width: 44px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent2);
  padding-top: .2rem;
  letter-spacing: .02em;
}
.pub-content h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-d);
  margin-bottom: .3rem;
  line-height: 1.45;
}
.authors { font-size: .83rem; color: var(--text-m); margin-bottom: .2rem; }
.venue   { font-size: .83rem; color: #64748b; margin-bottom: .5rem; }
.pub-links { display: flex; gap: .75rem; }
.pub-links a {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent2);
  border: 1px solid rgba(0,103,71,.4);
  padding: .15em .6em;
  border-radius: 4px;
  transition: background .2s, color .2s;
}
.pub-links a:hover { background: var(--accent2); color: #fff; }

.pub-cta { text-align: center; margin-top: 2rem; }

/* ═══════════════════════════════════════════════
   5. People
═══════════════════════════════════════════════ */
.people-group { margin-bottom: 2.5rem; }
.group-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

/* Link buttons (profile pages) */
.pi-links   { display: flex; gap: .75rem; flex-wrap: wrap; }
.pi-links a {
  font-size: .8rem; font-weight: 600; color: var(--accent);
  border: 1px solid rgba(207,196,147,.4);
  padding: .2em .7em; border-radius: 4px;
  transition: background .2s, color .2s;
}
.pi-links a:hover { background: var(--accent); color: var(--navy); }

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.team-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: background .25s, transform .25s;
}
.team-card:hover { background: rgba(255,255,255,.09); transform: translateY(-3px); }
.team-avatar {
  width: 104px; height: 104px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,103,71,.45), rgba(207,196,147,.3));
  border: 2px solid rgba(207,196,147,.45);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.5rem;
  color: var(--accent);
  margin: 0 auto .9rem;
}
.team-card h4    { font-size: .9rem; font-weight: 700; color: var(--text-l); margin-bottom: .2rem; }
.team-role       { font-size: .78rem; color: var(--accent); margin-bottom: .35rem; }
.team-topic      { font-size: .78rem; color: rgba(255,255,255,.5); line-height: 1.5; }
.team-now        { font-size: .75rem; color: var(--accent); margin-top: .4rem; font-style: italic; line-height: 1.4; }

/* Photo avatars */
.avatar-photo    { display: block; object-fit: cover; object-position: top; background: none; }
img.team-avatar  { margin: 0 auto .9rem; }
/* Homepage photos are black & white until their card is hovered or focused */
.team-card img.team-avatar { filter: grayscale(1); transition: filter .35s; }
.team-card:hover img.team-avatar,
.team-card:focus-visible img.team-avatar { filter: none; }

/* Alumni group — flat list */
.alumni-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 680px;
}
.alumni-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem .75rem;
  padding: .55rem .8rem;
  border-radius: 6px;
  background: rgba(0,0,0,.12);
}
.alumni-name  { font-weight: 600; font-size: .92rem; white-space: nowrap; }
.alumni-role  { font-size: .82rem; color: rgba(255,255,255,.6); }
.alumni-now   { font-size: .78rem; color: var(--accent); font-style: italic; margin-left: auto; }

/* ═══════════════════════════════════════════════
   6. Join Us
═══════════════════════════════════════════════ */
.join-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 680px;
  margin: 0 auto 2rem;
}
.join-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}
.join-item:last-child { border-bottom: none; }
.join-icon { font-size: 1.6rem; line-height: 1; padding-top: .1rem; flex-shrink: 0; }
.join-body h3 { font-size: 1rem; font-weight: 700; color: var(--text-d); margin-bottom: .3rem; }
.join-body p  { font-size: .9rem; color: var(--text-m); line-height: 1.65; }

.join-note {
  text-align: center;
  font-size: .9rem;
  color: var(--text-m);
  max-width: 520px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════
   7. Contact
═══════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-block h3 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}
.contact-block p { color: rgba(255,255,255,.7); font-size: .9rem; line-height: 1.8; }
.contact-link { color: var(--accent); }
.contact-link:hover { text-decoration: underline; }

.social-links { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.social-pill {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-l);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  padding: .3em .9em;
  border-radius: 999px;
  transition: background .2s;
}
.social-pill:hover { background: rgba(255,255,255,.15); }

.map-box {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  height: 360px;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.map-box iframe {
  flex: 1;
  width: 100%;
  border: 0;
  display: block;
  filter: invert(90%) hue-rotate(180deg) saturate(1.00) brightness(1.00);
}
.map-label { color: rgba(255,255,255,.45); font-size: .875rem; }

.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.3);
}

/* ═══════════════════════════════════════════════
   Responsive
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Mobile nav */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(0, 55, 30, 0.97);
    backdrop-filter: blur(16px);
    padding: .5rem 0 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    display: block;
    padding: .75rem 2rem;
    font-size: 1rem;
  }
  .nav-links a:hover,
  .nav-links a.active { color: var(--accent); }
  .nav-links a::after { display: none; }
  .hamburger { display: flex; }

  /* Sections */
  .section { padding: calc(var(--nav-h) + 1.5rem) 1.25rem 2rem; }
  .contact-grid { grid-template-columns: 1fr; }

  /* Hamburger animation */
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .pub-item { flex-direction: column; gap: .5rem; }
  .news-item { flex-direction: column; gap: .6rem; }
}

/* ═══════════════════════════════════════════════
   Person pages (person.html)
═══════════════════════════════════════════════ */
a.team-card { display: block; }

body.page-person {
  overflow: auto;
  height: auto;
  min-height: 100vh;
  background: var(--light-bg);
}
.person-hero {
  background: var(--mid-bg);
  padding: calc(var(--nav-h) + 2.5rem) 2rem 3rem;
}
.person-inner { max-width: 900px; margin: 0 auto; }
.person-back {
  display: inline-block;
  font-size: .85rem; font-weight: 600;
  color: var(--accent);
  margin-bottom: 2rem;
}
.person-back:hover { text-decoration: underline; }
.person-head { display: flex; gap: 2.25rem; align-items: center; }
.person-photo {
  width: 180px; height: 180px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid rgba(207,196,147,.45);
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 2.5rem; color: #fff;
}
.person-head h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text-l);
  line-height: 1.15;
  margin-bottom: .4rem;
}
.person-role  { color: var(--accent); font-weight: 500; margin-bottom: .35rem; }
.person-topic { color: rgba(255,255,255,.6); font-size: .92rem; line-height: 1.6; margin-bottom: 1rem; }

.person-body { padding: 3rem 2rem 4rem; }
.person-section { margin-bottom: 3rem; }
.person-section h2 {
  font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent2);
  padding-bottom: .6rem; margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.person-bio { font-size: 1.02rem; line-height: 1.8; color: var(--text-m); }
.person-bio + .person-bio { margin-top: 1rem; }
.award-list { list-style: none; }
.award-item {
  display: flex; gap: 2rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
}
.award-item:last-child { border-bottom: none; }
.award-title { font-size: .95rem; font-weight: 700; color: var(--text-d); }
.award-org   { font-size: .83rem; color: #64748b; margin-top: .15rem; }
.person-empty { font-size: .92rem; color: #64748b; }
.person-footer {
  background: var(--navy);
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  padding: 1.5rem 2rem;
}

@media (max-width: 640px) {
  .person-hero { padding: calc(var(--nav-h) + 1.5rem) 1.25rem 2.25rem; }
  .person-body { padding: 2rem 1.25rem 3rem; }
  .person-head { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .person-photo { width: 130px; height: 130px; }
  .award-item { gap: 1rem; }
}

/* ═══════════════════════════════════════════════
   Research write-ups (research.html)
═══════════════════════════════════════════════ */
a.r-card { display: block; }
.r-card .read-more { color: var(--accent2); margin-top: 1rem; }

body.page-article { background: var(--white); }
.article { padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem; }
.article-head,
.article-body,
.article-end { max-width: 720px; margin: 0 auto; }

.article-back {
  display: block;
  font-size: .85rem; font-weight: 600;
  color: var(--accent2);
  margin-bottom: 2rem;
}
.article-back:hover { text-decoration: underline; }
.article-head h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  color: var(--text-d);
  margin-bottom: 1rem;
}
.article-deck {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 1.25rem;
}
.article-meta {
  font-size: .85rem;
  color: #64748b;
  padding: .9rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

/* Body text */
.article-body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.19rem;
  line-height: 1.75;
  color: #1f2937;
}
.article-body > * + * { margin-top: 1.4rem; }
.article-body h2 {
  font-family: var(--font);
  font-size: 1.6rem; font-weight: 700;
  line-height: 1.3;
  color: var(--text-d);
  margin-top: 3rem;
}
.article-body h3 {
  font-family: var(--font);
  font-size: 1.2rem; font-weight: 700;
  line-height: 1.35;
  color: var(--text-d);
  margin-top: 2.25rem;
}
.article-body h2 + *, .article-body h3 + * { margin-top: .9rem; }
.article-body a {
  color: var(--accent2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-body a:hover { text-decoration-thickness: 2px; }
.article-body strong { font-weight: 700; color: var(--text-d); }
.article-body ul, .article-body ol { padding-left: 1.5rem; }
.article-body li + li { margin-top: .6rem; }
.article-body li::marker { color: var(--accent2); font-weight: 700; }
.article-body blockquote {
  border-left: 3px solid var(--accent2);
  padding: .2rem 0 .2rem 1.4rem;
  margin-top: 2.25rem; margin-bottom: 2.25rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--text-d);
}
.article-body figure { margin-top: 2.25rem; margin-bottom: 2.25rem; }
.article-body figure img,
.article-body figure video {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 620px;
  width: auto;
  border-radius: 8px;
  background: #000;
}
.article-body figcaption {
  font-family: var(--font);
  font-size: .85rem;
  line-height: 1.55;
  color: #64748b;
  text-align: center;
  max-width: 560px;
  margin: .9rem auto 0;
}
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* After the text: papers, other areas, call to action */
.article-section { margin-top: 3.5rem; }
.article-section h2 {
  font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent2);
  padding-bottom: .6rem; margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.article-more { display: grid; gap: 1rem; }
.article-more-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .25s, box-shadow .25s;
}
.article-more-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.article-more-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-d); margin-bottom: .4rem; }
.article-more-card p  { font-size: .9rem; line-height: 1.6; color: var(--text-m); }
.article-more-card .read-more { color: var(--accent2); }
.article-cta {
  margin-top: 3.5rem;
  padding: 2rem;
  text-align: center;
  background: var(--light-bg);
  border-radius: var(--radius);
}
.article-cta p { font-weight: 600; color: var(--text-d); margin-bottom: 1rem; }

@media (max-width: 640px) {
  .article { padding: calc(var(--nav-h) + 1.75rem) 1.25rem 3rem; }
  .article-body { font-size: 1.08rem; }
  .article-body h2 { font-size: 1.35rem; }
  .article-deck { font-size: 1.08rem; }
}

/* Write-ups with a `background` picture: the picture stays put, the text scrolls over it */
.article-bg {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  z-index: 0;
  will-change: transform;
  background-color: #05070c;
  background-size: cover;
  background-position: center;
}
.article-bg::after {              /* darkens the picture so text stays readable */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3,8,12,.55) 0%, rgba(3,8,12,.25) 45%, rgba(3,8,12,.7) 100%);
}
body.has-bg { background: #05070c; }
.has-bg .article, .has-bg .person-footer { position: relative; z-index: 1; }
.has-bg .person-footer { background: rgba(0,31,19,.85); }

/* Title sits directly on the picture and fills the first screen */
.has-bg .article-head {
  min-height: calc(100vh - var(--nav-h) - 5rem);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 3rem;
  text-shadow: 0 2px 18px rgba(0,0,0,.75);
}
.has-bg .article-back { color: var(--accent); margin-bottom: auto; }
.has-bg .article-head .tag { background: rgba(255,255,255,.14); color: var(--accent); align-self: flex-start; }
.has-bg .article-head h1 { color: #fff; }
.has-bg .article-deck { color: rgba(255,255,255,.88); }
.has-bg .article-meta { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.22); margin-bottom: 0; }

/* The text scrolls over the picture on a dark glass panel */
.has-bg .article-sheet {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 3.1rem 3.5rem;
  background: rgba(22,34,44,.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
}
.has-bg .article-body { color: rgba(255,255,255,.93); text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.has-bg .article-body h2, .has-bg .article-body h3, .has-bg .article-body strong { color: #fff; }
.has-bg .article-body a { color: var(--accent); }
.has-bg .article-body li::marker { color: var(--accent); }
.has-bg .article-body blockquote { color: #fff; border-color: var(--accent); }
.has-bg .article-body figcaption { color: rgba(255,255,255,.75); }
.has-bg .article-body hr, .has-bg .article-section h2 { border-color: rgba(255,255,255,.15); }
.has-bg .article-section h2 { color: var(--accent); }
.has-bg .pub-item { border-color: rgba(255,255,255,.12); }
.has-bg .pub-year { color: var(--accent); }
.has-bg .pub-content h4 { color: #fff; }
.has-bg .pub-content .authors { color: rgba(255,255,255,.82); }
.has-bg .pub-content .authors strong { color: #fff; }
.has-bg .pub-content .venue { color: rgba(255,255,255,.7); }
.has-bg .pub-links a { color: var(--accent); border-color: rgba(207,196,147,.45); }
.has-bg .pub-links a:hover { background: var(--accent); color: var(--navy); }
.has-bg .article-more-card { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.04); }
.has-bg .article-more-card h3 { color: #fff; }
.has-bg .article-more-card p { color: rgba(255,255,255,.7); }
.has-bg .article-more-card .read-more { color: var(--accent); }
.has-bg .article-cta { background: rgba(255,255,255,.06); }
.has-bg .article-cta p { color: #fff; }
.has-bg .article-cta .btn-outline-dark { color: var(--accent); border-color: var(--accent); }
.has-bg .article-cta .btn-outline-dark:hover { color: var(--navy); }
.has-bg .person-empty { color: rgba(255,255,255,.7); }

@media (max-width: 640px) {
  .has-bg .article { padding-left: .75rem; padding-right: .75rem; }
  .has-bg .article-head { padding-left: .5rem; padding-right: .5rem; }
  .has-bg .article-sheet { padding: 1.75rem 1.25rem 2.25rem; border-radius: 12px; }
}

/* Slow upward drift of the background picture while scrolling (set in research.js).
   The picture is 18% taller than the window, and that extra is how far it travels. */
@media (prefers-reduced-motion: no-preference) {
  .article-bg { height: 118vh; }
}

/* ═══════════════════════════════════════════════
   Animated nav logo (built by logo.js)
═══════════════════════════════════════════════ */
.logo-anim {
  display: block;
  height: 44px;
  width: auto;
  max-width: 150px;
  overflow: visible;
}
/* Wavefronts travelling down the beam from the "D" to the focus */
.logo-wave {
  fill: #0b3d2c;
  opacity: 0;
}
.play .logo-wave {
  animation: logo-wave 1s linear both;
  animation-delay: calc(var(--i) * .2s);
}
@keyframes logo-wave {
  0%   { transform: translateX(0);       opacity: 0; }
  12%  {                                 opacity: .85; }
  85%  {                                 opacity: .85; }
  100% { transform: translateX(-1950px); opacity: 0; }
}
/* The focus lights up as the waves arrive */
.logo-flash {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.play .logo-flash { animation: logo-flash 1.5s ease-out .85s both; }
@keyframes logo-flash {
  0%   { opacity: 0;  transform: scale(.2); }
  25%  { opacity: 1;  transform: scale(1); }
  55%  { opacity: .8; transform: scale(.8); }
  100% { opacity: 0;  transform: scale(1.3); }
}
/* Ripples spreading out from the focus */
.logo-ripple {
  fill: none;
  stroke: #e6dcae;
  stroke-width: 80;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.play .logo-ripple {
  animation: logo-ripple 1.7s cubic-bezier(.2,.6,.4,1) both;
  animation-delay: calc(1.05s + var(--i) * .3s);
}
@keyframes logo-ripple {
  0%   { transform: scale(.08); opacity: 0; }
  15%  {                        opacity: .9; }
  100% { transform: scale(1);   opacity: 0; }
}

/* A small background picture shown as a band across the top (backgroundMaxHeight in config.js) */
.article-bg.band {
  background-size: auto var(--band);
  background-repeat: no-repeat;
}
.article-bg.band::after {
  background: linear-gradient(180deg,
    rgba(5,7,12,.45) 0,
    rgba(5,7,12,.2) calc(var(--band) * .45),
    #05070c var(--band));
}
