/* ==========================================================================
   KEYFRAMES & CREATIVE ANIMATIONS (NAVY SCHOLAR EDITION)
   ========================================================================== */

/* Cursor Blinking for Typewriter */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.animate-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background-color: var(--secondary);
  vertical-align: -0.15em;
  margin-left: 2px;
  animation: blink 0.9s infinite ease-in-out;
}

/* Status Dot Pulse */
@keyframes statusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.status-dot-active {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--secondary);
  display: inline-block;
  position: relative;
  animation: statusPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Giant Standalone Centered Logo Glow & Presence */
@keyframes logoSubtleFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 10px 25px rgba(10, 25, 47, 0.12));
  }
  50% {
    transform: translateY(-4px) scale(1.01);
    filter: drop-shadow(0 18px 35px rgba(37, 99, 235, 0.22));
  }
}

.giant-center-logo {
  animation: logoSubtleFloat 6s infinite ease-in-out;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.giant-center-logo:hover {
  transform: scale(1.03) translateY(-6px);
  filter: drop-shadow(0 25px 45px rgba(37, 99, 235, 0.35));
}

/* Text Shimmer Gradient - Navy & Cobalt */
@keyframes textShimmerNavy {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--secondary) 25%,
    #60a5fa 50%,
    var(--secondary) 75%,
    var(--primary) 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: textShimmerNavy 6s linear infinite;
}

html.dark .shimmer-text {
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    var(--secondary-light) 30%,
    #93c5fd 50%,
    var(--secondary) 70%,
    #ffffff 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: textShimmerNavy 6s linear infinite;
}

/* Blueprint Scanline Sweep */
@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(1000%);
  }
}

.scanline-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(37, 99, 235, 0.05) 50%,
    transparent 100%
  );
  pointer-events: none;
  animation: scanline 12s linear infinite;
  opacity: 0.8;
}

/* Waveform Visualizer Bars */
@keyframes waveBar {
  0%, 100% {
    height: 5px;
  }
  50% {
    height: 28px;
  }
}

.wave-bar {
  width: 3.5px;
  background: var(--secondary);
  border-radius: 2px;
  display: inline-block;
  margin: 0 2px;
  transition: background-color 0.3s ease;
}

.wave-bar:nth-child(1) { animation: waveBar 1.2s infinite ease-in-out 0.1s; }
.wave-bar:nth-child(2) { animation: waveBar 0.9s infinite ease-in-out 0.3s; }
.wave-bar:nth-child(3) { animation: waveBar 1.4s infinite ease-in-out 0.2s; }
.wave-bar:nth-child(4) { animation: waveBar 0.8s infinite ease-in-out 0.5s; }
.wave-bar:nth-child(5) { animation: waveBar 1.1s infinite ease-in-out 0.4s; }
.wave-bar:nth-child(6) { animation: waveBar 1.3s infinite ease-in-out 0.15s; }
.wave-bar:nth-child(7) { animation: waveBar 0.7s infinite ease-in-out 0.45s; }
.wave-bar:nth-child(8) { animation: waveBar 1.0s infinite ease-in-out 0.25s; }

/* Scroll Reveal States */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero Portrait: grayscale until scrolled into view, then fades up to full colour */
.hero-portrait-photo {
  filter: grayscale(100%);
  transition: filter 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-revealed .hero-portrait-photo,
.hero-portrait-photo:hover {
  filter: grayscale(0%);
}

/* Apple-Style 3D Drum Wheel Carousel */
.apple-picker-container {
  perspective: 1200px;
  position: relative;
  height: 380px;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

.apple-picker-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-picker-item {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 90px;
  margin-top: -45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-radius: 12px;
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-light);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.apple-picker-item.active {
  border-color: var(--secondary);
  box-shadow: 0 10px 30px var(--secondary-glow);
  background: var(--surface-container-lowest);
  opacity: 1;
}

/* TEDx Stage Spotlight Radial & Cutout Pop Effect */
.tedx-stage-container {
  position: relative;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tedx-spotlight-radial {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(30, 58, 138, 0.08) 50%, transparent 70%);
  animation: statusPulse 4s infinite ease-in-out;
  pointer-events: none;
}

.tedx-cutout-img {
  position: relative;
  z-index: 10;
  max-height: 420px;
  width: auto;
  filter: drop-shadow(0 15px 30px rgba(10, 25, 47, 0.25));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tedx-cutout-img:hover {
  transform: scale(1.04) translateY(-8px);
}
