/* ============================================
   SCOPE Lab — Liquid Glass Design
   Inspired by Apple's Liquid Glass (WWDC 2025)
   ============================================ */

:root {
  /* Glass palette */
  --bg-primary: #FAFAFA;
  --bg-secondary: #F5F5F5;
  --bg-tertiary: #EFEFEF;
  --navy: #1C1C1E;
  --navy-mid: #2C2C2E;
  --navy-light: #3A3A3C;
  --blue: #007AFF;
  --blue-light: #409CFF;
  --blue-bright: #5AC8FA;
  --accent: #30D158;
  --accent-light: #34C759;
  --text-primary: #1C1C1E;
  --text-secondary: #636366;
  --text-muted: #8E8E93;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(0, 0, 0, 0.06);
  --card-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
  --radius-card: 20px;
  --radius-btn: 980px;
  --success: #34C759;
  --warning: #FF9500;
  --hero-gradient-start: #0A1628;
  --hero-gradient-mid: #0F2647;
  --hero-gradient-end: #0D1F3C;
  --font-main: -apple-system, 'SF Pro Display', 'Inter', BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', monospace;

  /* Glass material tokens */
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-bg-heavy: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-border-specular: rgba(255, 255, 255, 0.95);
  --glass-blur: 20px;
  --glass-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --glass-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);

  /* Dark glass (for hero / page-header) */
  --glass-dark-bg: rgba(255, 255, 255, 0.08);
  --glass-dark-border: rgba(255, 255, 255, 0.15);
  --glass-dark-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-main);
  background: #FFFFFF;
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 17px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--navy);
  font-weight: 700;
}

a { color: var(--blue); text-decoration: none; transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1); }
a:hover { color: var(--blue-light); }

/* Smooth transitions for all interactive elements */
a, button, .content-card, .btn, .pub-btn, .grant-card {
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.text-ice-blue { color: var(--blue) !important; }
.text-accent { color: var(--accent) !important; }
.bg-navy { background-color: var(--bg-secondary) !important; }
.bg-navy-dark { background-color: var(--bg-primary) !important; }

/* ============================================
   NAVIGATION — Liquid Glass navbar
   ============================================ */
.navbar-scope {
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

.navbar-scope.scrolled {
  background: rgba(251, 251, 253, 0.95);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04),
              0 2px 12px rgba(0, 0, 0, 0.04);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--navy) !important;
  letter-spacing: -0.5px;
}

.navbar-brand .brand-accent {
  color: var(--blue);
  font-weight: 300;
}

/* Logo sizes */
.navbar-logo {
  height: 38px;
  width: 38px;
  object-fit: contain;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.navbar-brand:hover .navbar-logo {
  transform: rotate(15deg) scale(1.05);
}

.hero-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
  animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.footer-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  opacity: 0.9;
}

/* Page-header logo (detail pages) */
.page-header-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  margin-right: 0.75rem;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.8rem !important;
  transition: color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-link:hover, .nav-link.active {
  color: var(--blue) !important;
}

