/* ============================================
   Apple Liquid Glass Design System
   Academic Paper Project Website
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Apple Primary Colors (dark variants for softer fills on white) */
  --apple-blue: #0091FF;
  --apple-blue-dark: #0091FF;
  --apple-red: #FF4245;
  --apple-green: #30D158;
  --apple-purple: #DB34F2;
  --apple-orange: #FF9230;
  --apple-teal: #00D2E0;
  --apple-indigo: #6D7CFF;

  /* Apple Grays */
  --gray-100: #F2F2F7;
  --gray-200: #E5E5EA;
  --gray-300: #D1D1D6;
  --gray-400: #C7C7CC;
  --gray-500: #AEAEB2;
  --gray-600: #8E8E93;
  --gray-700: #636366;
  --gray-800: #48484A;
  --gray-900: #3A3A3C;

  /* Dark Backgrounds */
  --dark-bg: #1C1C1E;
  --dark-bg-elevated: #2C2C2E;
  --dark-bg-secondary: #38383A;

  /* Apple Music Gradient */
  --gradient-music: linear-gradient(135deg, #b48def 0%, #9b8ec8 25%, #7572ff 50%, #69a6f9 75%, #5ac8e0 100%);
  --gradient-music-animated: linear-gradient(270deg, #b48def, #9b8ec8, #7572ff, #69a6f9, #5ac8e0, #b48def);

  /* Glass Properties */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-hover: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-border-strong: rgba(255, 255, 255, 0.5);
  --glass-blur: 20px;
  --glass-saturate: 180%;
  --glass-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.08);
  --glass-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.12);
  --glass-shadow-deep: 0 4px 16px rgba(0, 0, 0, 0.08), 0 16px 48px rgba(0, 0, 0, 0.16);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 100px;

  /* Typography */
  --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  --font-text: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, monospace;

  /* Transitions */
  --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-default: all 0.3s var(--ease-apple);
  --transition-fast: all 0.2s var(--ease-apple);
  --transition-slow: all 0.5s var(--ease-apple);

  /* Spacing */
  --section-gap: 80px;
  --content-max: 980px;
  --content-wide: 1200px;

  /* Semantic Colors (Light Mode) */
  --bg-primary: #FFFFFF;
  --bg-secondary: var(--gray-100);
  --text-primary: #1D1D1F;
  --text-secondary: #86868B;
  --text-tertiary: var(--gray-600);
  --separator: rgba(0, 0, 0, 0.08);
}

/* --- Dark Mode Variables --- */
@media (prefers-color-scheme: dark) {
  :root {
    --glass-bg: rgba(44, 44, 46, 0.72);
    --glass-bg-hover: rgba(44, 44, 46, 0.82);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-strong: rgba(255, 255, 255, 0.18);
    --glass-blur: 24px;
    --glass-saturate: 200%;
    --glass-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
    --glass-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.4);
    --glass-shadow-deep: 0 4px 16px rgba(0, 0, 0, 0.3), 0 16px 48px rgba(0, 0, 0, 0.5);

    --bg-primary: var(--dark-bg);
    --bg-secondary: var(--dark-bg-elevated);
    --text-primary: #F5F5F7;
    --text-secondary: #A1A1A6;
    --text-tertiary: var(--gray-600);
    --separator: rgba(255, 255, 255, 0.08);
  }
}

