/* ================================================
   CHLOE ENGINE - Anti-Design Manifesto Styles
   Aurora Gradient | Diagonal Sections | Mono Only
   ================================================ */

/* --- CSS Custom Properties --- */
:root {
    --bg-field: #0a0b14;
    --deep-navy: #1a1b2e;
    --ice-white: #e0e6f0;
    --cool-gray: #c0c8d0;
    --ice-blue: #80c8e0;
    --aurora-green: #00e5a0;
    --aurora-violet: #7b5ea7;
    --aurora-pink: #e05080;
    --aurora-cyan: #40c8e8;
    --warm-amber: #e8a040;
    --aurora-shift: 0deg;
    --band-overlap: -6vw;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-field);
    color: var(--ice-white);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.65;
    letter-spacing: -0.02em;
    overflow-x: hidden;
}

/* --- Text Rotation Utilities --- */
.text-rot-neg3 { transform: rotate(-3deg); }
.text-rot-neg2 { transform: rotate(-2deg); }
.text-rot-neg1 { transform: rotate(-1deg); }
.text-rot-pos1 { transform: rotate(1deg); }
.text-rot-pos2 { transform: rotate(2deg); }
.text-rot-pos3 { transform: rotate(3deg); }
.text-rot-pos4 { transform: rotate(4deg); }

/* --- Font Classes --- */
.annotation-font {
    font-family: 'Cutive Mono', monospace;
    font-weight: 400;
}

/* --- Vertical Navigation Strip --- */
#nav-strip {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    writing-mode: vertical-rl;
    transform: rotate(180deg) translateX(50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 4px;
    background: linear-gradient(
        to bottom,
        rgba(0, 229, 160, 0.12),
        rgba(123, 94, 167, 0.12),
        rgba(224, 80, 128, 0.12)
    );
    border-radius: 2px;
    backdrop-filter: blur(4px);
}

.nav-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--cool-gray);
    text-transform: uppercase;
}

.nav-sep {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--aurora-violet);
    opacity: 0.6;
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--cool-gray);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 200ms ease;
}

.nav-link:hover {
    color: var(--aurora-green);
}

/* --- Hangul Jamo Watermarks --- */
.jamo-watermark {
    position: fixed;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    color: var(--aurora-violet);
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

.jamo-1 {
    font-size: 400px;
    top: 5vh;
    left: 10vw;
}

.jamo-2 {
    font-size: 280px;
    top: 35vh;
    right: 15vw;
}

.jamo-3 {
    font-size: 340px;
    bottom: 15vh;
    left: 30vw;
}

/* --- Diagonal Band Base --- */
.diagonal-band {
    position: relative;
    min-height: 100vh;
    padding: 80px 80px 80px 60px;
    overflow: hidden;
}

.diagonal-band + .diagonal-band {
    margin-top: var(--band-overlap);
}

/* --- Aurora Overlays --- */
.aurora-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.band-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin-left: 60px;
}

/* --- Band 1: Hero / Manifesto --- */
.band-1 {
    background-color: var(--bg-field);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4vw), 0 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.band-1 .aurora-overlay {
    background: linear-gradient(
        calc(135deg + var(--aurora-shift)),
        rgba(0, 229, 160, 0.05) 10%,
        rgba(123, 94, 167, 0.08) 45%,
        rgba(224, 80, 128, 0.04) 80%
    );
}

.manifesto-block {
    margin-bottom: 48px;
    margin-left: 32px;
}

.manifesto-comment {
    font-family: 'Major Mono Display', monospace;
    font-size: clamp(28px, 4.5vw, 64px);
    color: var(--aurora-green);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.manifesto-description {
    max-width: 680px;
    margin-left: 48px;
    margin-bottom: 40px;
}

.manifesto-description p {
    font-size: 16px;
    color: var(--ice-white);
    line-height: 1.7;
}

.manifesto-aside {
    margin-left: 20px;
    max-width: 600px;
}

.manifesto-aside p {
    font-family: 'Cutive Mono', monospace;
    font-size: 13px;
    color: var(--ice-blue);
    opacity: 0.7;
}

/* --- Band 2: Architecture --- */
.band-2 {
    background-color: var(--deep-navy);
    clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 calc(100% - 4vw));
}

.band-2 .aurora-overlay {
    background: linear-gradient(
        calc(200deg + var(--aurora-shift)),
        rgba(123, 94, 167, 0.07) 10%,
        rgba(0, 229, 160, 0.05) 50%,
        rgba(64, 200, 232, 0.06) 90%
    );
}

.architecture-diagram {
    margin-top: 40px;
    padding: 20px;
    transform: rotate(-1deg);
}

/* Hand-drawn SVG styles */
.hand-drawn-svg {
    max-width: 800px;
    width: 100%;
}

.arch-node {
    fill: none;
    stroke: var(--ice-blue);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    cursor: pointer;
    transition: stroke 200ms ease;
}

.arch-node:hover {
    stroke: var(--aurora-green);
}

