:root {
  --bg: #ffffff;
  --muted: #f5f5f5;
  --text: #111;
  --subtext: #444;
  --border: rgba(0, 0, 0, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

/* Brand logo */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  height: 100px;     /* adjust if needed */
  width: auto;
  display: block;
}

.brand-title {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* Header/Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav {
  transform: translateY(8px); /* try 4px to 10px, compensate logo */
  margin-left: auto;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  line-height: 1;
}

.site-header .header-inner .nav a.nav-link,
.site-header .header-inner .nav a.nav-link:visited {
  color: #325f99;
}

.nav-link:hover {
  background: rgba(0,0,0,0.05);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

/* Hero gallery */
.hero {
  position: relative;
}

.hero-gallery {
  position: relative;
  height: min(62vh, 520px);
  min-height: 360px;
  overflow: hidden;
  background: #000;
}

/* Hero slides — shared by desktop + mobile */
.slides {
  position: absolute;
  inset: 0;
}

/* each slide is a full-size layer */
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;

  opacity: 0;
  transition: opacity 500ms ease;
}

/* active slide only */
.slide.is-active {
  opacity: 1;
}

/* crop image to fit hero box */
.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* <-- vertical/horizontal cropping */
  object-position: center;
  display: block;
}

/* overlay text */
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0.55));
}

.hero-title {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: 0.2px;
  text-shadow: var(--shadow);
}

.hero-subtitle {
  margin: 10px 0 0;
  color: rgba(255,255,255,0.9);
  font-size: clamp(16px, 2vw, 20px);
  max-width: 52ch;
  text-shadow: var(--shadow);
}

/* arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.35);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 28px;
}

.hero-arrow:hover { background: rgba(0,0,0,0.5); }
.hero-arrow.prev { left: 14px; }
.hero-arrow.next { right: 14px; }

/* dots */
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.18);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.25);
  cursor: pointer;
}

.hero-dot.is-active {
  background: rgba(255,255,255,0.9);
}

/* Sections */
.section {
  padding: 44px 0;
}

.section-muted {
  background: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-kicker {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtext);
}

.section-title {
  margin: 0 0 12px;
  font-size: 28px;
}

.section-text {
  margin: 0;
  color: var(--subtext);
  max-width: 76ch;
}

/* News */
.news-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.news-item {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.news-date {
  font-weight: 700;
  margin-right: 8px;
}

/* CTA */
.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-weight: 600;
}

.btn:hover { text-decoration: none; opacity: 0.92; }

.btn-outline {
  background: transparent;
  color: #111;
}

.nav-link-text,
.nav-link-text:link,
.nav-link-text:visited,
.nav-link-text:hover,
.nav-link-text:active {
  color: #b80c17;
  text-decoration: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  background: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-logo {
  height: 34px;
  width: auto;
  opacity: 0.95;
}

.footer-text {
  color: var(--subtext);
  font-size: 14px;
}

.footer-links {
  margin-left: auto;
  display: flex;
  gap: 12px;
  font-size: 14px;
}

/* Mobile nav */
@media (max-width: 860px) {
   /* shrink logo on mobile so it doesn’t dwarf the toggle */
  .brand-logo {
    height: 80px; /* tweak 52–64 if you want */
    width: auto;
  }
  .nav {
    display: none;
  }
  .nav.is-open {
    display: flex;
    width: 100%;
    padding: 10px 0 0;
  }
  .nav-toggle {
    transform: translateY(10px); /* try 4px to 10px, compensate logo */
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 64px;
    padding: 0;

    border: none;              /* ⬅ remove solid-line border */
    background: transparent;   /* clean look */
    border-radius: 14px;
    
    font-size: 32px;
    line-height: 1; /* critical for vertical centering */
  }
  .header-inner { flex-wrap: wrap; }

  /* 1) Give the hero a real height */
  .hero-gallery {
    position: relative;
    height: min(70svh, 140px); /* svh works better on iOS than vh */
    min-height: 60px;
    overflow: hidden;
  }
}

/* Active nav link */
.nav-link-active {
  background: rgba(0,0,0,0.06);
  text-decoration: none;
}

/* Page header */
.page-hero {
  padding: 34px 0 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.page-title {
  margin: 0;
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing: 0.2px;
}

.page-hero .container .page-title {
  color: #325f99;
}

.page-subtitle {
  margin: 10px 0 0;
  color: var(--subtext);
  max-width: 70ch;
}

/* Prose */
.prose {
  max-width: 78ch;
}
.prose p {
  margin: 0 0 14px;
  color: var(--subtext);
  font-size: 16px;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px 12px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.card-text {
  margin: 0 0 10px;
  color: var(--subtext);
}

.card-bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--subtext);
}

/* List cards (links) */
.list-cards {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.list-card {
  display: block;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
}

.list-card:hover {
  text-decoration: none;
  background: rgba(0,0,0,0.02);
}

.list-card-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.list-card-text {
  color: var(--subtext);
}

/* Responsive */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Team/People page styles */

/* MORE space between different people (cards) */
.people {
  display: grid;
  gap: 26px; /* was ~14px; increase so text doesn't hug next photo */
}

/* Make each person card feel like a block (more bottom breathing room) */
.person {
  padding: 18px;              /* was ~14px */
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03); /* subtle, helps grouping */
}

/* Optional: add a bit of spacing under the last text line inside a card */
.person-body {
  padding-bottom: 4px;
}

.person-photo {
  width: 170px;
  height: 170px;          /* ← forces same size */
  object-fit: cover;     /* ← crops instead of stretching */
  object-position: center top; /* ← better for faces */
  border-radius: 14px;
  border: 1px solid var(--border);
  display: block;
  background: #f5f5f5;
}

@media (max-width: 720px) {
  .person-photo {
    width: 100%;
    height: 240px;
  }
}

.person-meta {
  margin-top: 6px;
  display: grid;
  gap: 4px;          /* controls spacing BETWEEN rows */
  font-size: 14px;
  color: var(--subtext);
}

/* Remove default margins from children */
.person-meta p,
.person-meta div {
  margin: 0;
}

/* Publications page */
.pub-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pub-controls-label {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtext);
  margin-bottom: 6px;
}

.pub-select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  font-size: 14px;
  min-width: 220px;
}

.pub-controls-right {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.pub-link {
  text-decoration: underline;
  font-size: 14px;
}

.pub-note {
  color: var(--subtext);
  font-size: 14px;
}

.pub-section-title {
  margin: 22px 0 10px;
  font-size: 22px;
}

.pub-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.pub-item {
  display: grid;
  gap: 6px;
}

.pub-citation {
  color: var(--subtext);
}

.pub-actions {
  display: flex;
  gap: 12px;
  font-size: 14px;
}

.pub-actions a {
  text-decoration: underline;
}

.pub-year {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 8px 10px;
}

.pub-year summary {
  cursor: pointer;
  font-weight: 700;
  padding: 6px 6px;
}

.pub-year .pub-list {
  margin-top: 8px;
  padding-left: 22px;
}

.pub-backtotop {
  margin-top: 18px;
  font-size: 14px;
}

.pub-backtotop a {
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 720px) {
  .pub-select {
    width: 100%;
    min-width: 0;
  }
}
