/* ==========================================================
   THEME: futuristic — a lit instrument panel behind glass.
   Orbitron carries the big display type (the H1 only); Chakra
   Petch — an angular, circuit-board-flavored sans — carries
   folder labels, page names, and body copy, so the whole theme
   reads as "machine typeface" without ever touching a monospace
   font. Instead of a blinking cursor, a thin comet of light
   occasionally streaks behind the H1, like something passing
   overhead.
   ========================================================== */

[data-theme="futuristic"] {
    --fx-bg: #05060a;
    --fx-panel: #0c0f18;
    --fx-panel-alt: #12151f;
    --fx-line: #2b3049;
    --fx-orange: #ff7d3f;
    --fx-periwinkle: #7d89ff;
    --fx-ink: #f4f6ff;
    --fx-muted: #838aab;

    /* Retune the shared accent palette into the orange -> periwinkle
       family so every folder reads as part of one instrument. */
    --c-magenta: #ff6a3d;
    --c-cyan: #7d89ff;
    --c-amber: #ffab5c;
    --c-violet: #6f7bef;
}

[data-theme="futuristic"] body {
    background:
        radial-gradient(ellipse 90% 50% at 12% -5%, rgba(255,125,63,0.20), transparent 55%),
        radial-gradient(ellipse 80% 50% at 100% 105%, rgba(125,137,255,0.20), transparent 55%),
        repeating-linear-gradient(180deg, rgba(244,246,255,0.02) 0px, rgba(244,246,255,0.02) 1px, transparent 1px, transparent 3px),
        var(--fx-bg);
    color: var(--fx-ink);
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 500;
}

[data-theme="futuristic"] a:focus-visible,
[data-theme="futuristic"] button:focus-visible {
    outline-color: var(--fx-periwinkle);
}

/* ---------- Header ---------- */

[data-theme="futuristic"] header {
    position: relative;
    overflow: hidden;
    margin: 6px 0 20px;
    padding: 22px 30px;
    background: linear-gradient(180deg, var(--fx-panel-alt), var(--fx-panel));
    border: 1px solid var(--fx-line);
}

[data-theme="futuristic"] h1 {
    position: relative;
    z-index: 0;
    font-family: 'Orbitron', var(--font-title);
    font-weight: 900;
    letter-spacing: 0.01em;
    font-size: clamp(2.2rem, 7vw, 3.4rem);
    line-height: 1;
    display: block;
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--fx-ink);
    text-shadow:
        0 0 10px rgba(255,125,63,0.9),
        0 0 34px rgba(255,125,63,0.45),
        0 0 64px rgba(125,137,255,0.35);
}

/* A thin comet of light that occasionally zips behind the title,
   instead of a blinking cursor. Mostly idle; a quick pass every
   few seconds. */
[data-theme="futuristic"] h1::after {
    content: "";
    position: absolute;
    top: 55%;
    left: 0;
    width: 160px;
    height: 3px;
    z-index: -1;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--fx-periwinkle) 45%, var(--fx-orange) 75%, transparent);
    filter: blur(1px) drop-shadow(0 0 8px rgba(125,137,255,0.75)) drop-shadow(0 0 8px rgba(255,125,63,0.55));
    opacity: 0;
    transform: translateY(-50%) translateX(-40%);
    animation: fx-swoosh 2.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes fx-swoosh {
    0%, 88% { transform: translateY(-50%) translateX(-40%); opacity: 0; }
    90% { opacity: 1; }
    96% { transform: translateY(-50%) translateX(340%); opacity: 1; }
    100% { transform: translateY(-50%) translateX(340%); opacity: 0; }
}

[data-theme="futuristic"] .cursor {
    display: none;
}

[data-theme="futuristic"] .subtitle {
    position: relative;
    color: var(--fx-muted);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.01em;
    margin-top: 8px;
    max-width: 88ch;
    white-space: pre-line;
}

/* ---------- Folder panels ---------- */

[data-theme="futuristic"] #dynamic-index {
    display: grid;
    gap: 12px;
}

[data-theme="futuristic"] #dynamic-index .group {
    display: block;
    background: var(--fx-panel);
    border: 1px solid color-mix(in srgb, var(--accent, var(--fx-periwinkle)) 55%, var(--fx-line));
    padding: 12px 22px;
    margin: 0;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.5) inset,
        0 0 32px -6px color-mix(in srgb, var(--accent, var(--fx-periwinkle)) 80%, transparent);
}

[data-theme="futuristic"] #dynamic-index h2 {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.94rem;
    color: var(--accent, var(--fx-periwinkle));
    text-shadow: 0 0 16px color-mix(in srgb, var(--accent, var(--fx-periwinkle)) 70%, transparent);
    padding: 6px 0 10px;
    margin: 0 0 10px;
    border-bottom: 1px solid var(--fx-line);
}
[data-theme="futuristic"] #dynamic-index h2::before {
    content: "";
}

[data-theme="futuristic"] #dynamic-index li:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 13px;
    background: var(--fx-line);
    opacity: 1;
    margin: 0 16px;
    vertical-align: middle;
}

/* Links read as system entries on the panel — a command-line
   prefix and text glow on activation, no button chrome. */
[data-theme="futuristic"] #dynamic-index a {
    padding: 4px 2px;
    border: none;
    border-radius: 0;
    clip-path: none;
    background: none;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    color: var(--fx-muted);
    transition: color 0.15s ease, text-shadow 0.15s ease;
}
[data-theme="futuristic"] #dynamic-index a::before {
    content: "\203a ";
    color: var(--accent, var(--fx-periwinkle));
    opacity: 0.85;
}

[data-theme="futuristic"] #dynamic-index a:hover,
[data-theme="futuristic"] #dynamic-index a:focus-visible {
    color: var(--fx-ink);
    background: none;
    box-shadow: none;
    text-shadow: 0 0 14px color-mix(in srgb, var(--accent, var(--fx-periwinkle)) 85%, transparent);
}

/* ---------- Footer ---------- */

[data-theme="futuristic"] footer {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
    border-top: 1px solid var(--fx-line);
    color: var(--fx-muted);
}

@media (prefers-reduced-motion: reduce) {
    [data-theme="futuristic"] h1::after {
        animation: none;
        opacity: 0;
    }
}

@media (max-width: 560px) {
    [data-theme="futuristic"] header {
        padding: 18px 20px;
    }
    [data-theme="futuristic"] #dynamic-index .group {
        padding: 12px 18px;
    }
    [data-theme="futuristic"] #dynamic-index h2 {
        font-size: 1.1rem;
    }
    [data-theme="futuristic"] #dynamic-index a {
        font-size: 1.2rem;
        padding: 6px 2px;
    }
    [data-theme="futuristic"] #dynamic-index li:not(:last-child)::after {
        margin: 0 12px;
        height: 16px;
    }
}
