@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:wght@400;700&display=swap');

:root {
  --green-dark:   #1B5E20;
  --green-main:   #2E7D32;
  --green-mid:    #388E3C;
  --green-light:  #66BB6A;
  --green-pale:   #E8F5E9;
  --bg:           #F9FAFB;
  --surface:      #FFFFFF;
  --text:         #1A1A2E;
  --text-muted:   #6B7280;
  --border:       #E5E7EB;
  --shadow:       0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.14);
  --radius:       10px;
  --radius-lg:    16px;
  --max-width:    1200px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding-top: 68px;
}

h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 2.8rem;
  color: var(--text);
}

h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 2rem;
}

h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
}

a {
  color: var(--green-main);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--green-pale);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading::before {
  content: '';
  width: 4px;
  height: 100%;
  align-self: stretch;
  background: var(--green-main);
  flex-shrink: 0;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.badge {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-dark);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.btn {
  display: inline-block;
  background: var(--green-main);
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  text-decoration: none;
}

.btn:hover {
  background: var(--green-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--green-main);
  color: var(--green-main);
}

.btn-outline:hover {
  background: var(--green-pale);
}

/* —— Navigation —— */
nav#site-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 68px;
  transition: background 0.2s, box-shadow 0.2s;
}

nav#site-nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
}

.nav-logo img {
  height: 44px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--green-main);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.18s ease;
}

.nav-links a:hover {
  color: var(--green-main);
  background: transparent;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--green-main);
  font-weight: 600;
  background: transparent;
}

.nav-links a.active::after {
  transform: scaleX(1);
}

/* "Join us" CTA — filled pill, always green, no underline indicator */
.nav-links a.nav-cta {
  background: var(--green-main);
  color: #ffffff;
  border-radius: 20px;
  padding: 7px 18px;
  font-weight: 600;
  transition: background 0.15s;
}

.nav-links a.nav-cta::after {
  display: none;
}

.nav-links a.nav-cta:hover {
  background: var(--green-dark);
  color: #ffffff;
}

.nav-links a.nav-cta.active {
  background: var(--green-dark);
  color: #ffffff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 24px 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
  }

  /* On mobile, the underline pseudo-element doesn't apply cleanly */
  /* Use a left border instead for the active item */
  .nav-links a::after { display: none; }
  .nav-links a.active {
    background: var(--green-pale);
    border-radius: 8px;
  }
  /* Keep the CTA pill on mobile */
  .nav-links a.nav-cta,
  .nav-links a.nav-cta.active {
    background: var(--green-main);
    color: white;
    border-radius: 20px;
    text-align: center;
    margin: 4px 0;
  }
}

/* ── Footer ── */
footer {
  background: var(--green-dark);
  border-top: 3px solid var(--green-mid);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}

.footer-label {
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 480px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* —— Home page —— */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 60%, #388e3c 100%);
  overflow: hidden;
}

/* Hero background overlay — higher opacity so drone image shows through */
.hero { position: relative; overflow: hidden; }
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background-image: url('../images/content/homepage_hero_drone_farm.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  z-index: 0;
}
.hero-content { position: relative; z-index: 1; }

.hero__content,
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px 80px;
  max-width: 800px;
}

