/* ============================================================
   VIL - Vision Intelligence Lab | IIIT Allahabad
   Main Stylesheet
   ============================================================ */

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

/* ---- Variables ---- */
:root {
  --primary: #1E3A6E;
  --primary-light: #2C4F8E;
  --accent: #2563EB;
  --accent-light: #93C5FD;
  --gradient: linear-gradient(135deg, #1E3A6E 0%, #2563EB 55%, #0E7490 100%);
  --gradient-text: linear-gradient(135deg, #1E3A6E, #2563EB);
  --gradient-hover: linear-gradient(135deg, #2C4F8E 0%, #3B82F6 55%, #155E75 100%);

  /* Light Mode — formal, neutral academic palette */
  --bg: #F7F9FC;
  --bg-secondary: #EDF1F7;
  --bg-card: #FFFFFF;
  --text-primary: #1A2436;
  --text-secondary: #3E4C63;
  --text-muted: #64748B;
  --border: rgba(30, 58, 110, 0.14);
  --shadow: 0 4px 24px rgba(30, 58, 110, 0.07);
  --shadow-hover: 0 10px 40px rgba(30, 58, 110, 0.14);
  --nav-bg: rgba(247, 249, 252, 0.96);
  --nav-border: rgba(30, 58, 110, 0.1);
  --tag-bg: rgba(37, 99, 235, 0.07);
  --tag-color: #1E3A6E;
}

[data-theme="dark"] {
  --bg: #0B1220;
  --bg-secondary: #111A2C;
  --bg-card: #172136;
  --text-primary: #E8EDF5;
  --text-secondary: #C3CEDF;
  --text-muted: #8A97AC;
  --border: rgba(96, 148, 235, 0.16);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 10px 40px rgba(37, 99, 235, 0.22);
  --nav-bg: rgba(11, 18, 32, 0.96);
  --nav-border: rgba(96, 148, 235, 0.14);
  --tag-bg: rgba(37, 99, 235, 0.12);
  --tag-color: #93C5FD;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Mulish', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  transition: background 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: 'Lora', serif; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; -webkit-user-drag: none; pointer-events: none; }
ul { list-style: none; }

/* ---- Utility ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section { padding: 90px 0; }

.glimpse-section { padding-top: 30px; }

.glimpse-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 22px;
  max-width: 1120px;
}

.glimpse-frame {
  position: relative;
  width: min(100%, 980px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(135deg, rgba(37,99,235,0.16), rgba(15,23,42,0.4));
}

.glimpse-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.glimpse-nav {
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow-hover);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.glimpse-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(37,99,235,0.24);
}

.glimpse-caption {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 760px;
  margin: 0 auto 18px;
}

.glimpse-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.glimpse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(100, 116, 139, 0.35);
  cursor: pointer;
  transition: all 0.25s ease;
}

.glimpse-dot.active {
  background: var(--accent);
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .glimpse-carousel {
    gap: 10px;
  }

  .glimpse-nav {
    width: 44px;
    height: 44px;
  }

  .glimpse-frame {
    border-radius: 18px;
  }
}

.section-header { text-align: center; margin-bottom: 60px; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
  margin: 20px auto 0;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  font-family: 'Mulish', sans-serif;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
}
.btn-primary:hover { background: var(--gradient-hover); transform: translateY(-1px); box-shadow: var(--shadow-hover); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }

/* ================================================================
   NAVBAR
   ================================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--nav-border);
  transition: all 0.3s ease;
}

#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(30, 58, 110, 0.12);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav-logo-title {
  font-family: 'Lora', serif;
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--tag-bg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ================================================================
   HERO
   ================================================================ */
#home {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 70px 24px 50px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #060d1a 0%, #0d1f3c 50%, #091628 100%);
  z-index: 0;
}

/* Subtle animated grid pattern */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 30% 50%, rgba(37,99,235,0.12) 0%, transparent 70%);
  z-index: 1;
}

.hero-split {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr minmax(420px, 560px);
  gap: 44px;
  align-items: center;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

/* ---- Left side ---- */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(147,197,253,0.85);
  background: rgba(37,99,235,0.12);
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: 100px;
  padding: 5px 14px;
  width: fit-content;
  animation: heroRise 0.8s cubic-bezier(0.22,0.61,0.36,1) 0.1s both;
}

.hero-logo-row {
  display: flex;
  align-items: center;
  gap: 18px;
  animation: heroRise 0.8s cubic-bezier(0.22,0.61,0.36,1) 0.2s both;
}

.hero-logo-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(37,99,235,0.5));
  flex-shrink: 0;
  pointer-events: none;
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title-full {
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  color: rgba(255,255,255,0.55);
  font-weight: 400;
  margin: 4px 0 0;
  letter-spacing: 0.3px;
}

