/* ===========================
   Scroll Reveal Base
   =========================== */
.reveal-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered card delays */
.section-visible .reveal-card:nth-child(1) { transition-delay: 0s; }
.section-visible .reveal-card:nth-child(2) { transition-delay: 0.1s; }
.section-visible .reveal-card:nth-child(3) { transition-delay: 0.2s; }
.section-visible .reveal-card:nth-child(4) { transition-delay: 0.3s; }
.section-visible .reveal-card:nth-child(5) { transition-delay: 0.4s; }
.section-visible .reveal-card:nth-child(6) { transition-delay: 0.5s; }
.section-visible .reveal-card:nth-child(7) { transition-delay: 0.6s; }
.section-visible .reveal-card:nth-child(8) { transition-delay: 0.7s; }

/* ===========================
   Hero Entrance
   =========================== */
.hero-content {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 0.8s ease 0.3s forwards;
}

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

/* ===========================
   Profile Photo Pulse
   =========================== */
.profile-photo-wrapper {
  animation: photoPulse 4s ease-in-out infinite;
}

@keyframes photoPulse {
  0%, 100% {
    box-shadow: 0 0 40px rgba(0, 200, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 60px rgba(0, 200, 255, 0.25);
  }
}

/* ===========================
   Timeline Marker Pulse
   =========================== */
.section-visible .timeline-marker {
  animation: markerPulse 2s ease-in-out infinite;
}

@keyframes markerPulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(0, 200, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.4);
  }
}

/* ===========================
   Button Shine
   =========================== */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: none;
  animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {
  0%, 70%, 100% {
    left: -100%;
  }
  85% {
    left: 100%;
  }
}

/* ===========================
   Card Glow on Hover
   =========================== */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 200, 255, 0.06), transparent 40%);
  pointer-events: none;
}

.card {
  position: relative;
}

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

/* ===========================
   Stat Number Count
   =========================== */
.stat-number {
  transition: color 0.3s;
}

.stat-number.counted {
  color: var(--accent);
}

/* ===========================
   Navbar Transition
   =========================== */
.navbar {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* ===========================
   Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  .reveal-card {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-content {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .profile-photo-wrapper {
    animation: none;
  }

  .section-visible .timeline-marker {
    animation: none;
  }

  .btn-primary::after {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
