/* ============================================================
   animations.css — All @keyframes + motion preferences
   ============================================================ */

@keyframes heroGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes pulse-dot {
  0%,  100% { box-shadow: 0 0 12px var(--accent); transform: scale(1); }
  50%        { box-shadow: 0 0 20px var(--accent-light), 0 0 8px var(--accent); transform: scale(1.25); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes bounce {
  0%,  100% { transform: rotate(45deg) translateY(0); }
  50%        { transform: rotate(45deg) translateY(6px); }
}

@keyframes scrollFadeIn {
  to { opacity: 1; }
}

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

@keyframes formSuccess {
  0%   { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---- Film grain overlay ---- */
@keyframes grain {
  0%,  100% { transform: translate(0, 0)    scale(1.05); }
  10%        { transform: translate(-2%, -2%) scale(1.05); }
  30%        { transform: translate(2%,  -1%) scale(1.05); }
  50%        { transform: translate(-1%,  2%) scale(1.05); }
  70%        { transform: translate(2%,   1%) scale(1.05); }
  90%        { transform: translate(-1%, -2%) scale(1.05); }
}

.grain-overlay {
  position: fixed;
  inset: -10%;
  z-index: 9997;
  pointer-events: none;
  width: 120%;
  height: 120%;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: grain 0.8s steps(1) infinite;
  mix-blend-mode: overlay;
}

/* ---- Respect prefers-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 { animation: none; }

  .reveal, .reveal-left, .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-eyebrow, .hero-h1 .word, .hero-tagline,
  .hero-pills, .hero-cta { opacity: 1 !important; transform: none !important; }

  .skill-chip, .cert-chip { opacity: 1 !important; transform: none !important; }
}