.hero-tagline {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: rgba(255,255,255,0.72);
  line-height: 1.75;
  max-width: 520px;
  animation: heroRise 0.8s cubic-bezier(0.22,0.61,0.36,1) 0.35s both;
}

.hero-typed {
  color: #93c5fd;
  font-weight: 600;
}

.hero-cursor {
  display: inline-block;
  color: #93c5fd;
  font-weight: 300;
  margin-left: 1px;
  animation: blink 0.9s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  animation: heroRise 0.8s cubic-bezier(0.22,0.61,0.36,1) 0.5s both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Lora', serif;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-stat-div {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.15);
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: heroRise 0.8s cubic-bezier(0.22,0.61,0.36,1) 0.65s both;
}

.hero-updates-panel {
  max-width: 540px;
  width: 100%;
  max-height: 680px;
  min-height: 460px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.96);
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  animation: heroRise 0.8s cubic-bezier(0.22,0.61,0.36,1) 0.7s both;
}

.hero-updates-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-updates-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.hero-updates-title {
  font-family: 'Inter', 'Mulish', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1E293B;
  margin: 0;
}

.hero-updates-carousel {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.hero-updates-nav {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #2563EB;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-updates-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.hero-updates-viewport {
  overflow-y: auto;
  border-radius: 14px;
  height: 360px;
  padding-right: 8px;
  scroll-behavior: auto;
}

.hero-updates-viewport::-webkit-scrollbar {
  width: 10px;
}

.hero-updates-viewport::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
}

.hero-updates-viewport::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.45);
  border-radius: 999px;
}

.hero-updates-viewport::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.65);
}

.hero-updates-track {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-update-slide {
  width: 100%;
  scroll-snap-align: start;
}

.hero-update-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  width: 100%;
  padding: 14px 16px;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.hero-update-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #2563EB 0%, #7C3AED 100%);
  transition: width 0.25s ease, filter 0.25s ease;
}

.hero-update-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.hero-update-card:hover::before {
  width: 5px;
  filter: brightness(1.2);
}

.hero-update-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.hero-update-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 8px;
}

.hero-update-year {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #EFF6FF;
  color: #2563EB;
  font-size: 0.72rem;
  font-weight: 700;
}

.hero-update-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.4;
  margin: 0 0 5px;
}

.hero-update-desc {
  font-size: 0.76rem;
  line-height: 1.45;
  color: #64748B;
  margin: 0 0 6px;
}

.hero-update-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2563EB;
}

.hero-update-link:hover {
  color: #7C3AED;
}

.hero-updates-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.hero-updates-dot {
  width: 7px;
  height: 7px;
  border: none;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.5);
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-updates-dot.active {
  background: #2563EB;
  transform: scale(1.15);
}

.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
  font-family: 'Mulish', sans-serif;
}
.btn-hero-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-1px);
}

/* ---- Right side: image frame ---- */
.hero-right {
  animation: heroRise 0.9s cubic-bezier(0.22,0.61,0.36,1) 0.3s both;
}

.hero-img-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(37,99,235,0.3);
  box-shadow:
    0 0 0 1px rgba(37,99,235,0.15),
    0 24px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(37,99,235,0.12);
  background: rgba(6,13,26,0.72);
}

.hero-main-media {
  position: relative;
}

.hero-main-media img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(0.82) saturate(0.9);
  transition: transform 8s ease;
}

.hero-img-frame:hover .hero-main-media img {
  transform: scale(1.04);
}

.hero-img-caption {
  position: absolute;
  right: 16px;
  bottom: 48px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.95);
  font-weight: 500;
  letter-spacing: 0.1px;
  text-align: center;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
}

.hero-img-description {
  position: absolute;
  right: 16px;
  bottom: 14px;
  max-width: 280px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.1px;
  text-align: center;
  line-height: 1.35;
}

.hero-img-top-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.85);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.hero-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(6, 13, 26, 0.65);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, transform 0.25s ease;
  z-index: 2;
}

.hero-carousel-btn:hover {
  background: rgba(37, 99, 235, 0.9);
  transform: translateY(-50%) scale(1.04);
}

.hero-carousel-prev {
  left: 14px;
}