.hero__eyebrow,
.hero-eyebrow {
  color: var(--green-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1,
.hero-title {
  color: #fff;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  max-width: 700px;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero__lead,
.hero-sub {
  color: #fff;
  opacity: 0.92;
  max-width: 580px;
  font-size: 1.08rem;
  line-height: 1.75;
  margin-bottom: 32px;
}

.hero__actions,
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.btn-outline--light {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn-outline--light:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
}

.hero__scroll-icon,
.scroll-arrow {
  display: block;
  width: 24px;
  height: 24px;
  border-right: 2px solid rgba(255, 255, 255, 0.85);
  border-bottom: 2px solid rgba(255, 255, 255, 0.85);
  transform: rotate(45deg);
  animation: hero-scroll-bounce 2s ease-in-out infinite;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
}

@keyframes hero-scroll-bounce {
  0%, 100% {
    transform: rotate(45deg) translate(0, 0);
    opacity: 0.6;
  }
  50% {
    transform: rotate(45deg) translate(6px, 6px);
    opacity: 1;
  }
}

/* Stat pills */
.hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 36px;
}
.hero-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 40px;
  padding: 10px 22px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-stat-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}
.hero-stat-lbl {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.pipeline-section {
  padding: 72px 0;
  background: var(--green-pale);
}
.pipeline-intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 52px;
  color: var(--text-muted);
  font-size: 1.02rem;
}
.pipeline-track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}
.pipeline-step {
  flex: 1;
  max-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 8px;
}
.pipeline-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--green-main);
  flex-shrink: 0;
}
.pipeline-step-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.pipeline-step-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.pipeline-connector {
  flex-shrink: 0;
  width: 32px;
  height: 2px;
  background: var(--green-light);
  margin-top: 32px;   /* aligns with center of the 64px icon */
  opacity: 0.7;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}
.pillar-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border-top: 4px solid var(--green-main);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.pillar-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.pillar-card-icon {
  width: 52px;
  height: 52px;
  background: var(--green-pale);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--green-main);
}
.pillar-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.pillar-card-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

@media (max-width: 1024px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .pillar-grid .pillar-card:last-child { grid-column: 1 / -1; max-width: 480px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .pillar-grid { grid-template-columns: 1fr; }
}

/* Mobile: stack pipeline steps vertically */
@media (max-width: 768px) {
  .pipeline-track {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .pipeline-step { max-width: 320px; flex-direction: row; text-align: left; gap: 16px; padding: 12px 0; }
  .pipeline-icon { margin-bottom: 0; flex-shrink: 0; width: 52px; height: 52px; }
  .pipeline-connector {
    width: 2px;
    height: 24px;
    margin: 0 0 0 25px; /* aligns under the icon center */
  }
}

/* White-outline button variant for the hero */
.btn-outline-white {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: #ffffff;
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

/* Remove old .stats-bar rule if it exists */
.stats-bar { display: none; }

/* Research blocks */
#research .section-heading {
  margin-bottom: 16px;
}

/* ── Magazine research blocks ── */
.magazine-blocks {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  margin-top: 48px;
}

.mag-block {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  cursor: default;
}

.mag-block-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Left-side overlay (text on the left) */
.mag-block-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(27, 94, 32, 0.88) 0%,
    rgba(27, 94, 32, 0.65) 35%,
    rgba(27, 94, 32, 0.18) 65%,
    transparent 100%
  );
}

/* Right-side overlay (text on the right) */
.mag-block-overlay.right {
  background: linear-gradient(
    to left,
    rgba(27, 94, 32, 0.88) 0%,
    rgba(27, 94, 32, 0.65) 35%,
    rgba(27, 94, 32, 0.18) 65%,
    transparent 100%
  );
}

.mag-block-content {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 52%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 48px;
}

.mag-block-content.right {
  left: auto;
  right: 0;
  text-align: right;
  align-items: flex-end;
}

.mag-block-num {
  font-family: 'Merriweather', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 10px;
}

.mag-block-title {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 14px;
  max-width: 340px;
}

.mag-block-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  max-width: 360px;
}

/* Mobile: full overlay, content full-width */
@media (max-width: 768px) {
  .mag-block { height: 260px; }
  .mag-block-overlay,
  .mag-block-overlay.right {
    background: linear-gradient(
      to top,
      rgba(27, 94, 32, 0.92) 0%,
      rgba(27, 94, 32, 0.6) 50%,
      rgba(27, 94, 32, 0.15) 100%
    );
  }
  .mag-block-content,
  .mag-block-content.right {
    left: 0;
    right: 0;
    width: 100%;
    top: auto;
    bottom: 0;
    padding: 24px 20px;
    text-align: left;
    align-items: flex-start;
  }
  .mag-block-title { font-size: 1.05rem; }
  .mag-block-text { font-size: 0.82rem; display: none; }
}

