/* ============================================================
   JJUGGL.dev — retro-futuristic developer terminal / dusk
   ============================================================ */

:root {
    /* Palette */
    --charred-oak: #1c0e08;
    --rooftop-brick: #2a1812;
    --dark-cocoa: #3a2419;
    --vellum: #f4d8b8;
    --faded-bronze: #c89978;
    --tungsten-peach: #ffb27a;
    --ember-strike: #e85a2c;
    --twilight-mauve: #7a4a5e;
    --phosphor-amber: #ffaa33;
    --soot: #0a0503;

    --rhythm: 24px;
    --sunset-stop: 0.65;

    --sidebar-w: 320px;

    /* Fonts */
    --font-mono: 'JetBrains Mono', 'Inter', monospace;
    --font-display: 'Major Mono Display', 'JetBrains Mono', monospace;
    --font-serif: 'Cormorant Garamond', 'Lora', Georgia, serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
    background: var(--charred-oak);
    color: var(--vellum);
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 16px;
    line-height: calc(var(--rhythm) / 16px * 1rem);
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body {
    background:
        linear-gradient(
            to bottom,
            var(--rooftop-brick) 0%,
            var(--twilight-mauve) 40%,
            var(--ember-strike) 65%,
            var(--charred-oak) 100%
        );
    background-attachment: fixed;
    min-height: 100vh;
    cursor: none;
}

/* Grain overlay — animated */
body::after {
    content: '';
    position: fixed;
    inset: -10px;
    pointer-events: none;
    z-index: 999;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.039 0 0 0 0 0.020 0 0 0 0 0.012 0 0 0 0.95 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 240px 240px;
    mix-blend-mode: overlay;
    opacity: 0.07;
    animation: grain-shift 4s steps(8) infinite;
}

@keyframes grain-shift {
    0%   { transform: translate(0,0); }
    12%  { transform: translate(-1px, 1px); }
    25%  { transform: translate(1px, -1px); }
    37%  { transform: translate(-2px, -1px); }
    50%  { transform: translate(2px, 1px); }
    62%  { transform: translate(-1px, 2px); }
    75%  { transform: translate(1px, -2px); }
    87%  { transform: translate(-1px, -1px); }
    100% { transform: translate(0, 0); }
}

/* A subtle vignette to deepen edges */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(10, 5, 3, 0.55) 100%);
}

/* ============================================================
   SIDEBAR (left, fixed)
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--charred-oak);
    border-right: 1px solid var(--dark-cocoa);
    z-index: 50;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar::after {
    /* faint inner-right tick column suggesting drafted edge */
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 1px;
    background: repeating-linear-gradient(
        to bottom,
        var(--dark-cocoa) 0 1px,
        transparent 1px var(--rhythm)
    );
    opacity: 0.6;
}

.sidebar-inner {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 18px;
}

/* Monogram */
.monogram {
    position: relative;
    border-bottom: 1px dashed var(--dark-cocoa);
    padding-bottom: 18px;
}

.monogram-frame {
    width: 64px;
    height: 80px;
    border: 1px solid var(--faded-bronze);
    transform: skewX(-12deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--vellum);
    background: rgba(232, 90, 44, 0.04);
}

.monogram-frame > * {
    transform: skewX(12deg);
}

.monogram-letter { letter-spacing: 0.1em; line-height: 1; }
.monogram-dot { color: var(--ember-strike); font-size: 10px; opacity: 0.7; }

.monogram-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--phosphor-amber);
    margin-top: 10px;
    margin-left: 28px;
    box-shadow: 0 0 8px var(--phosphor-amber);
    animation: led-pulse 7s var(--ease) infinite;
}

@keyframes led-pulse {
    0%, 90%, 100% { opacity: 1; box-shadow: 0 0 8px var(--phosphor-amber); }
    45% { opacity: 0.25; box-shadow: 0 0 1px var(--phosphor-amber); }
}