/* Dark mode override class */
.dark-mode {
  --glass-bg: rgba(44, 44, 46, 0.72);
  --glass-bg-hover: rgba(44, 44, 46, 0.82);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-strong: rgba(255, 255, 255, 0.18);
  --glass-blur: 24px;
  --glass-saturate: 200%;
  --glass-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
  --glass-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.4);
  --glass-shadow-deep: 0 4px 16px rgba(0, 0, 0, 0.3), 0 16px 48px rgba(0, 0, 0, 0.5);

  --bg-primary: var(--dark-bg);
  --bg-secondary: var(--dark-bg-elevated);
  --text-primary: #F5F5F7;
  --text-secondary: #A1A1A6;
  --text-tertiary: var(--gray-600);
  --separator: rgba(255, 255, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

/* --- Selection Color (Indigo tint) --- */
::selection {
  background: rgba(109, 124, 255, 0.25);
  color: inherit;
}

::-moz-selection {
  background: rgba(109, 124, 255, 0.25);
  color: inherit;
}

/* --- Scrollbar Styling (WebKit) --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(109, 124, 255, 0.2);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(109, 124, 255, 0.35);
  border: 2px solid transparent;
  background-clip: content-box;
}

.dark-mode ::-webkit-scrollbar-thumb {
  background: rgba(139, 148, 255, 0.25);
  border: 2px solid transparent;
  background-clip: content-box;
}

.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 148, 255, 0.4);
  border: 2px solid transparent;
  background-clip: content-box;
}

body {
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s var(--ease-apple), color 0.4s var(--ease-apple);
  overflow-x: hidden;
}

a {
  color: var(--apple-indigo);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

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

/* ============================================
   Typography Scale
   ============================================ */
.text-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.text-headline {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary);
}

.text-subtitle {
  font-size: 19px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 10px;
}

.text-body {
  font-size: 17px;
  line-height: 1.6;
}

.text-caption {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.text-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--apple-indigo);
}

.dark-mode .text-label {
  color: #8B94FF;
}

.text-mono {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================
   Content Body Typography Polish
   ============================================ */
.section p {
  line-height: 1.7;
}

.section strong {
  font-weight: 650;
  color: var(--text-primary);
}

.section em {
  font-style: italic;
  color: var(--text-secondary);
}

.dark-mode .section em {
  color: #B0B0B8;
}

.section a:not(.btn):not(.nav-brand) {
  color: var(--apple-indigo);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease-apple), color 0.2s var(--ease-apple);
}

.section a:not(.btn):not(.nav-brand):hover {
  border-bottom-color: var(--apple-indigo);
  opacity: 1;
}

.dark-mode .section a:not(.btn):not(.nav-brand) {
  color: #8B94FF;
}

.dark-mode .section a:not(.btn):not(.nav-brand):hover {
  border-bottom-color: #8B94FF;
}

/* ============================================
   Layout Utilities
   ============================================ */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.section + .section {
  border-top: 1px solid var(--separator);
}

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

.section-header .text-label {
  display: block;
  margin-bottom: 14px;
  color: var(--apple-indigo);
}

.dark-mode .section-header .text-label {
  color: #8B94FF;
}

.section-header .text-headline {
  margin-bottom: 12px;
}

.section-header .text-subtitle {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* ============================================
   Navigation (Floating Glass Bar)
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04),
    0 0 0 0 rgba(0, 0, 0, 0);
  transition: background 0.4s var(--ease-apple),
              box-shadow 0.4s var(--ease-apple),
              border-color 0.4s var(--ease-apple),
              backdrop-filter 0.4s var(--ease-apple);
}

/* Three-layer glass: inner glow highlight */
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  pointer-events: none;
  z-index: 1;
}

