/* =============================================
   MANNA LAB — main.css
   Palette: White · Crimson · Navy
   Fonts:   Space Grotesk (headings) · Inter (body)
   ============================================= */

:root {
  --terra:      #800000;
  --terra-mid:  #9A0000;
  --terra-pale: #FFF0F0;
  --terra-dark: #5C0000;

  --charcoal:   #243142;
  --charcoal-2: #800000;
  --charcoal-3: #111827;

  --white:      #FFFFFF;
  --off-white:  #FFFFFF;
  --warm-100:   #F5F5F5;
  --warm-200:   #E8E8E8;
  --warm-400:   #8A9AB0;
  --warm-600:   #4A5568;
  --warm-700:   #2D3748;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  --max-w:      1100px;
  --radius:     6px;
  --shadow:     0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 28px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);
  --transition: 0.16s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  { font-family: var(--font-body); color: var(--charcoal); background: var(--white); line-height: 1.65; }
img   { max-width: 100%; display: block; }
a     { color: var(--terra); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--terra-dark); }
ul    { list-style: none; }

/* --- Layout --- */
.container  { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section-alt { background: var(--off-white); }

.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before {
  content: ''; display: block;
  width: 28px; height: 2px; background: var(--terra); flex-shrink: 0;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 2rem; font-weight: 700;
  color: var(--charcoal); margin-bottom: 0.4rem;
  line-height: 1.15; letter-spacing: -0.02em;
}
.section-sub {
  color: var(--warm-600); font-size: 0.95rem;
  margin-bottom: 2.75rem; max-width: 540px; line-height: 1.65;
}

/* --- Navigation --- */
.nav {
  background: var(--charcoal-2);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem; font-weight: 700;
  color: var(--white) !important;
  letter-spacing: -0.01em;
}
.nav-brand span { color: var(--white); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  color: rgba(255,255,255,0.62);
  font-size: 0.85rem; font-weight: 500;
  padding: 0.45rem 0.7rem; border-radius: 4px;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-join {
  background: var(--terra) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  padding: 0.38rem 1rem !important;
  border-radius: 4px !important;
  margin-left: 0.5rem;
}
.nav-join:hover { background: var(--terra-mid) !important; color: var(--white) !important; }
.nav-toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: 0.4rem; flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px; transition: all 0.25s;
}

/* --- Hero --- */
.hero {
  background: var(--charcoal-3);
  color: var(--white);
  padding: 5.5rem 0 5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--terra);
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(128,0,0,0.10) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 3.5rem; align-items: center;
  position: relative; z-index: 1;
}
.hero-photo {
  width: 176px; height: 176px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; gap: 0.5rem;
  color: rgba(255,255,255,0.2); font-size: 0.7rem; text-align: center;
}
.hero-badge {
  font-family: var(--font-heading);
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--terra-mid); margin-bottom: 0.9rem;
}
.hero-name {
  font-family: var(--font-heading);
  font-size: 2.6rem; font-weight: 700;
  line-height: 1.1; margin-bottom: 0.3rem;
  letter-spacing: -0.03em;
}
.hero-role {
  font-size: 0.9rem; color: rgba(255,255,255,0.52);
  margin-bottom: 1.5rem;
}
.hero-role strong { color: rgba(255,255,255,0.80); font-weight: 400; }
.hero-tagline {
  font-size: 1rem; line-height: 1.78;
  color: rgba(255,255,255,0.72);
  max-width: 540px; margin-bottom: 2rem;
}
.hero-links { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.hero-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  color: rgba(255,255,255,0.72) !important;
  font-size: 0.82rem; font-weight: 500;
  background: rgba(255,255,255,0.04);
  transition: all var(--transition);
}
.hero-link:hover {
  border-color: var(--terra);
  color: var(--white) !important;
  background: rgba(128,0,0,0.12);
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-icon {
  width: 40px; height: 40px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  background: var(--terra-pale); color: var(--terra);
}
.card-title { font-family: var(--font-heading); font-weight: 600; font-size: 1rem; color: var(--charcoal); margin-bottom: 0.45rem; letter-spacing: -0.01em; }
.card-text  { color: var(--warm-600); font-size: 0.875rem; line-height: 1.65; }

/* research top accents */
.rc-teal   { border-top: 2px solid var(--terra); }
.rc-navy   { border-top: 2px solid #5C6B73; }
.rc-navy   .card-icon { background: rgba(92,107,115,0.08); color: #5C6B73; }
.rc-amber  { border-top: 2px solid #7B6B52; }
.rc-amber  .card-icon { background: rgba(123,107,82,0.08); color: #7B6B52; }
.rc-purple { border-top: 2px solid #3D5A80; }
.rc-purple .card-icon { background: rgba(61,90,128,0.08); color: #3D5A80; }

/* --- News --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.news-card {
  padding: 1.4rem 1.4rem 1.4rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--warm-200);
  border-left: 2px solid var(--terra);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.news-card:hover { box-shadow: var(--shadow-md); }
.news-date    { font-size: 0.74rem; color: var(--warm-400); margin-bottom: 0.4rem; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.news-title   { font-family: var(--font-heading); font-weight: 600; color: var(--charcoal); margin-bottom: 0.4rem; font-size: 0.93rem; line-height: 1.35; letter-spacing: -0.01em; }
.news-excerpt { color: var(--warm-600); font-size: 0.85rem; line-height: 1.65; }
.news-more    { display: inline-block; margin-top: 0.6rem; font-size: 0.8rem; font-weight: 600; color: var(--terra); }
.news-more:hover { color: var(--terra-dark); }

/* --- CTA Band --- */
.cta-band {
  background: var(--off-white);
  border-top: 1px solid var(--warm-200);
  border-bottom: 1px solid var(--warm-200);
  padding: 4.5rem 0; text-align: center;
}
.cta-band h2 {
  font-family: var(--font-heading);
  font-size: 1.9rem; font-weight: 700;
  color: var(--charcoal); margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}
.cta-band p {
  color: var(--warm-600);
  max-width: 440px; margin: 0 auto 2rem;
  font-size: 0.95rem; line-height: 1.72;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.6rem; border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 600; font-size: 0.88rem;
  letter-spacing: -0.01em;
  transition: all var(--transition); cursor: pointer;
}
.btn-primary { background: var(--terra); color: var(--white); }
.btn-primary:hover { background: var(--terra-dark); color: var(--white); }
.btn-outline {
  border: 1.5px solid var(--charcoal);
  color: var(--charcoal);
  margin-left: 0.75rem; background: var(--white);
}
.btn-outline:hover { border-color: var(--terra); color: var(--terra); background: var(--white); }

/* --- Page Header --- */
.page-header {
  background: #F5F0EB;
  color: var(--charcoal);
  padding: 3.5rem 0;
  border-top: 3px solid var(--terra);
  border-bottom: 1px solid var(--warm-200);
}
.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem; font-weight: 700;
  margin-bottom: 0.4rem; letter-spacing: -0.02em;
}
.page-header p { color: var(--warm-600); font-size: 0.95rem; }

/* --- Publications Tab Nav --- */
.pub-tabnav {
  position: sticky;
  top: 60px;
  z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--warm-200);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.pub-tabnav .container {
  display: flex;
  gap: 0;
}
.pub-tab {
  padding: 1rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--warm-400);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  letter-spacing: -0.01em;
  transition: all var(--transition);
}
.pub-tab:hover { color: var(--charcoal); }
.pub-tab.active {
  color: var(--terra);
  border-bottom-color: var(--terra);
}
.pub-section-head { margin-bottom: 2rem; }

.pub-num {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--warm-400);
  padding-top: 0.15rem;
  text-align: right;
}

/* --- Publications --- */
.pub-year-block { margin-bottom: 2.75rem; }
.pub-year-label {
  font-family: var(--font-heading);
  font-size: 1rem; font-weight: 700;
  color: var(--charcoal); letter-spacing: -0.01em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--warm-200);
  margin-bottom: 1rem;
}
.pub-list { display: flex; flex-direction: column; gap: 0.85rem; }
.pub-item {
  display: grid; grid-template-columns: 2rem 1fr auto;
  gap: 1rem; align-items: start;
  padding: 1.25rem 1.4rem;
  background: var(--white);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.pub-item:hover { box-shadow: var(--shadow-md); }
.pub-item.highlighted { border-left: 2px solid var(--terra); }
.pub-title   { font-weight: 600; color: var(--charcoal); margin-bottom: 0.28rem; font-size: 0.92rem; line-height: 1.45; }
.pub-authors { font-size: 0.83rem; color: var(--warm-600); margin-bottom: 0.2rem; }
.pub-authors strong { color: var(--charcoal); }
.pub-journal { font-size: 0.82rem; color: var(--terra); font-style: italic; }
.pub-if { font-style: normal; font-weight: 600; color: var(--warm-600); }
.pub-legend { font-size: 0.78rem; color: var(--warm-400); margin-top: 1.5rem; }
.pub-badges  { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.6rem; }
.pub-badge {
  font-family: var(--font-heading);
  font-size: 0.7rem; font-weight: 600;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--warm-200);
  border-radius: 3px; color: var(--warm-600);
  transition: all var(--transition); letter-spacing: 0.02em;
}
.pub-badge:hover { border-color: var(--terra); color: var(--terra); background: var(--terra-pale); }
.pub-year-tag { font-size: 0.8rem; color: var(--warm-400); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 0.1rem; }

/* --- Team --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}
.team-section-label {
  font-family: var(--font-heading);
  font-size: 1.1rem; font-weight: 700;
  color: var(--charcoal); letter-spacing: -0.01em;
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--warm-200);
}
.team-card {
  background: var(--white);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius);
  padding: 1.75rem 1.4rem;
  text-align: center; box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.team-card:hover { box-shadow: var(--shadow-md); }
.team-photo {
  width: 90px; height: 90px; border-radius: 4px;
  margin: 0 auto 1rem;
  background: var(--warm-100);
  border: 1px solid var(--warm-200);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pi-card {
  grid-column: 1 / -1;
  display: flex;
  gap: 2.5rem;
  text-align: left;
}
.pi-card-left {
  flex-shrink: 0;
  width: 200px;
  text-align: center;
}
.pi-card .team-photo { width: 175px; height: 225px; }
.pi-card-right { flex: 1; }
.pi-positions {
  list-style: none;
  padding: 0; margin: 0 0 1rem;
}
.pi-positions li {
  font-size: 0.82rem;
  color: var(--warm-700);
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--warm-200);
  line-height: 1.4;
}
.pi-positions li:last-child { border-bottom: none; }
.pi-cv-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--terra);
  border: 1px solid var(--terra);
  border-radius: 3px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 1.25rem;
  transition: all var(--transition);
}
.pi-cv-link:hover { background: var(--terra); color: var(--white); }
.pi-bio {
  font-size: 0.85rem;
  color: var(--warm-600);
  line-height: 1.7;
}
.pi-bio p { margin: 0 0 0.75rem; }
.pi-bio p:last-child { margin-bottom: 0; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo-ph  { color: var(--warm-400); }
.team-name  { font-family: var(--font-heading); font-weight: 600; color: var(--charcoal); margin-bottom: 0.2rem; font-size: 0.93rem; letter-spacing: -0.01em; }
.team-role  { font-size: 0.81rem; color: var(--terra); margin-bottom: 0.5rem; }
.team-bio   { font-size: 0.8rem; color: var(--warm-600); line-height: 1.55; }
.team-links { display: flex; justify-content: center; gap: 0.6rem; margin-top: 0.75rem; }
.team-link  { color: var(--warm-400); font-size: 0.8rem; transition: color var(--transition); }
.team-link:hover { color: var(--terra); }
.team-dept {
  font-size: 0.8rem; color: var(--warm-600);
  margin-bottom: 0.15rem; line-height: 1.4;
}
.team-location {
  font-size: 0.78rem; color: var(--warm-400);
  margin-bottom: 0.6rem; line-height: 1.4;
}
.pi-link-btn {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--warm-200);
  border-radius: 3px;
  font-size: 0.75rem; font-weight: 500;
  color: var(--warm-700) !important;
  background: var(--white);
  transition: all var(--transition);
}
.pi-link-btn:hover {
  border-color: var(--terra);
  color: var(--terra) !important;
  background: var(--terra-pale);
}
.pi-card .team-links { flex-wrap: wrap; gap: 0.4rem; }
.team-card.slot { border: 1.5px dashed var(--warm-200); background: var(--off-white); }
.team-card.slot .team-photo { width: 175px; height: 225px; background: var(--warm-100); border-color: var(--warm-200); }
.team-card.slot .team-photo-ph { color: var(--warm-200); }
.team-card.slot .team-name { color: var(--warm-400); }

/* --- Join --- */
.position-card {
  background: var(--white);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius);
  padding: 1.75rem; margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.pos-badge {
  display: inline-block;
  background: var(--terra-pale); color: var(--terra);
  font-family: var(--font-heading);
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 3px;
  margin-bottom: 0.65rem;
}
.pos-title { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 600; color: var(--charcoal); margin-bottom: 0.45rem; letter-spacing: -0.01em; }
.pos-desc  { color: var(--warm-600); font-size: 0.9rem; line-height: 1.75; }
.arrow-list { display: flex; flex-direction: column; gap: 0.55rem; }
.arrow-list li {
  padding-left: 1.4rem; position: relative;
  color: var(--warm-700); font-size: 0.9rem; line-height: 1.65;
}
.arrow-list li::before { content: '→'; position: absolute; left: 0; color: var(--terra); font-weight: 700; }

/* --- Contact --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-map { padding-top: 0.25rem; }
.contact-item  { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.4rem; }
.contact-icon  {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--terra-pale); color: var(--terra);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.contact-label { font-family: var(--font-heading); font-size: 0.68rem; font-weight: 700; color: var(--warm-400); text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 0.15rem; }
.contact-value { font-weight: 500; color: var(--charcoal); font-size: 0.92rem; line-height: 1.55; }
.contact-social-icons { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
.social-icon-btn { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 6px; background: var(--terra-pale); color: var(--terra); transition: background 0.18s, color 0.18s; }
.social-icon-btn:hover { background: var(--terra); color: var(--white); }

/* --- Gallery --- */
.gal-tabnav {
  background: var(--white);
  border-bottom: 2px solid var(--warm-200);
  position: sticky; top: 60px; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.gal-tabnav .container { display: flex; flex-wrap: wrap; gap: 0; }
.gal-tab {
  padding: 1rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 0.92rem; font-weight: 600;
  color: var(--warm-400);
  background: none; border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer; letter-spacing: -0.01em;
  transition: all var(--transition);
}
.gal-tab:hover { color: var(--charcoal); }
.gal-tab.active { color: var(--terra); border-bottom-color: var(--terra); }

.gal-section { padding-top: 0.5rem; }
.gal-hidden  { display: none; }

.gal-grid {
  columns: 3;
  column-gap: 1rem;
  margin-top: 1.5rem;
}
.gal-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.gal-item img {
  width: 100%; display: block;
  transition: transform 0.35s ease;
}
.gal-item:hover img { transform: scale(1.03); }
.gal-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  color: var(--white);
  font-size: 0.78rem; padding: 1.25rem 0.75rem 0.6rem;
  opacity: 0; transition: opacity 0.25s ease;
}
.gal-item:hover .gal-caption { opacity: 1; }

.gal-empty {
  text-align: center; padding: 5rem 0;
  color: var(--warm-400);
}
.gal-empty svg { margin: 0 auto 1rem; opacity: 0.35; }
.gal-empty p { font-size: 0.9rem; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.92);
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lb-img-wrap {
  max-width: 88vw; max-height: 88vh;
  display: flex; flex-direction: column; align-items: center;
}
.lb-img-wrap img {
  max-width: 100%; max-height: 80vh;
  object-fit: contain; border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.lb-caption {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem; margin-top: 0.75rem; text-align: center;
}
.lb-close {
  position: fixed; top: 1.25rem; right: 1.5rem;
  background: none; border: none;
  color: var(--white); font-size: 2rem;
  cursor: pointer; line-height: 1; opacity: 0.7;
  transition: opacity var(--transition);
}
.lb-close:hover { opacity: 1; }
.lb-prev, .lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white); border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition);
}
.lb-prev:hover, .lb-next:hover { background: rgba(128,0,0,0.6); }
.lb-prev { left: 1.25rem; }
.lb-next { right: 1.25rem; }

@media (max-width: 768px) {
  .gal-grid { columns: 2; }
}
@media (max-width: 480px) {
  .gal-grid { columns: 1; }
  .gal-tab  { padding: 0.75rem 1rem; font-size: 0.82rem; }
}

/* --- Footer --- */
.footer {
  background: var(--charcoal-2);
  color: rgba(255,255,255,0.60);
  padding: 2rem 0; font-size: 0.83rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
}
.footer-brand { color: var(--white); font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; }
.footer-brand span { color: var(--white) !important; font-weight: 400; }
.footer-affil { color: rgba(255,255,255,0.65); font-size: 0.8rem; line-height: 1.6; margin: 0.25rem 0; }

/* --- Post / news single --- */
.post-wrap { max-width: 720px; margin: 0 auto; padding: 3.5rem 1.5rem; }
.post-back  { font-size: 0.83rem; color: var(--warm-400); display: inline-block; margin-bottom: 1.75rem; }
.post-back:hover { color: var(--terra); }
.post-title { font-family: var(--font-heading); font-size: 1.9rem; font-weight: 700; color: var(--charcoal); margin-bottom: 0.45rem; line-height: 1.2; letter-spacing: -0.02em; }
.post-meta  { font-size: 0.83rem; color: var(--warm-400); margin-bottom: 2.25rem; }
.post-body  { color: var(--warm-700); line-height: 1.82; }
.post-body h2 { font-family: var(--font-heading); color: var(--charcoal); margin: 2.25rem 0 0.7rem; font-size: 1.35rem; letter-spacing: -0.01em; }
.post-body h3 { font-family: var(--font-heading); color: var(--charcoal); margin: 1.5rem 0 0.5rem; }
.post-body p  { margin-bottom: 1.1rem; }
.post-body a  { text-decoration: underline; text-underline-offset: 2px; }

/* --- Research full page --- */
.research-block { padding-bottom: 3.5rem; margin-bottom: 3.5rem; border-bottom: 1px solid var(--warm-200); }
.research-block:last-child { border-bottom: none; margin-bottom: 0; }
.research-block-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.research-block h2 { font-family: var(--font-heading); font-size: 1.45rem; font-weight: 700; color: var(--charcoal); letter-spacing: -0.02em; }
.research-desc { color: var(--warm-600); line-height: 1.82; max-width: 740px; }
.method-tags   { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 1rem; }
.method-tag    {
  font-family: var(--font-heading);
  font-size: 0.74rem; font-weight: 500;
  padding: 0.22rem 0.6rem;
  background: var(--off-white); border: 1px solid var(--warm-200);
  border-radius: 3px; color: var(--warm-700); letter-spacing: 0.01em;
}

/* --- Collaborator Strip --- */
.collab-viewport {
  overflow: hidden;
  clip-path: inset(0);
  margin: 2rem auto 0;
  max-width: 62%;
}
.collab-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  animation: collab-scroll 14s linear infinite;
}
.collab-viewport:hover .collab-track { animation-play-state: paused; }
.collab-item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.collab-item img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) opacity(0.5);
  transition: filter 0.25s ease;
}
.collab-item:hover img { filter: grayscale(0) opacity(1); }
.collab-item span {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--warm-600);
  white-space: nowrap;
  letter-spacing: 0.01em;
  padding: 0.35rem 1rem;
  border: 1px solid var(--warm-200);
  border-radius: 4px;
  transition: all var(--transition);
}
.collab-item:hover span {
  color: var(--terra);
  border-color: var(--terra);
  background: var(--terra-pale);
}
@keyframes collab-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- Slideshow --- */
.slideshow {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  background: #263346;
}
.slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.slide.active {
  opacity: 1;
  pointer-events: auto;
}
.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.slide-ph {
  width: 100%;
  height: 100%;
  position: relative;
}
.slide-bg-pattern {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}
.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 2.5rem 2rem;
  background: none;
}
.slide-label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terra-pale);
  margin-bottom: 0.45rem;
}
.slide-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  max-width: 580px;
  letter-spacing: -0.01em;
}
.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.36);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  z-index: 10;
}
.slide-arrow:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.slide-arrow:disabled { cursor: default; pointer-events: none; }
.slide-prev { left: 1.25rem; }
.slide-next { right: 1.25rem; }
.slide-dots {
  position: absolute;
  bottom: 1.1rem;
  right: 1.5rem;
  display: flex;
  gap: 0.45rem;
  z-index: 10;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.32);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}