.monogram-label {
    margin-top: 12px;
    font-size: 10px;
    color: var(--faded-bronze);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* Elevation diagram */
.elevation {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.elevation-label {
    font-size: 10px;
    color: var(--faded-bronze);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.elevation-svg {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 360px);
    flex: 1;
}

/* lit window state */
.ew.lit {
    fill: var(--tungsten-peach);
    filter: drop-shadow(0 0 3px rgba(255, 178, 122, 0.7));
    transition: fill 0.6s var(--ease);
}

.ew {
    transition: fill 0.6s var(--ease), filter 0.6s var(--ease);
}

.elev-floor.active rect:first-of-type {
    stroke: var(--vellum);
}

/* Telemetry */
.telemetry {
    border-top: 1px dashed var(--dark-cocoa);
    padding-top: 14px;
    font-size: 10.5px;
    color: var(--faded-bronze);
    letter-spacing: 0.08em;
    line-height: 1.6;
}

.telemetry-row {
    display: flex;
    justify-content: space-between;
    padding: 1px 0;
}

.t-key { color: var(--faded-bronze); opacity: 0.7; text-transform: uppercase; }
.t-val { color: var(--vellum); }
.t-val.dimmed { color: var(--faded-bronze); opacity: 0.6; }

.telemetry-stamp {
    margin-top: 14px;
    padding: 6px 10px;
    border: 1px solid var(--dark-cocoa);
    text-align: center;
    font-family: var(--font-display);
    color: var(--ember-strike);
    letter-spacing: 0.3em;
    font-size: 11px;
}

.stamp-sub {
    display: block;
    color: var(--faded-bronze);
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.25em;
    margin-top: 2px;
    opacity: 0.7;
}

/* ============================================================
   RIGHT CANVAS
   ============================================================ */
.canvas {
    margin-left: var(--sidebar-w);
    position: relative;
    z-index: 2;
}

/* Drafting ruler */
.ruler {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24px;
    pointer-events: none;
}
.ruler-left {
    left: 0;
    background-image: repeating-linear-gradient(
        to bottom,
        var(--faded-bronze) 0 1px,
        transparent 1px var(--rhythm)
    );
    background-size: 8px 24px;
    background-repeat: no-repeat;
    opacity: 0.25;
}

/* Scene base */
.scene {
    min-height: 100vh;
    padding: 96px 9% 96px 18%;
    position: relative;
    border-bottom: 1px solid var(--dark-cocoa);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* horizon sliver: place at random horizontal position via inline var */
.scene::after {
    content: '';
    position: absolute;
    bottom: -1px;
    height: 1px;
    background: var(--tungsten-peach);
    width: 80px;
    box-shadow: 0 0 6px var(--tungsten-peach);
    opacity: 0.55;
    left: calc(20% + 60vw * var(--horizon-x, 0.5) * 0.5);
}

.scene-meta {
    position: absolute;
    top: 36px;
    left: 18%;
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-family: var(--font-display);
    color: var(--faded-bronze);
    font-size: 12px;
    letter-spacing: 0.18em;
}
.scene-num {
    color: var(--ember-strike);
}
.scene-of {
    color: var(--faded-bronze);
    opacity: 0.7;
}
.scene-name {
    color: var(--vellum);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.22em;
}

/* ============================================================
   SCENE 01 — THE WINDOW
   ============================================================ */
.scene-01 {
    --horizon-x: 0.7;
    align-items: stretch;
    padding-bottom: 0;
}

.scene-window {
    flex: 1;
    position: relative;
    min-height: 86vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sky-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        var(--rooftop-brick) 0%,
        var(--twilight-mauve) 35%,
        var(--ember-strike) 62%,
        var(--charred-oak) 95%
    );
    opacity: 0.35;
    z-index: 0;
}

.skyline-hero {
    position: absolute;
    left: -5%;
    right: -5%;
    bottom: 0;
    width: 110%;
    height: 42%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: 8vh;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 8vw, 120px);
    color: var(--vellum);
    letter-spacing: 0.18em;
    line-height: 1;
    text-shadow: 0 0 32px rgba(244, 216, 184, 0.18);
}

.hero-title-text {
    display: inline-block;
}

.hero-title-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.hero-title-text .char.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle {
    margin-top: var(--rhythm);
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--vellum);
    letter-spacing: 0.04em;
}

.hero-subtitle .caret {
    display: inline-block;
    color: var(--phosphor-amber);
    margin-left: 2px;
    animation: blink 1.06s steps(2, end) infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.scroll-cue {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--faded-bronze);
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 1.2s var(--ease);
    animation: cue-bob 2s var(--ease) infinite;
    z-index: 3;
}
.scroll-cue.visible { opacity: 0.8; }

@keyframes cue-bob {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 6px); }
}

/* Skyline city windows: flickering */
.cw, .cwr, .cwc { fill: var(--tungsten-peach); opacity: 0.85; }
.cw.flick-off, .cwr.flick-off { opacity: 0.05; }

