/* 2026-08-09 [Kahan-Homage, KBN, IEEE-754, Style] - Organized by Gemini */
:root {
    --bionic-l: 0.12;
    --bionic-c: 0.06;
    --bionic-h: 220;
    --bg-color: oklch(var(--bionic-l) var(--bionic-c) var(--bionic-h));
    --fg-color: oklch(0.88 0.08 200);
    /* Kahan accent: precise electric blue instead of Feynman's cyan */
    --accent-color: oklch(0.65 0.22 240);
}

* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }

body, html {
    width: 100%; height: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--fg-color);
    font-family: 'Courier New', Courier, monospace;
    transition: background-color 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hidden { display: none !important; }

.overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    z-index: 100; background: #000;
}
#init-overlay {
    background: rgba(0, 0, 5, 0.88);
    backdrop-filter: blur(10px);
    z-index: 50;
}

.glitch-container { text-align: center; max-width: 80%; }
.glitch {
    font-size: 2.2rem; font-weight: bold; text-transform: uppercase;
    position: relative; color: #0055ff;
    text-shadow: 0 0 10px rgba(0,85,255,0.5);
    margin-bottom: 20px;
}
.glitch::before, .glitch::after {
    content: attr(data-text); position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}
.glitch::before {
    left: 2px; text-shadow: -2px 0 #00ffcc;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px; text-shadow: -2px 0 #ff6600;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 86px, 0); }
    20% { clip: rect(62px, 9999px, 98px, 0); }
    40% { clip: rect(21px, 9999px, 63px, 0); }
    60% { clip: rect(74px, 9999px, 15px, 0); }
    80% { clip: rect(3px, 9999px, 59px, 0); }
    100% { clip: rect(96px, 9999px, 2px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(14px, 9999px, 53px, 0); }
    40% { clip: rect(98px, 9999px, 20px, 0); }
    60% { clip: rect(43px, 9999px, 78px, 0); }
    80% { clip: rect(10px, 9999px, 91px, 0); }
    100% { clip: rect(85px, 9999px, 11px, 0); }
}
.subtext { font-size: 1rem; color: #0088ff; text-shadow: 0 0 5px rgba(0,136,255,0.3); }
.subtext.dim { margin-top: 15px; font-size: 0.8rem; color: #334455; letter-spacing: 2px; }

/* Intro Box */
.intro-box {
    text-align: center;
    border: 1px solid var(--accent-color);
    padding: 30px; border-radius: 12px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,100,255,0.08);
    max-width: 90%;
}
.intro-box h2 { color: var(--accent-color); margin-bottom: 10px; font-size: 1.5rem; }
.intro-box h3 { color: oklch(0.6 0.15 240); margin-bottom: 16px; font-size: 1rem; letter-spacing: 1px; }
.intro-box p  { font-size: 0.9rem; color: #8899aa; margin-bottom: 20px; line-height: 1.6; }

.credits {
    font-size: 0.75rem; color: #4d6070;
    margin-bottom: 15px; letter-spacing: 1px;
}
.kahan-verdict {
    font-size: 0.68rem; color: #4d6070;
    margin-top: 18px; letter-spacing: 0.5px;
    line-height: 1.5;
    border-top: 1px solid rgba(0,100,255,0.12);
    padding-top: 12px;
}
.kahan-link {
    color: #4d6070; text-decoration: none;
    border-bottom: 1px dotted #4d6070;
    transition: color 0.2s, border-color 0.2s;
}
.kahan-link:hover { color: var(--accent-color); border-color: var(--accent-color); }

.btn-bionic {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 15px 30px; font-size: 1.1rem; font-weight: bold;
    font-family: inherit; border-radius: 4px;
    text-shadow: 0 0 8px var(--accent-color);
    box-shadow: 0 0 10px rgba(0,100,255,0.2);
    cursor: pointer; transition: all 0.2s;
}
.btn-bionic:active { background: var(--accent-color); color: #000; }

/* Canvas */
#kahan-canvas {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10; touch-action: none;
}

/* Top bar */
.top-bar {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 10px; box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center;
    z-index: 50; background: rgba(0,0,8,0.45);
    backdrop-filter: blur(5px);
    pointer-events: none; text-align: center;
}
.homage-text { font-size: 0.9rem; color: var(--accent-color); font-weight: 700; }
.homage-credits { font-size: 0.75rem; color: rgba(200,220,255,0.7); margin-bottom: 5px; }
.glow-link {
    color: var(--accent-color); text-decoration: none;
    pointer-events: auto;
    text-shadow: 0 0 8px var(--accent-color);
}

/* Kahan SVG icons */
.intro-container {
    display: flex; align-items: center;
    justify-content: center; gap: 20px;
}
.kahan-anim {
    width: 70px; height: auto;
    opacity: 0.85; pointer-events: none; flex-shrink: 0;
}
@media (max-width: 600px) {
    .kahan-anim { width: 45px; }
    .intro-container { gap: 10px; }
    .glitch { font-size: 1.5rem; }
}
