/* ==========================================================
   PS Research Group — psminimal theme
   Organized stylesheet — values unchanged from source.
   Section order:
   01. Design tokens
   02. Base & reset
   03. Layout containers
   04. Header & navigation
   05. Hero
   06. Buttons
   07. Section blocks & cards
   08. Publications
   09. Team & People
   10. PI profile
   11. About page & stats
   12. Research pages
   13. Facilities
   14. Gallery & lightbox
   15. News
   16. Alumni
   17. Footer
   18. Miscellaneous
   Duplicate selectors from earlier revisions are kept in
   original cascade order and flagged with NOTE comments.
   ========================================================== */

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

/* ==========================================================
   01. Design tokens
   ========================================================== */

:root {
  --primary: #0F4C81;
  --primary-dark: #0A355A;
  --accent: #C97C2C;
  --text: #1F2937;
  --muted: #6B7280;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E5E7EB;
  --max: 1200px;
}

/* ==========================================================
   02. Base & reset
   ========================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter,system-ui,sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

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

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

a:hover {
  text-decoration: underline;
}

h1,h2,h3 {
  font-family: Fraunces,serif;
  line-height: 1.15;
  margin-top: 0;
}

h2 {
  color: var(--primary);
}

/* ==========================================================
   03. Layout containers
   ========================================================== */

.container,.container-wide {
  width: min(100% - 48px,var(--max));
  margin: auto;
}

/* ==========================================================
   04. Header & navigation
   ========================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 24px;
  row-gap: 4px;
  min-height: 80px;
  flex-wrap: wrap;
  padding-block: 12px;
}

.site-brand {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-name {
  display: block;
  font-family: Fraunces,serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
}

.brand-sub {
  display: block;
  margin-top: 8px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: #6b7280;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  row-gap: 4px;
}

.nav-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .92rem;
  color: #1f2937;
  text-decoration: none;
  white-space: nowrap;
}

.nav-list a:hover {
  background: #f3f4f6;
}

.nav-list a.active {
  background: #0F4C81;
  color: #fff;
}

.nav-toggle {
  display: none;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 12px 24px;
  }

  .nav-list.open {
    display: flex;
  }
}

/* ==========================================================
   05. Hero
   ========================================================== */

.hero {
  width: min(100% - 48px,var(--max));
  margin: auto;
  padding: 50px 0;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.8rem,5vw,4.5rem);
  margin: .5rem 0 1rem;
}

.hero-text {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 60ch;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-placeholder {
  min-height: 320px;
  border-radius: 20px;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #fff;
}

.hero-page {
  padding: 60px 0 50px;
}

.hero-page .hero-content {
  max-width: 760px;
}

.hero-page h1 {
  margin-top: 10px;
  margin-bottom: 20px;
}

.hero-page p {
  max-width: 700px;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--muted);
}

/* NOTE: '.hero-page' redefined (revision 2) — later declarations win */
.hero-page {
  padding: 50px 0 40px;
}

/* NOTE: '.hero-page .hero-content' redefined (revision 2) — later declarations win */
.hero-page .hero-content {
  max-width: 760px;
}

/* NOTE: '.hero-page p' redefined (revision 2) — later declarations win */
.hero-page p {
  max-width: 700px;
}

/* FIX: inner-page hero titles inherited .hero h1's large homepage-
   scale font-size (clamp 2.8-4.5rem) and wrapped to multiple lines
   inside the 760px hero-page column. Placed after .hero h1 in
   cascade order so it correctly wins for pages with both classes. */
.hero-page h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
}

/* ==========================================================
   06. Buttons
   ========================================================== */

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  transition: .25s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* ==========================================================
   07. Section blocks & cards
   ========================================================== */

section.block {
  padding: 30px 0;
  border-top: 1px solid var(--border);
}

.section-label {
  color: var(--accent);
  text-transform: uppercase;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
}

section.block h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  transition: .25s;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(0,0,0,.10);
}

.card h3 {
  margin-bottom: .5rem;
}