.cw {
    transition: opacity 0.8s var(--ease);
    filter: drop-shadow(0 0 1.5px rgba(255, 178, 122, 0.5));
}
.cwr {
    transition: opacity 0.8s var(--ease);
    filter: drop-shadow(0 0 1.5px rgba(255, 178, 122, 0.5));
}
.cwc {
    fill: var(--tungsten-peach);
    opacity: 0.6;
    filter: drop-shadow(0 0 1px rgba(255, 178, 122, 0.4));
}

/* ============================================================
   SCENE 02 — THE FLOOR PLAN
   ============================================================ */
.scene-02 { --horizon-x: 0.3; }

.scene-02-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.scene-02-copy {
    font-size: 16px;
    line-height: 1.7;
    color: var(--vellum);
    max-width: 480px;
}
.scene-eyebrow {
    font-size: 11px;
    color: var(--faded-bronze);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.reveal-block {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    margin-bottom: var(--rhythm);
    text-align: left;
    max-width: 46ch;
}
.scene.active .reveal-block,
.reveal-block.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.3s; }

.highlight-amber {
    color: var(--phosphor-amber);
    background: linear-gradient(to bottom, transparent 80%, rgba(255, 170, 51, 0.18) 80%);
    padding: 0 2px;
}

.scene-02-figure {
    position: relative;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.scene.active .scene-02-figure { opacity: 1; transform: translateY(0); }

.skyline-rise {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 20px rgba(10, 5, 3, 0.4));
}

.figure-caption {
    margin-top: 12px;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    color: var(--faded-bronze);
    font-size: 16px;
    text-align: right;
}

/* ============================================================
   SCENE 03 — THE TERMINAL
   ============================================================ */
.scene-03 { --horizon-x: 0.55; }

.scene-03-room {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-window {
    position: absolute;
    top: 20px;
    right: 6%;
    width: 240px;
    height: 180px;
    border: 2px solid var(--dark-cocoa);
    background: linear-gradient(to bottom,
        #1a0d09 0%,
        #3a1f1a 40%,
        #5a2a22 80%,
        #2a1812 100%
    );
    box-shadow:
        inset 0 0 60px rgba(255, 178, 122, 0.08),
        0 0 24px rgba(0, 0, 0, 0.5);
}
.room-window-mullion-v {
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 2px;
    background: var(--dark-cocoa);
    transform: translateX(-1px);
}
.room-window-mullion-h {
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 2px;
    background: var(--dark-cocoa);
    transform: translateY(-1px);
}

.terminal {
    width: min(720px, 90%);
    background: #0d0604;
    border: 1px solid var(--dark-cocoa);
    box-shadow:
        0 0 0 1px rgba(255, 170, 51, 0.08),
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 80px rgba(255, 170, 51, 0.04);
    font-family: var(--font-mono);
    color: var(--phosphor-amber);
    z-index: 2;
    position: relative;
}

.terminal-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--dark-cocoa);
    background: linear-gradient(to bottom, #1c0e08, #0d0604);
    font-size: 10px;
    color: var(--faded-bronze);
    letter-spacing: 0.1em;
}
.t-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: 1px solid var(--faded-bronze);
}
.t-title {
    margin-left: auto;
    margin-right: auto;
    opacity: 0.7;
}

.terminal-body {
    padding: 18px 20px;
    min-height: 220px;
    font-size: 13.5px;
    line-height: 1.65;
    background: radial-gradient(ellipse at center, rgba(255, 170, 51, 0.04) 0%, transparent 70%);
    position: relative;
}

.terminal-body::after {
    /* scanline overlay */
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0 2px,
        rgba(0, 0, 0, 0.18) 2px 3px
    );
    pointer-events: none;
    mix-blend-mode: multiply;
}

.t-line { display: flex; align-items: baseline; gap: 8px; }
.t-prompt { color: var(--ember-strike); }
.t-cmd { color: var(--vellum); }
.t-caret {
    color: var(--phosphor-amber);
    animation: blink 1.06s steps(2, end) infinite;
    display: inline-block;
}

