/* ==========================================================================
   PERFORMANT ANIMATIONS & TRANSITIONS
   Oshan Nethsara Subhasinghe — Personal Portfolio (oshan.me)
   ========================================================================== */

/* Fade In On Scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* Stagger Delay Utility */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Subtle Glitch/Tungsten Flicker on Hover */
@keyframes tungstenGlow {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.live-badge-glow {
  animation: tungstenGlow 3s ease-in-out infinite;
}

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

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