/* ── SoilX Lab section ── */
.lab-section {
  padding: 88px 0;
  background: #ffffff;
}
.lab-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.lab-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-main);
  margin-bottom: 10px;
}
.lab-heading {
  font-family: 'Merriweather', serif;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 28px;
}
.lab-stat-block {
  background: var(--green-dark);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: inline-block;
}
.lab-stat-num {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 6px;
}
.lab-stat-x {
  color: var(--green-light);
  margin: 0 4px;
}
.lab-stat-unit {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em;
}
.lab-description {
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 420px;
}

/* Image grid: 1 tall image on the left, 2 stacked on the right */
.lab-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 10px;
  height: 380px;
}
.lab-img-main {
  grid-row: span 2;
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.lab-img-pair {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 380px;
}
.lab-img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}
.lab-img-pair .lab-img {
  flex: 1;
  min-height: 0;
}

@media (max-width: 768px) {
  .lab-section { padding: 52px 0; }
  .lab-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .lab-stat-block { display: block; }
  .lab-description { max-width: 100%; }

  /* Image grid: show only the main image, hide the pair */
  .lab-image-grid {
    display: block;
    height: auto;
  }
  .lab-img-main {
    display: block;
    width: 100%;
    height: 220px;
    grid-row: unset;
  }
  .lab-img-pair {
    display: none;
  }
}

@media (max-width: 480px) {
  .lab-img-main { height: 180px; }
}

/* Publications teaser */
.pub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.pub-card {
  display: block;
  padding: 24px;
  border-top: 4px solid var(--green-main);
  text-decoration: none;
  color: inherit;
}

.pub-card:hover {
  text-decoration: none;
  color: inherit;
}

.pub-card .badge {
  margin-bottom: 14px;
}

.pub-card h3 {
  font-size: 1.05rem;
  line-height: 1.45;
  margin-bottom: 12px;
  color: var(--text);
}

.pub-card__venue {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.pub-teaser__link-wrap {
  text-align: center;
  margin-top: 36px;
}

.pub-teaser__link {
  font-weight: 600;
  font-size: 1rem;
}

.pub-strip {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pub-strip-item {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.pub-strip-item:first-child {
  border-top: 1px solid var(--border);
}
.pub-strip-item:hover {
  background: var(--surface);
  border-radius: var(--radius);
}
.pub-strip-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--green-main);
  flex-shrink: 0;
  align-self: stretch;
  min-height: 40px;
}
.pub-strip-body {
  flex: 1;
}
.pub-strip-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}
.pub-strip-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.pub-year-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
}
.pub-badge-journal {
  background: var(--green-pale);
  color: var(--green-dark);
}
.pub-badge-review {
  background: #EEF2FF;
  color: #3730A3;
}
.pub-strip-link {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-main);
  text-decoration: none;
  white-space: nowrap;
  padding: 0 4px;
  transition: color 0.15s;
}
.pub-strip-link:hover { color: var(--green-dark); }

@media (max-width: 600px) {
  .pub-strip-link { display: none; }
}

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

@media (max-width: 768px) {
  .pub-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats { gap: 10px; }
}

/* Mobile: stack hero stat pills 2×2 */
@media (max-width: 480px) {
  .hero-stats { gap: 8px; }
  .hero-stat-pill { padding: 8px 16px; }
  .hero-stat-num { font-size: 1.1rem; }
}

/* —— Team page —— */
.page-hero {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  text-align: center;
  padding: 0 24px;
}

.page-hero__inner {
  max-width: 640px;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}

.page-hero__subtitle {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* —— Media page —— */
.media-page {
  padding-bottom: 64px;
}

.media-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 32px 0;
}

.media-tab {
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.media-tab__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  vertical-align: text-bottom;
}

.media-tab__icon svg {
  width: 18px;
  height: 18px;
}

.media-tab:hover {
  color: var(--text);
}

.media-tab.is-active {
  background: var(--green-main);
  color: #fff;
  border-color: var(--green-main);
}

.media-tab-panel {
  padding-bottom: 16px;
}

.media-tab-panel[hidden] {
  display: none;
}

/* YouTube facade */
.yt-facade {
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.2s;
}

