/* ============================================================
   IRIE LAB — Bright & Friendly Theme
   White base · Warm accents · Image-forward
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* ---- CSS Variables ---- */
:root {
  --white:         #ffffff;
  --bg-page:       #f6f8fb;
  --bg-section:    #f0f4f9;
  --bg-card:       #ffffff;
  --teal:          #0891b2;
  --teal-light:    #e0f7fa;
  --teal-mid:      #67c9de;
  --sky:           #38bdf8;
  --coral:         #f97316;
  --coral-light:   #fff4ee;
  --sage:          #4ade80;
  --sage-light:    #f0fdf4;
  --ink:           #1e293b;
  --ink-mid:       #475569;
  --ink-soft:      #94a3b8;
  --border:        #e2e8f0;
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.09);
  --shadow-lg:     0 12px 48px rgba(0,0,0,0.12);
  --shadow-hover:  0 20px 60px rgba(8,145,178,0.15);
  --radius:        14px;
  --radius-lg:     22px;
  --radius-pill:   999px;
  --font:          'Inter', sans-serif;
  --font-serif:    'Lora', Georgia, serif;
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --t:             0.3s;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 900;
  padding: 14px 0;
  transition: all var(--t) var(--ease);
}

#navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

.nav-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.18)); }
.nav-logo-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--teal);
  letter-spacing: -0.01em;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-mid);
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  transition: all var(--t) var(--ease);
}
.nav-links a:hover {
  color: var(--teal);
  background: var(--teal-light);
}
/* ── Language switch button in navbar ── */
.nav-lang {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-pill) !important;
  color: var(--ink-soft) !important;
  padding: 5px 12px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  transition: all var(--t) var(--ease) !important;
}
.nav-lang:hover {
  border-color: var(--teal) !important;
  color: var(--teal) !important;
  background: var(--teal-light) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--t);
}

/* ============================================================
   HERO — full-bleed original artwork background
   ============================================================ */
#hero {
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(160deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.28) 50%, rgba(0,0,0,0.50) 100%),
    url('assets/img/header_bg.jpg') center/cover no-repeat;
  position: relative;
  overflow: hidden;
  padding-top: 64px; /* clear fixed navbar */
}

/* bottom-to-page-color fade */
#hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(transparent, var(--bg-page));
  z-index: 2;
  pointer-events: none;
}

.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px 120px;
  text-align: center;
  position: relative;
  z-index: 3;
  display: block;
}

.hero-right { display: none !important; }
.hero-stat-chip { display: none !important; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 28px;
  animation: fadeUp 0.7s ease both;
}
.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: #7ee8f8;
  border-radius: 50%;
  animation: blink 2s infinite;
}

.hero-title {
  font-size: clamp(3rem, 6.5vw, 5.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #ffffff;
  margin-bottom: 24px;
  text-shadow: 0 2px 28px rgba(0,0,0,0.55);
  animation: fadeUp 0.7s 0.08s ease both;
}
.hero-title em {
  font-style: normal;
  color: #7ee8f8;
}
.hero-title .serif-word {
  font-family: var(--font-serif);
  font-style: italic;
  color: #ffa875;
  font-weight: 400;
}

.hero-lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 40px;
  animation: fadeUp 0.7s 0.15s ease both;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.7s 0.22s ease both;
}

/* Navbar: transparent + white text on dark hero */
#navbar:not(.scrolled) {
  background: transparent;
}
#navbar:not(.scrolled) .nav-logo-text { color: #fff; }
#navbar:not(.scrolled) .nav-links > li > a { color: rgba(255,255,255,0.88); }
#navbar:not(.scrolled) .nav-links > li > a:hover {
  color: #fff;
  background: rgba(255,255,255,0.14);
}
#navbar:not(.scrolled) .nav-lang {
  border-color: rgba(255,255,255,0.45) !important;
  color: rgba(255,255,255,0.82) !important;
}
#navbar:not(.scrolled) .nav-lang:hover {
  border-color: rgba(255,255,255,0.9) !important;
  color: #fff !important;
  background: rgba(255,255,255,0.15) !important;
}
#navbar:not(.scrolled) .nav-toggle span { background: #fff; }