/* Scrolled state — frosted, elevated */
.nav.nav-scrolled {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Dark mode nav */
.dark-mode .nav {
  background: rgba(28, 28, 30, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 0 0 0 rgba(0, 0, 0, 0);
}

.dark-mode .nav::before {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dark-mode .nav.nav-scrolled {
  background: rgba(28, 28, 30, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.25);
}

.nav-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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

.nav-links a {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: color 0.2s var(--ease-apple),
              background 0.2s var(--ease-apple);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
  opacity: 1;
}

.dark-mode .nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Active link indicator */
.nav-links a.nav-active {
  color: var(--apple-indigo);
  background: rgba(109, 124, 255, 0.08);
}

.dark-mode .nav-links a.nav-active {
  color: #8B94FF;
  background: rgba(109, 124, 255, 0.12);
}

.nav-toggle-dark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s var(--ease-apple),
              background 0.2s var(--ease-apple);
}

.nav-toggle-dark:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
  transform: none;
}

.dark-mode .nav-toggle-dark:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================
   Glass Card Components
   ============================================ */
.glass-card {
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  padding: 32px;
  transition: var(--transition-default);
}

.glass-card:hover {
  box-shadow: var(--glass-shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  border-color: var(--glass-border-strong);
}

.glass-card-sm {
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  padding: 24px;
  transition: var(--transition-default);
}

.glass-card-sm:hover {
  box-shadow: var(--glass-shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
}

.glass-surface {
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

/* ============================================
   Button Styles
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: var(--transition-default);
  text-decoration: none;
  white-space: nowrap;
}

.btn-solid {
  background: var(--apple-indigo);
  color: #fff;
}

.btn-solid:hover {
  background: #5B6AE6;
  opacity: 1;
  transform: scale(1.02);
}

.btn-outline {
  background: transparent;
  color: var(--apple-indigo);
  border: 1.5px solid var(--apple-indigo);
}

.btn-outline:hover {
  background: rgba(109, 124, 255, 0.1);
  opacity: 1;
}

.btn-glass {
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.btn-glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-strong);
  box-shadow: var(--glass-shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  opacity: 1;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-icon {
  font-size: 18px;
  line-height: 1;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 24px 60px;
}

/* --- Hero Background: static Indigo gradient --- */
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #5E5CE6 0%, #6D7CFF 55%, #8B94FF 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 860px;
  width: 100%;
}

/* --- Hero Glass Card: three-layer premium frosted centerpiece --- */
.hero-glass {
  position: relative;
  backdrop-filter: blur(54px) saturate(200%);
  -webkit-backdrop-filter: blur(54px) saturate(200%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top-color: rgba(255, 255, 255, 0.35);
  border-radius: 26px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 16px 48px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  padding: 56px 52px;
  text-align: center;
}

/* ::before — inner glow */
.hero-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 0;
}

/* ::after — specular highlight at top edge (lensing) */
.hero-glass::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  border-radius: 1px;
  pointer-events: none;
  z-index: 1;
}

/* Dark mode hero glass */
.dark-mode .hero-glass {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 16px 48px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.dark-mode .hero-glass::before {
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.04);
}

.dark-mode .hero-glass::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* --- Venue Badge: glass pill with inner highlight --- */
.hero-venue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
}

.hero-venue .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apple-green);
  box-shadow: 0 0 6px var(--apple-green), 0 0 12px rgba(48, 209, 88, 0.3);
  animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 6px var(--apple-green), 0 0 12px rgba(48, 209, 88, 0.3); }
  50% { box-shadow: 0 0 8px var(--apple-green), 0 0 18px rgba(48, 209, 88, 0.45); }
}

/* --- Title: SF Pro Display, tight hierarchy --- */
.hero-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: #fff;
  margin-bottom: 22px;
  position: relative;
  z-index: 2;
}

/* --- Authors: hover glow effect --- */
.hero-authors {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 8px;
  line-height: 1.7;
  position: relative;
  z-index: 2;
}

.hero-authors a {
  color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: border-color 0.2s var(--ease-apple),
              text-shadow 0.2s var(--ease-apple);
}

.hero-authors a:hover {
  border-bottom-color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.hero-affiliation {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 36px;
  letter-spacing: 0.005em;
  position: relative;
  z-index: 2;
}

/* --- Button Row: glass material with hover lift + press --- */
.hero-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.hero-links .btn-glass {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.2s var(--ease-apple),
              background 0.2s var(--ease-apple),
              border-color 0.2s var(--ease-apple),
              box-shadow 0.2s var(--ease-apple);
  padding: 11px 22px;
  font-size: 14px;
}

.hero-links .btn-glass:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.hero-links .btn-glass:active {
  transform: translateY(0.5px);
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  transition-duration: 0.1s;
}

/* Dark mode hero buttons */
.dark-mode .hero-links .btn-glass {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.dark-mode .hero-links .btn-glass:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.dark-mode .hero-links .btn-glass:active {
  background: rgba(255, 255, 255, 0.12);
}

/* --- Floating Orbs: larger, softer, ethereal, Indigo/purple/blue only --- */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 1;
  animation: orbFloat 12s ease-in-out infinite;
  will-change: transform;
}

.hero-orb-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(117, 114, 255, 0.7) 0%, rgba(88, 86, 214, 0.3) 60%, transparent 100%);
  top: 5%;
  left: -10%;
  animation-delay: 0s;
  animation-duration: 14s;
}