.yt-facade:hover img {
  filter: brightness(0.75);
}

.yt-facade__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(0, 0, 0, 0.32);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.yt-facade__play::after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

.yt-facade:hover .yt-facade__play {
  transform: translate(-50%, -50%) scale(1.1);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.video-card {
  padding: 0;
  overflow: hidden;
}

.video-card .yt-facade {
  border-radius: var(--radius) var(--radius) 0 0;
}

.video-card__title {
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 20px;
  margin: 0;
  color: var(--text);
}

/* Gallery masonry */
.gallery-masonry {
  column-count: 3;
  column-gap: 12px;
}

.gallery-masonry img {
  width: 100%;
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  transition: opacity 0.15s;
}

.gallery-masonry img:hover {
  opacity: 0.9;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  line-height: 1;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__close {
  top: 16px;
  right: 16px;
  font-size: 2rem;
  width: 48px;
  height: 48px;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  width: 52px;
  height: 52px;
}

.lightbox__prev {
  left: 16px;
}

.lightbox__next {
  right: 16px;
}

/* Audio */
.audio-list {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.audio-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 24px;
}

.audio-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-main);
  font-size: 0;
  flex-shrink: 0;
}

.audio-card__icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.audio-card__label {
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.audio-card audio {
  width: 100%;
  accent-color: var(--green-main);
}

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

  .gallery-masonry {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .gallery-masonry {
    column-count: 1;
  }

  .lightbox {
    padding: 56px 12px;
  }

  .lightbox__prev {
    left: 8px;
  }

  .lightbox__next {
    right: 8px;
  }
}

/* —— Publications page —— */
.publications-page {
  padding: 48px 0 72px;
}

.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.pub-filter {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pub-filter:hover {
  color: var(--text);
}

.pub-filter.is-active {
  background: var(--green-main);
  color: #fff;
  border-color: var(--green-main);
}

.pub-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pub-list .pub-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  border-top: none;
  border-left: 5px solid var(--green-main);
  display: block;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.pub-list .pub-card:hover {
  transform: none;
  box-shadow: var(--shadow-hover);
}

.pub-list .pub-card[data-type='conference'] {
  border-left-color: var(--green-light);
}

.pub-list .pub-card[data-type='poster'] {
  border-left-color: #aed581;
}

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

.pub-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.pub-card__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.45;
  margin: 0;
  flex: 1;
}

.pub-card__title a {
  color: var(--text);
  text-decoration: none;
}

.pub-card__title a:hover {
  color: var(--green-main);
  text-decoration: underline;
}

.pub-card__authors {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.pub-card__venue {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.pub-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pub-card__year-pill {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-dark);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.pub-card__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge--muted {
  background: #f3f4f6;
  color: #6b7280;
}

.pub-card__award {
  font-size: 0.85rem;
  font-weight: 600;
  color: #b8860b;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.pub-card--compact {
  padding: 16px 20px;
}

.pub-card--compact .pub-card__title {
  font-size: 0.95rem;
}

.pub-card--compact .pub-card__authors,
.pub-card--compact .pub-card__venue {
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.pub-card--compact .pub-card__venue {
  margin-bottom: 10px;
}

/* —— Shared inner pages —— */
.page-intro {
  max-width: 720px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

.page-intro--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.container--narrow {
  max-width: 760px;
}

/* ══════════════════════════════════════════
   EDUCATION PAGE
══════════════════════════════════════════ */

.edu-path {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  padding: 32px 0 48px;
  overflow-x: auto;
}
.edu-path-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.edu-path-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-main);
  border: 3px solid var(--green-pale);
  outline: 2px solid var(--green-main);
}
.edu-path-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 100px;
  line-height: 1.35;
}
.edu-path-line {
  flex: 1;
  min-width: 40px;
  height: 2px;
  background: var(--green-light);
  opacity: 0.6;
  margin-bottom: 28px;
}

.edu-module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.edu-module {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.edu-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
  gap: 10px;
}
.edu-module-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-main);
}
.edu-module-tags {
  display: flex;
  gap: 6px;
}
.edu-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--green-pale);
  color: var(--green-dark);
}
.edu-module-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  padding: 10px 20px 8px;
  line-height: 1.35;
}
.edu-module-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding: 0 20px 16px;
  flex: 1;
}

