/* Void Themes — Min Void / Max Void
   Two engagement modes. The toggle IS the framework.
   Min Void: constraint-aligned, transparent, zero attention capture.
   Max Void: full immersion — glow, particles, pull. Experience what a void feels like. */

/* ============================================================
   MIN VOID — The constraint. Clean. Readable. No pull.
   ============================================================ */

/* Variables on html (for flash-prevention inline script) + body */
.theme-min-void {
    --bg: #0d0d12;
    --bg-card: #141420;
    --bg-hover: #1c1c2c;
    --text: #d0d0d8;
    --text-dim: #777790;
    --accent: #4a9eff;
    --accent-dim: #2a6ecc;
    --green: #3ddc84;
    --red: #ff4444;
    --orange: #ffaa33;
    --border: #252535;
    --glow-strength: 0;
    --pulse-speed: 0s;
    --particle-opacity: 0;
    --card-glow: none;
    --accent-glow: none;
    --transition-speed: 0.15s;
}

body.theme-min-void * {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

body.theme-min-void .cta-primary {
    box-shadow: none;
}

body.theme-min-void .condition {
    border-color: var(--border);
    box-shadow: none;
}

body.theme-min-void .nav-logo {
    text-shadow: none;
}

body.theme-min-void #main-nav {
    background: color-mix(in srgb, var(--bg-card) 85%, transparent);
    box-shadow: none;
}


/* ============================================================
   MAX VOID — The pull. Glow. Depth. Immersion.
   You chose this. Notice what it does to your attention.
   ============================================================ */
/* Variables on html (for flash-prevention inline script) + body */
.theme-max-void {
    --bg: #06060c;
    --bg-card: #0c0c18;
    --bg-hover: #14142a;
    --text: #eeeef4;
    --text-dim: #9999b8;
    --accent: #5aafff;
    --accent-dim: #3a7fdd;
    --green: #4dec94;
    --red: #ff5555;
    --orange: #ffbb44;
    --border: #1e1e3a;
    --glow-strength: 1;
    --pulse-speed: 4s;
    --particle-opacity: 1;
    --card-glow: 0 0 20px rgba(90, 175, 255, 0.08);
    --accent-glow: 0 0 12px rgba(90, 175, 255, 0.3);
    --transition-speed: 0.3s;
}

/* --- Background glow --- */
body.theme-max-void {
    background:
        radial-gradient(ellipse 60% 40% at 20% 50%, rgba(90, 175, 255, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 80% 30%, rgba(90, 100, 255, 0.025) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 50% 80%, rgba(120, 60, 200, 0.02) 0%, transparent 60%),
        var(--bg);
}

/* --- Accent glow on interactive elements --- */
body.theme-max-void .cta-primary {
    box-shadow: var(--accent-glow);
    transition: box-shadow var(--transition-speed), background var(--transition-speed);
}
body.theme-max-void .cta-primary:hover {
    box-shadow: 0 0 24px rgba(90, 175, 255, 0.45), 0 0 48px rgba(90, 175, 255, 0.15);
}

body.theme-max-void .cta-secondary:hover {
    text-shadow: 0 0 8px rgba(90, 175, 255, 0.4);
}

/* --- Card glow --- */
body.theme-max-void .condition {
    border-color: var(--border);
    box-shadow: var(--card-glow);
    transition: box-shadow var(--transition-speed), border-color var(--transition-speed);
}
body.theme-max-void .condition:hover {
    box-shadow: 0 0 30px rgba(90, 175, 255, 0.12), 0 0 60px rgba(90, 175, 255, 0.04);
    border-color: rgba(90, 175, 255, 0.2);
}

body.theme-max-void .nav-card {
    box-shadow: var(--card-glow);
    transition: box-shadow var(--transition-speed), border-color var(--transition-speed);
}
body.theme-max-void .nav-card:hover {
    box-shadow: 0 0 30px rgba(90, 175, 255, 0.12);
    border-color: rgba(90, 175, 255, 0.25);
}

/* --- Logo glow --- */
body.theme-max-void .nav-logo {
    text-shadow: 0 0 10px rgba(90, 175, 255, 0.4);
    transition: text-shadow var(--transition-speed);
}
body.theme-max-void .nav-logo:hover {
    text-shadow: 0 0 16px rgba(90, 175, 255, 0.6), 0 0 30px rgba(90, 175, 255, 0.2);
}

/* --- Nav glass + glow --- */
body.theme-max-void #main-nav {
    background: color-mix(in srgb, var(--bg-card) 60%, transparent);
    border-color: rgba(90, 175, 255, 0.1);
    box-shadow:
        0 1px 0 0 rgba(90, 175, 255, 0.06),
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.03);
}

