/* ═══════════════════════════════════════════════
   PORTFOLIO — Animation Keyframes & Effects v2.0
   Refined micro-interactions with premium easing
   ═══════════════════════════════════════════════ */

/* ── Fade In Up (Scroll Reveal) ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}

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

/* ── Stagger children ── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

/* ── Bento Card Stagger-In ── */
@keyframes bentoFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bento-reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.97);
}

.bento-reveal--visible {
  animation: bentoFadeIn 0.7s var(--ease-out-expo) forwards;
}

/* ── Scale In ── */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Slide from left ── */
@keyframes slideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Slide from right ── */
@keyframes slideFromRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Tilt Card Effect ── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-out-expo);
}

.tilt-card:hover {
  transform: perspective(800px) rotateY(2deg) rotateX(-2deg) scale(1.02);
}

/* ── Gold Foil Shimmer ── */
.gold-shimmer {
  background: linear-gradient(
    120deg,
    var(--accent-gold) 0%,
    #e0c589 25%,
    var(--accent-gold) 50%,
    #a88d54 75%,
    var(--accent-gold) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShimmer 4s linear infinite;
}

@keyframes goldShimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ── Pulse Glow ── */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(77, 255, 219, 0.08);
  }
  50% {
    box-shadow: 0 0 40px rgba(77, 255, 219, 0.2);
  }
}

/* ── Border Glow Pulse (for bento cards) ── */
@keyframes borderGlow {
  0%, 100% {
    border-color: var(--border-subtle);
  }
  50% {
    border-color: var(--border-hover);
  }
}

/* ── Shadow Elevation Shift ── */
@keyframes elevationShift {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  }
}

/* ── Counter animation ── */
[data-counter] {
  font-variant-numeric: tabular-nums;
}

/* ── Floating animation ── */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-6px) rotate(0.5deg);
  }
  66% {
    transform: translateY(3px) rotate(-0.5deg);
  }
}

/* ── Letter Scramble (used by loader) ── */
@keyframes charFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.char-scramble {
  animation: charFlicker 0.08s linear infinite;
}

/* ── Line Draw ── */
@keyframes drawLine {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.draw-line {
  transform-origin: left center;
  animation: drawLine 1s var(--ease-out-expo) forwards;
}

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Magnetic hover ── */
.magnetic {
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

/* ── Page transition ── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  pointer-events: none;
}

/* ── Will change hints ── */
.will-animate {
  will-change: transform, opacity;
}

/* ── Hover Lift (for cards) ── */
.hover-lift {
  transition: transform var(--duration-normal) var(--ease-out-expo),
              box-shadow var(--duration-slow) var(--ease-out-expo);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

/* ── 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;
  }

  .grain-overlay {
    display: none;
  }

  .hero__glow {
    animation: none;
    opacity: 0.5;
  }

  .genre-tag {
    animation: none;
  }

  .bento-reveal {
    opacity: 1;
    transform: none;
  }
}