/* YouTube facade inside module */
.edu-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}
.edu-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}
.edu-video:hover img { opacity: 0.85; }
.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(220, 0, 0, 0.88);
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.yt-play-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #ffffff;
}
.edu-video:hover .yt-play-btn {
  background: rgba(220, 0, 0, 1);
  transform: translate(-50%, -50%) scale(1.08);
}

.edu-module-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.edu-module-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-main);
  text-decoration: none;
  transition: color 0.15s;
}
.edu-module-link:hover { color: var(--green-dark); }

.edu-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.edu-tool-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.edu-tool-icon {
  width: 48px;
  height: 48px;
  background: var(--green-pale);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-main);
  margin-bottom: 16px;
}
.edu-tool-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.edu-tool-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}
.edu-tool-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-main);
  text-decoration: none;
  transition: color 0.15s;
}
.edu-tool-link:hover { color: var(--green-dark); }

.edu-glossary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.edu-glossary-item {
  background: var(--green-pale);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.edu-glossary-term {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 6px;
}
.edu-glossary-def {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Education mobile */
@media (max-width: 768px) {
  .edu-module-grid { grid-template-columns: 1fr; }
  .edu-tools-grid { grid-template-columns: 1fr; }
  .edu-glossary { grid-template-columns: 1fr; }
  .edu-path { gap: 0; }
  .edu-path-label { font-size: 0.72rem; max-width: 72px; }
}

/* —— Career page —— */
.career-section-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.45rem;
  color: var(--text);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.career-section-title::before {
  content: '';
  width: 4px;
  height: 1.15em;
  background: var(--green-main);
  flex-shrink: 0;
}

.career-position-card {
  padding: 28px 32px;
}

.career-position-card h3 {
  font-size: 1.2rem;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.career-position-card__dept {
  font-weight: 600;
  color: var(--green-main);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.career-position-card__desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 24px;
}

.career-traits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.career-trait-card {
  padding: 28px 24px;
  text-align: center;
}

.career-trait-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--green-pale);
  font-size: 1.5rem;
}
.career-trait-card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--green-main);
}

.career-trait-card h3 {
  font-size: 1.05rem;
  color: var(--green-dark);
  margin-bottom: 10px;
}

.career-trait-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.career-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.career-steps__item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.career-steps__num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-main);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.career-steps__item strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 6px;
}

.career-steps__item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* —— Supporters page —— */
.supporter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.supporter-card {
  padding: 40px 24px;
  text-align: center;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.supporter-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.4;
  margin-bottom: 8px;
}

.supporter-card__subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 900px) {
  .career-traits-grid {
    grid-template-columns: 1fr;
  }

  .supporter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .supporter-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════
   TEAM PAGE — OPTION D
══════════════════════════════════════════ */

/* Portrait image — top-biased so faces stay visible */
.person-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ── Team page hero ── */
.team-hero {
  background: linear-gradient(135deg, #1B5E20, #2E7D32);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}
.team-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}
.team-hero-quote {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 680px;
  line-height: 1.85;
  letter-spacing: 0.015em;
  margin: 0;
}

/* ── PI strip ── */
.pi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0;
}
.pi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--green-main);
  padding: 18px 18px 18px 14px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.pi-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.pi-photo-wrap {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--green-pale);
}
/* Show full portrait inside circle — no cover crop */
.pi-photo-wrap .person-photo {
  object-fit: contain;
  object-position: center center;
}
.pi-info { flex: 1; min-width: 0; }
.pi-info .pi-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pi-info .pi-role {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.pi-info .pi-inst {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green-main);
  margin-top: 5px;
  display: block;
}
.pi-link {
  display: inline-block;
  margin-top: 7px;
  font-size: 0.68rem;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.pi-link:hover {
  border-color: var(--green-main);
  color: var(--green-main);
}

/* ── Section divider ── */
.team-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 48px 0 20px;
}
.team-divider:first-of-type {
  margin-top: 40px;
}
.team-divider h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  margin: 0;
}
.team-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Uniform member card (students + alumni) ── */
.member-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  padding: 20px 10px 16px;
  transition: box-shadow 0.2s, transform 0.2s;
  /* Note: remove overflow:hidden — the photo is now inside, not full-bleed */
}
.member-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.member-photo-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--green-pale);
  margin: 0 auto 12px;
  flex-shrink: 0;
}
.member-info {
  padding: 0 4px;
}
.member-info .m-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.3;
}
.member-info .m-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pi-strip { grid-template-columns: repeat(2, 1fr); }
  .member-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .pi-strip { grid-template-columns: 1fr; }
  .member-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .member-grid { grid-template-columns: repeat(2, 1fr); }
  .pi-photo-wrap { width: 68px; height: 68px; }
}