.card p {
  color: var(--muted);
}

section.block p,
section.block ul,
section.block ol {
  max-width: 75ch;
}

section.block img {
  border-radius: 12px;
  border: 1px solid var(--border);
}

section.block img[src*="/images/team/"] {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
}

.pi-photo img[src*="/images/team/"] {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,.1);
}

/* ==========================================================
   08. Publications
   ========================================================== */

.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 18px;
}

.pub-item:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.pub-year {
  font-weight: 700;
  color: var(--primary);
}

.pub-authors,.pub-venue {
  color: var(--muted);
}

.pub-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.pub-group-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin: 2.5rem 0 1rem;
}

.pub-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f5f7fa;
  color: var(--primary);
  font-size: .75rem;
  font-weight: 600;
  vertical-align: middle;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(340px,1fr));
  gap: 28px;
  align-items: stretch;
}

.pub-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: all .25s ease;
}

.pub-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.pub-meta {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 600;
}

.pub-card h3 {
  font-size: 1.15rem;
  line-height: 1.45;
  margin-bottom: 18px;
}

.pub-card p {
  color: var(--muted);
  margin-top: auto;
}

/* ==========================================================
   09. Team & People
   ========================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 30px;
  margin-top: 50px;
}

.team-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: .3s;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.team-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.team-card h3 {
  margin: 20px 20px 8px;
}

.team-card .role {
  margin: 0 20px 24px;
  color: var(--muted);
}

/* NOTE: '.team-card img' redefined (revision 2) — later declarations win */
.team-card img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  margin-top: 20px;
}

.team-body {
  padding: 24px;
}

.team-body h3 {
  text-align: center;
  margin-bottom: 10px;
}

.member-role {
  text-align: center;
  margin-bottom: 28px;
  color: var(--primary);
  font-weight: 600;
  position: relative;
}

.member-role::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: #e5e7eb;
  margin: 16px auto 0;
}

/* NOTE: '.team-grid' redefined (revision 2) — later declarations win */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
  gap: 32px;
  margin-top: 50px;
}

/* NOTE: '.team-card' redefined (revision 2) — later declarations win */
.team-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: .3s;
}

/* NOTE: '.team-card:hover' redefined (revision 2) — later declarations win */
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0,0,0,.07);
}

/* NOTE: '.team-card img' redefined (revision 3) — later declarations win */
.team-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.team-placeholder {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f6f6;
  font-size: 3rem;
}

/* NOTE: '.team-body' redefined (revision 2) — later declarations win */
.team-body {
  padding: 24px;
}

/* NOTE: '.team-body h3' redefined (revision 2) — later declarations win */
.team-body h3 {
  margin-bottom: 8px;
}

/* NOTE: '.member-role' redefined (revision 2) — later declarations win */
.member-role {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 18px;
}

.member-education {
  margin-top: 18px;
  font-size: .95rem;
  color: var(--muted);
}

.member-links {
  display: flex;
  gap: 18px;
  margin-top: 24px;
}

.member-links a {
  text-decoration: none;
  font-weight: 600;
}

.member-category {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 600;
}

.alumni-card .team-body {
  padding: 20px;
}

.alumni-card .member-role {
  margin-bottom: 10px;
}

.alumni-card .member-links {
  margin-top: 16px;
}

.member-education,
.member-project,
.member-period,
.member-supervision {
  margin-top: 10px;
  line-height: 1.45;
  font-size: .95rem;
}

/* -- responsive: team & people -- */
@media(max-width:600px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
  .member-links {
    flex-direction: column;
    gap: 10px;
  }
}

/* ==========================================================
   10. PI profile
   ========================================================== */


.pi-content h3 {
  margin-bottom: 8px;
}

.pi-title {
  color: var(--muted);
  margin-bottom: 25px;
  line-height: 1.7;
}

.pi-bio {
  margin-bottom: 25px;
}

.pi-content h4 {
  margin-top: 30px;
  margin-bottom: 12px;
}

