/* =============================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================= */

/* --- Fade In --- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* --- Slide Up --- */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.6s ease-out forwards;
}

.slide-up--delay-1 { animation-delay: 0.1s; }
.slide-up--delay-2 { animation-delay: 0.2s; }
.slide-up--delay-3 { animation-delay: 0.3s; }
.slide-up--delay-4 { animation-delay: 0.4s; }
.slide-up--delay-5 { animation-delay: 0.5s; }

/* --- Glow Pulse --- */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 5px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(6, 182, 212, 0.1);
  }
}

.glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}

/* --- Gradient Shift (for background) --- */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-shift {
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

/* --- Float Animation --- */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float {
  animation: float 4s ease-in-out infinite;
}

/* --- Pulse --- */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* --- Spin --- */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 2s linear infinite;
}

/* --- Shimmer (for loading/skeleton) --- */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-elevated) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* --- Reveal on Scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* --- Stagger Children --- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.5s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }

/* --- Hover Glow --- */
.hover-glow {
  transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
  box-shadow: 0 0 20px var(--accent-glow);
}

/* --- Text Gradient --- */
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Border Glow on Hover --- */
.border-glow {
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.border-glow:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* --- Animated Background Gradient Mesh --- */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
  animation: gradientShift 20s ease infinite;
  background-size: 200% 200%;
  pointer-events: none;
}

/* --- Card Entrance Animation --- */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.card-entrance {
  animation: cardEntrance 0.5s ease-out forwards;
}