/* ═══════════════════════════════════════════════
   TABLET & MOBILE  (≤ 768px)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Global spacing ── */
  .container {
    padding: 0 16px;
  }
  .section {
    padding: 52px 0;
  }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.45rem; }

  /* ── Navigation ── */
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 20px;
    gap: 4px;
    z-index: 999;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 0.97rem;
    color: var(--text);
  }
  /* On mobile: underline animation doesn't work — use bg highlight instead */
  .nav-links a::after {
    display: none;
  }
  .nav-links a.active {
    background: var(--green-pale);
    color: var(--green-dark);
    font-weight: 600;
  }
  .nav-links a:hover {
    background: var(--green-pale);
    color: var(--green-main);
  }
  /* "Join us" CTA pill — full-width on mobile */
  .nav-links a.nav-cta {
    background: var(--green-main);
    color: white;
    border-radius: 8px;
    text-align: center;
    margin-top: 6px;
    padding: 12px 14px;
  }
  .nav-links a.nav-cta:hover {
    background: var(--green-dark);
  }
  .nav-toggle {
    display: flex;
  }

  /* ── Hero section ── */
  .hero {
    min-height: 88svh;
    min-height: 88vh; /* fallback */
    padding: 0 16px;
  }
  .hero-content {
    padding: 0 4px;
    max-width: 100%;
  }
  .hero-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }
  .hero-title {
    font-size: clamp(1.65rem, 7vw, 2.2rem);
    line-height: 1.25;
    margin-bottom: 14px;
  }
  .hero-sub {
    font-size: 0.95rem;
    max-width: 100%;
    margin-bottom: 24px;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 0;
  }
  .hero-buttons .btn,
  .hero-buttons .btn-outline-white {
    display: block;
    text-align: center;
    padding: 14px 20px;
    font-size: 1rem;
  }
  /* Stat pills: wrap to 2×2 */
  .hero-stats {
    gap: 8px;
    margin-top: 28px;
    justify-content: center;
  }
  .hero-stat-pill {
    flex: 0 0 calc(50% - 4px);
    max-width: 140px;
    padding: 10px 12px;
    border-radius: 12px; /* more rectangular on mobile */
  }
  .hero-stat-num { font-size: 1.15rem; }
  .hero-stat-lbl { font-size: 0.68rem; }

  /* ── Pipeline section ── */
  .pipeline-track {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 8px;
  }
  .pipeline-step {
    flex-direction: row;
    max-width: 100%;
    width: 100%;
    text-align: left;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
  }
  .pipeline-icon {
    flex-shrink: 0;
    margin-bottom: 0;
    width: 52px;
    height: 52px;
  }
  .pipeline-step-name {
    font-size: 0.92rem;
    margin-bottom: 4px;
  }
  .pipeline-step-desc {
    font-size: 0.82rem;
  }
  /* Connector becomes a vertical line on the left */
  .pipeline-connector {
    width: 2px;
    height: 20px;
    margin: 0 0 0 25px; /* 26px = half of 52px icon, minus 1px for border */
    background: var(--green-light);
    opacity: 0.8;
  }
  .pipeline-intro {
    font-size: 0.95rem;
    margin-bottom: 32px;
  }

  /* ── Research pillar cards ── */
  .pillar-grid {
    grid-template-columns: 1fr;
    margin-bottom: 40px;
    gap: 12px;
  }
  /* Override the "last child spans full width" tablet rule */
  .pillar-grid .pillar-card:last-child {
    grid-column: auto;
    max-width: 100%;
    margin: 0;
  }
  .pillar-card {
    padding: 20px 18px;
  }

  /* ── Magazine research blocks ── */
  .magazine-blocks {
    border-radius: var(--radius);
    margin-top: 32px;
  }
  .mag-block {
    height: 230px;
  }
  /* On mobile: always fade from bottom so text sits at the bottom */
  .mag-block-overlay,
  .mag-block-overlay.right {
    background: linear-gradient(
      to top,
      rgba(15, 60, 18, 0.95) 0%,
      rgba(27, 94, 32, 0.7) 45%,
      rgba(27, 94, 32, 0.1) 80%,
      transparent 100%
    );
  }
  /* Content always pinned to bottom, full width */
  .mag-block-content,
  .mag-block-content.right {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    padding: 20px 18px;
    text-align: left;
    align-items: flex-start;
    justify-content: flex-end;
  }
  .mag-block-num {
    font-size: 0.65rem;
    margin-bottom: 6px;
  }
  .mag-block-title {
    font-size: 1.05rem;
    margin-bottom: 0;
  }
  /* Hide description text on mobile — title only */
  .mag-block-text {
    display: none;
  }

  /* ── Lab images row ── */
  .lab-images,
  .lab-image-row {
    flex-direction: column;
    gap: 12px;
  }
  .lab-images img,
  .lab-image-row img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
  }

  /* ── Recent publications strip ── */
  .pub-strip-item {
    padding: 16px 10px;
    gap: 12px;
  }
  .pub-strip-title {
    font-size: 0.88rem;
  }
  .pub-strip-meta {
    font-size: 0.75rem;
    flex-wrap: wrap;
    gap: 6px;
  }
  .pub-strip-link {
    display: none; /* hide the → arrow on small screens */
  }

  /* ── Page heroes (all inner pages) ── */
  .page-hero {
    height: 180px;
    min-height: 180px;
  }
  .page-hero h1 {
    font-size: 1.7rem;
  }
  .page-hero p {
    font-size: 0.9rem;
  }

}

