/* ============================================================
   Animations & Transitions (Cyberpunk Edition)
   ============================================================ */

/* ---- Scroll-triggered Animations ---- */

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays for timeline items */
.timeline__item:nth-child(1) [data-animate],
.timeline__item:nth-child(1).visible {
  transition-delay: 0.1s;
}

.timeline__item:nth-child(2) [data-animate],
.timeline__item:nth-child(2).visible {
  transition-delay: 0.2s;
}

.timeline__item:nth-child(3) [data-animate],
.timeline__item:nth-child(3).visible {
  transition-delay: 0.3s;
}

.timeline__item:nth-child(4) [data-animate],
.timeline__item:nth-child(4).visible {
  transition-delay: 0.4s;
}

/* Hero entrance animations - individual timing */
.hero__greeting[data-animate] {
  transition-delay: 0.2s;
}

.hero__title[data-animate] {
  transition-delay: 0.4s;
}

.hero__subtitle[data-animate] {
  transition-delay: 0.6s;
}

.hero__description[data-animate] {
  transition-delay: 0.8s;
}

.hero__actions[data-animate] {
  transition-delay: 1s;
}

.hero__social[data-animate] {
  transition-delay: 1.2s;
}

/* ============================================================
   Glitch Effect Keyframes (Cyberpunk)
   ============================================================ */

@keyframes glitch-skew {
  0% { transform: skew(0deg); }
  20% { transform: skew(2deg); }
  40% { transform: skew(-1deg); }
  60% { transform: skew(0.5deg); }
  80% { transform: skew(-0.3deg); }
  100% { transform: skew(0deg); }
}

@keyframes glitch-shake {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(-3px, 1px); }
  20% { transform: translate(3px, -1px); }
  30% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  50% { transform: translate(-1px, 1px); }
  60% { transform: translate(1px, -1px); }
  70% { transform: translate(-2px, 0); }
  80% { transform: translate(2px, 0); }
  90% { transform: translate(-1px, 0); }
}

@keyframes glitch-text {
  0%, 100% {
    text-shadow: 0 0 0 transparent;
  }
  10% {
    text-shadow: -3px 0 var(--glitch-color-1, #ff00aa), 3px 0 var(--glitch-color-2, #00fff0);
  }
  20% {
    text-shadow: 2px 0 var(--glitch-color-2, #00fff0), -2px 0 var(--glitch-color-1, #ff00aa);
  }
  30% {
    text-shadow: -1px 0 var(--glitch-color-1, #ff00aa), 1px 0 transparent;
  }
  40% {
    text-shadow: 0 0 0 transparent;
  }
}

/* ============================================================
   CRT Monitor Effects
   ============================================================ */

@keyframes crt-scanline {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(4px);
  }
}

@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.998; }
}

@keyframes crt-turn-on {
  0% {
    transform: scaleY(0.01) scaleX(0.1);
    filter: brightness(30);
    opacity: 0;
  }
  30% {
    transform: scaleY(0.01) scaleX(1);
    filter: brightness(10);
    opacity: 1;
  }
  60% {
    transform: scaleY(1) scaleX(1);
    filter: brightness(2);
    opacity: 1;
  }
  100% {
    transform: scaleY(1) scaleX(1);
    filter: brightness(1);
    opacity: 1;
  }
}

/* ============================================================
   Neon Pulse Effects
   ============================================================ */

@keyframes neon-pulse-cyan {
  0%, 100% {
    box-shadow: 0 0 7px rgba(0, 255, 240, 0.3),
                0 0 15px rgba(0, 255, 240, 0.15),
                0 0 30px rgba(0, 255, 240, 0.05);
  }
  50% {
    box-shadow: 0 0 15px rgba(0, 255, 240, 0.5),
                0 0 30px rgba(0, 255, 240, 0.25),
                0 0 60px rgba(0, 255, 240, 0.1);
  }
}

@keyframes neon-pulse-pink {
  0%, 100% {
    box-shadow: 0 0 7px rgba(255, 0, 170, 0.3),
                0 0 15px rgba(255, 0, 170, 0.15),
                0 0 30px rgba(255, 0, 170, 0.05);
  }
  50% {
    box-shadow: 0 0 15px rgba(255, 0, 170, 0.5),
                0 0 30px rgba(255, 0, 170, 0.25),
                0 0 60px rgba(255, 0, 170, 0.1);
  }
}

/* ============================================================
   Standard Animations
   ============================================================ */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-left {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in-right {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 255, 240, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 255, 240, 0.5), 0 0 60px rgba(255, 0, 170, 0.2);
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes connection-pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================================
   Terminal-style text cursor
   ============================================================ */

@keyframes terminal-blink {
  0%, 100% {
    border-color: var(--color-accent-cyan, #00fff0);
  }
  50% {
    border-color: transparent;
  }
}
