/* ==========================================================================
   ANIMATIONS & TRANSITION SYSTEM
   Mosaidur Rahman Asif — Personal Portfolio
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Entrance & Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-32px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(32px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
  }
}

/* --------------------------------------------------------------------------
   2. Scroll Reveal Utilities (IntersectionObserver Driven)
   -------------------------------------------------------------------------- */
.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.reveal-left {
  transform: translateX(-30px);
}

.reveal-on-scroll.reveal-right {
  transform: translateX(30px);
}

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

/* Staggered Child Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* --------------------------------------------------------------------------
   3. Floating Badges Animation
   -------------------------------------------------------------------------- */
.floating-subtle {
  animation: floatSlow 6s ease-in-out infinite;
}

.floating-subtle-delayed {
  animation: floatSlow 7s ease-in-out 1.5s infinite;
}

/* --------------------------------------------------------------------------
   4. Page Load Initial Animation
   -------------------------------------------------------------------------- */
.hero-content > * {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-eyebrow { animation-delay: 0.1s; }
.hero-headline { animation-delay: 0.2s; }
.hero-roles-banner { animation-delay: 0.3s; }
.hero-description { animation-delay: 0.4s; }
.hero-actions { animation-delay: 0.5s; }
.hero-availability { animation-delay: 0.6s; }

.hero-visual {
  animation: fadeInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

/* --------------------------------------------------------------------------
   5. Accessible Reduced Motion
   -------------------------------------------------------------------------- */
@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;
  }

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