/* --- Dropdown glass --- */
body.theme-max-void .nav-dropdown-menu {
    background: color-mix(in srgb, var(--bg-card) 80%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(90, 175, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 12px rgba(90, 175, 255, 0.04);
}

body.theme-max-void .nav-dropdown-menu a:hover {
    background: rgba(90, 175, 255, 0.06);
}

/* --- Stat numbers pulse --- */
body.theme-max-void .condition h3[style*="font-mono"] {
    animation: void-pulse var(--pulse-speed) ease-in-out infinite;
}

/* --- Nav link glow on hover --- */
body.theme-max-void .nav-links a:hover {
    text-shadow: 0 0 6px rgba(224, 224, 232, 0.3);
}

/* --- Section borders glow subtly --- */
body.theme-max-void section[style*="border-top"] {
    border-image: linear-gradient(
        90deg,
        transparent 0%,
        rgba(90, 175, 255, 0.15) 30%,
        rgba(90, 175, 255, 0.15) 70%,
        transparent 100%
    ) 1;
}

/* --- Scrollbar theming --- */
body.theme-max-void::-webkit-scrollbar {
    width: 8px;
}
body.theme-max-void::-webkit-scrollbar-track {
    background: var(--bg);
}
body.theme-max-void::-webkit-scrollbar-thumb {
    background: rgba(90, 175, 255, 0.2);
    border-radius: 4px;
}
body.theme-max-void::-webkit-scrollbar-thumb:hover {
    background: rgba(90, 175, 255, 0.35);
}

/* --- Selection color --- */
body.theme-max-void ::selection {
    background: rgba(90, 175, 255, 0.25);
    color: var(--text);
}

/* --- Footer dim glow --- */
body.theme-max-void footer {
    border-top: 1px solid rgba(90, 175, 255, 0.08);
}


/* ============================================================
   SHARED — Animations (only active in max-void via var())
   ============================================================ */

@keyframes void-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes void-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}


/* ============================================================
   THEME TOGGLE — The switch itself
   ============================================================ */

.void-theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.void-theme-toggle:hover {
    color: var(--text);
    border-color: var(--accent);
}

.void-theme-toggle .toggle-track {
    position: relative;
    width: 28px;
    height: 14px;
    background: var(--border);
    border-radius: 7px;
    transition: background 0.3s;
}

.void-theme-toggle .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}

/* Max void toggle state */
body.theme-max-void .void-theme-toggle {
    border-color: rgba(90, 175, 255, 0.3);
    color: var(--accent);
}

body.theme-max-void .toggle-track {
    background: rgba(90, 175, 255, 0.2);
}

body.theme-max-void .toggle-thumb {
    transform: translateX(14px);
    background: var(--accent);
    box-shadow: 0 0 6px rgba(90, 175, 255, 0.5);
}

/* --- Particle canvas (injected by JS) --- */
#void-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s ease;
}

body.theme-max-void #void-particles {
    opacity: 0.6;
}

body.theme-min-void #void-particles {
    opacity: 0;
}

/* ============================================================
   VOIDWALKING PLAYER — Spotify embed, Max Void only
   The soundtrack to mapping the architecture.
   ============================================================ */

.void-player {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

body.theme-max-void .void-player {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.void-player-toggle {
    align-self: flex-end;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    background: rgba(10, 10, 18, 0.9);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 0.25rem 0.6rem;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: color 0.2s, border-color 0.2s;
}

.void-player-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

body.theme-max-void .void-player-toggle {
    border-color: rgba(90, 175, 255, 0.15);
}

.void-player-embed {
    background: rgba(10, 10, 18, 0.9);
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    max-height: 152px;
    transition: max-height 0.4s ease, opacity 0.3s ease, border-color 0.3s;
}

body.theme-max-void .void-player-embed {
    border-color: rgba(90, 175, 255, 0.15);
    box-shadow: 0 0 20px rgba(90, 175, 255, 0.06);
}

.void-player.collapsed .void-player-embed {
    max-height: 0;
    opacity: 0;
    border-width: 0;
}

.void-player.collapsed .void-player-toggle {
    border-radius: 4px;
    border-bottom: 1px solid var(--border);
}

body.theme-max-void .void-player.collapsed .void-player-toggle {
    border-color: rgba(90, 175, 255, 0.15);
}

.void-player-embed iframe {
    display: block;
    border: none;
}

/* --- Mobile: keep toggle compact --- */
@media (max-width: 768px) {
    .void-theme-toggle {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        gap: 0.3rem;
    }
    .void-theme-toggle .toggle-label {
        display: none;
    }
    .void-player {
        bottom: 1rem;
        left: 1rem;
    }
    .void-player-embed iframe {
        width: 280px;
    }
}
