/* Modern Interactive Animations & Visual Effects */

/* Gradient Text Shimmer */
.gradient-text-shimmer {
  background: linear-gradient(135deg, #ffffff 20%, #28c7cb 50%, #ffffff 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 6s linear infinite;
}

@keyframes textShimmer {
  to {
    background-position: 200% center;
  }
}

/* Glowing Neon Pills */
.badge-glow {
  position: relative;
  background: rgba(40, 199, 203, 0.08);
  border: 1px solid rgba(40, 199, 203, 0.3);
  box-shadow: 0 0 25px rgba(40, 199, 203, 0.15);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge-glow:hover {
  border-color: rgba(40, 199, 203, 0.7);
  box-shadow: 0 0 35px rgba(40, 199, 203, 0.3);
  transform: translateY(-2px);
}

/* 3D Tilt Card Base */
.tilt-card-wrapper {
  perspective: 1200px;
  transform-style: preserve-3d;
}

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

.tilt-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(40, 199, 203, 0.2);
}

/* Floating Glass Cards */
.floating-glass-card {
  background: rgba(27, 29, 31, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-radius: 1rem;
}

/* Floating ambient glow orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: screen;
  will-change: transform;
}

.glow-orb-cyan {
  background: radial-gradient(circle, #28c7cb, rgba(40, 199, 203, 0.1) 70%, transparent);
}

.glow-orb-purple {
  background: radial-gradient(circle, #7928ca, rgba(121, 40, 202, 0.1) 70%, transparent);
}

.glow-orb-blue {
  background: radial-gradient(circle, #0070f3, rgba(0, 112, 243, 0.1) 70%, transparent);
}

/* Crystal / Glassmorphism Cards with Dynamic Torch Spotlight */
.crystal-card,
.glass-interactive,
.card {
  position: relative;
  overflow: hidden;
}

.crystal-card::before,
.glass-interactive::before,
.card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, -150px);
  left: var(--mouse-x, -150px);
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(40, 199, 203, 0.15) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

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

/* Floating Glow Pulse */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(40, 199, 203, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 35px rgba(40, 199, 203, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
  }
}

.pulse-glow {
  animation: glowPulse 4s ease-in-out infinite;
}

/* Hover Lift Magnetic */
.btn-magnetic {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  will-change: transform;
}


/* Pulse animation */
@keyframes pulseSubtle {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.animate-pulse-glow {
  animation: pulseSubtle 4s ease-in-out infinite;
}

/* Interactive Magnetic Button */
.btn-magnetic {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.btn-magnetic::after {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.btn-magnetic:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* Scroll Indicator Line */
.scroll-indicator-mouse {
  width: 24px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  position: relative;
  margin: 0 auto;
}

.scroll-indicator-mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background-color: var(--color-primary);
  animation: scrollWheel 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollWheel {
  0% { transform: translate(-50%, 0); opacity: 0; }
  40% { opacity: 1; }
  80% { transform: translate(-50%, 16px); opacity: 0; }
  100% { opacity: 0; }
}

/* Infinite Marquee */
.marquee-wrapper {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 2rem;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  min-width: 100%;
  gap: 2.5rem;
  animation: scrollMarquee 30s linear infinite;
}

.marquee-wrapper:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - 2.5rem)); }
}

/* Glassmorphism Interactive Hover Cards */
.glass-interactive {
  background: rgba(27, 29, 31, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.glass-interactive::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.glass-interactive:hover::before {
  left: 100%;
}

.glass-interactive:hover {
  transform: translateY(-6px);
  border-color: rgba(40, 199, 203, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(40, 199, 203, 0.15);
}

/* Tech badge styling */
.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-on-surface);
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.tech-pill:hover {
  background: rgba(40, 199, 203, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* Animations & Transitions */

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Scroll Reveals - Default visible with smooth transitions */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-enabled .reveal:not(.active) {
  opacity: 0;
  transform: translateY(28px);
}

.js-enabled .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.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; }

/* Micro-interactions */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
}

/* Grid overlay aesthetic */
.grid-pattern-bg {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