/* ═══════════════════════════════════════════════
   SMALL PHONES ONLY  (≤ 480px)
   ═══════════════════════════════════════════════ */
@media (max-width: 480px) {

  .container { padding: 0 12px; }
  .section { padding: 40px 0; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }

  /* Hero */
  .hero { min-height: 92svh; min-height: 92vh; }
  .hero-title { font-size: 1.55rem; }
  .hero-sub { font-size: 0.88rem; }
  .hero-stat-pill {
    flex: 0 0 calc(50% - 4px);
    max-width: none;
    padding: 9px 10px;
  }

  /* Nav */
  .nav-links a { font-size: 0.92rem; padding: 10px 14px; }

  /* Magazine blocks */
  .mag-block { height: 200px; }
  .mag-block-title { font-size: 0.95rem; }

  /* Pipeline */
  .pipeline-section { padding: 40px 0; }
  .pipeline-icon { width: 44px; height: 44px; }
  .pipeline-connector { margin-left: 21px; }

}

/* ═══════════════════════════════════════════════
   TEAM PAGE — mobile  (≤ 768px)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Team page hero ── */
  .team-quote-banner,
  .quote-banner {
    padding: 28px 16px;
  }
  .team-quote-text,
  .quote-text {
    font-size: 1rem;
  }

  /* ── PI strip → 1 column ── */
  .pi-strip {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 32px 0 0;
  }
  .pi-card {
    padding: 14px 16px;
    gap: 14px;
  }
  .pi-photo-wrap {
    width: 60px;
    height: 60px;
  }
  .pi-card-info h3 {
    font-size: 0.97rem;
  }
  .pi-card-info .role {
    font-size: 0.78rem;
  }

  /* ── Team section dividers ── */
  .team-divider {
    margin: 32px 0 16px;
  }

  /* ── Member grid → 2 columns ── */
  .member-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .member-card {
    border-radius: var(--radius);
  }

  /* ── Section padding on team page ── */
  .team-section {
    padding: 40px 0 0;
  }

}