.hero-orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(105, 166, 249, 0.6) 0%, rgba(90, 130, 240, 0.25) 60%, transparent 100%);
  bottom: 5%;
  right: -8%;
  animation-delay: -4s;
  animation-duration: 16s;
}

.hero-orb-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(139, 148, 255, 0.5) 0%, rgba(109, 124, 255, 0.2) 60%, transparent 100%);
  top: 45%;
  left: 55%;
  animation-delay: -7s;
  animation-duration: 18s;
}

/* ============================================
   Abstract Section
   ============================================ */
.abstract-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 44px 48px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.03),
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 12px 40px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Indigo accent bar at top */
.abstract-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--apple-indigo), #8B94FF);
  border-radius: 2px 2px 0 0;
}

/* Subtle inner glow at top edge */
.abstract-card::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(109, 124, 255, 0.03), transparent);
  pointer-events: none;
}

.dark-mode .abstract-card {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dark-mode .abstract-card::after {
  background: linear-gradient(180deg, rgba(109, 124, 255, 0.06), transparent);
}

.abstract-card p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.abstract-card p + p {
  margin-top: 20px;
}

.abstract-card strong {
  font-weight: 650;
  color: var(--apple-indigo);
}

.dark-mode .abstract-card strong {
  color: #8B94FF;
}

.abstract-card em {
  font-style: italic;
  color: var(--text-secondary);
}

.dark-mode .abstract-card em {
  color: #B0B0B8;
}

/* ============================================
   Key Results / Metrics
   ============================================ */
.metric-card {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 28px 24px 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.02),
    0 4px 16px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.3s var(--ease-apple),
              box-shadow 0.3s var(--ease-apple),
              border-color 0.3s var(--ease-apple);
}

.dark-mode .metric-card {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Top accent bar — full width, subtle gradient */
.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--apple-indigo), #8B94FF);
  opacity: 0.7;
  transition: opacity 0.3s var(--ease-apple);
}

.metric-card:hover::before {
  opacity: 1;
}

/* Hover lift */
.metric-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border-color: rgba(109, 124, 255, 0.15);
}

.dark-mode .metric-card:hover {
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.25),
    0 16px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-color: rgba(109, 124, 255, 0.2);
}

.metric-value {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--apple-indigo);
  margin-top: 12px;
  margin-bottom: 10px;
  line-height: 1.1;
}

.dark-mode .metric-value {
  color: #8B94FF;
}

.metric-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.metric-detail {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0;
}

/* ============================================
   Method Overview
   ============================================ */
.method-figure {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.method-figure-placeholder {
  width: 100%;
  aspect-ratio: 16 / 7;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.02),
    0 4px 16px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.dark-mode .method-figure-placeholder {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.method-figure-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(109, 124, 255, 0.05) 0%,
    rgba(117, 114, 255, 0.03) 50%,
    rgba(250, 87, 193, 0.05) 100%);
}

.method-figure-placeholder .icon {
  font-size: 40px;
  opacity: 0.3;
}

.method-figure-placeholder .label {
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.method-description h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.method-description p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.method-step {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.02),
    0 4px 16px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.3s var(--ease-apple),
              box-shadow 0.3s var(--ease-apple),
              border-color 0.3s var(--ease-apple);
}

.dark-mode .method-step {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.method-step:hover {
  transform: translateY(-3px);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border-color: rgba(109, 124, 255, 0.12);
}

.dark-mode .method-step:hover {
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-color: rgba(109, 124, 255, 0.18);
}

.method-step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--apple-indigo), #8B94FF);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 2px 8px rgba(109, 124, 255, 0.3);
  flex-shrink: 0;
}