/* ============================================================
   ANIMALS STRIP — panoramic species banner
   ============================================================ */
#animals-strip {
  width: 100%;
  position: relative;
  overflow: hidden;
  line-height: 0;
  margin-top: -1px;
}
.animals-strip-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  filter: saturate(1.08) contrast(1.03);
  transition: transform 9s ease;
}
#animals-strip:hover .animals-strip-img { transform: scale(1.04); }

.animals-strip-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 40px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.62));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.animals-strip-label {
  color: rgba(255,255,255,0.82);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.animals-strip-dots { display: flex; gap: 7px; }
.animals-strip-dots span {
  width: 4px; height: 4px;
  background: rgba(255,255,255,0.38);
  border-radius: 50%;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-fill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--teal);
  cursor: pointer;
  transition: all var(--t) var(--ease);
  box-shadow: 0 4px 16px rgba(8,145,178,0.3);
}
.btn-fill:hover {
  background: #0e7490;
  border-color: #0e7490;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(8,145,178,0.4);
}

/* Light variant (for use on dark backgrounds) */
.btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1.8px solid rgba(255,255,255,0.45);
  transition: all var(--t) var(--ease);
  cursor: pointer;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink-mid);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-light);
  transform: translateY(-2px);
}

/* ============================================================
   AFFILIATIONS
   ============================================================ */
#affiliations {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.affil-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.affil-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-right: 24px;
  border-right: 1px solid var(--border);
}
.affil-item {
  opacity: 0.55;
  transition: opacity var(--t), transform var(--t);
  cursor: pointer;
}
.affil-item:hover { opacity: 1; transform: scale(1.05); }
.affil-item img { height: 40px; width: auto; object-fit: contain; }

/* ============================================================
   SECTION COMMONS
   ============================================================ */
section { padding: 96px 0; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

.sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}
.sec-eyebrow::before {
  content: '';
  width: 18px; height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

.sec-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.sec-title .accent { color: var(--teal); }
.sec-title .serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--coral); }

.sec-lead {
  font-size: 1rem;
  color: var(--ink-mid);
  max-width: 560px;
  margin-bottom: 56px;
  line-height: 1.75;
}

/* ============================================================
   FOCUS CARDS
   ============================================================ */
#focus {
  background: var(--white);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.focus-card {
  background: var(--bg-page);
  border: none;
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  position: relative;
  overflow: hidden;
  transition: all var(--t) var(--ease);
  cursor: default;
  box-shadow: var(--shadow-sm);
}

.focus-card:nth-child(1) { --card-accent: var(--teal); --card-bg: var(--teal-light); }
.focus-card:nth-child(2) { --card-accent: var(--coral); --card-bg: var(--coral-light); }
.focus-card:nth-child(3) { --card-accent: #7c3aed; --card-bg: #f5f3ff; }
.focus-card:nth-child(4) { --card-accent: var(--sage); --card-bg: var(--sage-light); }

.focus-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-accent);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  opacity: 0;
  transition: opacity var(--t);
}
.focus-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  background: var(--card-bg);
}
.focus-card:hover::after { opacity: 1; }

.focus-icon-wrap { display: none; }

.focus-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.4;
}
.focus-card p {
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.7;
}

/* ============================================================
   RESEARCH / MAJOR FINDINGS
   ============================================================ */
#research {
  background: var(--bg-section);
}

.research-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}

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

/* Featured card: same grid size as others (no oversized span) */
.research-card-featured {
  grid-column: span 1;
}

.research-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

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

.rc-img {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Consistent image height for all cards — object-fit:cover fills box, no white bars */
.rc-img {
  height: 210px;
}
.rc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.55s var(--ease);
}
.research-card:hover .rc-img img {
  transform: scale(1.04);
}

.rc-body {
  padding: 22px 22px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rc-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 10px;
}

.research-card-featured .rc-body h3 { font-size: 0.95rem; }