.hero-carousel-next {
  right: 14px;
}

.hero-carousel-btn:hover {
  background: rgba(37, 99, 235, 0.85);
  transform: translateY(-50%) scale(1.05);
}

.hero-carousel-btn-prev {
  left: 12px;
}

.hero-carousel-btn-next {
  right: 12px;
}



/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: bounce 2.5s ease-in-out infinite;
}

.hero-scroll .scroll-arrow {
  width: 18px;
  height: 18px;
  border-right: 2px solid rgba(255,255,255,0.35);
  border-bottom: 2px solid rgba(255,255,255,0.35);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* Entrance animation */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-logo-row { justify-content: center; }
  .hero-tagline  { margin: 0 auto; }
  .hero-stats    { justify-content: center; }
  .hero-cta      { justify-content: center; }
  .hero-badge    { margin: 0 auto; }
  .hero-right    { max-width: 540px; margin: 0 auto; }
  .hero-updates-panel { margin: 0 auto; }
}

@media (max-width: 480px) {
  #home { padding: 90px 16px 50px; }
  .hero-main-media img { height: 200px; }
  .hero-updates-panel { padding: 22px; }
  .hero-updates-title { font-size: 1.12rem; }
  .hero-update-card { padding: 16px 16px 16px 20px; }
  .hero-updates-viewport { height: 360px; }
  .hero-stats { gap: 14px; }
  .hero-stat-num { font-size: 1.4rem; }
}

/* ================================================================
   ABOUT
   ================================================================ */
#about { background: var(--bg-secondary); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 560px;
  gap: 60px;
  align-items: start;
}

.about-side {
  display: grid;
  gap: 24px;
}

.hero-updates-panel {
  max-width: 560px;
  width: 100%;
  max-height: 720px;
  min-height: 540px;
  overflow: hidden;
  padding: 20px;
}

.about-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.about-text p {
  font-size: 0.975rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.about-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.focus-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--tag-bg);
  color: var(--tag-color);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.focus-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.focus-tag svg { width: 12px; height: 12px; }

/* ---- Supervisor Tile Block ---- */
.pi-tile {
  background: var(--bg-card);
  border: 1px solid rgba(37,99,235,0.35);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(37,99,235,0.15), 0 8px 40px rgba(37,99,235,0.18), 0 0 60px rgba(37,99,235,0.1);
  max-width: 100%;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.pi-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(37,99,235,0.3), 0 16px 60px rgba(37,99,235,0.28), 0 0 80px rgba(37,99,235,0.18);
}

.pi-tile-img {
  width: 75%;
  aspect-ratio: 3 / 4;
  margin: 20px auto 0;
  border-radius: 16px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 5rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Lora', serif;
}

.pi-tile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.pi-tile-body {
  padding: 22px 24px 26px;
}

.pi-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-family: 'Lora', serif;
}

.pi-name a {
  color: inherit;
  text-decoration: none;
}
.pi-name a:hover { color: var(--accent); }

.pi-role {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.pi-institute {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

.pi-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--accent);
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
}
.pi-email:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

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

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

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  min-height: 220px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.research-card::before {
  content: '';
  position: absolute;
  inset: 0;
  /* background: linear-gradient(160deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.62) 100%); */
  background: linear-gradient(85deg, rgb(0 0 0 / 57%) 0%, rgb(0 0 0) 100%);
  opacity: 1;
  transition: background 0.3s;
  border-radius: inherit;
  z-index: 0;
}

.research-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.research-card:hover::before {
  background: linear-gradient(160deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.48) 100%);
}

.research-card h3,
.research-card p {
  position: relative;
  z-index: 1;
  color: #fff;
}

.research-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

.research-card p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.research-card {
  background-size: cover;
  background-position: center;
}

/* ================================================================
   PUBLICATIONS
   ================================================================ */
#publications { background: var(--bg-secondary); }

/* ---- Publication Search ---- */
.pub-search-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.pub-search {
  width: 100%;
  max-width: 440px;
  padding: 10px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Mulish', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pub-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 125, 210, 0.12);
}

.pub-search::placeholder { color: var(--text-muted); }

/* ---- Show More / Less ---- */
#pub-pagination {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.pub-show-more,
.pub-show-less {
  padding: 10px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 100px;
  cursor: pointer;
}

/* ---- Pagination ---- */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Mulish', sans-serif;
  line-height: 1;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0 2px;
  line-height: 36px;
}

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

