@font-face {
  font-family: 'Marta';
  src: url('../font/Marta_Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

/* =============================================
   MLAB — Design System & Global Styles (Light Theme)
   ============================================= */

/* --- Tokens --- */
:root {
  --bg: #f8f9fc;
  --bg-2: #ffffff;
  --bg-3: #eef0f7;
  --surface: #ffffff;
  --surface-hover: #f3f4ff;
  --border: #e2e4ef;
  --border-hover: #6366f1;

  --accent: #6366f1;
  --accent-2: #0ea5e9;
  --accent-grad: linear-gradient(135deg, #6366f1, #0ea5e9);
  --accent-grad-warm: linear-gradient(135deg, #f43f5e, #f59e0b);

  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;

  --font-sans: 'Inter', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-marta: 'Marta', serif;

  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --nav-height: 70px;

  --shadow: 0 4px 24px rgba(99, 102, 241, 0.08);
  --shadow-md: 0 8px 40px rgba(99, 102, 241, 0.12);
  --shadow-accent: 0 8px 32px rgba(99, 102, 241, 0.22);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-3);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

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

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

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

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  background: rgba(99, 102, 241, 0.08);
  padding: 4px 14px;
  border-radius: 999px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

.section-subtitle {
  margin-top: 10px;
  font-size: 15px;
  color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 7px 18px;
  font-size: 13px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  cursor: pointer;
}

.btn-sm:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-sm.ghost {
  background: transparent;
  border-color: var(--border);
}

.btn-sm.ghost:hover {
  background: var(--bg-3);
  color: var(--text);
}

/* --- Tags --- */
.tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.06);
}

.tag.small {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* --- Filter Tabs --- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  justify-content: center;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-accent);
}

/* =============================================
   NAV
   ============================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  background: rgba(248, 249, 252, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border), var(--shadow);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  text-decoration: none;
}

.nav-logo a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  width: auto !important;
  object-fit: contain;
  display: block;
}

.nav-logo-main {
  height: 56px !important;
  max-height: 56px !important;
  transition: filter var(--transition);
}

#navbar:not(.on-home) .nav-logo-main {
  filter: brightness(0);
}

.nav-logo-secondary {
  display: none !important;
  width: auto !important;
  object-fit: contain;
}

#navbar.on-home .nav-logo-secondary {
  display: block !important;
}

#navbar:not(.on-home) .nav-logo-secondary {
  display: none !important;
}

.nav-logo-ufrgs {
  height: 46px !important;
  max-height: 46px !important;
}

.nav-logo-inf {
  height: 42px !important;
  max-height: 42px !important;
}

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

.nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

#navbar.on-home .nav-links a {
  color: rgba(255, 255, 255, 0.88);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-3);
}

#navbar.on-home .nav-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.nav-links a.active {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

#navbar.on-home .nav-links a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* =============================================
   HOME / HERO
   ============================================= */
#home {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -15%, rgba(99, 102, 241, 0.15), transparent 65%),
    radial-gradient(ellipse 60% 50% at 90% 90%, rgba(14, 165, 233, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(139, 92, 246, 0.08), transparent 50%),
    url('../img/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  /* animation: heroParallax 20s ease-in-out infinite; */
}

#home::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, rgba(30, 41, 59, 0.7) 50%, rgba(15, 23, 42, 0.8) 100%);
  z-index: 0;
}

#home::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  z-index: 0;
}

#particles {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 140px 40px 100px;
  width: min(100%, 1000px);
  max-width: 1000px;
}

.hero-content::before {
  content: '';
  position: absolute;
  inset: -100px;
  background: radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.2), rgba(14, 165, 233, 0.1) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  animation: glowPulse 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  filter: blur(40px);
}

@keyframes glowPulse {
  0%, 100% {
    transform: scale(1) translateY(0);
    opacity: 0.4;
  }
  25% {
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15) translateY(-20px);
    opacity: 0.8;
  }
  75% {
    opacity: 0.5;
  }
}

.hero-badge {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.98);
  margin-bottom: 48px;
  animation: fadeDown 0.8s ease both, badgeShimmer 3s ease-in-out infinite;
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.25), 0 8px 32px rgba(59, 130, 246, 0.15), 0 0 20px rgba(14, 165, 233, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* .hero-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: shimmerBadge 3s infinite;
  border-radius: 999px;
  pointer-events: none;
} */

