/* ============================================
   Advanced Animations & Effects
   ============================================ */

/* Floating Particles Effect */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: float-particle 15s infinite ease-in-out;
}

@keyframes float-particle {
  0%, 100% {
    transform: translate(0, 0) scale(1) translateZ(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(100px, -100vh) scale(0) translateZ(0);
    opacity: 0;
  }
}

/* Scroll-triggered animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px) translateZ(0);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

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

/* Glass morphism hover effect */
.glass-hover {
  position: relative;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

.glass-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Shimmer effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 150%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  to {
    left: 150%;
  }
}

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

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

/* Pulse effect */
.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Bounce effect */
.bounce {
  animation: bounce 1s infinite;
}

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

/* Rotate effect */
.rotate-slow {
  animation: rotate-slow 20s linear infinite;
}

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

/* Scale on hover */
.scale-hover {
  transition: transform 0.3s ease;
}

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

/* Glow effect - Gold theme */
.glow {
  box-shadow: 0 0 20px rgba(206, 141, 37, 0.5);
  animation: glow-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  will-change: box-shadow;
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(206, 141, 37, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(206, 141, 37, 0.8);
  }
}

/* Tilt effect on hover */
.tilt-hover {
  transition: transform 0.3s ease;
}

.tilt-hover:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

/* Frosted glass text */
.frosted-text {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Liquid animation */
.liquid-shape {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: liquid-morph 8s ease-in-out infinite;
}

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

/* Magnetic effect */
.magnetic {
  transition: transform 0.2s ease;
}

.magnetic:hover {
  transform: scale(1.1);
}

/* Typewriter effect */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: currentColor;
  }
}

.typewriter {
  overflow: hidden;
  border-right: 0.15em solid;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* ============================================
   Animations
   ============================================ */

.is-visible {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.navbar.is-scrolled {
    margin: 0 var(--spacing-md);
    box-shadow: var(--shadow-xl);
}