.t-output {
    margin-top: 8px;
    white-space: pre-wrap;
    color: var(--phosphor-amber);
}
.t-output .out-line {
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.t-output .out-line.visible { opacity: 1; transform: translateY(0); }
.t-output .out-key { color: var(--vellum); }
.t-output .out-bullet { color: var(--ember-strike); }

.desk-objects {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 200px;
    pointer-events: none;
    opacity: 0.7;
}

/* ============================================================
   SCENE 04 — THE DIAGONAL
   ============================================================ */
.scene-04 { --horizon-x: 0.5; }

.diagonal-stage {
    position: relative;
    height: 80vh;
    min-height: 540px;
    width: 100%;
    overflow: hidden;
    background: var(--charred-oak);
    border: 1px solid var(--dark-cocoa);
}

.diagonal-half {
    position: absolute;
    inset: 0;
    padding: 48px 56px;
}

.diagonal-day {
    background: linear-gradient(135deg, rgba(200, 153, 120, 0.08) 0%, rgba(200, 153, 120, 0.02) 100%);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    color: var(--faded-bronze);
}

.diagonal-night {
    background: linear-gradient(135deg, rgba(232, 90, 44, 0.18) 0%, rgba(28, 14, 8, 0.5) 100%);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    text-align: right;
    color: var(--vellum);
}

.diagonal-label {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 28px;
    color: var(--faded-bronze);
}
.diagonal-night .diagonal-label { color: var(--ember-strike); }

.diagonal-day .project-list { padding-left: 0; }
.diagonal-night .project-list { padding-right: 0; }

.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 60%;
}
.diagonal-night .project-list {
    margin-left: auto;
}

.project-item {
    display: flex;
    gap: 16px;
    font-size: 14px;
    line-height: 1.5;
    align-items: baseline;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.diagonal-night .project-item {
    transform: translateX(30px);
    justify-content: flex-end;
}
.scene.active .project-item,
.project-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.project-list.ember .proj-line { color: var(--tungsten-peach); }
.proj-glyph { color: var(--ember-strike); font-size: 14px; }
.proj-line { color: var(--vellum); flex: 1; }
.diagonal-day .proj-line { color: var(--faded-bronze); }
.proj-year { color: var(--faded-bronze); font-size: 11px; letter-spacing: 0.1em; opacity: 0.7; min-width: 56px; text-align: right; }
.diagonal-night .proj-year { color: var(--ember-strike); }

/* The diagonal line itself */
.diagonal-line {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.diagonal-line::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 200%;
    height: 1px;
    background: var(--faded-bronze);
    transform-origin: bottom left;
    transform: rotate(-14deg);
    box-shadow: 0 0 12px rgba(232, 90, 44, 0.35);
    pointer-events: auto;
}

.diag-tooltip {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    color: var(--tungsten-peach);
    font-size: 18px;
    background: rgba(28, 14, 8, 0.85);
    padding: 8px 18px;
    border: 1px solid var(--dark-cocoa);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease);
    white-space: nowrap;
    z-index: 5;
}
.diagonal-line.hover .diag-tooltip { opacity: 1; }

/* ============================================================
   SCENE 05 — THE WINDOWS
   ============================================================ */
.scene-05 { --horizon-x: 0.42; }

.scene-05-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
    position: relative;
}

.window-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 28px;
    gap: 4px;
    padding: 24px;
    background: rgba(10, 5, 3, 0.35);
    border: 1px solid var(--dark-cocoa);
}

.win-cell {
    background: var(--tungsten-peach);
    opacity: 0.7;
    cursor: none;
    transition: opacity 0.45s var(--ease), background 0.45s var(--ease), box-shadow 0.45s var(--ease);
    box-shadow: inset 0 0 4px rgba(232, 90, 44, 0.25);
    border-radius: 1px;
}
.win-cell.dark {
    background: var(--charred-oak);
    opacity: 1;
    box-shadow: inset 0 0 2px rgba(244, 216, 184, 0.1);
}
.win-cell:hover {
    opacity: 1;
}

.window-side {
    padding-top: 24px;
}

