/* ==========================================================================
   ANIMATIONS & SCROLL INTERACTIONS
   Smooth, High-Performance (transform & opacity only), Accessible
   ========================================================================== */

/* 1. Hero Line-by-Line Reveal on Load */
.hero-reveal-line {
  display: block;
  overflow: hidden;
}

.hero-reveal-text {
  display: block;
  opacity: 0;
  transform: translateY(100%);
}

/* Triggered when page loader finishes and exits */
.hero-loaded .hero-reveal-text,
.no-js .hero-reveal-text {
  animation: heroLineReveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.22s; }
.delay-3 { animation-delay: 0.36s; }
.delay-4 { animation-delay: 0.50s; }

@keyframes heroLineReveal {
  0% {
    opacity: 0;
    transform: translateY(80%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2. Scroll Triggered Section Fade & Slide-Up */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: none;
}

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

/* 3. Skills Infinite Marquee Keyframe (CSS Only) */
@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* 4. Reduced Motion Accessibility Override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .page-loader {
    transform: none !important;
  }

  .page-loader.is-hidden {
    transform: none !important;
    transition: opacity 0.2s ease !important;
    opacity: 0 !important;
  }

  .loader-progress-bar {
    transform: scaleX(1) !important;
    transition: none !important;
  }

  .hero-reveal-text {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hanging-card {
    transition: none !important;
    transform: translate(-50%, 90px) rotate(0deg) !important;
  }

  .cursor-spotlight, .scroll-progress-bar {
    display: none !important;
  }

  .skills-marquee-track {
    animation: none !important;
    transform: none !important;
  }

  .project-card {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}