.arch-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    fill: var(--ice-white);
    text-anchor: middle;
    letter-spacing: 0.1em;
    pointer-events: none;
}

.arch-connector {
    fill: none;
    stroke: var(--ice-blue);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.7;
}

.arch-arrow {
    fill: none;
    stroke: var(--ice-blue);
    stroke-width: 2;
    stroke-linecap: round;
}

.pulse-ring {
    fill: none;
    stroke: var(--aurora-green);
    stroke-width: 2;
    opacity: 0;
    pointer-events: none;
}

.hand-circle {
    fill: none;
    stroke: var(--aurora-pink);
    stroke-width: 1.5;
    stroke-dasharray: 6 4;
    opacity: 0.6;
}

.annotation-svg-text {
    font-family: 'Cutive Mono', monospace;
    font-size: 12px;
    fill: var(--ice-blue);
    opacity: 0.7;
}

.deprecated-box {
    fill: none;
    stroke: var(--aurora-pink);
    stroke-width: 1.5;
    opacity: 0.5;
}

.deprecated-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    fill: var(--aurora-pink);
    text-anchor: middle;
    opacity: 0.5;
    letter-spacing: 0.1em;
}

.cross-out-line {
    stroke: var(--aurora-pink);
    stroke-width: 2.5;
    stroke-linecap: round;
    opacity: 0.8;
}

.correction-text {
    fill: var(--aurora-green);
    opacity: 1;
    font-size: 13px;
}

/* --- Band 3: Render Pipeline --- */
.band-3 {
    background-color: var(--bg-field);
    clip-path: polygon(0 0, 100% 4vw, 100% calc(100% - 4vw), 0 100%);
}

.band-3 .aurora-overlay {
    background: linear-gradient(
        calc(160deg + var(--aurora-shift)),
        rgba(224, 80, 128, 0.06) 10%,
        rgba(123, 94, 167, 0.08) 45%,
        rgba(0, 229, 160, 0.04) 80%
    );
}

.code-walkthrough {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 40px;
}

.pipeline-diagram {
    flex: 0 0 auto;
    transform: rotate(1deg);
}

.pipeline-svg {
    max-width: 350px;
}

.pipeline-stage {
    fill: none;
    stroke: var(--aurora-cyan);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pipeline-label {
    font-family: 'Cutive Mono', monospace;
    font-size: 12px;
    fill: var(--ice-white);
    text-anchor: middle;
    letter-spacing: 0.08em;
}

.pipeline-connector {
    fill: none;
    stroke: var(--aurora-cyan);
    stroke-width: 1.5;
    stroke-linecap: round;
    opacity: 0.6;
    stroke-dasharray: 4 3;
}

.annotation-circle {
    stroke: var(--aurora-pink);
}

.hand-arrow {
    fill: none;
    stroke: var(--aurora-pink);
    stroke-width: 2;
    stroke-linecap: round;
}

/* Code Block */
.code-block {
    flex: 1 1 400px;
    background-color: rgba(26, 27, 46, 0.8);
    border-left: 3px solid var(--aurora-violet);
    padding: 24px 28px;
    border-radius: 2px;
    overflow-x: auto;
}

.code-line {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: var(--ice-white);
    white-space: pre;
    border-left: 2px solid transparent;
    padding-left: 8px;
    transition: border-color 150ms ease;
}

.code-line:hover {
    border-left-color: var(--aurora-green);
}

.code-keyword {
    color: var(--aurora-pink);
    font-weight: 700;
}

.code-func {
    color: var(--aurora-green);
}

.code-param {
    color: var(--aurora-cyan);
}

.code-comment {
    color: var(--aurora-cyan);
    opacity: 0.6;
    font-style: italic;
}

/* --- Band 4: Cultural Context --- */
.band-4 {
    background-color: var(--deep-navy);
    clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 calc(100% - 5vw));
}

.band-4 .aurora-overlay {
    background: linear-gradient(
        calc(180deg + var(--aurora-shift)),
        rgba(0, 229, 160, 0.04) 10%,
        rgba(224, 80, 128, 0.07) 50%,
        rgba(123, 94, 167, 0.05) 90%
    );
}

.cultural-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
    margin-top: 48px;
    padding: 20px;
}

.cultural-term {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.term-original {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(20px, 2.5vw, 36px);
    font-weight: 700;
    color: var(--ice-white);
    line-height: 1.3;
}

.term-1 .term-original { color: var(--aurora-green); }
.term-2 .term-original { color: var(--aurora-violet); }
.term-3 .term-original { color: var(--aurora-cyan); }
.term-4 .term-original { color: var(--aurora-pink); }
.term-5 .term-original { color: var(--aurora-green); }
.term-6 .term-original { color: var(--warm-amber); }
.term-7 .term-original { color: var(--aurora-violet); }

.term-english {
    font-family: 'Cutive Mono', monospace;
    font-size: 13px;
    color: var(--ice-blue);
    opacity: 0.7;
    letter-spacing: 0.04em;
}

.cultural-note {
    margin-top: 40px;
    margin-left: 48px;
    color: var(--ice-blue);
    opacity: 0.7;
    font-size: 13px;
    line-height: 1.8;
}

/* --- Band 5: Get Started / Terminal --- */
.band-5 {
    background-color: var(--bg-field);
    clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 100%);
}