.pub-filter-btn {
  padding: 7px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Mulish', sans-serif;
}

.pub-filter-btn:hover,
.pub-filter-btn.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

.pub-list { display: flex; flex-direction: column; }

.pub-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.pub-item:first-child { border-top: 1px solid var(--border); }

.pub-year-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.pub-body { flex: 1; }

.pub-cat-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 4px;
}
.cat-conference { background: rgba(45,125,210,0.12); color: #2D7DD2; }
.cat-journal    { background: rgba(40,167,69,0.12);  color: #28a745; }
.cat-workshop   { background: rgba(255,120,50,0.12); color: #e06020; }

..pub-title {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  line-height: 1.5;
}

.pub-type-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.12);
  margin-bottom: 4px;
}
.pub-title:hover { text-decoration: underline; }

.pub-authors {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.5;
}

.pub-venue {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.pub-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 48px 0;
}

/* ================================================================
   TEAM
   ================================================================ */
#team { background: var(--bg); }

.team-section { margin-bottom: 56px; }

.team-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-section-title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--gradient);
  border-radius: 2px;
}

/* ---- Team Profile List ---- */
.team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 48px;
}

.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 160px;
}

.member-avatar-wrap {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: var(--gradient);
  padding: 3px;
  margin-bottom: 14px;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member:hover .member-avatar-wrap {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(45, 125, 210, 0.3);
}

.member-avatar {
  width: 50%;
  height: 50%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  display: block;
}

.member-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Lora', serif;
  border: 3px solid var(--bg);
}

.member-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
  line-height: 1.3;
}

.member-name-link .member-name { color: #111; }
.member-name-link:hover .member-name { color: var(--accent); text-decoration: underline; }

.member-role {
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 3px;
}

.member-grad-year {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.member-email {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: color 0.2s;
  word-break: break-all;
}
.member-email:hover { color: var(--accent); }

/* ================================================================
   NEWS & EVENTS
   ================================================================ */
#news { background: var(--bg-secondary); }

.news-grid,
.news-list {
  display: flex;
  flex-direction: column;
}

.news-card,
.news-list-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-card:first-child,
.news-list-item:first-child { border-top: 1px solid var(--border); }

.news-image,
.news-image-placeholder { display: none; }

.news-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.news-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}

.news-label.label-news       { background: rgba(45, 125, 210, 0.12); color: var(--accent); }
.news-label.label-event      { background: rgba(30, 58, 110, 0.12); color: var(--primary-light); }
.news-label.label-seminar    { background: rgba(0, 188, 180, 0.12); color: #00BCB4; }
.news-label.label-award      { background: rgba(240, 180, 41, 0.12); color: #F0B429; }
.news-label.label-conference { background: rgba(255, 120, 50, 0.12); color: #FF7832; }
.news-label.label-workshop   { background: rgba(139, 92, 246, 0.12); color: #8B5CF6; }

.news-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-desc {
  font-size: 0.855rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 6px;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s;
  margin-top: auto;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.news-link:hover { gap: 8px; }

/* ---- Newspaper Modal ---- */
.news-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.news-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.news-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px);
  transition: transform 0.25s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}
.news-modal-overlay.open .news-modal { transform: translateY(0); }
.news-modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}
.news-modal-close:hover { background: var(--bg-secondary); }
.news-modal-img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 20px 20px 0 0;
}
.news-modal-body {
  padding: 28px 32px 36px;
}
.news-modal-title {
  font-family: 'Lora', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 14px 0 18px;
}
.news-modal-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.85;
  white-space: pre-wrap;
  margin-bottom: 24px;
}
.news-modal-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--gradient);
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}
.news-modal-ext-link:hover { opacity: 0.88; }
@media (max-width: 600px) {
  .news-modal-body { padding: 20px 20px 28px; }
  .news-modal-title { font-size: 1.25rem; }
}

/* ================================================================
   DATASETS
   ================================================================ */
#datasets { background: var(--bg); }

.datasets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.dataset-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  min-height: 400px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dataset-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(45, 125, 210, 0.25);
}

.dataset-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.dataset-card-bg {
  background-size: cover;
  background-position: center;
  position: relative;
  isolation: isolate;
}

.dataset-card-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.38) 100%);
  z-index: -1;
}