.navbar-toggler {
  border-color: rgba(0, 122, 255, 0.3);
  padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,122,255,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   HERO / SPOTLIGHT — Dark glass gradient
   ============================================ */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(160deg, #0A1628 0%, #0F2647 40%, #142E55 70%, #0D1F3C 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 25% 40%, rgba(0, 122, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 75% 70%, rgba(90, 200, 250, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(48, 209, 88, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

.hero-section h1, .hero-section h2, .hero-section h3,
.hero-section h4, .hero-section h5, .hero-section h6 {
  color: #FFFFFF;
}

.hero-section .text-white { color: #FFFFFF !important; }

.hero-tagline {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: #FFFFFF;
}

.hero-tagline .highlight {
  background: linear-gradient(135deg, #5AC8FA, #30D158);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 600px;
  line-height: 1.6;
}

.hero-badge {
  display: inline-block;
  background: var(--glass-dark-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-dark-border);
  border-radius: 30px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

/* Spotlight Video/Media Carousel */
.spotlight-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.spotlight-container video,
.spotlight-container img {
  width: 100%;
  display: block;
  border-radius: 16px;
}

/* Arrow buttons in video info bar */
.spotlight-arrow-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
}
.spotlight-arrow-btn:hover {
  background: rgba(0, 122, 255, 0.5);
  border-color: rgba(0, 122, 255, 0.5);
  color: #fff;
}

/* ============================================
   SECTIONS
   ============================================ */
.section-dark { background: #FFFFFF; padding: 6rem 0; }
.section-mid { background: #F0F0F5; padding: 6rem 0; }

.section-heading {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.section-lead {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 800px;
}

/* Full-width section lead that spans all columns */
.section-lead-wide {
  max-width: 100%;
}

/* ============================================
   CONTENT CARDS — Glass material
   ============================================ */
.content-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-card);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.content-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
  border-color: rgba(0, 0, 0, 0.08);
}

.content-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(0, 122, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--blue);
  margin-bottom: 1rem;
}

/* ============================================
   RESEARCH AREA CARDS — Glass with accent
   ============================================ */
.research-area-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-card);
  padding: 2rem;
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  border-left: 4px solid var(--blue);
}

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

/* Research Topics Filter */
.topic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.topic-btn {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.topic-btn:hover, .topic-btn.active {
  background: rgba(0, 122, 255, 0.12);
  border-color: rgba(0, 122, 255, 0.3);
  color: var(--blue);
}

/* ============================================
   TEAM MEMBER CARDS
   ============================================ */
.team-card {
  text-align: center;
  padding: 1.5rem;
}

.team-card .member-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  border: 3px solid #FFFFFF;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.team-card:hover .member-photo {
  border-color: var(--blue);
}

.member-photo-lg {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 28px;
  border: 3px solid #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.team-card .member-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--navy);
}

.team-card .member-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   NEWS ITEMS
   ============================================ */
.news-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.news-item:last-child { border-bottom: none; }

.news-date {
  font-size: 0.8rem;
  color: var(--blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   PUBLICATION ENTRIES — Glass pills
   ============================================ */
.pub-entry {
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.pub-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
}

.pub-entry .pub-title {
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.pub-entry .pub-authors {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pub-entry .pub-venue {
  font-size: 0.85rem;
  color: var(--blue);
  font-style: italic;
}

.pub-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.08);
  color: var(--blue);
  margin-right: 0.25rem;
  margin-top: 0.5rem;
}

/* Glass pill buttons */
.pub-btn {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 12px;
  background: rgba(0, 122, 255, 0.06);
  color: var(--blue);
  border: 1px solid rgba(0, 122, 255, 0.15);
  cursor: pointer;
  margin-right: 0.25rem;
  margin-top: 0.5rem;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.pub-btn:hover {
  background: var(--blue);
  color: #FFFFFF;
  border-color: var(--blue);
}

/* ============================================
   PUBLICATION CATEGORY FILTERS — Glass chips
   ============================================ */
.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pub-filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.pub-filter-btn:hover {
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
  color: var(--blue);
}

.pub-filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

/* Filter buttons (presentations page) */
.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-btn:hover {
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
  color: var(--blue);
}
.filter-btn.active {
  background: rgba(0, 122, 255, 0.85);
  border-color: rgba(0, 122, 255, 0.6);
  color: #FFFFFF;
  box-shadow: 0 2px 12px rgba(0, 122, 255, 0.25);
}

/* Author filter (collapsible toggle) */
.author-filter-section {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 0.75rem;
}

.author-toggle-header {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.author-toggle-header:hover {
  color: var(--blue);
}

.author-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.author-chips .pub-filter-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.pub-filter-status {
  padding: 0.5rem 0;
}

/* Numbered publication list view */
.numbered-pub-list {
  counter-reset: none;
  padding-left: 2rem;
  list-style-type: decimal;
}

.numbered-pub-list li {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-primary);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.numbered-pub-list li:last-child {
  border-bottom: none;
}

.numbered-pub-list li b {
  color: var(--navy);
}

.numbered-pub-list li i {
  color: var(--blue);
}

/* Year header styling — collapsed state */
.year-header.collapsed .toggle-icon i {
  transform: rotate(-90deg);
}

/* ============================================
   GRANT CARDS — Glass material
   ============================================ */
.grant-card {
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  border-left: 3px solid var(--blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.grant-card .grant-title {
  font-weight: 600;
  color: var(--navy);
}

.grant-card .grant-agency {
  font-size: 0.85rem;
  color: var(--blue);
}

.grant-card .grant-amount {
  font-weight: 700;
  color: var(--accent);
}

/* Grants Section */
.grants-section {
  margin-bottom: 2rem;
}

.grants-group-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
}

.grant-timeline {
  position: relative;
  padding-left: 2rem;
}

.grant-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--blue), transparent);
}

/* ============================================
   BUTTONS — Glass pills
   ============================================ */
.btn-accent {
  background: var(--blue);
  color: #FFFFFF;
  font-weight: 600;
  border: 1px solid var(--blue);
  padding: 0.7rem 1.8rem;
  border-radius: var(--radius-btn);
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 122, 255, 0.35);
  background: rgba(0, 122, 255, 0.95);
  color: #FFFFFF;
}

.btn-outline-light {
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
  border-radius: var(--radius-btn);
  background: #FFFFFF;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn-outline-light:hover {
  background: rgba(0, 122, 255, 0.08);
  border-color: rgba(0, 122, 255, 0.3);
  color: var(--blue);
}

/* In hero (dark bg), glass outline buttons */
.hero-section .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: rgba(255, 255, 255, 0.8);
}

.hero-section .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
}

/* ============================================
   YEAR GROUP HEADERS
   ============================================ */
.year-group {
  margin-bottom: 2rem;
}

.year-header {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 1rem;
  cursor: pointer;
  user-select: none;
}

.year-header .toggle-icon {
  float: right;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   PAGE HEADER — Dark glass gradient
   ============================================ */
.page-header {
  background: linear-gradient(160deg, var(--hero-gradient-start), var(--hero-gradient-mid), var(--hero-gradient-end));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6rem !important;
}

.page-header h1, .page-header h2, .page-header h3 { color: #FFFFFF; }
.page-header p { color: rgba(255, 255, 255, 0.65); }
.page-header .lead { color: rgba(255, 255, 255, 0.65); }
.page-header .text-light { color: rgba(255, 255, 255, 0.8) !important; }

.page-header .pub-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.page-header .pub-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
}

.breadcrumb-item a { color: rgba(255, 255, 255, 0.6); }
.breadcrumb-item.active { color: rgba(255, 255, 255, 0.4); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, 0.3); }

/* ============================================
   FOOTER — Dark glass
   ============================================ */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3rem 0 1.5rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer h5 { color: #FFFFFF; }
.footer a { color: rgba(255, 255, 255, 0.5); }
.footer a:hover { color: var(--blue-light); }
.footer .text-muted { color: rgba(255, 255, 255, 0.3) !important; }

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

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

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   BIBTEX / ABSTRACT DISPLAY — Glass panel
   ============================================ */
.bibtex-display, .abstract-display {
  display: none;
  background: #F8F8FA;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-primary);
  max-height: 300px;
  overflow-y: auto;
}

.abstract-display {
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ============================================
   PUBLICATION SUMMARY — Blog-style cards
   ============================================ */
.pub-blog-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-card);
  padding: 1.75rem 2rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.pub-blog-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pub-blog-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.pub-blog-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.pub-blog-text {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin: 0;
}

.pub-blog-sidebar-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.pub-blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pub-sidebar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.pub-sidebar-item:last-child { border-bottom: none; }

.pub-sidebar-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.pub-sidebar-value {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .pub-blog-card { padding: 1.25rem; }
  .pub-blog-sidebar-card { padding: 1rem; }
}

/* Section title small */
.section-title-sm {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  color: var(--navy);
}

/* ============================================
   RESPONSIVE — Tablets (≤992px)
   ============================================ */
@media (max-width: 992px) {
  /* Add breathing room when hero stacks to single column */
  .hero-section {
    min-height: auto;
    padding: 6rem 0 3rem;
  }
  /* Center the hero text column when it stacks to single column */
  .hero-section .col-lg-5 {
    text-align: center;
    margin-bottom: 2rem;
  }
  .hero-tagline {
    font-size: 2.4rem;
  }
  .hero-sub {
    font-size: 1.05rem;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-logo {
    display: none;
  }
  /* Center the CTA buttons */
  .hero-section .d-flex.gap-3 {
    justify-content: center;
  }
  .section-heading {
    font-size: 2.4rem;
  }
  .section-lead {
    font-size: 1rem;
  }
  .stats-bar {
    gap: 1.25rem;
  }
  .stat-number {
    font-size: 2rem;
  }
  /* Director card: stack on tablet */
  .content-card .row.align-items-center .col-md-2 {
    margin-bottom: 1rem;
  }
}

/* ============================================
   RESPONSIVE — Mobile (≤768px)
   ============================================ */
@media (max-width: 768px) {
  .hero-tagline {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
  }
  .hero-section {
    min-height: auto;
    padding: 6rem 0 3rem;
  }
  .hero-section .col-lg-5 {
    text-align: center;
  }
  .hero-sub {
    font-size: 0.95rem;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-logo {
    display: none;
  }
  .hero-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
  }
  .section-heading {
    font-size: 2rem;
  }
  .section-lead {
    font-size: 0.95rem;
  }
  .stats-bar {
    gap: 0.75rem;
    justify-content: center;
  }
  .stat-item {
    min-width: 70px;
  }
  .stat-number {
    font-size: 1.6rem;
  }
  .stat-label {
    font-size: 0.7rem;
  }
  /* Spotlight video: smaller shadow, tighter spacing */
  .spotlight-container {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }
  /* Cards: reduce padding */
  .content-card {
    padding: 1rem !important;
  }
  .content-card .card-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  /* Team cards: smaller photos */
  .team-card .member-photo {
    width: 70px;
    height: 70px;
  }
  .team-card {
    padding: 1rem;
  }
  .member-photo-lg {
    width: 120px;
    height: 120px;
  }
  /* Featured section: stack event cards vertically */
  #featured .d-flex.flex-wrap.gap-3 {
    flex-direction: column;
  }
  /* Featured section: center image on mobile */
  #featured .col-lg-5 {
    margin-bottom: 1rem;
  }
  #featured .col-lg-7 {
    text-align: center;
  }
  #featured p.mb-3 {
    text-align: left;
  }
  /* News cards: tighter */
  .news-date {
    font-size: 0.7rem;
  }
  /* Publication entries */
  .pub-entry-scholar {
    padding: 1rem;
  }
  .pub-ref {
    font-size: 0.85rem;
  }
  .pub-btn {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }
  .pub-actions {
    gap: 0.2rem;
  }
  /* Grant cards */
  .grant-card {
    padding: 1rem;
  }
  .grant-card .grant-title {
    font-size: 0.9rem;
  }
  .grant-card .grant-amount {
    font-size: 0.85rem;
  }
  /* Year headers */
  .year-header {
    font-size: 1.2rem;
  }
  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
  }
  /* Buttons */
  .btn-accent, .btn-outline-light {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  /* Navbar */
  .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem !important;
  }
  /* Bibtex/Abstract display */
  .bibtex-display, .abstract-display {
    font-size: 0.7rem;
    padding: 0.75rem;
    max-height: 200px;
  }
  /* Page header (detail pages) */
  .page-header {
    padding-top: 5rem !important;
  }
  .page-header h1 {
    font-size: 1.5rem;
  }
  /* Project detail pages — stack sidebar below on mobile */
  .col-lg-4 {
    margin-top: 1.5rem;
  }
  /* Publications page header on mobile */
  .page-header .d-flex.align-items-center {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }
  .page-header .display-5 {
    font-size: 1.5rem !important;
  }
  .page-header .lead {
    font-size: 0.9rem;
  }
  .page-header .btn-sm {
    margin-left: 0 !important;
    margin-top: 0.5rem;
    display: inline-block;
  }
  /* Project & research content on mobile */
  .project-content, .research-content {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  .project-content h2, .research-content h2 {
    font-size: 1.3rem;
  }
  .project-content h3, .research-content h3 {
    font-size: 1.1rem;
  }
  .project-content hr, .research-content hr {
    margin: 2rem 0;
  }
}