.hero-badge:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3), 0 12px 48px rgba(59, 130, 246, 0.25), 0 0 30px rgba(14, 165, 233, 0.15);
  transform: translateY(-2px);
}

.hero-brand-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-bottom: 2px;
  text-align: left;
  animation: fadeUp 0.9s 0.1s ease both;
}

.hero-logo-container {
  flex: 0 0 auto;
}

.hero-logo-large {
  width: clamp(160px, 26vw, 260px);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 32px rgba(59, 130, 246, 0.25));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  /* animation: logoFloat 4s ease-in-out infinite; */
}

.hero-logo-large:hover {
  filter: drop-shadow(0 16px 48px rgba(59, 130, 246, 0.4));
  transform: scale(1.05);
}

.hero-text-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-brand-name {
  font-family: var(--font-marta);
  font-size: clamp(3.5rem, 14vw, 9rem);
  font-weight: 700;
  line-height: 0.92;
  color: #ffffff;
  margin-bottom: -25px;
  text-shadow: 
    0 0 30px rgba(59, 130, 246, 0.4),
    0 4px 40px rgba(0, 0, 0, 0.5),
    0 20px 60px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
  animation: fadeUp 0.9s 0.15s ease both;
}

.hero-brand-title {
  font-family: var(--font-sans);
  font-size: clamp(1.15rem, 4.1vw, 1.3rem);
  font-weight: 400;
  line-height: 1.4;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.3px;
  text-shadow: 
    0 2px 25px rgba(0, 0, 0, 0.4),
    0 10px 30px rgba(0, 0, 0, 0.2);
  animation: fadeUp 0.9s 0.2s ease both;
}

.hero-sub {
  font-size: clamp(0.9rem, 2.0vw, 1.0rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 650px;
  margin: 120px auto 40px;
  line-height: 1.9;
  animation: fadeUp 0.9s 0.25s ease both;
  font-weight: 300;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.9s 0.35s ease both;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  right: 40px;
  left: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeUp 1s 0.8s ease both;
}

.hero-scroll-hint:hover {
  transform: translateY(6px);
  color: rgba(255, 255, 255, 0.95);
}

.scroll-mouse {
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 13px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 15px rgba(14, 165, 233, 0.08);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-mouse:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2), 0 12px 32px rgba(0, 0, 0, 0.2), 0 0 20px rgba(14, 165, 233, 0.12);
  transform: translateY(-4px);
}

.scroll-wheel {
  width: 3.5px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  animation: scrollWheel 2s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes scrollWheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  60% {
    transform: translateY(12px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}

/* --- Hero Buttons --- */
#home .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
  color: #ffffff;
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 30px rgba(59, 130, 246, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 14px 34px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#home .btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
}

/* #home .btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: buttonShimmer 3s infinite;
  border-radius: 999px;
  pointer-events: none;
} */

#home .btn-primary:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 40px rgba(59, 130, 246, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
}

#home .btn-primary:active {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(59, 130, 246, 0.4);
}

#home .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 12px 32px;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 20px rgba(14, 165, 233, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#home .btn-ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent);
  pointer-events: none;
  border-radius: 999px;
}

/* #home .btn-ghost::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: buttonShimmer 3s infinite;
  border-radius: 999px;
  pointer-events: none;
} */

#home .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.7);
  color: #ffffff;
  transform: translateY(-6px);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.2), 0 16px 40px rgba(0, 0, 0, 0.25), 0 0 30px rgba(14, 165, 233, 0.15);
}

#home .btn-ghost:active {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* --- Subtle glow animation for buttons --- */
@keyframes buttonGlow {
  0%, 100% {
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(59, 130, 246, 0.0);
  }
  50% {
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 12px 36px rgba(59, 130, 246, 0.15);
  }
}

@keyframes shimmerBadge {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes buttonShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

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

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

@keyframes heroParallax {
  0%, 100% {
    background-position: center;
  }
  50% {
    background-position: center 10px;
  }
}

/* =============================================
   ABOUT
   ============================================= */
#about {
  padding: 120px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 80px;
  align-items: center;
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.about-subtitle {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  margin-bottom: 20px;
}

.about-text p.lead {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 400;
  text-align: justify;
  text-align-last: left;
  -webkit-hyphens: none;
  hyphens: none;
}

.about-text p.lead-2 {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 100;
  text-align: justify;
  text-align-last: left;
  -webkit-hyphens: none;
  hyphens: none;
}

.research-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.about-stats {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.05), rgba(14, 165, 233, 0.02));
}