.dataset-card.dataset-card-bg h3 {
  color: #fff !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}

.dataset-card.dataset-card-bg .dataset-desc {
  color: rgba(255,255,255,0.88);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.dataset-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dataset-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.dataset-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.dataset-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.dataset-link.paper {
  background: #fff;
  color: #1a1a2e;
  border: 1px solid rgba(0,0,0,0.12);
  font-weight: 600;
}
.dataset-link.paper:hover { background: var(--accent); color: #fff; border-color: transparent; }

.dataset-link.download {
  background: var(--gradient);
  color: #fff;
}
.dataset-link.download:hover { opacity: 0.9; transform: translateY(-1px); }

/* ================================================================
   CONTACT
   ================================================================ */
#contact { background: var(--bg-secondary); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}

.contact-info h3,
.contact-map h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.contact-map {
  display: flex;
  flex-direction: column;
}

.contact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.contact-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.contact-item-text strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.contact-item-text span,
.contact-item-text a {
  font-size: 0.855rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.contact-item-text a { color: var(--accent); }
.contact-item-text a:hover { text-decoration: underline; }

.map-wrapper {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  height: 320px;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ================================================================
   FUNDING
   ================================================================ */
#funding {
  background: var(--bg);
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.funding-title {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.funding-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  align-items: center;
}

.funding-logo-item {
  opacity: 0.65;
  transition: opacity 0.2s;
  filter: grayscale(30%);
}

.funding-logo-item:hover {
  opacity: 1;
  filter: grayscale(0);
}

.funding-logo-item img {
  height: 56px;
  max-width: 160px;
  object-fit: contain;
}

.funding-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.visit-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.visit-counter span { font-weight: 700; color: var(--accent); }

.footer-center {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-center a { color: var(--accent); }
.footer-center a:hover { text-decoration: underline; }

.footer-right {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ================================================================
   GO TO TOP
   ================================================================ */
#go-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(30, 58, 110, 0.35);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
}

#go-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

#go-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(30, 58, 110, 0.45);
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* Section divider grows in when its header reveals */
.section-divider {
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s;
}
.reveal.visible .section-divider { transform: scaleX(1); }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal, .section-divider { transition: none; transform: none; opacity: 1; }
  .hero-title, .hero-institute, .hero-tagline, .hero-cta { animation: none !important; opacity: 1 !important; }
}

/* ================================================================
   MOBILE NAV OVERLAY
   ================================================================ */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 20, 0.97);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

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

.nav-overlay a {
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  font-family: 'Lora', serif;
}

.nav-overlay-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

/* ================================================================
   EMPTY STATES
   ================================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .pi-tile { max-width: 100%; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; max-width: 560px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .section { padding: 70px 0; }
  .team-grid.supervisor-grid { max-width: 100%; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .pub-item { flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .news-grid,
  .datasets-grid { grid-template-columns: 1fr; }
}

@media print {
  body { visibility: hidden; }
}

/* ================================================================
   QUICK LINKS SIDEBAR
   ================================================================ */

/* Desktop sidebar wrapper */
.ql-sidebar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* Vertical tab */
.ql-tab {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 16px 6px;
  font-family: 'Mulish', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 8px 0 0 8px;
  box-shadow: 2px 0 12px rgba(0,0,0,0.25);
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.ql-tab:hover { opacity: 0.88; }

/* Slide-in panel — clips to zero width when closed, expands right of tab */
.ql-panel {
  width: 0;
  overflow: hidden;
  transition: width 0.3s ease;
}
.ql-sidebar.open .ql-panel {
  width: 210px;
}

/* Inner panel — holds actual styling at full width */
.ql-panel-inner {
  min-width: 210px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow-hover);
}

/* Panel header */
.ql-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}
.ql-panel-title {
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ql-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.ql-close:hover { color: var(--text-primary); background: var(--border); }

/* Bullet list */
.ql-list {
  list-style: disc;
  padding: 14px 16px 14px 34px;
  margin: 0;
}
.ql-list li {
  margin-bottom: 6px;
  line-height: 0.8;
}
.ql-list li:last-child { margin-bottom: 0; }
.ql-list a {
  color: var(--accent);
  font-size: 0.7rem;
  text-decoration: none;
  transition: text-decoration 0.15s;
}
.ql-list a:hover { text-decoration: underline; }

/* Mobile FAB */
.ql-fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 500;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(30,58,110,0.35);
  transition: transform 0.2s, opacity 0.2s;
  display: none;
}
.ql-fab:hover { transform: scale(1.08); opacity: 0.9; }

/* Mobile overlay */
.ql-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ql-overlay.open { display: flex; }
.ql-popup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Responsive: hide desktop sidebar, show FAB on mobile */
@media (max-width: 768px) {
  .ql-sidebar { display: none !important; }
  .ql-fab.ql-loaded { display: flex; align-items: center; justify-content: center; }
}

/* ================================================================
   TEAM TILE CARDS  — vertical card with rectangle image
   ================================================================ */
.team-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.team-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.team-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(45, 125, 210, 0.25);
}

.tile-avatar-wrap {
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: var(--gradient);
  flex-shrink: 0;
}

.tile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}

.team-tile:hover .tile-avatar { transform: scale(1.04); }

.tile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Lora', serif;
}