.dot.active {
  background: var(--terra-mid);
  transform: scale(1.25);
}

/* --- PI Section --- */
.pi-section {
  background: var(--white);
  border-bottom: 1px solid var(--warm-200);
  padding: 3rem 0;
}
.pi-inner {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2.5rem;
  align-items: center;
}
.pi-photo {
  width: 128px;
  height: 128px;
  border-radius: 4px;
  border: 1px solid var(--warm-200);
  background: var(--warm-100);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.pi-photo img { width: 100%; height: 100%; object-fit: cover; }
.pi-photo-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--warm-400);
}
.pi-badge {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 0.55rem;
}
.pi-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.1;
  margin-bottom: 0.2rem;
  letter-spacing: -0.03em;
}
.pi-role {
  font-size: 0.88rem;
  color: var(--warm-600);
  margin-bottom: 0.85rem;
}
.pi-role strong { color: var(--charcoal); font-weight: 500; }
.pi-tagline {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--warm-700);
  max-width: 560px;
  margin-bottom: 1.25rem;
}
.pi-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pi-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--warm-200);
  border-radius: 4px;
  color: var(--warm-700);
  font-size: 0.81rem;
  font-weight: 500;
  background: var(--white);
  transition: all var(--transition);
}
.pi-link:hover {
  border-color: var(--terra);
  color: var(--terra);
  background: var(--terra-pale);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--charcoal-2); padding: 0.75rem;
    gap: 2px; border-top: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .nav-toggle { display: flex; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { margin: 0 auto; border-radius: 4px; }
  .hero-links { justify-content: center; }
  .hero-name  { font-size: 2rem; }
  .contact-grid  { grid-template-columns: 1fr; gap: 1rem; }
  .pub-item      { grid-template-columns: 2rem 1fr; }
  .pub-year-tag  { display: none; }
  .slideshow     { height: 360px; }
  .slide-img     { object-position: 65% center; }
  .slide-arrow   { display: none; }
  .pi-card       { flex-direction: column; }
  .pi-card-left  { width: 100%; }
  .slide-text    { font-size: 1.1rem; }
  .slide-caption { padding: 1.5rem 1.25rem 1.25rem; }
  .pi-inner      { grid-template-columns: 1fr; text-align: center; gap: 1.25rem; }
  .pi-photo      { margin: 0 auto; }
  .pi-links      { justify-content: center; }
  .pi-tagline    { margin-left: auto; margin-right: auto; }
}

@media (max-width: 480px) {
  .card-grid  { grid-template-columns: 1fr; }
  .team-grid  { grid-template-columns: repeat(2, 1fr); }
  .news-grid  { grid-template-columns: 1fr; }
  .section    { padding: 3.5rem 0; }
  .hero       { padding: 3.75rem 0 3.25rem; }
  .slideshow  { height: 280px; }
  .slide-img  { object-position: center center; }
  .slide-text { font-size: 0.97rem; }
  .slide-arrow { display: none; }
  .pi-name    { font-size: 1.6rem; }
}