/* ============================================
   RESPONSIVE — Small phones (≤480px)
   ============================================ */
@media (max-width: 480px) {
  .hero-tagline {
    font-size: 1.5rem;
  }
  .hero-sub {
    font-size: 0.85rem;
  }
  .hero-logo {
    display: none;
  }
  .stats-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .stat-item {
    min-width: auto;
  }
  .stat-number {
    font-size: 1.4rem;
  }
  .section-heading {
    font-size: 1.6rem;
  }
  .section-lead {
    font-size: 0.9rem;
  }
  /* Compact author filter chips */
  .author-chips .pub-filter-btn {
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
  }
  .pub-filters {
    gap: 0.35rem;
  }
  .pub-filter-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
  }
  /* Stack hero buttons vertically */
  .hero-section .d-flex.gap-3 {
    flex-direction: column;
    gap: 0.5rem !important;
  }
  .hero-section .d-flex.gap-3 .btn {
    width: 100%;
    text-align: center;
  }
  /* Team: 2 columns always on small phone */
  .team-card .member-photo {
    width: 56px;
    height: 56px;
  }
  .team-card .member-name {
    font-size: 0.85rem;
  }
  .team-card .member-role {
    font-size: 0.7rem;
  }
  /* Director card — stack fully on small phones */
  .content-card .row.align-items-center .col-md-2 img {
    width: 80px !important;
    height: 80px !important;
  }
  /* Navbar brand */
  .navbar-brand {
    font-size: 1.1rem;
  }
  .navbar-logo {
    height: 30px;
    width: 30px;
  }
  .spotlight-arrow-btn {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
  }
  /* Grant amount wrapping */
  .grant-card .d-flex {
    flex-direction: column;
  }
  .grant-card .grant-amount {
    text-align: left !important;
    margin-top: 0.5rem;
  }
}