.rc-body p {
  font-size: 0.83rem;
  color: var(--ink-mid);
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.rc-footer {
  padding: 0 22px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
}

.rc-more {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color var(--t);
}
.research-card:hover .rc-more { color: var(--teal); }
.rc-more svg { transition: transform var(--t); }
.research-card:hover .rc-more svg { transform: translateX(4px); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(30, 41, 59, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s var(--ease);
  box-shadow: var(--shadow-lg);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.modal-overlay.active .modal-box {
  transform: none;
}
.modal-box::-webkit-scrollbar { width: 4px; }
.modal-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.modal-img-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #f0f4f8;
}
.modal-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px 0;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.modal-close-btn {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink-mid);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  margin-top: 2px;
}
.modal-close-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.modal-content {
  padding: 18px 28px 30px;
}
.modal-content p {
  font-size: 0.92rem;
  color: var(--ink-mid);
  line-height: 1.82;
  margin-bottom: 16px;
}
.modal-content h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.modal-pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-pub-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: 0.875rem;
  color: var(--teal);
  font-weight: 500;
  transition: color var(--t);
}
.modal-pub-list a::before { content: '→'; font-size: 0.75rem; color: var(--teal-mid); }
.modal-pub-list a:hover { color: #0e7490; }
.modal-content img {
  border-radius: var(--radius);
  margin: 14px 0;
  border: 1px solid var(--border);
}
.modal-img-secondary {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 16px 0;
  border: 1px solid var(--border);
}

/* ============================================================
   PARALLAX PHOTO DIVIDERS
   ============================================================ */
.parallax-section {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.parallax-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.52);
}
.parallax-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 32px;
  max-width: 800px;
}
.parallax-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7ee8f8;
  margin-bottom: 18px;
}
.parallax-heading {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-family: var(--font-serif);
  font-style: italic;
  color: #fff;
  line-height: 1.35;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
  margin-bottom: 18px;
}
.parallax-sub {
  color: rgba(255,255,255,0.78);
  font-size: 1rem;
  line-height: 1.78;
  max-width: 560px;
  margin: 0 auto 32px;
}

/* ============================================================
   SCIENCE QUOTE SECTION
   ============================================================ */
#science-quote {
  position: relative;
  overflow: hidden;
  line-height: 0;
  height: min(220px, 30vw);
}
#science-quote::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
#sq-img {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: block;
  transform-origin: center center;
  will-change: transform;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background:
    linear-gradient(rgba(10,20,40,0.88), rgba(10,20,40,0.92)),
    url('assets/img/bg/divider4.jpg') center/cover no-repeat;
  color: rgba(255,255,255,0.6);
  padding: 52px 0 36px;
  position: relative;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand img { width: 38px; height: 38px; filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4)); }
.footer-brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  letter-spacing: -0.01em;
}
.footer-info { font-size: 0.8rem; line-height: 1.7; text-align: center; }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--t);
}
.footer-links a:hover { color: var(--white); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .research-grid { grid-template-columns: repeat(2, 1fr); }
  .research-card-featured { grid-column: span 1; }
}

