/* ============================================================
   Cheng Lab — Global Stylesheet  v2
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ── Design tokens ── */
:root {
  --navy:    #0f172a;
  --navy-2:  #1e293b;
  --blue:    #2563eb;
  --blue-d:  #1d4ed8;
  --blue-lt: #dbeafe;
  --blue-m:  #bfdbfe;
  --text:    #1e293b;
  --muted:   #64748b;
  --border:  #e2e8f0;
  --bg:      #ffffff;
  --bg-soft: #f8fafc;
  --bg-alt:  #f1f5f9;
  --green:   #16a34a;
  --green-lt:#dcfce7;
  --amber:   #b45309;
  --amber-lt:#fef3c7;
  --red:     #dc2626;
  --radius:  10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.05);
  --shadow:    0 2px 8px rgba(0,0,0,.08), 0 6px 24px rgba(0,0,0,.06);
  --max-w:   920px;
  --nav-h:   60px;
  --transition: .18s ease;
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', sans-serif;
  font-size: 15px;
  line-height: 1.72;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
h1,h2,h3,h4 { line-height: 1.25; letter-spacing: -.02em; }
em { font-style: italic; }
strong { font-weight: 650; }

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--navy);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-inner {
  width: 100%;
  max-width: calc(var(--max-w) + 64px);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo span { color: #93c5fd; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { color: #e2e8f0; background: rgba(255,255,255,.07); }
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,.1);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 6px;
  font-size: 22px;
  line-height: 1;
}

/* ── Page wrapper ── */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 52px 28px 88px;
}
.page-header {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}
.page-header p { font-size: 14px; color: var(--muted); margin: 0; }

/* ── Section label ── */
.section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.section-gap { margin-top: 56px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 8px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); }
.btn-outline {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}
.btn-outline:hover { background: rgba(255,255,255,.18); }
.btn-ghost {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--border); }