.pi-interests {
  padding-left: 20px;
}

.pi-interests li {
  margin-bottom: 8px;
}

.pi-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.pi-links-primary {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.pi-links-primary a {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: .25s;
}

.pi-links-primary a:hover {
  transform: translateY(-2px);
}

.pi-links-secondary {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* NOTE: '.pi-links-secondary' redefined (revision 2) — later declarations win */
.pi-links-secondary {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.pi-links-secondary a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.pi-links-secondary a:hover {
  text-decoration: underline;
}

.pi-links-secondary span {
  color: #9ca3af;
}

.pi-stats {
  display: flex;
  gap: 80px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.pi-stat {
  text-align: center;
}

.pi-stat span {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.pi-stat small {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pi-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 50px;
  align-items: center;
  margin-top: 50px;
  background: var(--surface, #fff);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(0,0,0,.06);
}

.pi-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,.1);
}

.pi-bio {
  margin-top: 25px;
  line-height: 1.7;
}

/* NOTE: '.pi-content h3' redefined (revision 2) — later declarations win */
.pi-content h3 {
  margin-bottom: 10px;
}

.pi-role {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

.pi-tagline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.pi-tag {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: #f4f4f4;
  color: var(--primary);
  font-weight: 500;
  font-size: .9rem;
}

/* NOTE: '.pi-bio' redefined (revision 2) — later declarations win */
.pi-bio {
  margin-bottom: 30px;
  max-width: 700px;
}

/* NOTE: '.pi-links' redefined (revision 2) — later declarations win */
.pi-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 30px;
}

/* NOTE: '.pi-links-primary a' redefined (revision 2) — later declarations win */
.pi-links-primary a {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  transition: .25s;
}

/* NOTE: '.pi-links-primary a:hover' redefined (revision 2) — later declarations win */
.pi-links-primary a:hover {
  transform: translateY(-2px);
  opacity: .95;
}

/* NOTE: '.pi-links-secondary a:hover' redefined (revision 2) — later declarations win */
.pi-links-secondary a:hover {
  text-decoration: underline;
}

.profile-links {
  margin-top: 24px;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 18px;
}

.profile-links a {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: .3s ease;
}

.profile-links a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* NOTE: '.profile-links' redefined (revision 2) — later declarations win */
.profile-links {
  margin-top: 24px;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 18px;
}

/* NOTE: '.profile-links a' redefined (revision 2) — later declarations win */
.profile-links a {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: .3s ease;
}

/* NOTE: '.profile-links a:hover' redefined (revision 2) — later declarations win */
.profile-links a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.quick-facts {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(0,0,0,.08);
}

.quick-facts h3 {
  margin-bottom: 1.5rem;
}

.quick-facts dl {
  margin: 0;
}

.quick-facts dt {
  font-weight: 600;
  color: var(--primary);
  margin-top: 1rem;
}

.quick-facts dd {
  margin: 0;
  color: var(--text-light);
}

/* NOTE: '.quick-facts' redefined (revision 2) — later declarations win */
.quick-facts {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 2rem;
}

/* NOTE: '.quick-facts h3' redefined (revision 2) — later declarations win */
.quick-facts h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* NOTE: '.quick-facts dl' redefined (revision 2) — later declarations win */
.quick-facts dl {
  margin: 0;
}

/* NOTE: '.quick-facts dt' redefined (revision 2) — later declarations win */
.quick-facts dt {
  font-weight: 600;
  color: var(--primary);
  margin-top: 1rem;
}

.quick-facts dt:first-child {
  margin-top: 0;
}

/* NOTE: '.quick-facts dd' redefined (revision 2) — later declarations win */
.quick-facts dd {
  margin: 0.25rem 0 1rem;
  color: var(--text-light);
}

/* -- responsive: pi profile -- */
@media(max-width:900px) {
  .pi-card {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .pi-photo img {
    width: 260px;
    margin: 0 auto;
  }
  .pi-stats {
    flex-wrap: wrap;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .join-card {
    padding: 40px 25px;
  }
}

/* ==========================================================
   11. About page & stats
   ========================================================== */

/* Consolidated from 3 duplicate revisions above; sized down ~50%,
   then back up ~25% per follow-up request. */
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9375rem 1.25rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,.10);
}

/* FIX: 1fr columns stretched cards to fill the full 520px row,
   spreading them out and breaking the left alignment of the photo/
   name block above. max-content sizes columns to their content and
   auto-fit collapses unused tracks, so the row hugs the left edge. */
.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, max-content));
  justify-content: start;
  gap: 0.9375rem;
  margin-top: 1.5rem;
}

.stat-value {
  font-size: 1.4375rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .2rem;
}

.stat-label {
  color: var(--text-light);
  font-size: .875rem;
}

.about-hero {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.about-photo {
  flex: 0 0 220px;
}

.about-photo img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid white;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.about-intro {
  flex: 1;
}

.about-intro h1 {
  margin-bottom: .5rem;
}

.about-intro h2 {
  margin-bottom: 1rem;
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-biography {
  line-height: 1.8;
}

/* NOTE: '.about-content' redefined (revision 2) — later declarations win */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* NOTE: '.about-biography' redefined (revision 2) — later declarations win */
.about-biography {
  line-height: 1.8;
}

.about-biography p:first-child {
  margin-top: 0;
}

/* -- responsive: about page & stats -- */
@media(max-width:900px) {
  .about-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .about-content {
    grid-template-columns: 1fr;
  }
  .quick-facts {
    position: static;
  }
}

/* ==========================================================
   12. Research pages
   ========================================================== */

.research-hero {
  text-align: center;
}

.research-hero .container {
  max-width: 850px;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
  gap: 32px;
  margin-top: 60px;
}

.research-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  transition: transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}

.research-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

.research-card h3 {
  margin-bottom: 18px;
}

.research-card p {
  margin-bottom: 24px;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.research-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f5f7fa;
  color: #495057;
  font-size: .85rem;
  font-weight: 500;
}

.research-interest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.research-interest-card {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(0,0,0,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.research-interest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

.research-interest-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--primary);
}

.research-interest-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--text-light);
}