@media (max-width: 480px) {
  /* Keep 2-col member grid even on smallest phones */
  .member-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .pi-strip {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════
   PUBLICATIONS PAGE — mobile  (≤ 768px)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Filter bar: wrap and scroll horizontally */
  .filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
  }
  .filter-btn {
    font-size: 0.82rem;
    padding: 7px 14px;
  }

  /* Publication cards: reduce padding, keep full width */
  .pub-card {
    padding: 16px;
    border-radius: var(--radius);
  }
  .pub-card .pub-title {
    font-size: 0.92rem;
    line-height: 1.45;
  }
  .pub-card .pub-authors {
    font-size: 0.78rem;
  }
  .pub-card .pub-venue {
    font-size: 0.78rem;
  }
  .pub-card .pub-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  /* Publication card list: full width, reasonable margin */
  .pub-list,
  .pub-cards {
    padding: 0 0;
    max-width: 100%;
  }

}

/* ═══════════════════════════════════════════════
   MEDIA PAGE — mobile  (≤ 768px)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Tabs: full width, evenly spaced */
  .media-tabs,
  .tab-bar {
    display: flex;
    width: 100%;
  }
  .media-tabs button,
  .tab-bar button,
  .tab-btn {
    flex: 1;
    font-size: 0.82rem;
    padding: 10px 8px;
    text-align: center;
  }

  /* Video grid: 1 column */
  .video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* YouTube facade: full width */
  .yt-facade {
    border-radius: var(--radius);
  }

  /* Image gallery: 1 column */
  .gallery-grid,
  .image-gallery {
    column-count: 1;
  }

  /* Audio players: full width, reduced padding */
  .audio-card,
  .audio-player-card {
    padding: 16px;
  }

}

/* ═══════════════════════════════════════════════
   CAREER PAGE — mobile  (≤ 768px)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* "What we look for" icon cards: 1 column */
  .qualifications-grid,
  .career-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Step-by-step numbered list: full width */
  .apply-steps ol {
    padding-left: 20px;
  }

}

/* ═══════════════════════════════════════════════
   SUPPORTERS PAGE — mobile  (≤ 768px)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  .supporters-grid,
  .supporter-cards {
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 400px;
    margin: 0 auto;
  }

  .supporters-banner {
    flex-direction: column !important;
  }

}

/* ═══════════════════════════════════════════════
   UNIVERSAL MOBILE SAFETY NET
   Prevents any grid or flex from overflowing
   the viewport horizontally on small screens
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* No element should ever be wider than the viewport */
  img, video, iframe, .card, .pub-card, .pi-card,
  .member-card, .pillar-card, .yt-facade {
    max-width: 100%;
  }

  /* Kill any horizontal overflow that slipped through */
  body { overflow-x: hidden; }
  .container { overflow-x: hidden; }

  /* Ensure all grids collapse to 1 col if not explicitly overridden above */
  [class*="-grid"]:not(.member-grid):not(.pillar-grid) {
    grid-template-columns: 1fr !important;
  }

}

/* ── Password gate ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.password-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}
.pg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}
.pg-icon {
  width: 56px;
  height: 56px;
  background: var(--green-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--green-main);
}
.pg-title {
  font-family: 'Merriweather', serif;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 8px;
}
.pg-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}
.pg-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pg-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
  text-align: center;
  letter-spacing: 0.1em;
}
.pg-input:focus {
  outline: none;
  border-color: var(--green-main);
}
.pg-submit {
  background: var(--green-main);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.pg-submit:hover {
  background: var(--green-dark);
}
.pg-error {
  display: none;
  font-size: 0.82rem;
  color: #C62828;
  margin-top: 4px;
}

/* Protected content — hidden until unlocked */
.protected-content {
  display: none;
}