.tile-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.tile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tile-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.tile-name-link { text-decoration: none; }
.tile-name-link:hover .tile-name { color: var(--accent); text-decoration: underline; }

.tile-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.tile-research {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tile-research-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 6px;
  color: #2563EB;
  background: transparent;
  border: 1px solid rgba(37, 99, 235, 0.18);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tile-research-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tile-grad-year {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.tile-email {
  font-size: 0.7rem;
  color: var(--accent);
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.tile-email:hover { opacity: 0.75; }

.tile-social {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.tile-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
  pointer-events: all;
}
.tile-social-link:hover { border-color: var(--accent); color: var(--accent); background: var(--tag-bg); }
.tile-social-link svg { width: 14px; height: 14px; fill: currentColor; }

/* ================================================================
   ALUMNI LIST — plain text rows, Stanford IRIS style
   ================================================================ */
.alumni-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alumni-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
}
.alumni-row:first-child { border-top: 1px solid var(--border); }

.alumni-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.alumni-name {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  flex: 0 1 auto;
  min-width: 0;
}

.alumni-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 4px 10px;
  flex-shrink: 0;
}

.alumni-role {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 0;
}

.alumni-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-left: 0;
}

.alumni-links .faculty-link {
  font-size: 0.8rem;
  padding: 5px 10px;
}

.alumni-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-left: 2px;
}

/* ================================================================
   GALLERY
   ================================================================ */
#gallery { background: var(--bg); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gallery-item:hover img { transform: scale(1.05); }

/* Cover wrapper + multi-image count badge */
.gallery-thumb-wrap { position: relative; overflow: hidden; }

.gallery-count-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 16, 28, 0.72);
  backdrop-filter: blur(4px);
  letter-spacing: 0.3px;
}

.gallery-caption {
  padding: 12px 16px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.gallery-caption .gallery-date {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ---- Gallery Lightbox ---- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(8, 12, 22, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 32px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.gallery-lightbox.open { opacity: 1; pointer-events: all; }

.gallery-lightbox img {
  max-width: min(92vw, 1080px);
  max-height: 74vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}

.gallery-lightbox-caption {
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
  max-width: 720px;
  text-align: center;
  line-height: 1.6;
}

/* Image counter (e.g. "2 / 5") */
.gallery-lightbox-counter {
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Thumbnail strip inside the lightbox */
.gallery-lightbox-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(92vw, 760px);
  max-height: 76px;
  overflow-x: auto;
  padding: 4px 2px;
}

.gallery-lightbox-thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.gallery-lightbox-thumb:hover { opacity: 0.85; transform: translateY(-2px); }
.gallery-lightbox-thumb.active { opacity: 1; border-color: var(--accent-light); }

.gallery-lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.gallery-lightbox-close:hover { background: rgba(255,255,255,0.2); }

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.gallery-lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.gallery-lightbox-nav.prev { left: 22px; }
.gallery-lightbox-nav.next { right: 22px; }

@media (max-width: 600px) {
  .gallery-lightbox-nav.prev { left: 8px; }
  .gallery-lightbox-nav.next { right: 8px; }
}

/* ================================================================
   NEWS IMAGE CAROUSEL (multiple images per event)
   ================================================================ */
.news-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: var(--bg-secondary);
}

.news-carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.news-carousel-track img {
  width: 100%;
  flex-shrink: 0;
  max-height: 340px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.news-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 16, 28, 0.55);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.news-carousel-btn:hover { background: rgba(10, 16, 28, 0.8); }
.news-carousel-btn.prev { left: 12px; }
.news-carousel-btn.next { right: 12px; }

.news-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 3;
}

.news-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.news-carousel-dot.active { background: #fff; transform: scale(1.2); }

/* Detail-page variant (rounded on all corners) */
.news-carousel.detail-variant { border-radius: 14px; margin-bottom: 28px; box-shadow: var(--shadow); }