/* ============================================
   SCROLLBAR — Glass style
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 122, 255, 0.4);
}

/* ============================================
   UTILITY
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Bibliography override for jekyll-scholar */
.bibliography { list-style: none; padding: 0; margin: 0; }

.bibliography li {
  margin-bottom: 0;
}

/* Scholar-rendered publication entries — Glass cards */
.pub-entry-scholar {
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.pub-entry-scholar:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
  border-color: rgba(0, 0, 0, 0.1);
}

.pub-ref {
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* ============================================
   RESEARCH DETAIL PAGES
   ============================================ */

.research-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}
.research-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}
.research-content h2:first-of-type {
  margin-top: 0;
}
.research-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.research-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
.research-content strong {
  color: var(--text-primary);
}
.research-content a {
  color: var(--blue);
  font-weight: 500;
}
.research-content hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin: 3rem 0;
  padding: 0;
}
.research-content ul, .research-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.research-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}
.research-content li strong {
  color: var(--text-primary);
}
.research-content p > strong:first-child {
  color: var(--blue);
}

/* ============================================
   PROJECT DETAIL PAGES
   ============================================ */

/* Project content area — the markdown body */
.project-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.project-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

/* The first h2 (## The Challenge) — no extra top margin */
.project-content h2:first-of-type {
  margin-top: 0;
}

