/* Shared cyber theme: variables, background layers, effects toggle state */

:root {
    --cyber-black: #0a0a0a;
    --cyber-dark: #1a1a2e;
    --cyber-blue: #4a90e2;
    --cyber-green: #6ab7db;
    --cyber-purple: #5a72a0;
    --cyber-pink: #4a90e2;
    --cyber-orange: #5a9bd4;
    --cyber-red: #7ba7d9;
    --terminal-green: #6ab7db;
    --matrix-green: #7ba7d9;
    --neon-blue: #5a9bd4;
    --dark-grey: #1a1a2e;
    --medium-grey: #252545;
    --text-primary: #d4e6f1;
    --text-secondary: #aed6f1;
    --text-muted: #85c1e9;
}

html {
    background-color: #0a0a1a;
    background-image: linear-gradient(135deg, #0a0a1a 0%, var(--cyber-dark) 100%);
    min-height: 100%;
    color-scheme: dark;
}

body {
    background: transparent;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 400;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    z-index: 0;
    margin: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
    contain: strict;
    animation: cyber-gridMove 20s linear infinite;
}

@keyframes cyber-gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

/* Keep main content above fixed background layers */
.navbar,
.container,
.cyber-footer {
    position: relative;
    z-index: 2;
}

/* Decorative JS/CSS paused when effects are disabled (default for performance) */
.cyber-effects-off .cyber-grid,
.cyber-effects-off body::before,
.cyber-effects-off .cyber-footer::before,
.cyber-effects-off .navbar::before,
.cyber-effects-off .grid-bg,
.cyber-effects-off .particle,
.cyber-effects-off .orb,
.cyber-effects-off .scanline,
.cyber-effects-off .hero-title,
.cyber-effects-off .bg-animation .scanline {
    animation: none !important;
}

/* backdrop-filter is very expensive (added in Safari fix commit); skip unless effects are on */
.cyber-effects-off,
.cyber-effects-off * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .cyber-grid,
    body::before,
    .cyber-footer::before,
    .navbar::before {
        animation: none !important;
    }

    *,
    *::before,
    *::after {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
}
