/* Animation Utilities */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered Animations */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Hover Animations */
.hover-lift {
  transition: transform var(--transition-medium);
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-glow {
  transition: all var(--transition-medium);
}

.hover-glow:hover {
  box-shadow: var(--shadow-glow);
}

/* Loading Animations */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Pulse Animation */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Rotate Animation */
.rotate {
  animation: rotate 10s linear infinite;
}

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

/* Typing Animation */
.typing {
  overflow: hidden;
  border-right: 2px solid var(--color-accent-blue);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--color-accent-blue); }
}

/* Parallax Effects */
.parallax {
  transform: translateZ(0);
  will-change: transform;
}

/* Smooth Reveal Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(100px);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-down {
  opacity: 0;
  transform: translateY(-100px);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-down.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Morphing Shapes */
.morph {
  animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

/* Gradient Animation */
.gradient-shift {
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

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

/* Text Reveal Animation */
.text-reveal {
  position: relative;
  overflow: hidden;
}

.text-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--color-accent-blue);
  animation: textReveal 1.5s ease forwards;
}

@keyframes textReveal {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; left: 100%; }
}

/* Floating Elements */
.float-1 {
  animation: float1 6s ease-in-out infinite;
}

.float-2 {
  animation: float2 8s ease-in-out infinite;
}

.float-3 {
  animation: float3 10s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-40px, -20px) rotate(180deg); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -40px) rotate(90deg); }
  50% { transform: translate(-30px, -20px) rotate(180deg); }
  75% { transform: translate(10px, 30px) rotate(270deg); }
}

/* Glitch Effect */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-primary-bg);
}

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: var(--color-accent-blue);
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: var(--color-accent-cyan);
  z-index: -2;
}

@keyframes glitch-1 {
  0%, 14%, 15%, 49%, 50%, 99%, 100% {
    transform: translate(0);
  }
  15%, 49% {
    transform: translate(-2px, 2px);
  }
}

@keyframes glitch-2 {
  0%, 20%, 21%, 62%, 63%, 99%, 100% {
    transform: translate(0);
  }
  21%, 62% {
    transform: translate(2px, -2px);
  }
}

/* Particle Effect */
.particles {
  position: relative;
  overflow: hidden;
}

.particles::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, var(--color-accent-blue), transparent),
    radial-gradient(2px 2px at 40px 70px, var(--color-accent-cyan), transparent),
    radial-gradient(1px 1px at 90px 40px, var(--color-accent-blue), transparent),
    radial-gradient(1px 1px at 130px 80px, var(--color-accent-cyan), transparent),
    radial-gradient(2px 2px at 160px 30px, var(--color-accent-blue), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: particles 20s linear infinite;
  opacity: 0.3;
}

@keyframes particles {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-200px, -100px); }
}

/* Neon Glow Effect */
.neon-glow {
  text-shadow: 
    0 0 5px var(--color-accent-blue),
    0 0 10px var(--color-accent-blue),
    0 0 15px var(--color-accent-blue),
    0 0 20px var(--color-accent-blue);
  animation: neonFlicker 2s infinite alternate;
}

@keyframes neonFlicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow: 
      0 0 5px var(--color-accent-blue),
      0 0 10px var(--color-accent-blue),
      0 0 15px var(--color-accent-blue),
      0 0 20px var(--color-accent-blue);
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}

/* Smooth Scrolling Enhancements */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