.stat-card {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 28px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-card:hover::after {
  transform: scaleX(1);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0;
  text-align: right;
  min-width: 3ch;
  flex-shrink: 0;
}

.stat-label {
  padding-left: 20px;
  border-left: 1.5px solid var(--border);
  text-align: left;
  min-width: 150px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-sublabel {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
  margin-top: 2px;
}

.about-media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.05), rgba(14, 165, 233, 0.02));
}

.media-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: var(--transition);
}

.media-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.media-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.media-card:hover::after {
  transform: scaleX(1);
}

.media-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-icon svg {
  width: 13px;
  height: 13px;
  fill: #fff;
}

.media-name {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =============================================
   PEOPLE
   ============================================= */
#people {
  padding: 120px 0;
  background: var(--bg);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.person-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  padding: 16px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2), box-shadow 0.4s ease, border-color 0.4s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.02);
  position: relative;
}

.person-card:nth-child(3n+1) {
  transform: rotate(-1deg);
}

.person-card:nth-child(3n+2) {
  transform: rotate(0.8deg);
}

.person-card:nth-child(3n) {
  transform: rotate(-0.6deg);
}

.person-card:hover {
  transform: translateY(-8px) scale(1.02) rotate(0deg);
  box-shadow: 0 16px 32px rgba(99, 102, 241, 0.12), 0 8px 16px rgba(0, 0, 0, 0.04);
  border-color: var(--accent);
  z-index: 10;
}

.person-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  background: var(--bg-3);
}

.person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  transition: transform 0.5s ease;
}

.person-card:hover .person-avatar img {
  transform: scale(1.04);
}

.person-info {
  width: 100%;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.person-info h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0;
  line-height: 1.3;
}

.person-research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 2px;
}

.person-role {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.person-role.coordination {
  background: rgba(99, 102, 241, 0.10);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.person-role.phd {
  background: rgba(14, 165, 233, 0.10);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.person-role.masters {
  background: rgba(13, 148, 136, 0.10);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.person-role.undergrad {
  background: rgba(192, 38, 211, 0.10);
  color: #c026d3;
  border: 1px solid rgba(192, 38, 211, 0.2);
}

.person-role.postdoc {
  background: rgba(124, 58, 237, 0.10);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.person-role.collaborators {
  background: rgba(100, 116, 139, 0.10);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.person-research-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}

.person-research-tag:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Colors for research areas */
.person-research-tag.genomic {
  background: rgba(139, 137, 255, 0.14);
  color: #8b89ff;
  border-color: rgba(139, 137, 255, 0.24);
}
.person-research-tag.genomic:hover {
  background: rgba(139, 137, 255, 0.2);
}

.person-research-tag.multimodal {
  background: rgba(0, 42, 97, 0.12);
  color: #002a61;
  border-color: rgba(0, 42, 97, 0.24);
}
.person-research-tag.multimodal:hover {
  background: rgba(0, 42, 97, 0.18);
}

.person-research-tag.surveillance {
  background: rgba(26, 101, 158, 0.12);
  color: #1a659e;
  border-color: rgba(26, 101, 158, 0.24);
}
.person-research-tag.surveillance:hover {
  background: rgba(26, 101, 158, 0.18);
}

.person-research-tag.predictive {
  background: rgba(12, 167, 200, 0.12);
  color: #0ca7c8;
  border-color: rgba(12, 167, 200, 0.24);
}
.person-research-tag.predictive:hover {
  background: rgba(12, 167, 200, 0.18);
}

.person-research-tag.trust {
  background: rgba(30, 175, 157, 0.12);
  color: #1eaf9d;
  border-color: rgba(30, 175, 157, 0.24);
}
.person-research-tag.trust:hover {
  background: rgba(30, 175, 157, 0.18);
}

.person-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 6px;
  width: 100%;
}

.person-links a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.person-links a svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Hover specific styles for brand links */
.person-links a.linkedin:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(10, 102, 194, 0.3);
}

.person-links a.scholar:hover {
  background: #4285f4;
  border-color: #4285f4;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(66, 133, 244, 0.3);
}

.person-links a.email:hover {
  background: #ea4335;
  border-color: #ea4335;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(234, 67, 53, 0.3);
}

.person-links a.lattes:hover {
  background: #003366;
  border-color: #003366;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 51, 102, 0.3);
}

.person-card.hidden {
  display: none;
}

/* Active research-area filter banner */
.area-filter-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: -12px 0 32px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.area-filter-banner.hidden {
  display: none;
}

.area-filter-banner strong {
  color: var(--accent);
}

.area-filter-banner button {
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
}

.area-filter-banner button:hover {
  text-decoration: underline;
}

/* =============================================
   RESEARCH AREAS
   ============================================= */
#research {
  padding: 120px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ra-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.ra-row {
  --ra-pad-y: 56px;
  --ra-gutter: 28px;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 36px;
  align-items: start;
  padding: var(--ra-pad-y) var(--ra-gutter);
  margin: 0 calc(-1 * var(--ra-gutter));
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition);
  cursor: pointer;
}

.ra-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.ra-row--highlight {
  background-color: var(--surface-hover);
  animation: ra-row-pulse 1.6s ease-out;
}

@keyframes ra-row-pulse {
  0% { box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.5); }
  100% { box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0); }
}

