/* ========================================
   riron.xyz — Theory meets the street
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-yellow: #e5ff00;
    --neon-cyan: #00e5ff;
    --neon-pink: #ff2d6f;
    --bg-darkest: #0a0a0f;
    --bg-dark: #0d0d1a;
    --bg-panel: #16161f;
    --text-muted: #6b6b78;
    --text-light: #e8e4df;
}

html {
    scroll-behavior: auto;
    overflow: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-darkest);
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* --- Split Container --- */
.split-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* --- Left Panel (Theory) --- */
.panel-left {
    width: 45%;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-dark);
    position: relative;
    z-index: 2;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-yellow) var(--bg-dark);
}

.panel-left::-webkit-scrollbar {
    width: 3px;
}

.panel-left::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.panel-left::-webkit-scrollbar-thumb {
    background: var(--neon-yellow);
}

.panel-left-inner {
    padding: 6vh 3vw 10vh 4vw;
}

/* --- Theory Sections --- */
.theory-section {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.theory-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-number {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(5rem, 12vw, 10rem);
    color: var(--bg-panel);
    position: absolute;
    top: 2rem;
    right: 0;
    line-height: 1;
    letter-spacing: -0.02em;
    user-select: none;
}

.title-main {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 0.95;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--neon-yellow);
    text-shadow: 0 0 40px rgba(229, 255, 0, 0.3), 0 0 80px rgba(229, 255, 0, 0.1);
    margin-bottom: 2rem;
}

.title-sub {
    font-size: 0.5em;
    letter-spacing: 0.3em;
    color: var(--text-light);
    text-shadow: none;
}

.section-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 6rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 0.95;
    color: var(--text-light);
    margin-bottom: 2rem;
    position: relative;
}

.section-heading::before {
    content: '';
    position: absolute;
    left: -2vw;
    top: 50%;
    width: 4px;
    height: 60%;
    transform: translateY(-50%);
    background: var(--neon-yellow);
    box-shadow: 0 0 10px var(--neon-yellow);
}

.axiom {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 32ch;
    letter-spacing: 0.01em;
}

.proposition {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-light);
    opacity: 0.85;
    max-width: 40ch;
    margin-bottom: 1.5rem;
}

.theory-quote {
    border-left: 2px solid var(--neon-pink);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    font-weight: 300;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 36ch;
}

/* --- Proof Block --- */
.proof-block {
    margin: 2rem 0;
    padding: 1.5rem 0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
}

.proof-line {
    padding: 0.4rem 0;
    color: var(--text-muted);
    position: relative;
    padding-left: 1.5rem;
}

.proof-line::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
}

.proof-conclusion {
    color: var(--neon-yellow);
    font-weight: 500;
    margin-top: 0.5rem;
    text-shadow: 0 0 20px rgba(229, 255, 0, 0.2);
}

.proof-conclusion::before {
    content: '';
    color: var(--neon-yellow);
}

/* --- Neon Rule --- */
.neon-rule {
    width: 60px;
    height: 2px;
    background: var(--neon-yellow);
    margin-top: 3rem;
    box-shadow: 0 0 8px var(--neon-yellow), 0 0 20px rgba(229, 255, 0, 0.3);
    transition: width 0.6s ease;
}

.theory-section.visible .neon-rule {
    width: 120px;
}

/* --- Footer Mark --- */
.footer-mark {
    margin-top: 4rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* --- Right Panel (Expression) --- */
.panel-right {
    width: 55%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--bg-darkest);
}

/* --- SVG Canvas --- */
.svg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.layer-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.layer-svg.active {
    opacity: 1;
}

.draw-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s ease;
}

.layer-svg.active .draw-path {
    stroke-dashoffset: 0;
}

.svg-text {
    opacity: 0;
    transition: opacity 1.5s ease 0.8s;
}

.layer-svg.active .svg-text {
    opacity: 0.6;
}

.glow-circle {
    transition: opacity 1.5s ease 1s;
}

.layer-svg.active .glow-circle {
    opacity: 0.15;
    filter: blur(15px);
}

/* --- Neon Overlay --- */
.neon-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(ellipse at 50% 50%, rgba(229, 255, 0, 0.03) 0%, transparent 70%);
    mix-blend-mode: screen;
}

/* --- Noise Layer --- */
.noise-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Kanji Watermarks --- */
.kanji-watermark {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.kanji-char {
    font-family: serif;
    font-size: clamp(8rem, 20vw, 18rem);
    color: var(--bg-panel);
    position: absolute;
    opacity: 0;
    transition: opacity 1.2s ease, transform 1.2s ease;
    user-select: none;
    transform: scale(0.8);
}

.kanji-char.active {
    opacity: 0.15;
    transform: scale(1);
}

/* --- Divider --- */
.divider {
    position: fixed;
    left: 45%;
    top: 0;
    width: 1px;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

.divider-line {
    position: absolute;
    inset: 0;
    width: 1px;
    background: var(--neon-yellow);
    opacity: 0.4;
}

.divider-glow {
    position: absolute;
    inset: 0;
    width: 1px;
    background: var(--neon-yellow);
    box-shadow: 0 0 8px var(--neon-yellow), 0 0 20px rgba(229, 255, 0, 0.3);
    opacity: 0.6;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    left: 22.5%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-indicator span {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px rgba(229, 255, 0, 0.4);
}

.scroll-arrow {
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--neon-yellow);
    border-bottom: 2px solid var(--neon-yellow);
    transform: rotate(45deg);
    animation: bounce 1.5s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(6px); }
}

/* --- Animations --- */
@keyframes neonPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.divider-glow {
    animation: neonPulse 3s ease infinite;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
    }

    .panel-left {
        width: 100%;
        height: auto;
        min-height: 100vh;
    }

    .panel-right {
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 0;
        opacity: 0.3;
    }

    .panel-left {
        z-index: 2;
        background: rgba(13, 13, 26, 0.92);
    }

    .divider {
        display: none;
    }

    .scroll-indicator {
        left: 50%;
    }

    .section-number {
        font-size: clamp(3rem, 20vw, 6rem);
    }
}