@media (max-width: 820px) {
  .hero-inner { padding: 0 24px 160px; }
  .hero-title { font-size: clamp(2.4rem, 9vw, 3.5rem); }
  .animals-strip-img { height: 180px; }
  .parallax-section { background-attachment: scroll; min-height: 340px; }
  #science-quote { background-attachment: scroll; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    box-shadow: var(--shadow-md);
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  /* On mobile, navbar is relative — always show solid bg so logo/text are legible */
  #navbar {
    position: relative;
    background: rgba(255,255,255,0.97) !important;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
  }
  #navbar.scrolled { position: fixed; }
  /* Override white-text styles that only make sense over dark hero */
  #navbar:not(.scrolled) .nav-logo-text { color: var(--teal) !important; }
  #navbar:not(.scrolled) .nav-links > li > a { color: var(--ink-mid) !important; }
  #navbar:not(.scrolled) .nav-links > li > a:hover {
    color: var(--teal) !important;
    background: var(--teal-light) !important;
  }
  #navbar:not(.scrolled) .nav-lang {
    border-color: var(--border) !important;
    color: var(--ink-soft) !important;
  }
  #navbar:not(.scrolled) .nav-toggle span { background: var(--ink) !important; }
  .nav-container { position: relative; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card-featured { grid-column: span 1; }
  section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .nav-container { padding: 0 20px; }
  .affil-inner { gap: 24px; padding: 0 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .affil-label { border-right: none; padding-right: 0; }
  .research-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .focus-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .modal-content { padding: 16px 18px 24px; }
  .modal-header { padding: 20px 18px 0; }
}

/* ============================================================
   INNER PAGES — shared styles for sub-pages
   ============================================================ */

/* ============================================================
   LAB LIFE / TEAM PHOTO BANNER (full-width inline photo)
   ============================================================ */
.lab-photo-banner {
  width: 100%;
  position: relative;
  overflow: hidden;
  line-height: 0;
}
.lab-photo-banner img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  filter: saturate(1.06) brightness(1.02);
  transition: transform 9s ease;
}
.lab-photo-banner:hover img { transform: scale(1.04); }
.lab-photo-banner-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 60px 48px 22px;
  background: linear-gradient(transparent, rgba(0,0,0,0.62));
  color: rgba(255,255,255,0.88);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  text-align: center;
  line-height: 0;
}

/* Photo hero for inner pages */
.page-hero-photo {
  min-height: 56vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.page-hero-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.28) 100%);
}
.page-hero-photo::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 150px;
  background: linear-gradient(transparent, var(--bg-page));
  pointer-events: none;
}
.page-hero-photo .page-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-bottom: 80px;
}
.page-hero-photo .page-breadcrumb a { color: rgba(255,255,255,0.82); }
.page-hero-photo .page-breadcrumb { color: rgba(255,255,255,0.6); }
.page-hero-photo h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}
.page-hero-photo .page-hero-desc { color: rgba(255,255,255,0.82); }

/* Page hero banner (replaces full-screen hero on sub-pages) */
.page-hero {
  padding: 120px 0 60px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, #e0f7fa 0%, transparent 70%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 350px; height: 350px;
  background: radial-gradient(circle, #fff4ee 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
  font-family: var(--font);
}
.page-breadcrumb a { color: var(--teal); text-decoration: none; }
.page-breadcrumb a:hover { text-decoration: underline; }
.page-breadcrumb span { color: var(--ink-soft); }
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 1rem;
  color: var(--ink-mid);
  max-width: 560px;
  line-height: 1.7;
}

/* ---- PUBLICATIONS PAGE ---- */
.pub-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.pub-filter-btn {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink-mid);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  font-family: var(--font);
}
.pub-filter-btn:hover,
.pub-filter-btn.active {
  background: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal);
}

.pub-year-group { display: flex; flex-direction: column; gap: 14px; margin-bottom: 0; }
.pub-year-group + .pub-year-group { margin-top: 14px; }

.pub-year-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.pub-year-label h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.pub-year-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.pub-list { display: contents; }

.pub-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px 16px 20px;
  transition: all var(--t) var(--ease);
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.pub-item:hover {
  border-color: var(--teal-mid);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}
/* OA badge — absolute top-right, no extra line */
.pub-oa-row {
  position: absolute;
  top: 14px;
  right: 16px;
  margin: 0;
}
.pub-oa {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #fff9e6;
  border: 1px solid #ffd60a;
  color: #b45309;
  padding: 2px 7px;
  border-radius: 4px;
}
.pub-body { min-width: 0; padding-right: 48px; /* room for OA badge */ }
.pub-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 6px;
}
.pub-item:hover .pub-title { color: var(--teal); }
.pub-authors {
  font-size: 0.8rem;
  color: var(--ink-mid);
  margin-bottom: 5px;
  line-height: 1.5;
}
.pub-authors u, .pub-authors strong { color: var(--ink); font-weight: 600; }
.pub-journal {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-style: italic;
}
.pub-journal strong { font-style: normal; font-weight: 600; color: var(--teal); }
.pub-erratum {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-style: normal;
  opacity: 0.7;
}