.dark-mode .method-step-number {
  background: linear-gradient(135deg, #6D7CFF, #8B94FF);
  box-shadow: 0 2px 8px rgba(109, 124, 255, 0.25);
}

.method-step h3,
.method-step h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.method-step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

/* ============================================
   Qualitative Results / Gallery
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.gallery-item {
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.35s var(--ease-apple),
              box-shadow 0.35s var(--ease-apple);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.02),
    0 4px 16px rgba(0, 0, 0, 0.05);
}

.dark-mode .gallery-item {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.18);
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 12px 36px rgba(0, 0, 0, 0.1),
    0 20px 56px rgba(0, 0, 0, 0.06);
}

.dark-mode .gallery-item:hover {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 12px 36px rgba(0, 0, 0, 0.3),
    0 20px 56px rgba(0, 0, 0, 0.2);
}

.gallery-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-xl);
}

.dark-mode .gallery-placeholder {
  border-color: rgba(255, 255, 255, 0.06);
}

.gallery-placeholder .icon {
  font-size: 36px;
  opacity: 0.2;
  transition: opacity 0.3s var(--ease-apple), transform 0.3s var(--ease-apple);
}

.gallery-item:hover .gallery-placeholder .icon {
  opacity: 0.35;
  transform: scale(1.1);
}

.gallery-placeholder .caption {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
}

.gallery-placeholder:nth-child(1) {
  background: linear-gradient(135deg, rgba(250, 87, 193, 0.06), rgba(177, 102, 204, 0.06));
}
.gallery-placeholder:nth-child(2) {
  background: linear-gradient(135deg, rgba(117, 114, 255, 0.06), rgba(105, 166, 249, 0.06));
}
.gallery-placeholder:nth-child(3) {
  background: linear-gradient(135deg, rgba(109, 124, 255, 0.06), rgba(48, 176, 199, 0.06));
}
.gallery-placeholder:nth-child(4) {
  background: linear-gradient(135deg, rgba(109, 124, 255, 0.06), rgba(175, 82, 222, 0.06));
}

/* Dark mode: slightly stronger gradients */
.dark-mode .gallery-placeholder:nth-child(1) {
  background: linear-gradient(135deg, rgba(250, 87, 193, 0.1), rgba(177, 102, 204, 0.1));
}
.dark-mode .gallery-placeholder:nth-child(2) {
  background: linear-gradient(135deg, rgba(117, 114, 255, 0.1), rgba(105, 166, 249, 0.1));
}
.dark-mode .gallery-placeholder:nth-child(3) {
  background: linear-gradient(135deg, rgba(109, 124, 255, 0.1), rgba(48, 176, 199, 0.1));
}
.dark-mode .gallery-placeholder:nth-child(4) {
  background: linear-gradient(135deg, rgba(109, 124, 255, 0.1), rgba(175, 82, 222, 0.1));
}

/* Glass-style overlay caption bar */
.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease-apple), transform 0.3s var(--ease-apple);
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   BibTeX Section — Apple Design
   ============================================ */
.bibtex-card {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dark-mode .bibtex-card,
.bibtex-card[data-dark] {
  background: var(--dark-bg);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
}

.bibtex-header .text-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gray-600);
  margin: 0;
}

.dark-mode .bibtex-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.dark-mode .bibtex-header .text-label {
  color: var(--gray-500);
}

/* Code area */
.bibtex-code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--gray-800);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 20px 24px 24px;
  overflow-x: auto;
  white-space: pre;
  display: block;
}

/* Syntax highlighting — light mode (Apple system colors) */
.bibtex-code .bib-keyword {
  color: #5E5CE6; /* System Indigo — entry type */
}

.bibtex-code .bib-key {
  color: #0091FF; /* System Blue — cite key */
}

.bibtex-code .bib-field {
  color: #00D2E0; /* System Teal — field names */
  filter: brightness(0.7);
}

.bibtex-code .bib-equals {
  color: var(--gray-500); /* Gray — punctuation */
}

.bibtex-code .bib-value {
  color: #1D1D1F; /* Primary text — values */
}

.bibtex-code .bib-brace {
  color: var(--gray-600); /* Gray — braces */
}