.ra-row:last-child {
  border-bottom: none;
}

.ra-row:hover {
  background-color: var(--surface-hover);
}

/* connecting spine + node marker per row */
.ra-row::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.ra-row:last-child::before {
  bottom: auto;
  height: calc(var(--ra-pad-y) + 14px);
}

.ra-row::after {
  content: '';
  position: absolute;
  left: 7px;
  top: calc(var(--ra-pad-y) + 4px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--border-hover);
  transition: var(--transition);
}

.ra-row:hover::after {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.14);
  transform: scale(1.1);
}

.ra-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 9vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: transparent;
  opacity: 0.5;
  -webkit-text-stroke: 1.5px var(--border-hover);
  font-variant-numeric: tabular-nums;
  transition: color var(--transition), opacity var(--transition);
  padding-top: 0.1em;
}

.ra-row:hover .ra-num {
  opacity: 1;
  -webkit-text-stroke: 0px transparent;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ra-content {
  min-width: 0;
  transition: transform var(--transition);
}

.ra-row:hover .ra-content {
  transform: translateX(8px);
}

.ra-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  background: rgba(99, 102, 241, 0.08);
  padding: 3px 12px;
  border-radius: 999px;
}

.ra-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 10px;
}

.ra-subtitle {
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--accent);
  margin-bottom: 14px;
  max-width: 62ch;
}

.ra-desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 65ch;
}

/* =============================================
   PUBLICATIONS
   ============================================= */
#publications {
  padding: 120px 0;
  background: var(--bg);
}

.pub-search-row {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

.pub-search {
  width: 100%;
  max-width: 480px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

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

.pub-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

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

.pub-year-label {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.pub-entries {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  border-left: 4px solid transparent;
  box-shadow: var(--shadow);
}

.pub-card:hover {
  border-left-color: var(--accent);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

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

.pub-type {
  display: inline-block;
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.pub-type--journal {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.24);
}

.pub-type--conference {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
  border-color: rgba(14, 165, 233, 0.24);
}

.pub-type--chapter {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.28);
}

.pub-venue {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.pub-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.pub-authors {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pub-abstract-wrap {
  position: relative;
  cursor: pointer;
  margin-bottom: 16px;
}

.pub-abstract-wrap:not(.expanded)::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 1.3em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--surface));
  pointer-events: none;
}

.pub-abstract {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.65;
  margin-bottom: 4px;
  max-height: 2.9em;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.pub-abstract-wrap.expanded .pub-abstract {
  max-height: 40em;
}

.pub-abstract-toggle {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.pub-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pub-card.hidden {
  display: none;
}

@keyframes pubFlashPulse {

  0%,
  100% {
    box-shadow: var(--shadow);
  }

  30% {
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.28), var(--shadow-md);
    border-left-color: var(--accent);
  }
}

.pub-flash {
  animation: pubFlashPulse 1.5s ease;
}

/* =============================================
   PUBLICATION TIME MACHINE (scroll-driven timeline)
   ============================================= */
.pub-timeline-wrap {
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1.5px dashed var(--border);
}

.pub-timeline-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 32px;
}

.pub-timeline-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(14, 165, 233, 0.1);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.pub-timeline-header h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.pub-timeline-header p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.pub-timeline-track {
  position: relative;
  /* height is set inline by JS: chapters.length * 110vh */
}

.pub-timeline-stage {
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  height: clamp(560px, calc(100vh - var(--nav-height) - 48px), 760px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
  outline: none;
}

/* A plain relative wrapper hosting the absolutely-positioned children.
   Sticky boxes are an inconsistent containing block for position:absolute
   descendants across browsers, so we anchor them here instead. */
.pub-timeline-stage-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.pub-timeline-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 25%, rgba(99, 102, 241, 0.16), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(14, 165, 233, 0.14), transparent 55%);
  transition: transform 0.2s linear;
  pointer-events: none;
}

.pub-timeline-chapters {
  position: absolute;
  inset: 0;
}

.pub-timeline-chapter {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

.pub-timeline-chapter.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.pub-timeline-chapter::after {
  content: attr(data-year);
  position: absolute;
  right: -0.1em;
  bottom: -0.22em;
  font-family: var(--font-display);
  font-size: 26rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.timeline-chapter-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 40px 84px 0;
  gap: 20px;
}

.timeline-chapter-eyebrow {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-faint);
}

.timeline-chapter-year {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: -6px 0 0;
}

.timeline-chapter-stat {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.6;
}

.timeline-stat-highlight {
  color: var(--text);
  font-weight: 700;
}

.timeline-spotlight {
  position: relative;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 14px 18px;
  max-width: 620px;
}

.timeline-spotlight-tag {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 6px;
}

.timeline-spotlight-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
}