/* -- responsive: research pages -- */
@media (max-width:768px) {
  .research-grid,
    .collab-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   13. Facilities
   ========================================================== */

.facility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(420px,1fr));
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 50px;
}

.facility-card {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}

.facility-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

.facility-image-wrapper {
  flex: 0 0 25px;
  height: 220px;
}

.facility-image {
  width: 300px;
  height: 300px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.facility-image-block {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
}

.facility-image-block .facility-image {
  height: 220px;
}

.facility-image-strip {
  display: flex;
  gap: 4px;
}

.facility-image-thumb {
  width: 50%;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
}

.facility-content {
  flex: 1;
  padding: 20px;
}

.facility-description ul {
  margin: 0;
  padding-left: 10px;
}

.facility-description li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.facility-links {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 28px;
  margin-top: 60px;
}

.facility-link-card {
  border-top: 4px solid transparent;
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
  cursor: pointer;
}

.facility-link-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 16px 36px rgba(0,0,0,.10);
  border-top-color: var(--primary);
}

.facility-link-card h3 {
  margin-bottom: 15px;
}

.facility-link-card p {
  margin: 0;
  color: var(--text-light);
}

.facility-link-arrow {
  display: inline-block;
  margin-top: 20px;
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 700;
  transition: transform .25s ease;
}

.facility-link-card:hover .facility-link-arrow {
  transform: translateX(6px);
}

.facility-link-card:hover h3 {
  color: var(--primary);
}

/* -- responsive: facilities -- */
@media (max-width:768px) {
  .facility-card {
    flex-direction: column;
  }
  .facility-image-wrapper {
    flex: auto;
    height: 240px;
  }
  .facility-image-block {
    flex: auto;
    width: 100%;
  }
  .facility-image-block .facility-image,
  .facility-image {
    width: 100%;
  }
}

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