/* Syntax highlighting — dark mode (Apple system colors, lightened) */
.dark-mode .bibtex-code {
  color: rgba(255, 255, 255, 0.7);
}

.dark-mode .bibtex-code .bib-keyword {
  color: #8B94FF; /* Indigo light */
}

.dark-mode .bibtex-code .bib-key {
  color: #64D2FF; /* Blue light */
}

.dark-mode .bibtex-code .bib-field {
  color: #00D2E0; /* Teal */
  filter: none;
}

.dark-mode .bibtex-code .bib-equals {
  color: var(--gray-600);
}

.dark-mode .bibtex-code .bib-value {
  color: rgba(255, 255, 255, 0.85);
}

.dark-mode .bibtex-code .bib-brace {
  color: var(--gray-600);
}

/* Copy button */
.bibtex-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s var(--ease-apple);
  font-family: var(--font-text);
}

.bibtex-copy:hover {
  color: var(--apple-indigo);
  border-color: rgba(109, 124, 255, 0.3);
  background: rgba(109, 124, 255, 0.06);
  transform: translateY(-1px);
}

.bibtex-copy:active {
  transform: translateY(0) scale(0.97);
}

.bibtex-copy .btn-icon {
  font-size: 13px;
}

/* Copied state */
.bibtex-copy.copied {
  color: var(--apple-green);
  background: rgba(48, 209, 88, 0.08);
  border-color: rgba(48, 209, 88, 0.25);
}

/* Dark mode copy button */
.dark-mode .bibtex-copy {
  color: var(--gray-500);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .bibtex-copy:hover {
  color: #8B94FF;
  border-color: rgba(139, 148, 255, 0.3);
  background: rgba(109, 124, 255, 0.08);
}

.dark-mode .bibtex-copy.copied {
  color: #30D158;
  background: rgba(48, 209, 88, 0.1);
  border-color: rgba(48, 209, 88, 0.25);
}

/* Override glass-card for bibtex */
.glass-card.bibtex-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: #FFFFFF;
}

.glass-card.bibtex-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

.dark-mode .glass-card.bibtex-card {
  background: var(--dark-bg);
  border-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .glass-card.bibtex-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   Footer — Clean, Minimal with Glass Tint
   ============================================ */
.footer {
  position: relative;
  padding: 48px 0 40px;
  text-align: center;
  border-top: none;
  background: rgba(0, 0, 0, 0.015);
}

.dark-mode .footer {
  background: rgba(255, 255, 255, 0.015);
}

/* Gradient separator line that fades at edges */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--separator) 20%,
    rgba(109, 124, 255, 0.15) 50%,
    var(--separator) 80%,
    transparent 100%
  );
}

.footer-links {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.footer-links a:hover {
  color: var(--apple-indigo);
  opacity: 1;
}

.dark-mode .footer-links a:hover {
  color: #8B94FF;
}

.footer-secondary {
  font-size: 12px;
  color: var(--text-tertiary);
  opacity: 0.6;
  margin-top: 8px;
}

/* Legacy support for unstyled footer p tags */
.footer p {
  font-size: 14px;
  color: var(--text-tertiary);
}

.footer a {
  color: var(--text-secondary);
  transition: color 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.footer a:hover {
  color: var(--apple-indigo);
  opacity: 1;
}

.dark-mode .footer a:hover {
  color: #8B94FF;
}

/* Back-to-top button */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background 0.25s ease,
              border-color 0.25s ease;
}

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

.back-to-top:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-strong);
  color: var(--apple-indigo);
  box-shadow: var(--glass-shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.dark-mode .back-to-top:hover {
  color: #8B94FF;
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-apple);
  padding: 40px;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s var(--ease-apple);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   Animations / Keyframes
   ============================================ */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(25px, -35px) scale(1.04); }
  50% { transform: translate(-10px, 20px) scale(1.02); }
  75% { transform: translate(-20px, -10px) scale(0.96); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glassShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, opacity;
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }
.animate-delay-6 { transition-delay: 0.6s; }