.project-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.project-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.project-content strong {
  color: var(--text-primary);
}

.project-content a {
  color: var(--blue);
  font-weight: 500;
}

/* Horizontal rules become clear section dividers */
.project-content hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin: 3rem 0;
  padding: 0;
}

/* Lists inside project content */
.project-content ul, .project-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.project-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.project-content li strong {
  color: var(--text-primary);
}

/* Project metadata (Partners, Funding, Key papers, Website) — tighter spacing */
.project-content p > strong:first-child {
  color: var(--blue);
}

/* Project slide images */
.project-slide-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Smooth project cards on index */
.project-preview-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.project-preview-card img {
  width: 160px;
  min-width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 576px) {
  .project-preview-card {
    flex-direction: column;
  }
  .project-preview-card img {
    width: 100%;
    height: 140px;
  }
}

/* Navbar collapse on mobile — glass panel */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0 0 16px 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-top: none;
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  }
  .navbar-nav .nav-link {
    padding: 0.6rem 0.8rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  }
  .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
  }
}

/* Ensure images are responsive everywhere */
img { max-width: 100%; height: auto; }

/* Prevent horizontal overflow */
html, body { overflow-x: hidden; }

/* Touch-friendly tap targets */
@media (pointer: coarse) {
  .pub-btn {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .topic-btn {
    min-height: 40px;
  }
}

/* Light-theme text color overrides for Bootstrap utilities
   Only override in sections with light backgrounds */
.section-dark .text-white,
.section-mid .text-white { color: var(--navy) !important; }
.section-dark .text-light,
.section-mid .text-light { color: var(--text-secondary) !important; }

/* Dark sections keep white text as-is */
.hero-section .text-white { color: #FFFFFF !important; }
.hero-section .text-light { color: rgba(255, 255, 255, 0.8) !important; }
.page-header .text-white { color: #FFFFFF !important; }
.page-header .text-light { color: rgba(255, 255, 255, 0.8) !important; }
.footer .text-white { color: #FFFFFF !important; }

/* ============================================
   BACK TO TOP BUTTON — Glass circle
   ============================================ */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--blue);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}
#backToTop.visible {
  opacity: 0.9;
  visibility: visible;
}
#backToTop:hover {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 122, 255, 0.25);
  background: rgba(0, 122, 255, 0.15);
}
@media (max-width: 480px) {
  #backToTop {
    width: 36px;
    height: 36px;
    bottom: 1.25rem;
    right: 1.25rem;
    font-size: 0.85rem;
  }
}