/* ==========================================================
   14. Gallery & lightbox
   ========================================================== */

.gallery-section {
  padding: 50px 0;
}

.gallery-section:first-of-type {
  padding-top: 30px;
}

.gallery-category {
  font-size: 1.8rem;
  margin-bottom: 28px;
  color: var(--primary);
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 24px;
}

.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 16px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all .3s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.gallery-grid img:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(0,0,0,.12);
}

/* ==========================================================
   Research journey — album card
   ========================================================== */

.album-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem auto 0;
  cursor: pointer;
  width: fit-content;
  text-align: center;
}

.album-stack {
  position: relative;
  width: 420px;
  height: 300px;
}

.album-layer {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: var(--border);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.album-layer-3 {
  transform: rotate(4deg) translate(6px, 6px);
  z-index: 1;
}

.album-layer-2 {
  transform: rotate(-3deg) translate(-4px, 4px);
  z-index: 2;
}

.album-cover {
  position: relative;
  z-index: 3;
  width: 420px;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transition: transform .2s ease;
}

.album-card:hover .album-cover {
  transform: scale(1.02) rotate(-1deg);
}

.album-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}

.album-badge {
  display: inline-block;
  width: fit-content;
  margin: 0 auto;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: .25rem .6rem;
  border-radius: 999px;
}

.album-label {
  font-size: .9rem;
  color: var(--muted);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: .3s ease;
  z-index: 1000;
  padding: 40px;
}

.lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 2.8rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: .2s ease;
}

.lightbox-close:hover {
  transform: scale(1.15);
}

/* ==========================================================
   15. News
   ========================================================== */

.news-content h2 {
  margin-top: 20px;
  margin-bottom: 30px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.news-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-content li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 14px;
  line-height: 1.8;
}

.news-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
}

/* ==========================================================
   16. Alumni
   ========================================================== */

.alumni-placeholder {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}

.alumni-card {
  display: flex;
  flex-direction: column;
}

.alumni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
  gap: 28px;
  margin-top: 40px;
}

/* NOTE: '.alumni-card' redefined (revision 2) — later declarations win */
.alumni-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: .3s;
}

.alumni-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

/* NOTE: '.alumni-placeholder' redefined (revision 2) — later declarations win */
.alumni-placeholder {
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.4rem;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}

.alumni-body {
  padding: 22px;
}

.alumni-role {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 14px;
}

.alumni-meta {
  margin-top: 14px;
  line-height: 1.55;
  color: var(--text);
}

.alumni-meta strong {
  color: var(--heading);
}

.alumni-members {
  margin: 10px 0 0;
  padding-left: 20px;
}

.alumni-members li {
  margin-bottom: 6px;
}

.alumni-members a {
  text-decoration: none;
  color: var(--primary);
}

.alumni-members a:hover {
  text-decoration: underline;
}

.alumni-project-title {
  font-size: 1.35rem;
  margin-bottom: 16px;
  color: var(--heading);
}

.alumni-body h3 a {
  color: var(--heading);
  text-decoration: none;
  transition: color .25s;
}

.alumni-body h3 a:hover {
  color: var(--primary);
}

/* NOTE: '.alumni-body h3 a' redefined (revision 2) — later declarations win */
.alumni-body h3 a {
  color: var(--primary);
  text-decoration: none;
  transition: color .25s ease;
}

/* NOTE: '.alumni-body h3 a:hover' redefined (revision 2) — later declarations win */
.alumni-body h3 a:hover {
  color: var(--heading);
  text-decoration: underline;
}

/* ==========================================================
   17. Footer
   ========================================================== */

.site-footer {
  margin-top: 100px;
  background: #0f172a;
  color: #cbd5e1;
  padding: 70px 0 30px;
}

.footer-grid {
  width: min(1180px,92%);
  margin: auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: 50px;
}

.footer-column h3,
.footer-column h4 {
  color: #fff;
  margin-bottom: 18px;
}