.shimmer {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%);
  background-size: 200% 100%;
  animation: glassShimmer 3s linear infinite;
}

/* ============================================
   Scroll indicator
   ============================================ */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeIn 1s 1.5s both;
}

.scroll-indicator-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.45), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.2; transform: scaleY(0.5); }
}

/* ============================================
   Comparison Table
   ============================================ */
.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-xl);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

/* Header row — subtle glass-like background */
.comparison-table thead tr {
  background: rgba(109, 124, 255, 0.04);
}

.dark-mode .comparison-table thead tr {
  background: rgba(109, 124, 255, 0.06);
}

.comparison-table th {
  text-align: left;
  padding: 16px 22px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--separator);
}

.comparison-table td {
  padding: 15px 22px;
  border-bottom: 1px solid var(--separator);
  font-size: 15px;
  transition: background-color 0.2s var(--ease-apple);
}

/* Subtle alternating row tint */
.comparison-table tbody tr:nth-child(even) {
  background: rgba(109, 124, 255, 0.015);
}

.dark-mode .comparison-table tbody tr:nth-child(even) {
  background: rgba(109, 124, 255, 0.03);
}

/* Hover row highlight */
.comparison-table tbody tr:hover {
  background: rgba(109, 124, 255, 0.04);
}

.dark-mode .comparison-table tbody tr:hover {
  background: rgba(109, 124, 255, 0.07);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

/* "Ours" highlight row — refined Indigo tint */
.comparison-table .highlight-row {
  background: rgba(109, 124, 255, 0.06) !important;
}

.comparison-table .highlight-row td {
  color: var(--apple-indigo);
  font-weight: 600;
}

.comparison-table .highlight-row td:first-child {
  font-weight: 700;
}

.comparison-table .highlight-row:hover {
  background: rgba(109, 124, 255, 0.10) !important;
}

.dark-mode .comparison-table .highlight-row {
  background: rgba(109, 124, 255, 0.1) !important;
}

.dark-mode .comparison-table .highlight-row:hover {
  background: rgba(109, 124, 255, 0.15) !important;
}

.dark-mode .comparison-table .highlight-row td {
  color: #8B94FF;
}

/* Best cells — subtle bold + Indigo accent */
.comparison-table .best {
  font-weight: 700;
  color: var(--apple-indigo);
  position: relative;
}

.dark-mode .comparison-table .best {
  color: #8B94FF;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 1068px) {
  :root {
    --section-gap: 64px;
  }

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

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

  .method-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 735px) {
  :root {
    --section-gap: 48px;
  }

  .hero {
    min-height: auto;
    padding: 100px 16px 48px;
  }

  .hero-glass {
    padding: 36px 24px;
    border-radius: 22px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-authors {
    font-size: 15px;
  }

  .hero-links {
    gap: 8px;
  }

  .hero-links .btn {
    padding: 10px 18px;
    font-size: 13px;
  }

  .text-title {
    font-size: 32px;
  }

  .text-headline {
    font-size: 28px;
  }

  .text-subtitle {
    font-size: 17px;
  }

  .container {
    padding: 0 16px;
  }

  .container-wide {
    padding: 0 16px;
  }

  .glass-card {
    padding: 24px;
    border-radius: var(--radius-lg);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

  .method-steps {
    grid-template-columns: 1fr;
  }

  /* Hide section anchor links on mobile, but keep the dark-mode toggle
     (the last <li>) visible so users can still flip themes. */
  .nav-links {
    gap: 0;
  }
  .nav-links li:not(:last-child) {
    display: none;
  }

  .metric-value {
    font-size: 38px;
  }

  .abstract-card {
    padding: 28px 24px;
  }

  .gallery-grid {
    gap: 16px;
  }

  .bibtex-code {
    font-size: 11px;
    padding: 16px 18px;
  }

  .bibtex-header {
    padding: 12px 16px 10px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .section-header {
    margin-bottom: 32px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .hero-glass {
    padding: 28px 18px;
    border-radius: 20px;
  }

  .hero-links {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-links .btn {
    justify-content: center;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .nav, .scroll-indicator, .lightbox, .back-to-top {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 40px 0;
  }

  .glass-card, .glass-card-sm {
    backdrop-filter: none;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* ===== Squircle (Apple superellipse icon shape) ===== */
.squircle { border-radius: 22.37%; }

/* ===== Focus Styles (Accessibility) ===== */
a:focus-visible,
button:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid rgba(109, 124, 255, 0.8);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Dark Mode Body Transition ===== */
body,
.glass-card,
.glass-card-sm,
.glass-surface,
.bibtex-card,
.footer {
  transition: background-color 0.4s var(--ease-apple),
              color 0.4s var(--ease-apple),
              border-color 0.4s var(--ease-apple),
              box-shadow 0.4s var(--ease-apple);
}

/* ===== Backdrop-filter Fallback ===== */
@supports not (backdrop-filter: blur(1px)) {
  .glass-card, .glass-card-sm, .nav {
    background: rgba(255, 255, 255, 0.92);
  }
  .dark-mode .glass-card, .dark-mode .glass-card-sm, .dark-mode .nav {
    background: rgba(28, 28, 30, 0.95);
  }
}

/* ===== Liquid Glass Accessibility ===== */
@media (prefers-reduced-transparency: reduce) {
  .glass-card,
  .glass-card-sm,
  .glass-surface,
  .nav,
  .btn-glass,
  .hero-glass,
  .metric-card,
  .lightbox {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@media (prefers-contrast: more) {
  .glass-card,
  .glass-card-sm,
  .glass-surface,
  .nav,
  .btn-glass,
  .hero-glass,
  .metric-card {
    border-width: 2px !important;
  }
}

/* ===== Scroll Edge Effect ===== */
.scroll-edge-top::before {
  content: '';
  position: sticky;
  top: 0;
  display: block;
  height: 40px;
  margin-bottom: -40px;
  background: linear-gradient(to bottom, var(--bg-primary, #fff), transparent);
  pointer-events: none;
  z-index: 10;
}

/* ============================================
   Fix: Glass-on-Content Antipattern
   Remove glass from content cards; use solid backgrounds.
   Glass is KEPT on: .nav, .hero-glass, .hero-venue,
   .btn-glass, .hero-links .btn-glass, .lightbox, .lightbox-close
   ============================================ */
.glass-card.abstract-card,
.glass-card-sm.metric-card,
.glass-card-sm.method-step {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--glass-shadow);
}

.glass-card.abstract-card:hover,
.glass-card-sm.metric-card:hover,
.glass-card-sm.method-step:hover {
  box-shadow: var(--glass-shadow-hover);
}

/* Comparison table wrapper: the parent .glass-card has inline style so override via specificity */
#results .glass-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--glass-shadow);
}

#results .glass-card:hover {
  box-shadow: var(--glass-shadow-hover);
}

/* Method description (text content area) */
.method-description {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Dark mode solid content backgrounds */
.dark-mode .glass-card.abstract-card,
.dark-mode .glass-card-sm.metric-card,
.dark-mode .glass-card-sm.method-step,
.dark-mode #results .glass-card {
  background: rgba(28, 28, 30, 0.95);
}

@media (prefers-color-scheme: dark) {
  .glass-card.abstract-card,
  .glass-card-sm.metric-card,
  .glass-card-sm.method-step,
  #results .glass-card {
    background: rgba(28, 28, 30, 0.95);
  }
}

/* ============================================
   Fix: Reduced-Motion Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* ============================================
   Fix: Focus-Visible States for Glass Elements
   ============================================ */
.btn-glass:focus-visible,
.glass-card:focus-visible,
.glass-card-sm:focus-visible,
.glass-surface:focus-visible,
.nav-toggle-dark:focus-visible,
.nav-links a:focus-visible,
.hero-links .btn:focus-visible,
.bibtex-copy:focus-visible,
.lightbox-close:focus-visible,
.gallery-item:focus-visible {
  outline: 2px solid rgba(109, 124, 255, 0.8);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(109, 124, 255, 0.2);
}
