/* ============================================================
   ANIMATIONS.CSS — @keyframes + scroll-driven animations
   ============================================================ */

/* ── Hero entrance ── */
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cursor blink ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Scroll dot bounce ── */
@keyframes scrollDot {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(12px); }
}

/* ── Avatar ring pulse ── */
@keyframes ringPulse {
  0%, 100% { transform: scale(1);    opacity: 0.7; }
  50%       { transform: scale(1.06); opacity: 1;   }
}

/* ── Cookie banner slide up ── */
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(120%); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

/* ── Glow pulse for CTA buttons ── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.3); }
  50%       { box-shadow: 0 0 45px rgba(124, 58, 237, 0.6); }
}

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

/* ── Chip hover shine ── */
@keyframes chipShine {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* ── Scroll-driven section reveal ── */
@supports (animation-timeline: scroll()) {
  .scroll-reveal {
    animation: scrollRevealAnim linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

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

/* ── Staggered card reveal (CSS only fallback) ── */
.stagger-item:nth-child(1) { transition-delay: 0.05s; }
.stagger-item:nth-child(2) { transition-delay: 0.15s; }
.stagger-item:nth-child(3) { transition-delay: 0.25s; }

/* ── Navigation active indicator ── */
@keyframes navActiveIn {
  from { width: 0; opacity: 0; }
  to   { width: 100%; opacity: 1; }
}

/* ── Floating particles fade-in ── */
@keyframes particleFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── About avatar entrance ── */
.avatar-wrapper {
  animation: avatarEntrance 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-play-state: paused;
}

.reveal-section.in-view .avatar-wrapper {
  animation-play-state: running;
}

@keyframes avatarEntrance {
  from {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* ── Card hover 3D tilt — driven by JS, CSS provides smooth transition ── */
.expertise-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ── Contact card arrow micro-animation ── */
.contact-card:hover .contact-card__arrow {
  animation: arrowNudge 0.4s ease;
}

@keyframes arrowNudge {
  0%   { transform: translateX(0); }
  40%  { transform: translateX(8px); }
  70%  { transform: translateX(2px); }
  100% { transform: translateX(4px); }
}

/* ── Footer appear on scroll ── */
.site-footer {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.site-footer.visible { opacity: 1; }