.footer-tagline {
  color: #60a5fa;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-column p {
  color: #cbd5e1;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: .2s;
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-column a {
  color: #60a5fa;
  text-decoration: none;
}

.footer-column a:hover {
  text-decoration: underline;
}

.footer-bottom {
  width: min(1180px,92%);
  margin: 50px auto 0;
  padding-top: 25px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
  color: #94a3b8;
}

/* NOTE: '.footer-bottom' redefined (revision 2) — later declarations win */
.footer-bottom {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* -- responsive: footer -- */
@media(max-width:900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* ==========================================================
   18. Miscellaneous
   ========================================================== */

.section-action {
  margin-top: 40px;
  text-align: center;
}

.infra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
  gap: 28px;
  margin-top: 40px;
}

.infra-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all .25s ease;
}

.infra-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.infra-card h3 {
  margin-bottom: 18px;
}

.infra-card ul {
  margin: 0 0 20px;
  padding-left: 18px;
}

.infra-card li {
  margin-bottom: 8px;
  color: var(--text);
}

.infra-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.infra-note {
  margin-top: 40px;
  max-width: 900px;
  color: var(--muted);
  font-style: italic;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
  gap: 28px;
  margin-top: 40px;
}

.partner-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all .25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.partner-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.partner-card h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  line-height: 1.4;
}

.partner-tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
}

.partner-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 25px;
  margin-top: 50px;
}

.join-card {
  text-align: center;
  max-width: 900px;
  margin: auto;
  padding: 60px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fafafa;
}

.join-card h2 {
  margin: 15px 0;
}

.join-card p {
  max-width: 700px;
  margin: 0 auto 30px;
}

.project-list {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-item {
  padding: 28px 32px;
  border-left: 4px solid var(--primary);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
  transition: .25s ease;
}

.project-item h3 {
  margin-bottom: 10px;
}

.project-item p {
  margin: 0;
}

.project-item:hover {
  transform: translateX(4px);
}

.workflow {
  margin-top: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.workflow-step {
  flex: 1;
  min-width: 220px;
  text-align: center;
}

.workflow-number {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.workflow-step h3 {
  margin-bottom: 12px;
}

.workflow-arrow {
  color: #d5d9df;
  font-size: 2.2rem;
}

.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
  gap: 32px;
  margin-top: 60px;
}

.collab-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  transition: .3s ease;
  display: flex;
  flex-direction: column;
}

.collab-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

.collab-card h3 {
  margin-bottom: 24px;
}

.collab-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.collab-card li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.collab-card li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 1.2rem;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 32px;
  margin-top: 60px;
}

.highlight-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  text-align: center;
  transition: .3s ease;
}

.highlight-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

.highlight-number {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

.highlight-card h3 {
  margin-bottom: 15px;
}

.highlight-card p {
  margin: 0;
}

.featured-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 60px;
}

.featured-paper {
  background: #fff;
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
  transition: .3s ease;
}

.featured-paper:hover {
  transform: translateX(4px);
}

.featured-paper h3 {
  margin-bottom: 14px;
}

.featured-paper .authors {
  margin-bottom: 10px;
  color: var(--text-light);
}

.featured-paper .journal {
  margin-bottom: 20px;
}

.bibbase-container {
  margin-top: 60px;
  background: #fff;
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
}

/* NOTE: '.highlights-grid' redefined (revision 2) — later declarations win */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 32px;
  margin-top: 60px;
}

/* NOTE: '.highlight-card' redefined (revision 2) — later declarations win */
.highlight-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  text-align: center;
  transition: transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}

/* NOTE: '.highlight-card:hover' redefined (revision 2) — later declarations win */
.highlight-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