.pulled-quote {
    font-family: var(--font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: 36px;
    line-height: 1.25;
    color: var(--vellum);
}
.quote-mark { color: var(--ember-strike); opacity: 0.8; }

.quote-attr {
    margin-top: 16px;
    font-size: 11px;
    color: var(--faded-bronze);
    letter-spacing: 0.18em;
}

.window-helper {
    margin-top: 32px;
    font-size: 11px;
    color: var(--faded-bronze);
    letter-spacing: 0.16em;
    opacity: 0.7;
}

.window-annotation {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--phosphor-amber);
    background: rgba(28, 14, 8, 0.92);
    border: 1px solid var(--dark-cocoa);
    padding: 6px 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    z-index: 10;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.window-annotation.visible { opacity: 1; }

/* ============================================================
   SCENE 06 — THE STACK
   ============================================================ */
.scene-06 { --horizon-x: 0.6; }

.stack-stage {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 80px;
    align-items: start;
}

.stack-building {
    position: relative;
}
.stack-elevation {
    width: 100%;
    height: auto;
    max-height: 76vh;
}

.sw {
    transition: fill 0.45s var(--ease), filter 0.45s var(--ease);
}
.stack-floor.active .sw {
    fill: var(--tungsten-peach);
    filter: drop-shadow(0 0 4px rgba(255, 178, 122, 0.6));
}
.stack-floor.active rect:first-of-type {
    stroke: var(--vellum);
}

.stack-disciplines {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.discipline {
    padding: 16px 20px;
    border-left: 1px solid var(--dark-cocoa);
    cursor: none;
    transition: background 0.45s var(--ease), border-color 0.45s var(--ease);
    display: grid;
    grid-template-columns: 50px 200px 1fr;
    gap: 20px;
    align-items: baseline;
}
.discipline.active {
    background: rgba(232, 90, 44, 0.06);
    border-left: 1px solid var(--ember-strike);
}

.discipline-key {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--phosphor-amber);
    letter-spacing: 0.2em;
}

.discipline-name {
    font-size: 14px;
    color: var(--vellum);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: lowercase;
}

.discipline-body {
    font-size: 13px;
    color: var(--faded-bronze);
    line-height: 1.6;
    max-width: 36ch;
    opacity: 0;
    transition: opacity 0.5s var(--ease);
}
.discipline.active .discipline-body { opacity: 1; }

/* ============================================================
   SCENE 07 — THE CLOSE
   ============================================================ */
.scene-07 {
    --horizon-x: 0.2;
    border-bottom: none;
}

.close-stage {
    position: relative;
    min-height: 86vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.close-sky {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        var(--charred-oak) 0%,
        var(--dark-cocoa) 70%,
        var(--ember-strike) 96%,
        var(--charred-oak) 100%
    );
    opacity: 0.85;
    z-index: 0;
}

.skyline-close {
    position: absolute;
    left: -5%; right: -5%;
    bottom: 0;
    width: 110%;
    height: 32%;
    z-index: 1;
}

.close-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding-top: 4vh;
}

.close-final {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.4vw, 56px);
    color: var(--vellum);
    letter-spacing: 0.14em;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.8s var(--ease), transform 1.8s var(--ease);
    text-shadow: 0 0 28px rgba(244, 216, 184, 0.18);
}
.scene-07.active .close-final {
    opacity: 1;
    transform: translateY(0);
}

.close-contact {
    margin-top: 64px;
    font-family: var(--font-mono);
    color: var(--vellum);
    font-size: 14px;
    line-height: 1.7;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 1.6s var(--ease) 0.6s;
}
.scene-07.active .close-contact { opacity: 1; }

.contact-row {
    display: flex;
    gap: 14px;
    align-items: baseline;
}
.c-key {
    color: var(--ember-strike);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    min-width: 56px;
    text-align: right;
}
.c-val { color: var(--vellum); font-size: 13px; }

.dot-break {
    margin: 24px 0 12px;
    color: var(--faded-bronze);
    letter-spacing: 0.6em;
    font-size: 14px;
}

.copyright {
    color: var(--faded-bronze);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    opacity: 0.7;
}

/* ============================================================
   Decorative cursor (phosphor block) — replaces native cursor
   ============================================================ */
.ghost-cursor {
    position: fixed;
    width: 12px;
    height: 20px;
    background: var(--phosphor-amber);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    box-shadow: 0 0 8px rgba(255, 170, 51, 0.6);
    transform: translate(-50%, -50%);
    animation: blink 1.06s steps(2, end) infinite;
}
.ghost-cursor.hollow {
    background: transparent;
    width: 14px;
    height: 2px;
    box-shadow: 0 0 6px var(--phosphor-amber);
    border-bottom: 2px solid var(--phosphor-amber);
}

/* ============================================================
   Responsive — mobile / tablet
   ============================================================ */
@media (max-width: 900px) {
    :root { --sidebar-w: 0px; }

    body { cursor: default; }
    .ghost-cursor { display: none; }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--dark-cocoa);
    }
    .sidebar-inner {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
        padding: 16px;
    }
    .elevation { display: none; }
    .telemetry { flex: 1; border-top: none; padding-top: 0; }
    .monogram { border-bottom: none; padding-bottom: 0; }

    .canvas { margin-left: 0; }

    .scene {
        padding: 80px 24px 80px 40px;
    }
    .scene-meta {
        left: 24px;
    }

    .scene-02-grid,
    .scene-05-grid,
    .stack-stage {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title { font-size: clamp(36px, 12vw, 80px); }
    .room-window { display: none; }
    .desk-objects { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    body::after { animation: none; }
}