/* ---- MEMBERS PAGE ---- */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}
.member-card {
  background: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  padding: 28px 20px 22px;
  text-align: center;
  transition: all var(--t) var(--ease);
  box-shadow: var(--shadow-sm);
}
.member-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.member-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: none;
  transition: opacity var(--t);
}
.member-card:hover .member-photo { opacity: 0.92; }
.member-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.3;
}
.member-role {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-soft);
  background: none;
  display: block;
  padding: 0;
  margin-bottom: 12px;
}
.member-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.member-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-page);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--t);
}
.member-link:hover { color: var(--teal); border-color: var(--teal); background: var(--teal-light); }

.alumni-section { margin-top: 16px; }
.alumni-list {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.alumni-item {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
  font-size: 0.875rem;
}
.alumni-item:last-child { border-bottom: none; }
.alumni-item:hover { background: var(--teal-light); }
.alumni-name { font-weight: 600; color: var(--ink); }
.alumni-meta { color: var(--ink-mid); font-size: 0.82rem; }
.alumni-dest { font-size: 0.78rem; color: var(--teal); white-space: nowrap; }

/* ---- PI FEATURED CARD ---- */
.pi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 40px;
  padding: 40px 44px;
  align-items: flex-start;
  margin-bottom: 52px;
  border-left: 5px solid var(--teal);
  position: relative;
  overflow: hidden;
}
.pi-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 280px; height: 100%;
  background: linear-gradient(135deg, transparent 40%, var(--teal-light) 100%);
  pointer-events: none;
}
.pi-photo-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.pi-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--teal-light);
  box-shadow: var(--shadow-md);
}
.pi-info { flex: 1; }
.pi-title-block { margin-bottom: 16px; }
.pi-name { font-size: 1.5rem; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.pi-role {
  display: inline-block;
  font-size: 0.78rem; font-weight: 600;
  color: var(--teal);
  background: var(--teal-light);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}
.pi-bio { font-size: 0.88rem; color: var(--ink-mid); line-height: 1.75; margin-bottom: 18px; }
.pi-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pi-email-img { margin-top: 4px; }
.pi-email-img img { height: 22px; width: auto; }

/* ---- POSTDOC HORIZONTAL CARDS ---- */
.postdoc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
  margin-bottom: 48px;
}
.postdoc-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 22px;
  padding: 24px 26px;
  align-items: flex-start;
  transition: all var(--t) var(--ease);
  border-top: 4px solid #67c9de;
}
.postdoc-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.postdoc-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--teal-light);
}
.postdoc-info { flex: 1; }
.postdoc-name { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.postdoc-role {
  font-size: 0.72rem; font-weight: 600; color: #0891b2;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.postdoc-bio { font-size: 0.8rem; color: var(--ink-mid); line-height: 1.65; margin-bottom: 10px; }
.postdoc-email img { height: 20px; width: auto; }

/* ---- STUDENT CARDS with accent top ---- */
.student-section { margin-bottom: 48px; }
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.student-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px 18px 20px;
  text-align: center;
  transition: all var(--t) var(--ease);
  position: relative;
  overflow: hidden;
}
.student-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, #4ade80, #0891b2);
}
.student-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.student-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 3px solid #e0f7fa;
}
.student-name { font-size: 0.95rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.student-role {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: #4ade80;
  margin-bottom: 10px;
}
.student-email img { height: 18px; width: auto; margin: 0 auto; }

/* ---- SECTION ROLE DIVIDERS ---- */
.role-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 40px 0 24px;
}
.role-divider-line { flex: 1; height: 1px; background: var(--border); }
.role-divider-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ============================================================
   UNIFIED MEMBER CARDS (portrait grid, equal size, click → modal)
   ============================================================ */
.member-uni-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.member-uni-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  border: 1.5px solid var(--border);
}
.member-uni-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--teal-mid);
}

.member-uni-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.member-uni-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s var(--ease);
  display: block;
}
.member-uni-card:hover .member-uni-photo img {
  transform: scale(1.06);
}

.member-uni-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 145, 178, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.member-uni-card:hover .member-uni-overlay {
  opacity: 1;
}
.member-uni-overlay span {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid rgba(255,255,255,0.7);
  padding: 7px 20px;
  border-radius: var(--radius-pill);
}