/* ── Hero ── */
.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: var(--navy);
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .38;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 48px;
  max-width: calc(var(--max-w) + 96px);
  margin: 0 auto;
  left: 0; right: 0;
}
.hero-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 14px;
}
.hero-title {
  font-size: clamp(26px, 3.8vw, 42px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  max-width: 580px;
  margin-bottom: 14px;
}
.hero-sub {
  font-size: 15.5px;
  color: #cbd5e1;
  max-width: 500px;
  line-height: 1.62;
  margin-bottom: 30px;
}
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Home: latest paper ── */
.latest-paper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid var(--blue-m);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 52px;
}
.latest-badge {
  flex-shrink: 0;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 3px 9px;
  border-radius: 5px;
  margin-top: 3px;
}
.latest-body h3 { font-size: 14.5px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.latest-body .authors { font-size: 13px; color: #475569; margin-bottom: 6px; }
.latest-body .journal { font-size: 12.5px; color: var(--blue); font-weight: 600; }

/* ── Home: research pillars ── */
.pillars {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
  margin-bottom: 52px;
}
.pillar {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.pillar:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.pillar-icon { font-size: 22px; margin-bottom: 10px; }
.pillar h3 { font-size: 13.5px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.pillar p  { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }

/* ── Home: news ── */
.news-list { margin-bottom: 52px; }
.news-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.news-item:first-child { border-top: none; }
.news-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}
.news-dot.paper   { background: var(--blue); }
.news-dot.award   { background: #f59e0b; }
.news-dot.event   { background: #10b981; }
.news-dot.member  { background: #8b5cf6; }
.news-date { font-size: 12px; color: var(--muted); min-width: 60px; padding-top: 1px; flex-shrink: 0; }
.news-text { font-size: 13.5px; color: var(--text); line-height: 1.55; }
.news-text a { color: var(--blue); }
.news-text a:hover { text-decoration: underline; }

/* ── Research page ── */
.research-intro {
  background: var(--bg-soft);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin-bottom: 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}
.research-body { font-size: 14.5px; color: #374151; line-height: 1.75; }
.research-body p { margin-bottom: 18px; }
.research-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 28px 0;
  background: var(--bg-soft);
}
.research-figure img { width: 100%; display: block; }
.research-figure figcaption {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.fig-placeholder {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.method-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 48px; }
.method-tag {
  font-size: 12px;
  padding: 5px 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
}
.contribution {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.contribution:last-child { border-bottom: none; }
.contribution-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
}
.contribution-body h3 { font-size: 14.5px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.contribution-body p  { font-size: 14px; color: #475569; margin-bottom: 10px; }
.contribution-figure {
  width: 200px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  align-self: flex-start;
}
.contribution-figure img { width: 100%; display: block; }
.contribution-figure .fig-placeholder { height: 130px; font-size: 11px; }
.contribution-figure figcaption {
  font-size: 10.5px;
  color: var(--muted);
  padding: 6px 8px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.lecture-list { display: flex; flex-direction: column; gap: 0; }
.lecture-row {
  display: flex;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.lecture-row:last-child { border-bottom: none; }
.lecture-date  { font-size: 12px; color: var(--muted); min-width: 88px; flex-shrink: 0; }
.lecture-title { font-size: 14px; color: var(--text); }

/* ── Publications ── */
.pub-filters { margin-bottom: 32px; }
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}
.filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  min-width: 52px;
}
.filter-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}
.scholar-links { display: flex; gap: 10px; margin-bottom: 36px; flex-wrap: wrap; }
.scholar-link {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-soft);
  transition: background var(--transition);
}
.scholar-link:hover { background: var(--bg-alt); }

.pub-year-group { margin-bottom: 8px; }
.year-divider {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 16px;
}
.year-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.pub-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--bg-alt);
}
.pub-item:last-child { border-bottom: none; }
.pub-num { font-size: 11px; font-weight: 700; color: #cbd5e1; min-width: 26px; text-align: right; padding-top: 3px; flex-shrink: 0; }
.pub-title  { font-size: 14px; font-style: italic; color: var(--navy); margin-bottom: 3px; line-height: 1.5; }
.pub-authors{ font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.pub-journal{ font-size: 12.5px; color: #475569; }
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: .03em;
}
.badge-nature { background: #dbeafe; color: #1d4ed8; }
.badge-pnas   { background: #dcfce7; color: #15803d; }
.badge-cell   { background: #fef3c7; color: #b45309; }

.media-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.media-item:last-child { border-bottom: none; }
.media-date { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 70px; flex-shrink: 0; padding-top: 1px; }
.media-link { font-size: 14px; color: var(--blue); display: block; margin-bottom: 2px; }
.media-link:hover { text-decoration: underline; }
.media-source { font-size: 12px; color: var(--muted); }

/* ── People ── */
.pi-card {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border: 1px solid var(--blue-m);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 52px;
}
.pi-photo-wrap {
  width: 170px; height: 220px;
  border-radius: 10%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--blue-m);
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  
}
.pi-photo-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: /*rotate(270deg)*/ scale(1); 
}
.pi-photo-wrap .initials { font-size: 28px; font-weight: 700; color: #94a3b8; }
.pi-info { flex: 1; min-width: 220px; }
.pi-info h2 { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 2px; }
.pi-zh   { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.pi-title-block { font-size: 13.5px; color: #475569; line-height: 1.65; margin-bottom: 14px; }
.pi-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pi-link {
  font-size: 12px;
  color: var(--blue);
  border: 1px solid var(--blue-m);
  padding: 4px 13px;
  border-radius: 20px;
  background: var(--blue-lt);
  transition: background var(--transition);
}
.pi-link:hover { background: var(--blue-m); }

.people-section { margin-bottom: 48px; }
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.person-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px 16px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.person-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.person-avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  margin: 0 auto 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #94a3b8;
  flex-shrink: 0;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-name { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 1px; }
.person-zh   { font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.person-role-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 20px;
  margin-bottom: 6px;
}
.person-meta { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.person-research { font-size: 11.5px; color: #475569; font-style: italic; margin-top: 4px; }

/* Alumni */
.alumni-section { margin-bottom: 52px; }
.alumni-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  margin-top: 12px;
  padding: 8px 0;
}
.alumni-toggle:hover { color: var(--text); }
.alumni-toggle .chevron { font-size: 14px; transition: transform var(--transition); }
.alumni-toggle.open .chevron { transform: rotate(90deg); }
.alumni-list {
  display: none;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.alumni-list.open { display: block; }
.alumni-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.alumni-row:last-child { border-bottom: none; }
.alumni-row:nth-child(even) { background: var(--bg-soft); }
.alumni-name { font-weight: 600; color: var(--navy); }
.alumni-years { font-size: 12px; color: var(--muted); }
.alumni-current { font-size: 12.5px; color: #475569; font-style: italic; }
.alumni-link { font-size: 12px; color: var(--blue); }
.alumni-link:hover { text-decoration: underline; }

/* Collaborators */
.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.collab-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 17px;
  background: var(--bg-soft);
  transition: box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.collab-card:hover { box-shadow: var(--shadow-sm); }
.collab-name  { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.collab-role  { font-size: 12px; color: var(--blue); margin-bottom: 2px; }
.collab-inst  { font-size: 12px; color: var(--muted); line-height: 1.5; }
/* Link row — pushed to bottom via margin-top:auto, reserves space on all cards */
.collab-link-row { margin-top: auto; padding-top: 7px; min-height: 22px; }
.collab-ext-link { font-size: 11.5px; color: var(--blue); }
.collab-ext-link:hover { text-decoration: underline; }

/* ── Gallery ── */
.gallery-filter { margin-bottom: 32px; }
.gallery-year-section { margin-bottom: 48px; }
.gallery-year-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.gallery-year-heading::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.gallery-item:hover { transform: scale(1.025); box-shadow: var(--shadow); }
/* Square thumbnail area */
.gallery-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  background: var(--bg-soft);
  flex-shrink: 0;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Multi-photo count badge (bottom-right corner of thumbnail) */
.gallery-count-badge {
  position: absolute;
  bottom: 7px;
  right: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  pointer-events: none;
  letter-spacing: .02em;
}
/* Caption below image */
.gallery-caption {
  padding: 8px 10px 9px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;          /* fill remaining height in .gallery-item so margin-top:auto works */
}
.gallery-caption-title { font-size: 12px; font-weight: 600; color: var(--navy); line-height: 1.4; }
/* Bottom row: date left, category tag right — always flush to bottom */
.gallery-caption-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}
.gallery-caption-date { font-size: 11px; color: var(--muted); }
/* Category tag */
.gallery-cat-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Placeholder (when src is null) */
.gallery-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  padding: 12px;
}
.gallery-placeholder .ph-icon { font-size: 24px; opacity: .4; }
.gallery-placeholder .ph-path { font-size: 10px; opacity: .6; font-family: monospace; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.lightbox.open { display: flex; }
.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,.5);
}
.lightbox-img-wrap img { max-width: 90vw; max-height: 80vh; display: block; }
.lightbox-meta { text-align: center; }
.lightbox-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.lightbox-caption { font-size: 13px; color: #94a3b8; }
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  opacity: .7;
  transition: opacity var(--transition);
}
.lightbox-close:hover { opacity: 1; }
/* Lightbox thumbnail strip for multi-photo entries */
.lb-thumb-strip {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
  max-width: 90vw;
}
.lb-thumb-item {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.45;
  border: 2px solid transparent;
  transition: opacity var(--transition), border-color var(--transition);
  display: block;
}
.lb-thumb-item:hover { opacity: 0.75; }
.lb-thumb-item.active { opacity: 1; border-color: #fff; }
/* Lightbox prev/next navigation for multi-photo entries */
.lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
}
.lb-nav-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 14px;
  border-radius: 6px;
  opacity: .7;
  transition: opacity var(--transition);
}
.lb-nav-btn:hover:not(:disabled) { opacity: 1; }
.lb-nav-btn:disabled { opacity: .2; cursor: default; }
.lb-counter { font-size: 12.5px; color: rgba(255,255,255,.6); min-width: 40px; text-align: center; }

/* ── Join Us ── */
.position-cards { display: flex; flex-direction: column; gap: 16px; margin-bottom: 0; }
.position-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  background: var(--bg);
  transition: box-shadow var(--transition);
}
.position-card:hover { box-shadow: var(--shadow-sm); }
.position-status {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: .04em;
}
.position-status.open { background: var(--green-lt); color: var(--green); }
.position-status.occasional { background: var(--amber-lt); color: var(--amber); }
.position-card h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.position-card p  { font-size: 14px; color: #475569; margin-bottom: 14px; }
.position-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.position-tag {
  font-size: 11.5px;
  padding: 3px 11px;
  border-radius: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--muted);
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 14px;
  margin-top: 20px;
}
.offer-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.offer-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.offer-item strong { font-size: 13.5px; font-weight: 700; color: var(--navy); display: block; margin-bottom: 3px; }
.offer-item p { font-size: 12.5px; color: #475569; margin: 0; line-height: 1.55; }

.contact-block {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
  align-items: start;
  margin-top: 20px;
}
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-row { display: flex; gap: 14px; align-items: flex-start; }
.contact-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.contact-row strong { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.contact-row p, .contact-row div { font-size: 13px; color: #475569; line-height: 1.65; margin: 0; }
.contact-row a { color: var(--blue); }
.contact-row a:hover { text-decoration: underline; }
.contact-map iframe { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }

/* ── Footer ── */
.footer {
  background: var(--navy);
  color: #64748b;
  text-align: center;
  padding: 28px 24px;
  font-size: 13px;
  line-height: 1.6;
}
.footer a { color: #60a5fa; }
.footer a:hover { text-decoration: underline; }

/* ── Mobile ── */
@media (max-width: 700px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--navy);
    padding: 12px 0 20px;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 24px; border-radius: 0; }
  .nav-toggle { display: block; }
  .nav { position: relative; }

  .hero { height: 420px; }
  .hero-overlay { padding: 0 24px; }

  .pillars { grid-template-columns: 1fr; }
  .latest-paper { flex-direction: column; gap: 12px; }
  .page { padding: 36px 18px 64px; }
  .page-header h1 { font-size: 26px; }

  .people-grid { grid-template-columns: repeat(2,1fr); }
  .collab-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2,1fr); }
  .offer-grid { grid-template-columns: 1fr; }
  .contact-block { grid-template-columns: 1fr; }
  .position-card { padding: 20px; }

  .contribution { flex-direction: column; }
  .contribution-figure { width: 100%; }
}
