/* ═══════════════════════════════════════════════════════════════
   ENHANCED VISUAL EFFECTS CSS
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   1. CUSTOM CURSOR (Desktop Only)
   ───────────────────────────────────────────────────────────── */
.custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 46, 63, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, border-color 0.3s ease;
  mix-blend-mode: difference;
}

.custom-cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--accent);
}

/* Hide custom cursor on touch devices */
@media (pointer: coarse) {
  .custom-cursor,
  .custom-cursor-dot {
    display: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   2. SCROLL-TRIGGERED ANIMATIONS
   ───────────────────────────────────────────────────────────── */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Slide from left */
.slide-in-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Slide from right */
.slide-in-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Scale up */
.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ─────────────────────────────────────────────────────────────
   3. ENHANCED CARD EFFECTS
   ───────────────────────────────────────────────────────────── */
.service-card,
.skill-card,
.resource-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.service-card::before,
.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 46, 63, 0.1) 0%,
    transparent 50%,
    rgba(0, 229, 160, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.service-card:hover::before,
.skill-card:hover::before {
  opacity: 1;
}

/* Glow effect on hover */
.service-card:hover,
.skill-card:hover {
  box-shadow:
    0 8px 32px rgba(255, 46, 63, 0.15),
    0 0 60px rgba(255, 46, 63, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ─────────────────────────────────────────────────────────────
   4. FLOATING ANIMATION
   ───────────────────────────────────────────────────────────── */
@keyframes floatBadge {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-8px) rotate(2deg);
  }
  66% {
    transform: translateY(-4px) rotate(-2deg);
  }
}

/* ─────────────────────────────────────────────────────────────
   5. PULSE GLOW ANIMATION
   ───────────────────────────────────────────────────────────── */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 46, 63, 0.4),
                0 0 40px rgba(255, 46, 63, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 46, 63, 0.6),
                0 0 60px rgba(255, 46, 63, 0.3);
  }
}

.book-session-btn,
.submit-btn {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  will-change: transform;
}

.book-session-btn:hover,
.submit-btn:hover {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────
   6. SKILL METER ENHANCED ANIMATION
   ───────────────────────────────────────────────────────────── */
.skill-meter-fill {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.5s cubic-bezier(0.65, 0, 0.35, 1);
  position: relative;
  overflow: visible;
}

.skill-meter-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8),
              0 0 24px var(--accent);
  animation: meterPulse 2s ease-in-out infinite;
}

@keyframes meterPulse {
  0%, 100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-50%) scale(1.3);
    opacity: 0.7;
  }
}

/* ─────────────────────────────────────────────────────────────
   7. SHIMMER EFFECT
   ───────────────────────────────────────────────────────────── */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.hero-title,
.services-title {
  position: relative;
  background-size: 200% auto;
}

.hero-title::before,
.services-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer 3s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────
   8. ENHANCED PROGRESS BAR
   ───────────────────────────────────────────────────────────── */
.progress-bar {
  transition: width 0.1s linear, box-shadow 0.3s ease;
  background: linear-gradient(
    90deg,
    var(--accent2),
    var(--accent),
    var(--green)
  );
  box-shadow: 0 0 10px var(--accent);
}

/* ─────────────────────────────────────────────────────────────
   9. GLASSMORPHISM OVERLAYS
   ───────────────────────────────────────────────────────────── */
.glass-effect {
  background: rgba(26, 11, 14, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ─────────────────────────────────────────────────────────────
   10. RIPPLE EFFECT ON BUTTONS
   ───────────────────────────────────────────────────────────── */
.book-session-btn,
.submit-btn,
button {
  position: relative;
  overflow: hidden;
}

.book-session-btn::after,
.submit-btn::after,
button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.book-session-btn:active::after,
.submit-btn:active::after,
button:active::after {
  width: 300px;
  height: 300px;
}

/* ─────────────────────────────────────────────────────────────
   11. ENHANCED NAV DOTS
   ───────────────────────────────────────────────────────────── */
.nav-dot {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-dot:hover {
  transform: scale(1.8);
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent);
}

/* ─────────────────────────────────────────────────────────────
   12. TEXT GRADIENT ANIMATION
   ───────────────────────────────────────────────────────────── */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-gradient-text {
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--green),
    var(--gold),
    var(--accent)
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 5s ease infinite;
}

/* ─────────────────────────────────────────────────────────────
   13. SMOOTH SECTION TRANSITIONS
   ───────────────────────────────────────────────────────────── */
section {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ─────────────────────────────────────────────────────────────
   14. ENHANCED HOVER STATES
   ───────────────────────────────────────────────────────────── */
.resource-card {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.resource-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 12px 40px rgba(255, 46, 63, 0.2),
    0 0 80px rgba(255, 46, 63, 0.1);
}

/* ─────────────────────────────────────────────────────────────
   15. DYNAMIC BACKGROUND BASED ON MOUSE POSITION
   ───────────────────────────────────────────────────────────── */
body {
  --mouse-x: 0.5;
  --mouse-y: 0.5;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    600px circle at calc(var(--mouse-x) * 100%) calc(var(--mouse-y) * 100%),
    rgba(255, 46, 63, 0.08),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (pointer: fine) {
  body:hover::after {
    opacity: 1;
  }
}

/* ─────────────────────────────────────────────────────────────
   16. PERFORMANCE OPTIMIZATIONS
   ───────────────────────────────────────────────────────────── */
.service-card,
.skill-card,
.resource-card,
.book-session-btn,
.submit-btn {
  will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .custom-cursor,
  .custom-cursor-dot {
    display: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   17. PARTICLE CANVAS STYLING
   ───────────────────────────────────────────────────────────── */
#particle-canvas {
  mix-blend-mode: screen;
}

/* ─────────────────────────────────────────────────────────────
   18. LOADING ANIMATION
   ───────────────────────────────────────────────────────────── */
@keyframes fadeInBody {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ─────────────────────────────────────────────────────────────
   19. ENHANCED MARQUEE
   ───────────────────────────────────────────────────────────── */
.marquee-chip {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.marquee-chip:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 20px rgba(255, 46, 63, 0.3);
}

/* ─────────────────────────────────────────────────────────────
   20. ENHANCED FORM INPUTS
   ───────────────────────────────────────────────────────────── */
.form-input:focus,
.form-select:focus {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(255, 46, 63, 0.2),
    0 0 0 3px rgba(255, 46, 63, 0.1);
  transition: all 0.3s ease;
}

/* ─────────────────────────────────────────────────────────────
   21. STAGGER ANIMATION UTILITY
   ───────────────────────────────────────────────────────────── */
.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; }

/* ─────────────────────────────────────────────────────────────
   22. GLOW TEXT EFFECT
   ───────────────────────────────────────────────────────────── */
.glow-text {
  text-shadow:
    0 0 10px currentColor,
    0 0 20px currentColor,
    0 0 30px currentColor;
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from {
    text-shadow:
      0 0 10px currentColor,
      0 0 20px currentColor,
      0 0 30px currentColor;
  }
  to {
    text-shadow:
      0 0 15px currentColor,
      0 0 30px currentColor,
      0 0 45px currentColor;
  }
}