.member-uni-info {
  padding: 16px 18px 18px;
  border-top: 3px solid var(--teal-light);
}
.member-uni-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.member-uni-role {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- MEMBER PROFILE MODAL ---- */
.member-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 50, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.member-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.member-modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 680px;
  width: 100%;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s var(--ease);
  overflow: hidden;
}
.member-modal-overlay.active .member-modal-box {
  transform: translateY(0) scale(1);
}

.member-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 34px;
  height: 34px;
  background: var(--bg-section);
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  z-index: 10;
}
.member-modal-close:hover {
  background: var(--teal-light);
  color: var(--teal);
}

.member-modal-content {
  display: flex;
  gap: 0;
  min-height: 300px;
}

.member-modal-photo-col {
  flex-shrink: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-section);
  padding: 36px 20px 28px;
  gap: 14px;
}

.member-modal-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
}

.member-modal-email img {
  height: 22px;
  width: auto;
  display: block;
}

.member-modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.member-modal-text-col {
  flex: 1;
  padding: 36px 32px 28px;
}

.member-modal-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}

.member-modal-role {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-light);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.member-modal-bio {
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.8;
}

/* Responsive member grid */
@media (max-width: 1024px) {
  .member-uni-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .member-uni-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .member-modal-content { flex-direction: column; }
  .member-modal-photo-col { width: 100%; flex-direction: row; padding: 24px; gap: 18px; }
  .member-modal-photo { width: 90px; height: 90px; }
  .member-modal-text-col { padding: 20px 24px 24px; }
  .member-modal-name { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .member-uni-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ---- COLLABORATORS SECTION ---- */
/* ---- International Collaborations grid ---- */
.collabs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.collab-tile {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.collab-tile:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.collab-tile img {
  width: 100%;
  height: auto;
  object-fit: unset;
  display: block;
}
.collab-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.18) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  transition: background 0.3s;
}
.collab-tile:hover .collab-tile-overlay {
  background: linear-gradient(to top, rgba(0,80,100,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}
.collab-tile-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
}
.collab-tile-period {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 6px;
}
.collab-tile-cta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal-light);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
}
.collab-tile:hover .collab-tile-cta {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Collab modal (for publications page) ---- */
.collab-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.collab-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.collab-modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s ease;
}
.collab-modal-overlay.active .collab-modal-box { transform: none; }
.collab-modal-img {
  width: 100%;
  height: auto;
  object-fit: unset;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: block;
}
.collab-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 0;
  gap: 12px;
}
.collab-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}
.collab-modal-close {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink-mid);
  display: flex; align-items: center; justify-content: center;
}
.collab-modal-close:hover { background: #fee2e2; border-color: #fca5a5; }
.collab-modal-body {
  padding: 16px 24px 28px;
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.75;
}
.collab-modal-body h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--teal);
  margin: 18px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}
.collab-modal-body p { margin-bottom: 12px; }
.collab-modal-body ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.collab-modal-body ul li::before { content: '→ '; color: var(--teal-mid); font-size: 0.75rem; }
.collab-modal-body a { color: var(--teal); text-decoration: none; }
.collab-modal-body a:hover { text-decoration: underline; }

/* ---- BOOKS GRID ---- */
.books-section { padding: 72px 0; background: var(--white); }
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t);
}
.book-card:hover { transform: translateY(-4px); }
.book-cover {
  width: 100%;
  max-width: 130px;
  height: auto;
  object-fit: unset;
  border-radius: 4px;
  box-shadow: 2px 4px 16px rgba(0,0,0,0.18);
  display: block;
  transition: box-shadow var(--t);
}
.book-card:hover .book-cover { box-shadow: 4px 8px 28px rgba(0,0,0,0.25); }
.book-title {
  font-size: 0.72rem;
  color: var(--ink-mid);
  text-align: center;
  line-height: 1.4;
  max-width: 130px;
}