.timeline-spotlight-venue {
  font-size: 12px;
  color: var(--text-faint);
}

.timeline-spotlight-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.timeline-spotlight-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.timeline-closing {
  font-size: 14px;
  color: var(--text-muted);
}

.timeline-closing strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}

.timeline-closing-link {
  margin-left: 8px;
  font-weight: 700;
  color: var(--accent);
}

.timeline-marquee {
  margin-top: auto;
  overflow: hidden;
  padding: 18px 0 28px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.timeline-marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: timelineMarquee calc(var(--chip-count, 6) * 3.2s) linear infinite;
}

.timeline-marquee:hover .timeline-marquee-track,
.timeline-marquee:focus-within .timeline-marquee-track {
  animation-play-state: paused;
}

@keyframes timelineMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.timeline-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 220px;
  flex-shrink: 0;
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
}

.timeline-chip:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.timeline-chip-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.timeline-chip-venue {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--text-faint);
}

.pub-timeline-nav {
  position: absolute;
  bottom: 22px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.pub-timeline-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pub-timeline-nav--prev {
  left: 24px;
}

.pub-timeline-nav--next {
  left: 70px;
}

.pub-timeline-dots {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.timeline-dot.active {
  background: var(--accent-grad);
  width: 24px;
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  .timeline-marquee-track {
    animation: none;
    overflow-x: auto;
  }

  .pub-timeline-bg {
    transition: none;
  }
}

/* =============================================
   PUBLICATION QUIZ
   ============================================= */
.pub-quiz-wrap {
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1.5px dashed var(--border);
}

.pub-quiz-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 32px;
}

.pub-quiz-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.pub-quiz-header h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.pub-quiz-header p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.pub-quiz-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.quiz-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.quiz-progress-dots {
  display: flex;
  gap: 7px;
}

.quiz-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.quiz-progress-dot.done {
  background: var(--accent);
}

.quiz-progress-dot.current {
  width: 22px;
  border-radius: 999px;
  background: var(--accent-grad);
}

.quiz-score {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.quiz-paper-context {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.quiz-paper-tag {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 6px;
}

.quiz-paper-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}

.quiz-question {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-choice {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-choice:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.quiz-choice:disabled {
  cursor: default;
}

.quiz-choice:disabled:not(.correct):not(.incorrect) {
  opacity: 0.5;
}

.quiz-choice.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  color: #067a5c;
  font-weight: 600;
}

.quiz-choice.incorrect {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.1);
  color: #be123c;
  font-weight: 600;
}

.quiz-feedback {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.4s ease;
}

.quiz-feedback-verdict {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.quiz-feedback-verdict.is-correct {
  color: #067a5c;
}

.quiz-feedback-verdict.is-incorrect {
  color: #be123c;
}

.quiz-feedback-explanation {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.quiz-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-results {
  text-align: center;
  animation: fadeUp 0.4s ease;
}

.quiz-results-score {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 4rem);
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.quiz-results-tier {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 28px;
}

.quiz-recap-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

.quiz-recap-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.quiz-recap-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.quiz-recap-icon.is-correct {
  background: #10b981;
}

.quiz-recap-icon.is-incorrect {
  background: #f43f5e;
}

.quiz-recap-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-muted);
}

.quiz-recap-link {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-recap-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.quiz-results-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

/* =============================================
   FOOTER
   ============================================= */
#footer {
  background: var(--text);
  color: #e2e8f0;
  padding: 72px 0 0;
}

#footer .nav-logo img {
  height: 40px !important;
  max-height: 40px !important;
  width: auto !important;
  object-fit: contain;
  display: block;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.8;
  margin-top: 12px;
}

.footer-socials {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  transition: var(--transition);
}

.footer-socials a svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.footer-socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.footer-links-col h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.footer-links-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-col li {
  font-size: 14px;
  color: #94a3b8;
}

.footer-links-col a {
  transition: var(--transition);
}

.footer-links-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  #home {
    background-attachment: scroll;
    background-position: center 18%;
  }

  .hero-content {
    padding: 120px 28px 92px;
  }

  .hero-brand-container {
    gap: 10px;
  }

  .hero-logo-large {
    width: clamp(140px, 30vw, 210px);
  }

  .hero-brand-name {
    font-size: clamp(3rem, 11vw, 6.5rem);
    margin-bottom: -18px;
  }

  .hero-brand-title {
    font-size: clamp(1rem, 2.4vw, 1.15rem);
  }

  .hero-sub {
    margin: 84px auto 32px;
    max-width: 560px;
  }

  .hero-scroll-hint {
    right: 24px;
    bottom: 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .timeline-chapter-inner {
    padding: 32px 56px 0;
  }
}

