/* ================================================================
   ANIMATIONS.CSS — Cyberpunk 2077 Portfolio
   Shared animations, glitch effects, neon glow, holo distortions
   ================================================================ */

/* ============================================================
   NEON GLOW KEYFRAMES
   ============================================================ */

@keyframes neon-pulse-cyan {
  0%, 100% {
    box-shadow:
      0 0 5px rgba(0, 245, 255, 0.4),
      0 0 10px rgba(0, 245, 255, 0.3),
      0 0 20px rgba(0, 245, 255, 0.2);
  }
  50% {
    box-shadow:
      0 0 10px rgba(0, 245, 255, 0.8),
      0 0 25px rgba(0, 245, 255, 0.5),
      0 0 50px rgba(0, 245, 255, 0.3);
  }
}

@keyframes neon-pulse-yellow {
  0%, 100% {
    box-shadow:
      0 0 5px rgba(255, 229, 0, 0.4),
      0 0 10px rgba(255, 229, 0, 0.3),
      0 0 20px rgba(255, 229, 0, 0.2);
  }
  50% {
    box-shadow:
      0 0 10px rgba(255, 229, 0, 0.8),
      0 0 25px rgba(255, 229, 0, 0.5),
      0 0 50px rgba(255, 229, 0, 0.3);
  }
}

/* ============================================================
   HOLOGRAPHIC SHIMMER
   ============================================================ */

@keyframes holo-shimmer {
  0% {
    background-position: -200% center;
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(30deg) saturate(1.3);
  }
  100% {
    background-position: 200% center;
    filter: hue-rotate(0deg);
  }
}

.holo-shimmer {
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(0, 245, 255, 0.15) 40%,
    rgba(255, 229, 0, 0.1) 50%,
    rgba(0, 245, 255, 0.15) 60%,
    transparent 80%
  );
  background-size: 200% auto;
  animation: holo-shimmer 4s linear infinite;
}

/* ============================================================
   CAMERA SHAKE
   ============================================================ */

@keyframes camera-shake-subtle {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-0.5px, -0.5px) rotate(0deg); }
  20% { transform: translate(0.5px, 0px) rotate(0deg); }
  30% { transform: translate(0px, 0.5px) rotate(0deg); }
  40% { transform: translate(-0.5px, 0px) rotate(0deg); }
  50% { transform: translate(0.5px, 0.5px) rotate(0deg); }
  60% { transform: translate(0px, -0.5px) rotate(0deg); }
  70% { transform: translate(-0.5px, 0px) rotate(0deg); }
  80% { transform: translate(0.5px, -0.5px) rotate(0deg); }
  90% { transform: translate(-0.5px, 0.5px) rotate(0deg); }
}

@keyframes camera-shake-strong {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-3px, -2px); }
  20% { transform: translate(3px, 0px); }
  30% { transform: translate(-2px, 2px); }
  40% { transform: translate(3px, -1px); }
  50% { transform: translate(-1px, 3px); }
  60% { transform: translate(2px, -2px); }
  70% { transform: translate(-3px, 1px); }
  80% { transform: translate(1px, -3px); }
  90% { transform: translate(-2px, 2px); }
}

/* ============================================================
   DIGITAL FLICKER
   ============================================================ */

@keyframes digital-flicker {
  0%, 100% { opacity: 1; }
  5%        { opacity: 0.85; }
  6%        { opacity: 1; }
  50%       { opacity: 0.95; }
  51%       { opacity: 1; }
  88%       { opacity: 0.9; }
  89%       { opacity: 1; }
  92%       { opacity: 0.7; }
  93%       { opacity: 1; }
}

.digital-flicker {
  animation: digital-flicker 6s ease-in-out infinite;
}

/* ============================================================
   SCAN LINE SWEEP
   ============================================================ */

@keyframes scan-line-sweep {
  0%   { top: -5%; opacity: 0; }
  5%   { opacity: 0.6; }
  95%  { opacity: 0.6; }
  100% { top: 105%; opacity: 0; }
}

.scan-sweep-overlay {
  position: fixed;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(0, 245, 255, 0.2),
    rgba(0, 245, 255, 0.1),
    transparent
  );
  animation: scan-line-sweep 8s linear infinite;
  pointer-events: none;
  z-index: 999;
}

/* ============================================================
   GLITCH BLOCK DISTORTION
   ============================================================ */

@keyframes glitch-block {
  0%, 90%, 100% {
    clip-path: none;
    transform: translateX(0);
    opacity: 1;
  }
  91% {
    clip-path: inset(0 0 85% 0);
    transform: translateX(-8px);
    opacity: 0.8;
  }
  92% {
    clip-path: inset(80% 0 0 0);
    transform: translateX(6px);
    opacity: 0.8;
  }
  93% {
    clip-path: inset(40% 0 40% 0);
    transform: translateX(-4px);
    opacity: 0.9;
  }
  94% {
    clip-path: none;
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================================
   ENTER ANIMATION (elements fade + slide in)
   ============================================================ */

@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(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in-right {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.anim-fade-up    { animation: fade-in-up    0.6s ease both; }
.anim-fade-left  { animation: fade-in-left  0.6s ease both; }
.anim-fade-right { animation: fade-in-right 0.6s ease both; }

/* Stagger delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================================
   NEON BORDER PULSE
   ============================================================ */

@keyframes neon-border-pulse {
  0%, 100% {
    border-color: rgba(0, 245, 255, 0.3);
    box-shadow: 0 0 8px rgba(0, 245, 255, 0.2);
  }
  50% {
    border-color: rgba(0, 245, 255, 0.7);
    box-shadow: 0 0 18px rgba(0, 245, 255, 0.4);
  }
}

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

/* ============================================================
   STATIC BURST (random TV static)
   ============================================================ */

@keyframes static-burst {
  0%   { opacity: 0; }
  5%   { opacity: 0.15; }
  6%   { opacity: 0; }
  50%  { opacity: 0; }
  52%  { opacity: 0.08; }
  53%  { opacity: 0; }
  95%  { opacity: 0; }
  96%  { opacity: 0.12; }
  97%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ============================================================
   HUD ELEMENT BOOT-IN
   ============================================================ */

@keyframes hud-boot {
  0%   { width: 0%; opacity: 0; }
  50%  { opacity: 1; }
  100% { width: 100%; opacity: 1; }
}

/* ============================================================
   RIPPLE ON CLICK
   ============================================================ */

@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(4); opacity: 0; }
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: rgba(0, 245, 255, 0.3);
  pointer-events: none;
  animation: ripple 0.6s ease-out forwards;
  transform-origin: center;
}

/* ============================================================
   MATRIX RAIN (used as CSS bg on special elements)
   ============================================================ */

@keyframes matrix-char {
  0%   { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* ============================================================
   ZOOM HOVER (used on cards)
   ============================================================ */

.hover-zoom {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-zoom:hover {
  transform: scale(1.05);
}

/* ============================================================
   FLOAT ANIMATION (for cards / HUD elements)
   ============================================================ */

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}

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

/* ============================================================
   POWER ON (screen wipe from center)
   ============================================================ */

@keyframes power-on {
  0%   { clip-path: inset(50% 50%); opacity: 0; }
  50%  { clip-path: inset(0% 0%); opacity: 1; }
  100% { clip-path: inset(0% 0%); opacity: 1; }
}

.power-on {
  animation: power-on 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}