/* NOTE: '.highlight-number' redefined (revision 2) — later declarations win */
.highlight-number {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

/* NOTE: '.highlight-card h3' redefined (revision 2) — later declarations win */
.highlight-card h3 {
  margin-bottom: 12px;
}

/* NOTE: '.highlight-card p' redefined (revision 2) — later declarations win */
.highlight-card p {
  margin: 0;
}

/* NOTE: '.bibbase-container' redefined (revision 2) — later declarations win */
.bibbase-container {
  margin-top: 60px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
}

.bibbase_container {
  font-size: 1rem;
  line-height: 1.8;
}

.bibbase_group {
  margin-bottom: 50px;
}

.bibbase_group_head {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--heading);
}

.bibbase_paper {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.bibbase_paper:last-child {
  border-bottom: none;
}

.bibbase_paper_title {
  font-weight: 600;
}

.bibbase_paper_title a {
  text-decoration: none;
}

.bibbase_paper_title a:hover {
  color: var(--primary);
}

.bibbase_author {
  color: var(--text-light);
}

.bibbase_journal {
  color: var(--text-light);
}

.teaching-content {
  max-width: 1000px;
  margin: 0 auto;
}

.teaching-content h2 {
  margin-bottom: 30px;
  color: var(--heading);
}

.teaching-content table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.04);
}

.teaching-content thead {
  background: var(--primary);
  color: #fff;
}

.teaching-content th {
  padding: 18px 20px;
  text-align: left;
  font-weight: 600;
}

.teaching-content td {
  padding: 18px 20px;
  border-top: 1px solid var(--border);
}

.teaching-content tbody tr {
  transition: background .25s ease;
}

.teaching-content tbody tr:hover {
  background: #f8fafc;
}

.designation {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.8;
}

.career-timeline {
  max-width: 850px;
  margin: 0 auto;
  position: relative;
}

.career-timeline::before {
  content: "";
  position: absolute;
  left: 115px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #d9d9d9;
}

.career-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  column-gap: 3rem;
  position: relative;
  margin-bottom: 2.5rem;
}

/* FIX: template renders a .career-marker element before .career-year;
   left undeclared, it consumed a grid slot and pushed .career-content
   onto a phantom row, producing a large empty gap. The timeline dot is
   already drawn by .career-year::after, so the marker is redundant. */
.career-marker {
  display: none;
}

.career-year {
  font-weight: 700;
  color: var(--primary);
  text-align: right;
  position: relative;
}

.career-year::after {
  content: "";
  position: absolute;
  right: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
}

.career-content h3 {
  margin: 0 0 0.35rem;
}

.career-content p {
  margin: 0;
  color: var(--text-light);
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 2rem;
}

.info-card {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(0,0,0,.08);
}

.info-card-wide {
  grid-column: span 2;
}

@media (max-width: 700px) {
  .info-card-wide {
    grid-column: span 1;
  }
}

.info-card h3 {
  margin-top: 0;
  color: var(--primary);
}

.info-card ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.info-card li {
  margin-bottom: .6rem;
  line-height: 1.6;
}

/* -- responsive: miscellaneous -- */
@media (max-width:900px) {
  .workflow {
    flex-direction: column;
  }
  .workflow-arrow {
    transform: rotate(90deg);
  }
}

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

