/* ============================================
   PROFESSIONAL BACKGROUND ENHANCEMENTS
   Advanced background system for modern website
   ============================================ */

/* Enhanced Neural Canvas Background */
#neuro {
  background: linear-gradient(
    135deg,
    #0F172A 0%,
    #1E293B 25%,
    #1E3A5F 50%,
    #1E293B 75%,
    #0F172A 100%
  );
  background-size: 400% 400%;
  animation: gradientFlow 20s ease infinite;
  position: relative;
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Ambient Light Overlays */
#neuro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(20, 184, 166, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
  animation: ambientPulse 15s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Animated Gradient Mesh */
#neuro::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(99, 102, 241, 0.03) 2px,
      rgba(99, 102, 241, 0.03) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(20, 184, 166, 0.03) 2px,
      rgba(20, 184, 166, 0.03) 4px
    );
  pointer-events: none;
  z-index: 2;
  animation: meshMove 30s linear infinite;
}

@keyframes meshMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Section Background Variations */
.section-dark {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(30, 41, 59, 0.95) 100%
  );
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.section-gradient {
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.98) 0%,
    rgba(30, 41, 59, 0.98) 50%,
    rgba(51, 65, 85, 0.98) 100%
  );
  position: relative;
}

.section-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(99,102,241,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
  opacity: 0.5;
  pointer-events: none;
}

/* Glassmorphism Containers */
.glass-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 
    0 8px 32px 0 rgba(99, 102, 241, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.glass-container-dark {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 24px;
  box-shadow: 
    0 8px 32px 0 rgba(99, 102, 241, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* Animated Particle Background */
.particle-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(99, 102, 241, 0.6);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
  animation: particleFloat 15s infinite;
}

.particle:nth-child(2n) {
  background: rgba(20, 184, 166, 0.6);
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.8);
  animation-duration: 20s;
}

.particle:nth-child(3n) {
  background: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
  animation-duration: 25s;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px) scale(0);
    opacity: 0;
  }
}

/* Hero Section Background */
.hero-section {
  position: relative;
  background: transparent;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at center top, rgba(99, 102, 241, 0.2) 0%, transparent 60%),
    radial-gradient(circle at center center, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* Section Dividers */
.section-divider {
  height: 200px;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0.5) 50%,
    rgba(15, 23, 42, 0) 100%
  );
  position: relative;
  overflow: hidden;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(99, 102, 241, 0.5) 50%,
    transparent 100%
  );
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* Floating Orbs */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: orbFloat 20s ease-in-out infinite;
  pointer-events: none;
}

.floating-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.6), transparent);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.floating-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.6), transparent);
  top: 60%;
  right: 10%;
  animation-delay: 5s;
}

.floating-orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.6), transparent);
  bottom: 20%;
  left: 50%;
  animation-delay: 10s;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 50px) scale(0.9);
  }
}

/* Spotlight Effect */
.spotlight {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(99, 102, 241, 0.15) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.spotlight:hover {
  opacity: 1;
}

/* Card Hover Backgrounds */
.card-hover-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(99, 102, 241, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover .card-hover-bg {
  opacity: 1;
}

/* Scanline Effect */
.scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(99, 102, 241, 0.8) 50%,
    transparent 100%
  );
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
  animation: scanlineMove 3s linear infinite;
  pointer-events: none;
  z-index: 9999;
}

@keyframes scanlineMove {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .floating-orb {
    filter: blur(50px);
  }
  
  .floating-orb-1,
  .floating-orb-2,
  .floating-orb-3 {
    width: 200px;
    height: 200px;
  }
  
  #neuro::after {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  #neuro,
  #neuro::before,
  #neuro::after,
  .floating-orb,
  .particle,
  .scanline {
    animation: none;
  }
}