.band-5 .aurora-overlay {
    background: linear-gradient(
        calc(140deg + var(--aurora-shift)),
        rgba(64, 200, 232, 0.06) 10%,
        rgba(0, 229, 160, 0.05) 45%,
        rgba(123, 94, 167, 0.04) 80%
    );
}

.terminal-block {
    max-width: 620px;
    margin-top: 40px;
    margin-left: 32px;
    background-color: rgba(10, 11, 20, 0.95);
    border: 1px solid rgba(128, 200, 224, 0.2);
    border-radius: 4px;
    overflow: hidden;
    transform: rotate(-1deg);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background-color: rgba(26, 27, 46, 0.8);
    border-bottom: 1px solid rgba(128, 200, 224, 0.1);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background-color: var(--aurora-pink); }
.dot-amber { background-color: var(--warm-amber); }
.dot-green { background-color: var(--aurora-green); }

.terminal-title {
    margin-left: 8px;
    font-size: 11px;
    color: var(--cool-gray);
    letter-spacing: 0.05em;
}

.terminal-body {
    padding: 20px 18px;
}

.terminal-line {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: var(--ice-white);
    line-height: 2;
    white-space: nowrap;
}

.terminal-prompt {
    color: var(--aurora-green);
    margin-right: 10px;
    font-weight: 700;
}

.terminal-cursor {
    display: inline-block;
    color: var(--aurora-green);
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-note {
    margin-top: 28px;
    margin-left: 32px;
    font-size: 13px;
    color: var(--ice-blue);
    opacity: 0.7;
}

/* --- Section Titles --- */
.section-title {
    font-family: 'Major Mono Display', monospace;
    font-size: clamp(28px, 4vw, 56px);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.title-green { color: var(--aurora-green); }
.title-violet { color: var(--aurora-violet); }
.title-pink { color: var(--aurora-pink); }
.title-cyan { color: var(--aurora-cyan); }

/* --- Overlap Zones --- */
.overlap-zone {
    position: absolute;
    bottom: -30px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 300ms ease 200ms, transform 300ms ease 200ms;
}

.overlap-zone.visible {
    opacity: 1;
    transform: translateY(0);
}

.overlap-1-2 { right: 120px; }
.overlap-2-3 { left: 200px; }
.overlap-3-4 { right: 160px; }
.overlap-4-5 { left: 140px; }

.scribble-text {
    font-size: 12px;
    color: var(--ice-blue);
    opacity: 0.7;
}

.margin-scribble {
    opacity: 0.7;
}

/* --- Footer & Stamp Seal --- */
#site-footer {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px 60px;
    background-color: var(--bg-field);
}

.stamp-seal {
    margin-bottom: 24px;
}

.stamp-svg {
    opacity: 0.8;
}

.stamp-circle {
    stroke-dasharray: 3 2;
}

.stamp-text-ring {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.stamp-version {
    font-family: 'Major Mono Display', monospace;
    font-size: 22px;
}

.stamp-bottom {
    font-size: 9px;
    letter-spacing: 0.25em;
}

.footer-text {
    font-size: 12px;
    color: var(--cool-gray);
    opacity: 0.5;
    letter-spacing: 0.1em;
}

/* --- Node Pulse Animation --- */
@keyframes node-pulse {
    0% {
        r: 20;
        opacity: 0.8;
        stroke-width: 2;
    }
    100% {
        r: 60;
        opacity: 0;
        stroke-width: 0.5;
    }
}

.pulse-ring.active {
    animation: node-pulse 600ms ease-out forwards;
}

/* --- Annotation Reveal Animation --- */
.annotation-reveal {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 400ms ease 200ms, transform 400ms ease 200ms;
}

.annotation-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Active Band Chromatic Breathing --- */
.diagonal-band .aurora-overlay {
    transition: opacity 0.8s ease;
}

.diagonal-band.in-view .aurora-overlay {
    opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .diagonal-band {
        padding: 60px 32px 60px 48px;
    }

    .band-content {
        margin-left: 32px;
    }

    .code-walkthrough {
        flex-direction: column;
        gap: 32px;
    }

    .cultural-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 20px;
    }

    #nav-strip {
        display: none;
    }

    .jamo-watermark {
        display: none;
    }
}

@media (max-width: 600px) {
    .diagonal-band {
        padding: 40px 20px 40px 20px;
    }

    .band-content {
        margin-left: 8px;
    }

    .cultural-grid {
        grid-template-columns: 1fr;
    }

    .manifesto-block {
        margin-left: 8px;
    }

    .manifesto-description {
        margin-left: 12px;
    }

    .terminal-block {
        margin-left: 0;
    }
}
