/* ===================================================================
   Pankaj TECH STUDIO - ADVANCED ANIMATIONS & INTERACTIVE FX
   Micro-interactions, 3D Tilts, Matrix Glows & Ambient Motion
   =================================================================== */

/* Keyframe Animations */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    opacity: 0.8;
  }
  50% {
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.5);
    opacity: 1;
  }
}

@keyframes radarSweep {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

@keyframes liveStatusPing {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes codeScanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(1000%);
  }
}

/* Animation Utility Classes */
.animate-float {
  animation: floatSlow 6s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spinSlow 20s linear infinite;
}

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

/* Status Indicator Dot */
.live-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  position: relative;
  animation: liveStatusPing 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Glassmorphism Card System */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-smooth), 
              border-color var(--transition-smooth), 
              box-shadow var(--transition-smooth),
              background var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.glass-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(0, 240, 255, 0.12);
  background: var(--bg-card-hover);
}

.glass-card:hover::before {
  opacity: 1;
}

/* Interactive 3D Card Hover Effect */
.card-3d-wrap {
  perspective: 1200px;
  transform-style: preserve-3d;
}

.card-3d {
  transition: transform 0.15s ease-out, box-shadow 0.25s ease;
  will-change: transform;
}

/* Magnetic Button Animation */
.btn-magnetic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: transform var(--transition-bounce), box-shadow var(--transition-normal), background var(--transition-normal);
}

.btn-magnetic:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-magnetic:active {
  transform: translateY(1px) scale(0.98);
}

/* Primary Button (Electric Neon Glow) */
.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #00a3ff 100%);
  color: #050b14;
  padding: 14px 28px;
  font-size: 0.96rem;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.6);
  background: linear-gradient(135deg, #38bdf8 0%, #00f0ff 100%);
}

/* Secondary Button (Glass & Subtle Border) */
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 14px 28px;
  font-size: 0.96rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
  color: #ffffff;
}

/* Outline Button */
.btn-outline {
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--accent-cyan);
  padding: 10px 22px;
  font-size: 0.88rem;
  background: rgba(0, 240, 255, 0.03);
}

.btn-outline:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

/* Badge System */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-family: var(--font-mono);
  font-weight: 500;
}

.badge-cyan {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Scroll Reveal Classes (Intersection Observer) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Interactive Hover Light Spotlight */
.hover-spotlight {
  position: relative;
  overflow: hidden;
}

.hover-spotlight::after {
  content: '';
  position: absolute;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, rgba(0, 240, 255, 0) 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hover-spotlight:hover::after {
  opacity: 1;
}

/* ===================================================================
   ACCESSIBILITY: PREFERS-REDUCED-MOTION
   Disables non-essential motion, particles, and continuous transitions
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .pulse-slow,
  .pulse-glow,
  .live-status-dot,
  .float-slow,
  .cursor-glow {
    animation: none !important;
  }
}
