/* CSS styles for OTQL - Light Mode Premium Theme (Blue & Grey) */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500;600&display=swap');

:root {
  /* User's palette - Blue and Grey */
  --theme-blue: #285CAA;
  --theme-blue-light: #4A7BCA; 
  --theme-grey-dark: #333333;
  --theme-grey-mid: #666666;
  
  /* Light mode backgrounds */
  --bg-deep: #f0f2f5;
  --bg-surface: #ffffff;
  --bg-elevated: #f8f9fa;
  --bg-card: rgba(255, 255, 255, 0.95);

  /* Text hierarchy */
  --text-primary: #222222;
  --text-secondary: #555555;
  --text-muted: #888888;

  /* Refined borders */
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.12);

  /* Elegant gradients */
  --gradient-primary: linear-gradient(135deg, var(--theme-blue) 0%, var(--theme-blue-light) 100%);

  /* Light mode shadows (Tinted with theme blue) */
  --shadow-sm: 0 2px 8px rgba(40, 92, 170, 0.06);
  --shadow-md: 0 8px 24px rgba(40, 92, 170, 0.08);
  --shadow-lg: 0 16px 48px rgba(40, 92, 170, 0.1);
  --shadow-glow: 0 8px 40px rgba(40, 92, 170, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 60% at 50% -20%, rgba(40, 92, 170, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(100, 100, 100, 0.03) 0%, transparent 50%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  padding: 48px 28px 48px 28px;
  position: relative;
  min-height: 100vh;
  line-height: 1.7;
  font-size: 15px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* Clean modern headings */
h1, h2, h3, h4, h5, h6, .section-heading {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Progress Sidebar */
.progress-sidebar {
  position: fixed;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: none;
}

@media (min-width: 1400px) {
  .progress-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
}

.progress-track {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.progress-line {
  position: absolute;
  left: 7px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: var(--border-light);
  z-index: 0;
}

.progress-line-fill {
  position: absolute;
  left: 7px;
  top: 22px;
  width: 2px;
  background: var(--theme-blue);
  z-index: 1;
  transition: height 0.3s ease;
  height: 0;
}

.progress-item {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.progress-item.active .progress-dot {
  background: var(--theme-blue);
  border-color: var(--theme-blue);
  box-shadow: 0 0 0 5px rgba(40, 92, 170, 0.2);
}

.progress-item.passed .progress-dot {
  background: var(--theme-blue);
  border-color: var(--theme-blue);
}

.progress-label {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-item:hover .progress-label,
.progress-item.active .progress-label {
  opacity: 1;
  transform: translateX(0);
}

.progress-item.active .progress-label {
  color: var(--theme-blue);
}

.progress-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

/* Main Content */
.main-content {
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Hero Section - Elegant */
.hero-flow {
  position: relative;
  overflow: hidden;
  padding: 64px 48px 48px 48px;
  border-radius: 28px;
  margin-bottom: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
}

/* Soft flowing gradient orbs (Blue/Grey theme) */
.hero-flow::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  top: -250px;
  left: -150px;
  background: radial-gradient(circle, rgba(40, 92, 170, 0.08) 0%, rgba(40, 92, 170, 0) 70%);
  animation: orbFlow1 25s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

.hero-flow::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  bottom: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(100, 100, 100, 0.06) 0%, rgba(100, 100, 100, 0) 70%);
  animation: orbFlow2 30s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

.hero-flow > * {
  position: relative;
  z-index: 1;
}

.hero-flow .hero-orb {
  position: absolute;
  width: 450px;
  height: 450px;
  top: 40%;
  right: 10%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(74, 123, 202, 0.06) 0%, rgba(74, 123, 202, 0) 70%);
  animation: orbFlow3 28s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes orbFlow1 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(80px, 40px); }
  50% { transform: translate(120px, -20px); }
  75% { transform: translate(40px, 60px); }
}

@keyframes orbFlow2 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-60px, -50px); }
  50% { transform: translate(-100px, 30px); }
  75% { transform: translate(-30px, -40px); }
}

@keyframes orbFlow3 {
  0%, 100% { transform: translateY(-50%) translate(0, 0); }
  33% { transform: translateY(-50%) translate(-50px, 70px); }
  66% { transform: translateY(-50%) translate(40px, -50px); }
}

.hero-text {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 80px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-primary);
}

.sub-hero-text {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 400;
  font-style: normal;
  margin-bottom: 36px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-secondary);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-flow .authors {
  text-align: center;
}

/* Authors */
.authors {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 2;
  margin-top: 0;
  margin-bottom: 32px;
  text-align: center;
}

.authors span {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.authors .affiliation {
  font-family: 'Inter', -apple-system, sans-serif;
  font-style: normal;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

.authors a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.authors a:hover {
  color: var(--theme-blue);
}

.authors sup {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 1px;
}

/* Hero Waves */
.hero-waves {
  position: relative;
  width: 100%;
  height: 70px;
  margin-top: 24px;
  overflow: hidden;
  opacity: 0.7;
}

.waves-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wave-parallax use {
  animation: waveShift 16s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.wave-parallax use:nth-child(1) { animation-delay: -2s; animation-duration: 16s; }
.wave-parallax use:nth-child(2) { animation-delay: -4s; animation-duration: 14s; }
.wave-parallax use:nth-child(3) { animation-delay: -6s; animation-duration: 20s; }
.wave-parallax use:nth-child(4) { animation-delay: -8s; animation-duration: 18s; }

@keyframes waveShift {
  0% { transform: translate3d(-90px, 0, 0); }
  50% { transform: translate3d(20px, 0, 0); }
  100% { transform: translate3d(-90px, 0, 0); }
}

/* Tagline - Section Headers */
.tagline {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  background: transparent;
  color: var(--text-primary);
  display: block;
  padding: 48px 0 0 0;
  margin: 24px 0 20px 0;
  border: none;
  position: relative;
}

.tagline::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--theme-blue) 0%, rgba(40, 92, 170, 0.15) 40%, transparent 100%);
  border-radius: 2px;
  margin-bottom: 12px;
  margin-top: 24px;
}

/* Images */
img {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  margin: 0;
  box-sizing: border-box;
  box-shadow: var(--shadow-md);
}

.main-content > img {
  margin-left: 0;
  margin-right: 0;
}

/* Figure Caption */
.figure-caption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 20px;
  margin-bottom: 48px;
  padding: 0 32px;
  line-height: 1.7;
}

/* Card Surface */
.card-surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.card-surface:hover {
  box-shadow: var(--shadow-lg);
}

/* Section styles */
.section {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 48px;
  color: var(--text-secondary);
}

.section-heading {
  font-size: 28px;
  margin: 0 0 12px 0;
  color: var(--text-primary);
}

.section-lead {
  color: var(--text-muted);
  margin: 0 0 24px 0;
  font-size: 14px;
  line-height: 1.6;
}

/* Video Card */
.video-card {
  margin-top: 28px;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 24px 18px;
    font-size: 14px;
  }
  
  .hero-text {
    font-size: 48px;
  }
  
  .sub-hero-text {
    font-size: 20px;
  }
  
  .hero-flow {
    padding: 40px 28px 32px 28px;
    border-radius: 24px;
  }
  
  .tagline {
    font-size: 24px;
  }
  
  .card-surface {
    padding: 24px;
    border-radius: 20px;
  }
  
  .section-heading {
    font-size: 24px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background: rgba(40, 92, 170, 0.25);
  color: var(--text-primary);
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--theme-blue);
  outline-offset: 3px;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}