/* Modern minimalist background styles */

.network-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    transition: opacity 0.5s ease;
}

.network-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Background transitions based on scroll depth */
body.scrolled .network-background {
    opacity: 0.8; /* Slightly reduce opacity when scrolling */
}

body.focused-content .network-background {
    opacity: 0.4; /* Further reduce when deep in content */
}

/* Subtle noise texture overlay for added depth */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

/* Background glow effects */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    transition: all 5s ease;
    pointer-events: none;
}

.glow-1 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.3) 0%, rgba(0, 229, 255, 0) 70%);
    top: -10%;
    left: -5%;
    animation: floatSlow 20s infinite alternate;
}

.glow-2 {
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, rgba(184, 46, 255, 0.2) 0%, rgba(184, 46, 255, 0) 70%);
    bottom: -10%;
    right: -5%;
    animation: floatSlow 15s infinite alternate-reverse;
}

@keyframes floatSlow {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(5%, 5%);
    }
}

/* Light theme adjustments */
[data-theme="light"] .bg-glow {
    opacity: 0.08;
}

[data-theme="light"] .background-overlay {
    opacity: 0.02;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bg-glow {
        opacity: 0.1;
    }
}

/* Background Effects and Animation Elements */

/* Gradient Overlay */
.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(12, 15, 24, 0), rgba(12, 15, 24, 0.8));
    z-index: -1;
    pointer-events: none;
}

[data-theme="light"] .gradient-overlay {
    background: radial-gradient(circle at 50% 50%, rgba(247, 249, 252, 0), rgba(247, 249, 252, 0.8));
}

/* Animated Background Blobs - Subtle and Minimal */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    mix-blend-mode: screen;
}

.blob-1 {
    width: 600px;
    height: 600px;
    top: -300px;
    right: -200px;
    background: rgba(34, 227, 235, 0.15);
    animation: float-slow 25s infinite alternate;
}

.blob-2 {
    width: 500px;
    height: 500px;
    bottom: -200px;
    left: -100px;
    background: rgba(144, 85, 255, 0.12);
    animation: float-slow 20s infinite alternate-reverse;
}

.blob-3 {
    width: 300px;
    height: 300px;
    top: 40%;
    right: 10%;
    background: rgba(66, 132, 255, 0.1);
    animation: float-slow 18s infinite alternate;
}

[data-theme="light"] .blob {
    opacity: 0.3;
    mix-blend-mode: multiply;
}

/* Grid Pattern Overlay - Ultra Subtle */
.grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

[data-theme="light"] .grid-pattern {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    opacity: 0.3;
}

/* Particle Effect Container */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

/* Animated Gradient Background - Ultra Subtle */
.animated-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(-45deg, 
        rgba(12, 15, 24, 1) 0%,
        rgba(14, 18, 30, 1) 25%, 
        rgba(16, 21, 35, 1) 50%, 
        rgba(18, 24, 40, 1) 75%,
        rgba(12, 15, 24, 1) 100%);
    background-size: 400% 400%;
    animation: gradient 20s ease infinite;
    z-index: -3;
}

[data-theme="light"] .animated-gradient {
    background: linear-gradient(-45deg, 
        rgba(247, 249, 252, 1) 0%,
        rgba(245, 247, 252, 1) 25%, 
        rgba(240, 245, 250, 1) 50%, 
        rgba(235, 240, 248, 1) 75%,
        rgba(247, 249, 252, 1) 100%);
}

/* Highlight Section Background - For Accenting Specific Sections */
.highlight-section {
    position: relative;
    overflow: hidden;
}

.highlight-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(34, 227, 235, 0.03) 0%, rgba(12, 15, 24, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

[data-theme="light"] .highlight-section::before {
    background: radial-gradient(circle at center, rgba(12, 187, 200, 0.05) 0%, rgba(247, 249, 252, 0) 70%);
}

/* Glow Effect for Elements */
.glow {
    box-shadow: 0 0 20px rgba(34, 227, 235, 0.15);
}

.glow-text {
    text-shadow: 0 0 15px rgba(34, 227, 235, 0.3);
}

/* Animations */
@keyframes float-slow {
    0% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-30px) translateX(20px);
    }
    100% {
        transform: translateY(10px) translateX(-15px);
    }
}

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

/* Parallax Container */
.parallax-container {
    position: relative;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* Noise Texture Overlay - Ultra Subtle Film Grain Effect */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: overlay;
}

[data-theme="light"] .noise-overlay {
    opacity: 0.02;
    mix-blend-mode: multiply;
}

/* Spotlight Effect - Follows Mouse for Subtle Interaction */
.spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(
        circle at var(--x) var(--y), 
        rgba(34, 227, 235, 0.03) 0%, 
        rgba(34, 227, 235, 0) 25%
    );
}

body:hover .spotlight {
    opacity: 1;
}

/* Hide various effects on mobile to improve performance */
@media screen and (max-width: 768px) {
    .noise-overlay, .spotlight, .grid-pattern {
        display: none;
    }
    
    .blob {
        opacity: 0.2;
    }
}