/* ---- NEWSPAPER / PRESS SECTION ---- */
.press-section { padding: 72px 0; background: var(--bg-section); }
.press-list { margin-top: 32px; }
.press-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.press-item:last-child { border-bottom: none; }
.press-type-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  min-width: 72px;
  width: auto;
  text-align: center;
  white-space: nowrap;
}
.press-type-tv { background: #fef3c7; color: #d97706; }
.press-type-news { background: #f0f9ff; color: #0891b2; }
.press-type-journal { background: #f0fdf4; color: #16a34a; }
.press-text { flex: 1; }
.press-headline { font-size: 0.88rem; color: var(--ink); font-weight: 500; line-height: 1.5; }
.press-headline a { color: var(--teal); text-decoration: underline; }
.press-date { font-size: 0.73rem; color: var(--ink-soft); margin-top: 3px; }

/* ---- JOIN US PAGE ---- */
.join-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.join-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px 0;
  transition: all var(--t) var(--ease);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.join-card:nth-child(1) { --jc: var(--teal); --jcl: var(--teal-light); }
.join-card:nth-child(2) { --jc: var(--coral); --jcl: var(--coral-light); }
.join-card:nth-child(3) { --jc: #7c3aed; --jcl: #f5f3ff; }
.join-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--jc);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.join-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  background: var(--jcl);
}
.join-icon {
  width: 52px; height: 52px;
  background: var(--jcl);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
  border: 1.5px solid var(--border);
}
.join-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.35;
}
.join-card p {
  font-size: 0.875rem;
  color: var(--ink-mid);
  line-height: 1.75;
}
.join-card a {
  color: var(--jc);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
}
.join-card a:hover { border-color: var(--jc); }

.join-card-img {
  position: relative;
  height: 180px;
  padding-top: 20px; /* コンテンツと画像の間の隙間 */
  margin-top: auto;
  margin-left: -28px;
  margin-right: -28px;
  flex-shrink: 0;
}
/* グラデーションは padding-top の隙間から画像上端にかけてフェード */
.join-card-img::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to bottom, var(--white), transparent);
  pointer-events: none;
  z-index: 2;
  transition: background var(--t);
}
.join-card:hover .join-card-img::before {
  background: linear-gradient(to bottom, var(--jcl), transparent);
}
.join-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.08);
  transform-origin: center center;
  transition: transform 0.5s;
}
.join-card:hover .join-card-img img {
  transform: scale(1.13);
}

.join-book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.join-book {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 0.75rem;
  color: var(--ink-mid);
  line-height: 1.3;
  transition: all var(--t);
  text-decoration: none;
  display: block;
  position: relative;
  z-index: 3;
}
.join-book:hover { border-color: var(--teal); color: var(--teal); box-shadow: var(--shadow-sm); }
.join-book strong { display: block; color: var(--ink); font-size: 0.8rem; margin-bottom: 2px; line-height: 1.25; }

/* ---- CONTACT PAGE ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.contact-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}
.contact-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.contact-item:last-child { margin-bottom: 0; }
.contact-icon {
  width: 38px; height: 38px;
  background: var(--teal-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 3px;
}
.contact-value {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.55;
}
.contact-value a { color: var(--teal); text-decoration: none; font-weight: 500; }
.contact-value a:hover { text-decoration: underline; }

.contact-map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--border);
  height: 340px;
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-map-wrap iframe {
  width: 100%; height: 100%;
  border: none;
}

/* ---- RESPONSIVE inner pages ---- */
@media (max-width: 900px) {
  .join-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .pi-card { flex-direction: column; padding: 28px 24px; }
  .collabs-grid { grid-template-columns: 1fr; }
  .books-grid { grid-template-columns: repeat(3, 1fr); }
  .postdoc-grid { grid-template-columns: 1fr; }
  .student-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .members-grid { grid-template-columns: repeat(2, 1fr); }
  .alumni-item { display: flex; flex-wrap: wrap; gap: 4px; }
  .alumni-name { width: 100%; }
  .alumni-dest { width: 100%; }
  .pub-item { flex-direction: column; gap: 8px; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .members-grid { grid-template-columns: 1fr; }
  .student-grid { grid-template-columns: 1fr; }
}
