/* =========================================== */
/* MAGNETIC INTERACTIONS 2026 */
/* Award-winning cursor-following effects */
/* =========================================== */

:root {
  --magnetic-strength: 0.3;
  --magnetic-distance: 20px;
  --magnetic-transition: 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  --parallax-intensity: 0.5;
}

/* =========================================== */
/* MAGNETIC CARDS */
/* =========================================== */

#main-content-section .card {
  position: relative;
  transition: transform var(--magnetic-transition),
              box-shadow var(--magnetic-transition);
  will-change: transform;
}

#main-content-section .card.magnetic {
  cursor: pointer;
}

#main-content-section .card.magnetic:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Magnetic effect on mouse move */
#main-content-section .card.magnetic.magnetic-active {
  transition: transform 0.1s ease-out,
              box-shadow var(--magnetic-transition);
}

/* =========================================== */
/* MAGNETIC BUTTONS */
/* =========================================== */

#main-content-section .btn,
#main-content-section button:not([type="submit"]):not([type="reset"]),
#main-content-section .badge {
  position: relative;
  transition: transform var(--magnetic-transition),
              box-shadow var(--magnetic-transition);
  will-change: transform;
  cursor: pointer;
}

#main-content-section .btn.magnetic:hover,
#main-content-section button.magnetic:hover,
#main-content-section .badge.magnetic:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

#main-content-section .btn.magnetic.magnetic-active,
#main-content-section button.magnetic.magnetic-active,
#main-content-section .badge.magnetic.magnetic-active {
  transition: transform 0.1s ease-out,
              box-shadow var(--magnetic-transition);
}

/* =========================================== */
/* MAGNETIC LINKS */
/* =========================================== */

#main-content-section a.magnetic {
  position: relative;
  display: inline-block;
  transition: transform var(--magnetic-transition);
  will-change: transform;
}

#main-content-section a.magnetic:hover {
  transform: translateX(4px);
}

#main-content-section a.magnetic.magnetic-active {
  transition: transform 0.1s ease-out;
}

/* =========================================== */
/* PARALLAX SCROLL EFFECTS */
/* =========================================== */

#main-content-section .section.parallax {
  will-change: transform;
}

#main-content-section .section.parallax-slow {
  transition: transform 0.1s ease-out;
}

#main-content-section .section.parallax-fast {
  transition: transform 0.05s ease-out;
}

/* Parallax on scroll */
#main-content-section .parallax-element {
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* =========================================== */
/* INTERACTIVE ELEMENT ANIMATIONS */
/* =========================================== */

#main-content-section .interactive-element {
  position: relative;
  transition: all var(--magnetic-transition);
  cursor: pointer;
}

#main-content-section .interactive-element::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

#main-content-section .interactive-element:hover::before {
  width: 300px;
  height: 300px;
  opacity: 1;
}

#main-content-section .interactive-element:hover {
  transform: scale(1.05);
}

/* =========================================== */
/* CURSOR FOLLOW EFFECT */
/* =========================================== */

.magnetic-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.3);
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  mix-blend-mode: difference;
}

.magnetic-cursor.active {
  width: 40px;
  height: 40px;
  opacity: 1;
}

.magnetic-cursor.hover {
  width: 60px;
  height: 60px;
  background: rgba(99, 102, 241, 0.2);
}

/* =========================================== */
/* SMOOTH SCROLL ANIMATIONS */
/* =========================================== */

#main-content-section .section {
  scroll-margin-top: 100px; /* Account for fixed navbar */
}

/* Smooth reveal on scroll */
#main-content-section .section.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

#main-content-section .section.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children animation */
#main-content-section .stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

#main-content-section .stagger-children.revealed > *:nth-child(1) {
  transition-delay: 0.1s;
}

#main-content-section .stagger-children.revealed > *:nth-child(2) {
  transition-delay: 0.2s;
}

#main-content-section .stagger-children.revealed > *:nth-child(3) {
  transition-delay: 0.3s;
}

#main-content-section .stagger-children.revealed > *:nth-child(4) {
  transition-delay: 0.4s;
}

#main-content-section .stagger-children.revealed > *:nth-child(5) {
  transition-delay: 0.5s;
}

#main-content-section .stagger-children.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================== */
/* RESPONSIVE ADJUSTMENTS */
/* =========================================== */

@media (max-width: 768px) {
  /* Reduce magnetic effects on mobile */
  #main-content-section .card.magnetic:hover {
    transform: translateY(-4px) scale(1.01);
  }
  
  #main-content-section .btn.magnetic:hover,
  #main-content-section button.magnetic:hover {
    transform: translateY(-1px) scale(1.02);
  }
  
  /* Hide custom cursor on mobile */
  .magnetic-cursor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main-content-section .card,
  #main-content-section .btn,
  #main-content-section button,
  #main-content-section a.magnetic,
  #main-content-section .section.scroll-reveal,
  #main-content-section .stagger-children > * {
    transition: none !important;
    transform: none !important;
  }
  
  .magnetic-cursor {
    display: none;
  }
}

/* =========================================== */
/* PERFORMANCE OPTIMIZATIONS */
/* =========================================== */

#main-content-section .card,
#main-content-section .btn,
#main-content-section .interactive-element {
  backface-visibility: hidden;
  perspective: 1000px;
}