@media (max-width:768px) {
  .highlights-grid {
    grid-template-columns: 1fr;
  }
  .bibbase-container {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .career-timeline::before {
    left: 18px;
  }
  .career-item {
    grid-template-columns: 1fr;
    padding-left: 3rem;
  }
  .career-year {
    text-align: left;
    margin-bottom: 0.5rem;
  }
  .career-year::after {
    left: -28px;
    right: auto;
  }
}

/* ==========================================================
   19. Section spacing fixes (Research & Publications pages)
   These section-modifier classes had zero CSS anywhere,
   causing sections to butt flush against each other with no
   vertical rhythm, unlike About/Home which use styled classes.
   ========================================================== */

.philosophy,
.research-areas,
.current-projects,
.research-workflow,
.funded-projects,
.collaborations,
.research-highlights,
.publication-highlights,
.publication-list,
.research-profiles,
.our-lab {
  padding: 50px 0;
}

.section-header {
  margin-bottom: 2rem;
}

/* ==========================================================
   20. Publications page — BibBase embed overflow fix
   The BibBase widget can render wide unconstrained content;
   without a max-width/overflow guard it was forcing the whole
   page wider than the viewport, squeezing the nav.
   ========================================================== */

.bibbase-container {
  max-width: 100%;
  overflow-x: auto;
}

/* ==========================================================
   21. Our Lab photo grid
   ========================================================== */

.lab-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.lab-photo-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

/* ==========================================================
   22. Hero image (right column) — previously only the homepage
   placeholder box was styled; real images in this column had
   no CSS at all.
   ========================================================== */

.hero-image img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.hero-team-photo {
  object-position: center 20%;
}

/* ==========================================================
   23. Achievement strip (About page)
   ========================================================== */

.achievement-strip-label {
  margin-top: 3rem;
  margin-bottom: 0;
  color: var(--primary);
}

.achievement-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.achievement-strip img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .2s ease;
}

.achievement-strip img:hover {
  transform: scale(1.03);
}

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

.achievement-strip-pair img {
  height: 280px;
}

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

/* ==========================================================
   24. Research highlight strip (Research page) — smaller,
   captioned thumbnails replacing the full-size gallery grid.
   ========================================================== */

.highlight-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.highlight-strip figure {
  margin: 0;
}

.highlight-strip img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .2s ease;
}

.highlight-strip img:hover {
  transform: scale(1.03);
}

.highlight-strip figcaption {
  font-size: .8rem;
  color: var(--text-light);
  margin-top: .5rem;
  line-height: 1.4;
}

/* ==========================================================
   25. Mobile fixes — hero grid & wide tables
   ========================================================== */

/* FIX: .hero was a fixed 2-column grid at every screen width,
   squeezing heading text and the hero image into narrow slivers
   on phones instead of stacking. */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-image img {
    height: 220px;
  }
}

/* FIX: teaching/funded-projects tables had no overflow handling,
   forcing the whole page wider than the viewport on phones. Now
   the table scrolls horizontally within its own box instead. */
.teaching-content {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.teaching-content table {
  min-width: 600px;
}

/* ==========================================================
   26. Gallery — two-level card navigation
   ========================================================== */

.gallery-toplevel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.gallery-toplevel-card,
.gallery-album-card {
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: transform .2s ease, box-shadow .2s ease;
}

.gallery-toplevel-card:hover,
.gallery-album-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.10);
}

.gallery-toplevel-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.gallery-toplevel-thumb-team {
  object-position: center 20%;
}

.gallery-toplevel-card h3 {
  padding: 1rem 1.25rem;
  margin: 0;
}

.gallery-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.gallery-album-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.gallery-album-card h4 {
  padding: .85rem 1rem;
  margin: 0;
  font-size: .95rem;
  line-height: 1.4;
}

.gallery-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.gallery-back:hover {
  background: #f3f4f6;
}

.gallery-photos h2 {
  margin-bottom: 1.5rem;
}

/* ==========================================================
   27. Lightbox prev/next navigation
   ========================================================== */

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none;
  font-size: 1.8rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1001;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,.3);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

@media (max-width: 600px) {
  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ==========================================================
   28. Year-grouped collapsible publication list
   ========================================================== */

.pub-year-group {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.pub-year-group summary {
  cursor: pointer;
  padding: 16px 22px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  background: #f8fafc;
  list-style: none;
}

.pub-year-group summary::-webkit-details-marker {
  display: none;
}

.pub-year-group summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 10px;
  transition: transform .2s ease;
}

.pub-year-group[open] summary::before {
  transform: rotate(90deg);
}

.pub-year-count {
  color: var(--text-light);
  font-weight: 500;
  font-size: .9rem;
}

.pub-year-group .pub-list {
  padding: 18px;
}

.pub-year-group .pub-item {
  margin-bottom: 12px;
}

.pub-year-group .pub-item:last-child {
  margin-bottom: 0;
}