@media (max-width: 680px) {
  #home {
    align-items: flex-start;
    background-position: 62% center;
  }

  .hero-content {
    padding: 108px 20px 120px;
  }

  .hero-badge {
    margin-bottom: 28px;
    padding: 8px 18px;
    font-size: 10px;
    letter-spacing: 2px;
  }

  .hero-brand-container {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

  .hero-text-container {
    align-items: center;
  }

  .hero-logo-large {
    width: min(58vw, 180px);
  }

  .hero-brand-name {
    font-size: clamp(2.8rem, 18vw, 4.5rem);
    margin-bottom: -10px;
  }

  .hero-brand-title {
    font-size: 0.98rem;
    line-height: 1.45;
    margin-top: 6px;
  }

  .hero-sub {
    margin: 56px auto 28px;
    font-size: 0.98rem;
    line-height: 1.75;
    max-width: 32rem;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(248, 249, 252, 0.97);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--border);
  }

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

  .nav-toggle {
    display: flex;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 12px;
  }

  .hero-actions .btn {
    width: min(100%, 240px);
    justify-content: center;
    padding: 10px 18px;
    font-size: 13px;
    letter-spacing: 0.3px;
  }

  .about-stats {
    padding: 16px;
  }

  .stat-card {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 20px;
  }

  .stat-label {
    border-left: none;
    padding-left: 0;
    text-align: center;
    min-width: 0;
  }

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

  .people-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .about-media {
    gap: 8px;
    padding: 12px;
  }

  .media-card {
    gap: 8px;
    padding: 8px 10px;
  }

  .media-icon {
    width: 24px;
    height: 24px;
  }

  .media-icon svg {
    width: 12px;
    height: 12px;
  }

  .media-name {
    font-size: 11.5px;
  }

  .ra-row {
    --ra-pad-y: 36px;
    --ra-gutter: 16px;
    column-gap: 16px;
  }

  .ra-title {
    margin-bottom: 8px;
  }

  .ra-subtitle {
    margin-bottom: 10px;
  }

  .pub-timeline-stage {
    height: clamp(620px, calc(100vh - var(--nav-height) - 32px), 820px);
  }

  .timeline-chapter-inner {
    padding: 24px 20px 0;
    gap: 14px;
  }

  .timeline-spotlight {
    padding: 12px 14px;
  }

  .pub-timeline-nav {
    width: 32px;
    height: 32px;
    font-size: 14px;
    bottom: 14px;
  }

  .pub-timeline-nav--prev {
    left: 14px;
  }

  .pub-timeline-nav--next {
    left: 54px;
  }

  .pub-timeline-dots {
    right: 14px;
    bottom: 14px;
  }

  .pub-quiz-card {
    padding: 22px 18px;
  }

  .quiz-question {
    font-size: 1.05rem;
  }

  .quiz-feedback-actions,
  .quiz-results-actions {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .hero-scroll-hint {
    left: 50%;
    right: auto;
    bottom: 18px;
    transform: translateX(-50%);
  }

  .hero-scroll-hint:hover {
    transform: translateX(-50%) translateY(4px);
  }
}