/* =====================================================
   KARCAEL · DECO TERMINAL
   Issue 01 / MMXXVI
   ===================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
    /* Colors */
    --void:          #0A0805;
    --void-deep:     #050302;
    --surface:       #14100A;
    --surface-2:     #1C160E;
    --phosphor:      #FF7A1A;
    --phosphor-soft: #FFB347;
    --phosphor-dim:  #B85812;
    --cream:         #F4E8D0;
    --cream-dim:     #D4C8A8;
    --muted:         #6B5D4A;
    --muted-deep:    #3D352A;
    --hairline:      rgba(244, 232, 208, 0.10);
    --hairline-strong: rgba(244, 232, 208, 0.25);
    --phosphor-glow: 0 0 12px rgba(255, 122, 26, 0.55),
                     0 0 32px rgba(255, 122, 26, 0.18);

    /* Type */
    --font-deco: 'Cinzel', 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

    /* Spatial */
    --rail-w: 56px;
    --status-h: 40px;
    --content-max: 1280px;
    --gutter: clamp(20px, 4vw, 56px);

    /* Type scale */
    --fs-xxs: 10px;
    --fs-xs:  11px;
    --fs-sm:  13px;
    --fs-base: 14px;
    --fs-md:  16px;
    --fs-lg:  20px;
    --fs-xl:  clamp(18px, 4.8vw, 28px);
    --fs-2xl: clamp(26px, 7vw, 44px);
    --fs-3xl: clamp(48px, 9vw, 128px);
    --fs-display: clamp(64px, 14vw, 220px);

    /* Motion */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    background: var(--void);
    color: var(--cream);
    font-family: var(--font-mono);
    font-size: var(--fs-base);
    line-height: 1.6;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    cursor: none; /* custom cursor */
    min-height: 100vh;
    /* Subtle warm vertical gradient */
    background-image:
        radial-gradient(ellipse at top, rgba(255, 122, 26, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at bottom, rgba(255, 122, 26, 0.03) 0%, transparent 60%);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: none;
}

ul, ol {
    list-style: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

table {
    border-collapse: collapse;
    width: 100%;
}

::selection {
    background: var(--phosphor);
    color: var(--void);
}

/* ---------- CRT OVERLAYS ---------- */
.crt-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
}

.crt-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 2px,
        rgba(0, 0, 0, 0.18) 3px,
        rgba(0, 0, 0, 0.18) 4px
    );
    mix-blend-mode: multiply;
    opacity: 0.45;
}

.crt-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(0, 0, 0, 0.35) 85%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.crt-grain {
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 0.7  0 0 0 0 0.3  0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- CUSTOM CURSOR ---------- */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    color: var(--phosphor);
    pointer-events: none;
    z-index: 1100;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    transition: transform 120ms var(--ease-out), color 200ms;
    filter: drop-shadow(0 0 4px rgba(255, 122, 26, 0.6));
}

.cursor.cursor-hover {
    transform: translate(-50%, -50%) scale(1.6);
    color: var(--phosphor-soft);
}

@media (hover: none), (pointer: coarse) {
    .cursor { display: none; }
    body, button { cursor: auto; }
}

/* ---------- STATUS BAR ---------- */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--status-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 20px;
    background: var(--void-deep);
    border-bottom: 1px solid var(--hairline-strong);
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cream-dim);
    z-index: 900;
    backdrop-filter: blur(6px);
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-left { justify-self: start; }
.status-center { justify-self: center; color: var(--phosphor); letter-spacing: 0.3em; }
.status-right { justify-self: end; }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--phosphor);
    box-shadow: var(--phosphor-glow);
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(0.7); }
}

#live-clock {
    color: var(--phosphor-soft);
    font-variant-numeric: tabular-nums;
}

/* ---------- SIDE RAILS ---------- */
.rail {
    position: fixed;
    top: var(--status-h);
    bottom: 0;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 32px 0;
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    border-color: var(--hairline);
    z-index: 800;
    pointer-events: none;
}

.rail-left  { left: 0;  border-right: 1px solid var(--hairline); }
.rail-right { right: 0; border-left:  1px solid var(--hairline); }

.rail-line {
    flex: 1;
    width: 1px;
    background: var(--hairline);
    margin: 16px 0;
}

.rail-vertical {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 0.4em;
    color: var(--phosphor-dim);
}

.scroll-progress {
    flex: 1;
    width: 2px;
    background: var(--hairline);
    margin: 16px 0;
    position: relative;
    overflow: hidden;
}

.scroll-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: var(--phosphor);
    box-shadow: var(--phosphor-glow);
    transition: height 80ms linear;
}

#scroll-percent {
    color: var(--phosphor);
    font-variant-numeric: tabular-nums;
}

/* ---------- LAYOUT ---------- */
main {
    margin-top: var(--status-h);
    padding: 0 var(--rail-w);
    position: relative;
    z-index: 10;
}

.module {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: clamp(80px, 12vh, 140px) var(--gutter);
    position: relative;
}

/* ============================================
   00 / MASTHEAD
   ============================================ */
.masthead {
    position: relative;
    min-height: calc(100vh - var(--status-h));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px var(--gutter) 60px;
    overflow: hidden;
}

.boot-sequence {
    position: absolute;
    top: 60px;
    left: var(--gutter);
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    color: var(--phosphor-dim);
    line-height: 1.85;
    text-align: left;
    max-width: 540px;
    z-index: 2;
}

.boot-line {
    white-space: nowrap;
    overflow: hidden;
    color: var(--phosphor);
    opacity: 0.8;
}

.boot-line.boot-final::after {
    content: "▮";
    color: var(--phosphor);
    animation: blink 1s steps(1) infinite;
    margin-left: 4px;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Sunburst */
.sunburst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(120vh, 1100px);
    height: min(120vh, 1100px);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: rotate-sun 120s linear infinite;
}

.sunburst svg {
    width: 100%;
    height: 100%;
}

.sunburst-rays { transform-origin: 400px 400px; }

@keyframes rotate-sun {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Masthead frame */
.masthead-frame {
    position: relative;
    z-index: 3;
    padding: clamp(40px, 6vw, 80px) clamp(30px, 5vw, 80px);
    max-width: 1100px;
}

.corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: var(--phosphor);
    border-style: solid;
    border-width: 0;
}
.corner-tl { top: 0;    left: 0;    border-top-width: 1px;    border-left-width: 1px;    }
.corner-tr { top: 0;    right: 0;   border-top-width: 1px;    border-right-width: 1px;   }
.corner-bl { bottom: 0; left: 0;    border-bottom-width: 1px; border-left-width: 1px;    }
.corner-br { bottom: 0; right: 0;   border-bottom-width: 1px; border-right-width: 1px;   }

.masthead-issue {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.4em;
    color: var(--phosphor);
    text-transform: uppercase;
    margin-bottom: 28px;
    text-shadow: var(--phosphor-glow);
}

.masthead-title {
    font-family: var(--font-deco);
    font-weight: 500;
    font-size: var(--fs-display);
    line-height: 0.9;
    letter-spacing: 0.04em;
    color: var(--cream);
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.masthead-title .title-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.18em;
}

.masthead-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    animation: word-in 1.2s var(--ease) forwards;
    animation-delay: calc(2.5s + var(--d) * 0.18s);
    text-shadow: 0 0 30px rgba(255, 122, 26, 0.15);
}

.masthead-title .word-alias {
    font-size: 0.22em;
    line-height: 1.2;
    letter-spacing: 0.55em;
    color: var(--phosphor);
    font-style: italic;
    font-weight: 400;
    margin: 0.6em 0 0.1em;
    text-shadow: 0 0 16px rgba(255, 122, 26, 0.5);
    text-indent: 0.55em;
}

@keyframes word-in {
    to { opacity: 1; transform: translateY(0); }
}

.masthead-alias {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.4em;
    color: var(--phosphor);
    text-transform: uppercase;
    margin: 4px 0 28px;
    text-shadow: 0 0 12px rgba(255, 122, 26, 0.45);
    opacity: 0;
    animation: fade-in 1.2s var(--ease) forwards;
    animation-delay: 3.2s;
}

.masthead-roles {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.3em;
    color: var(--cream-dim);
    text-transform: uppercase;
    margin-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    animation: fade-in 1.2s var(--ease) forwards;
    animation-delay: 3.4s;
}

.masthead-roles .dot { color: var(--phosphor); }

.masthead-coord {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 24px;
    border: 1px solid var(--hairline-strong);
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.2em;
    color: var(--phosphor-soft);
    text-transform: uppercase;
    opacity: 0;
    animation: fade-in 1.2s var(--ease) forwards;
    animation-delay: 3.6s;
}

.masthead-coord .bar {
    width: 1px;
    height: 12px;
    background: var(--phosphor-dim);
}

@keyframes fade-in {
    to { opacity: 1; }
}

.scroll-cue {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.3em;
    color: var(--phosphor);
    text-transform: uppercase;
    opacity: 0;
    animation: fade-in 1.5s var(--ease) forwards;
    animation-delay: 4s;
    z-index: 5;
}

.scroll-cue:hover { color: var(--phosphor-soft); }

.cue-arrow {
    animation: bob 2s ease-in-out infinite;
}

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

/* ============================================
   DIVIDER
   ============================================ */
.divider {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--phosphor-dim);
    font-size: var(--fs-md);
}

.divider .hline {
    flex: 1;
    height: 1px;
    background: linear-gradient(
        to right,
        var(--phosphor-dim) 0%,
        var(--hairline) 50%,
        var(--phosphor-dim) 100%
    );
    opacity: 0.6;
}

.divider .chevron-mid {
    color: var(--phosphor);
    text-shadow: var(--phosphor-glow);
    font-size: var(--fs-sm);
}

/* ============================================
   MODULE HEADER (shared)
   ============================================ */
.module-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 60px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--hairline);
    flex-wrap: wrap;
}

.module-num {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--phosphor);
    letter-spacing: 0.2em;
}

.module-slash {
    color: var(--muted);
    font-size: var(--fs-md);
}

.module-title {
    font-family: var(--font-deco);
    font-weight: 600;
    font-size: var(--fs-2xl);
    letter-spacing: 0.08em;
    color: var(--cream);
    line-height: 1;
}

.module-state {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.25em;
    color: var(--phosphor);
    text-transform: uppercase;
    border: 1px solid var(--phosphor-dim);
    padding: 4px 12px;
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.4);
}

/* Reveal animation for modules */
.module {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.module.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   01 / IDENTITY
   ============================================ */
.identity-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 60px;
    align-items: start;
}

.identity-meta {
    position: sticky;
    top: calc(var(--status-h) + 40px);
    border: 1px solid var(--hairline-strong);
    padding: 24px 20px;
    background: var(--surface);
}

.meta-pair {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--hairline);
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.meta-pair:last-child { border-bottom: none; }

.meta-key { color: var(--muted); }
.meta-val { color: var(--cream); }
.state-live { color: var(--phosphor); text-shadow: 0 0 6px rgba(255,122,26,0.5); }

.identity-bio {
    font-family: var(--font-mono);
    font-size: var(--fs-base);
    line-height: 1.85;
    color: var(--cream-dim);
    max-width: 64ch;
}

.identity-bio p { margin-bottom: 1.2em; }

.bio-lead { font-size: var(--fs-md); color: var(--cream); }

.dropcap {
    float: left;
    font-family: var(--font-deco);
    font-size: 5em;
    line-height: 0.85;
    margin: 0.05em 0.12em -0.05em 0;
    color: var(--phosphor);
    font-weight: 700;
    text-shadow: 0 0 24px rgba(255, 122, 26, 0.4);
}

.bio-head {
    font-family: var(--font-deco);
    font-weight: 600;
    font-size: var(--fs-md);
    letter-spacing: 0.18em;
    color: var(--phosphor);
    margin: 2.4em 0 0.8em;
    text-transform: uppercase;
}

/* ============================================
   02 / OPERATIONS
   ============================================ */
.ops-list {
    border-top: 1px solid var(--hairline);
}

.op-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 32px;
    align-items: center;
    padding: 28px 0;
    border-bottom: 1px solid var(--hairline);
    transition: background 400ms var(--ease), padding 400ms var(--ease);
    position: relative;
}

.op-item::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: var(--phosphor);
    transition: width 400ms var(--ease);
}

.op-item:hover {
    background: linear-gradient(to right, rgba(255,122,26,0.05), transparent);
    padding-left: 20px;
}

.op-item:hover::before { width: 12px; }

.op-num {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--phosphor);
    letter-spacing: 0.1em;
}

.op-title {
    font-family: var(--font-deco);
    font-weight: 600;
    font-size: var(--fs-xl);
    letter-spacing: 0.1em;
    color: var(--cream);
    margin-bottom: 6px;
}

.op-text {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--cream-dim);
    line-height: 1.6;
}

.op-since {
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    color: var(--phosphor);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border-left: 1px solid var(--phosphor-dim);
    padding-left: 16px;
    text-align: right;
    min-width: 100px;
}

/* ============================================
   03 / ARCHIVE
   ============================================ */
.archive-wrap {
    border: 1px solid var(--hairline-strong);
    background: var(--surface);
    overflow-x: auto;
}

.archive-table {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    min-width: 720px;
}

.archive-table thead {
    background: var(--void-deep);
    border-bottom: 1px solid var(--phosphor-dim);
}

.archive-table th {
    text-align: left;
    padding: 16px 20px;
    font-size: var(--fs-xxs);
    letter-spacing: 0.2em;
    color: var(--phosphor);
    text-transform: uppercase;
    font-weight: 500;
}

.archive-row {
    border-bottom: 1px solid var(--hairline);
    transition: background 300ms var(--ease);
}

.archive-row:last-child { border-bottom: none; }

.archive-row:hover {
    background: rgba(255, 122, 26, 0.04);
}

.archive-table td {
    padding: 22px 20px;
    vertical-align: top;
    color: var(--cream-dim);
}

.td-num {
    color: var(--phosphor);
    width: 70px;
}

.td-title {
    color: var(--cream);
    min-width: 280px;
}

.td-title a, .td-title .td-static {
    font-size: var(--fs-md);
    letter-spacing: 0.06em;
    color: var(--cream);
    display: inline-block;
    position: relative;
    transition: color 300ms;
}

.td-title a {
    border-bottom: 1px solid transparent;
    transition: color 300ms, border-color 300ms, text-shadow 300ms;
}

.td-title a:hover {
    color: var(--phosphor);
    border-bottom-color: var(--phosphor);
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.4);
}

.link-arrow {
    display: inline-block;
    transition: transform 300ms var(--ease);
}

.td-title a:hover .link-arrow {
    transform: translate(2px, -2px);
}

.td-desc {
    margin-top: 6px;
    font-size: var(--fs-xs);
    color: var(--muted);
    letter-spacing: 0.04em;
    max-width: 50ch;
}

.td-cat, .td-year, .td-state {
    font-size: var(--fs-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
}

.td-state.state-live {
    color: var(--phosphor);
    text-shadow: 0 0 6px rgba(255, 122, 26, 0.4);
}

.td-state.state-archived {
    color: var(--muted);
}

.td-state.state-soon {
    color: var(--phosphor-soft);
    font-style: italic;
    text-shadow: 0 0 6px rgba(255, 179, 71, 0.45);
}

/* ============================================
   04 / SIGNAL
   ============================================ */
.tracklist-meta {
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.3em;
    color: var(--phosphor);
    text-transform: uppercase;
    margin-bottom: 32px;
}

.tracks {
    border-top: 1px solid var(--hairline);
}

.track {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    align-items: center;
    gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid var(--hairline);
    transition: background 300ms var(--ease);
}

.track:hover {
    background: linear-gradient(to right, rgba(255,122,26,0.05), transparent);
}

.track-num {
    font-family: var(--font-mono);
    font-size: var(--fs-md);
    color: var(--phosphor);
    letter-spacing: 0.1em;
}

.track-title {
    font-family: var(--font-deco);
    font-weight: 600;
    font-size: var(--fs-xl);
    letter-spacing: 0.08em;
    color: var(--cream);
    margin-bottom: 4px;
}

.track-genre {
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.2em;
    color: var(--muted);
    text-transform: uppercase;
}

.track-bars {
    display: flex;
    align-items: end;
    gap: 3px;
    height: 28px;
}

.track-bars span {
    width: 3px;
    background: var(--phosphor);
    box-shadow: 0 0 6px rgba(255, 122, 26, 0.5);
    animation: bars 0.85s ease-in-out infinite;
    transform-origin: bottom;
}

.track-bars span:nth-child(1) { animation-delay: 0.0s; height: 40%; }
.track-bars span:nth-child(2) { animation-delay: 0.1s; height: 70%; }
.track-bars span:nth-child(3) { animation-delay: 0.2s; height: 100%; }
.track-bars span:nth-child(4) { animation-delay: 0.15s; height: 60%; }
.track-bars span:nth-child(5) { animation-delay: 0.25s; height: 85%; }
.track-bars span:nth-child(6) { animation-delay: 0.3s; height: 50%; }
.track-bars span:nth-child(7) { animation-delay: 0.18s; height: 75%; }
.track-bars span:nth-child(8) { animation-delay: 0.22s; height: 45%; }

/* TIMELESS · Dubstep — fastest, aggressive double-spike */
@keyframes bars {
    0%, 100% { transform: scaleY(0.3);  opacity: 0.65; }
    18%      { transform: scaleY(1);    opacity: 1; }
    32%      { transform: scaleY(0.35); opacity: 0.7; }
    55%      { transform: scaleY(0.95); opacity: 0.95; }
    78%      { transform: scaleY(0.38); opacity: 0.7; }
}

/* DAYS FROM PAST · Downtempo — mid tempo, gentle three-step wave */
@keyframes bars-alt-2 {
    0%, 100% { transform: scaleY(0.5);  opacity: 0.7; }
    35%      { transform: scaleY(0.92); opacity: 0.92; }
    70%      { transform: scaleY(0.55); opacity: 0.78; }
}

/* GLOVE · Soundtrack — slowest, ambient swell */
@keyframes bars-alt-3 {
    0%, 100% { transform: scaleY(0.42); opacity: 0.62; }
    50%      { transform: scaleY(0.78); opacity: 0.88; }
}

/* Tempo per genre: Dubstep (fastest) → Downtempo (mid) → Soundtrack (slowest) */
.tracks .track:nth-child(2) .track-bars span {
    animation-name: bars-alt-2;
    animation-duration: 1.5s;
}

.tracks .track:nth-child(3) .track-bars span {
    animation-name: bars-alt-3;
    animation-duration: 2.6s;
}

.track-links {
    display: flex;
    gap: 14px;
}

.track-links a {
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.2em;
    color: var(--cream-dim);
    text-transform: uppercase;
    border: 1px solid var(--hairline-strong);
    padding: 6px 12px;
    transition: all 300ms var(--ease);
}

.track-links a:hover {
    color: var(--phosphor);
    border-color: var(--phosphor);
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.5);
    box-shadow: inset 0 0 12px rgba(255, 122, 26, 0.1);
}

/* ============================================
   05 / CHANNEL
   ============================================ */
.channel-grid {
    display: flex;
    flex-direction: column;
    gap: 36px;
    max-width: 820px;
    margin: 0 auto;
}

/* Primary channel / large email card */
.channel-primary {
    position: relative;
    border: 1px solid var(--hairline-strong);
    background:
        radial-gradient(ellipse at center, rgba(255, 122, 26, 0.05) 0%, transparent 70%),
        var(--surface);
    padding: clamp(32px, 5vw, 56px) clamp(28px, 5vw, 56px);
    text-align: center;
    overflow: hidden;
}

.channel-primary .corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--phosphor);
    border-style: solid;
    border-width: 0;
}
.channel-primary .corner-tl { top: 10px; left: 10px;     border-top-width: 1px;    border-left-width: 1px; }
.channel-primary .corner-tr { top: 10px; right: 10px;    border-top-width: 1px;    border-right-width: 1px; }
.channel-primary .corner-bl { bottom: 10px; left: 10px;  border-bottom-width: 1px; border-left-width: 1px; }
.channel-primary .corner-br { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }

.channel-prompt {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--phosphor);
    letter-spacing: 0.05em;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--hairline);
    text-align: left;
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.3);
}

.channel-email {
    display: block;
    text-align: center;
    transition: transform 400ms var(--ease);
}

.ce-label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.35em;
    color: var(--phosphor-soft);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.ce-value {
    display: block;
    font-family: var(--font-deco);
    font-weight: 600;
    font-size: clamp(22px, 4vw, 38px);
    letter-spacing: 0.04em;
    color: var(--cream);
    transition: color 300ms var(--ease), text-shadow 300ms var(--ease);
}

.channel-email .link-arrow {
    display: inline-block;
    margin-left: 6px;
    color: var(--phosphor);
    transition: transform 300ms var(--ease);
}

.channel-email:hover .ce-value {
    color: var(--phosphor);
    text-shadow: 0 0 24px rgba(255, 122, 26, 0.5);
}

.channel-email:hover .link-arrow {
    transform: translate(4px, -4px);
}

/* Sockets block */
.channel-sockets-block {
    /* container for label + cards */
}

.sockets-label {
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.3em;
    color: var(--phosphor);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.3);
}

.socket-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.socket-card {
    border: 1px solid var(--hairline-strong);
    background: var(--surface);
    transition: all 350ms var(--ease);
    position: relative;
}

.socket-card a {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 22px;
    position: relative;
}

.sc-tag {
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.3em;
    color: var(--phosphor);
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(255, 122, 26, 0.35);
}

.sc-handle {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--cream-dim);
    letter-spacing: 0.04em;
    transition: color 300ms var(--ease);
}

.sc-arrow {
    position: absolute;
    top: 18px;
    right: 22px;
    color: var(--muted);
    font-size: var(--fs-sm);
    transition: transform 300ms var(--ease), color 300ms var(--ease);
}

.socket-card:hover {
    background: rgba(255, 122, 26, 0.05);
    border-color: var(--phosphor);
    box-shadow: inset 0 0 18px rgba(255, 122, 26, 0.06),
                0 0 24px rgba(255, 122, 26, 0.10);
}

.socket-card:hover .sc-handle {
    color: var(--phosphor-soft);
}

.socket-card:hover .sc-arrow {
    color: var(--phosphor);
    transform: translate(2px, -2px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: 80px;
    padding: 60px var(--rail-w);
    border-top: 1px solid var(--phosphor-dim);
    background: var(--void-deep);
    position: relative;
    z-index: 10;
}

.footer-frame {
    max-width: var(--content-max);
    margin: 0 auto;
    text-align: center;
    padding: 0 var(--gutter);
}

.end-mark {
    font-family: var(--font-deco);
    font-size: var(--fs-lg);
    letter-spacing: 0.3em;
    color: var(--phosphor);
    text-shadow: var(--phosphor-glow);
    margin-bottom: 16px;
}

.footer-meta {
    font-family: var(--font-mono);
    font-size: var(--fs-xxs);
    letter-spacing: 0.2em;
    color: var(--muted);
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.footer-meta .dot { color: var(--phosphor-dim); }

.footer-meta a {
    color: var(--phosphor-soft);
    border-bottom: 1px solid transparent;
    transition: border-color 300ms var(--ease), text-shadow 300ms var(--ease);
}

.footer-meta a:hover {
    border-bottom-color: var(--phosphor-soft);
    text-shadow: 0 0 8px rgba(255, 122, 26, 0.45);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .identity-grid,
    .channel-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .identity-meta {
        position: static;
    }

    .op-item {
        grid-template-columns: 60px 1fr;
    }

    .op-since {
        grid-column: 2;
        grid-row: 2;
        text-align: left;
        border-left: none;
        border-top: 1px dashed var(--hairline);
        padding-left: 0;
        padding-top: 8px;
        margin-top: 8px;
    }
}

@media (max-width: 768px) {
    :root {
        --rail-w: 28px;
        --gutter: 20px;
    }

    .rail {
        font-size: 9px;
    }

    .rail-vertical { display: none; }

    main {
        padding: 0 var(--rail-w);
    }

    .module {
        padding: 80px 16px;
    }

    .boot-sequence {
        font-size: 9px;
        max-width: calc(100% - 60px);
    }

    .boot-line {
        white-space: normal;
    }

    .module-header {
        gap: 10px;
    }

    .module-state {
        margin-left: 0;
        margin-top: 8px;
    }

    .track {
        grid-template-columns: 40px 1fr;
        gap: 12px;
    }

    .track-bars,
    .track-links {
        grid-column: 2;
    }

    .track-links {
        flex-wrap: wrap;
    }

    /* --- Archive becomes a card list on mobile (no horizontal scroll) --- */
    .archive-wrap {
        border: none;
        background: transparent;
        overflow-x: visible;
    }

    .archive-table {
        min-width: 0;
        display: block;
        font-size: var(--fs-base);
    }

    .archive-table thead {
        display: none;
    }

    .archive-table tbody {
        display: block;
        width: 100%;
    }

    .archive-row {
        display: block;
        padding: 22px 0;
        border-bottom: 1px solid var(--hairline);
        position: relative;
    }

    .archive-row:first-child {
        border-top: 1px solid var(--hairline);
    }

    .archive-row td {
        display: block;
        padding: 0;
        border: none;
        vertical-align: baseline;
        width: auto;
        min-width: 0;
        white-space: normal;
    }

    .archive-row .td-num {
        display: inline-block;
        font-size: var(--fs-xs);
        color: var(--phosphor);
        margin-bottom: 10px;
        letter-spacing: 0.12em;
    }

    .archive-row .td-state {
        position: absolute;
        top: 22px;
        right: 0;
        font-size: var(--fs-xxs);
        letter-spacing: 0.18em;
        white-space: nowrap;
        text-transform: uppercase;
    }

    .archive-row .td-title {
        margin-bottom: 0;
    }

    .archive-row .td-title a,
    .archive-row .td-title .td-static {
        font-size: var(--fs-md);
        line-height: 1.3;
        letter-spacing: 0.05em;
    }

    .archive-row .td-desc {
        margin-top: 10px;
        margin-bottom: 14px;
        font-size: var(--fs-xs);
        max-width: none;
        line-height: 1.55;
    }

    .archive-row .td-cat,
    .archive-row .td-year {
        display: inline;
        font-size: var(--fs-xxs);
        letter-spacing: 0.2em;
        color: var(--phosphor);
        text-transform: uppercase;
    }

    .archive-row .td-cat::after {
        content: " · ";
        color: var(--muted);
        margin: 0 4px;
    }

    .status-center { display: none; }

    /* --- Mobile typography & wrapping --- */
    .module-title {
        letter-spacing: 0.04em;
        word-break: break-word;
    }

    .op-title {
        letter-spacing: 0.04em;
        line-height: 1.15;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .op-num {
        font-size: 11px;
    }

    .op-since {
        font-size: 10px;
        letter-spacing: 0.18em;
    }

    .op-item {
        padding: 20px 0;
        gap: 16px;
    }

    /* Disable hover/active backgrounds on touch devices */
    .op-item:hover,
    .track:hover,
    .archive-row:hover,
    .socket-card:hover {
        background: none;
        padding-left: 0;
    }

    .op-item:hover::before {
        width: 0;
    }

    .op-item:hover {
        padding-left: 0;
    }

    .socket-card:hover {
        border-color: var(--hairline-strong);
        box-shadow: none;
    }

    /* --- Hero readability: dim sunburst + dark radial backdrop --- */
    .sunburst {
        opacity: 0.22;
        width: min(140vw, 700px);
        height: min(140vw, 700px);
    }

    .masthead-frame {
        isolation: isolate;
    }

    .masthead-frame::before {
        content: "";
        position: absolute;
        inset: -24px -16px;
        background: radial-gradient(
            ellipse at center,
            rgba(10, 8, 5, 0.82) 0%,
            rgba(10, 8, 5, 0.6) 35%,
            rgba(10, 8, 5, 0.28) 65%,
            transparent 90%
        );
        z-index: -1;
        pointer-events: none;
    }
}

@media (max-width: 480px) {
    .masthead-title {
        font-size: clamp(40px, 16vw, 80px);
    }

    .footer-meta {
        flex-direction: column;
        gap: 6px;
    }

    .footer-meta .dot { display: none; }
}

/* ============================================
   PREFERS REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .sunburst { animation: none; }
    .module { opacity: 1; transform: none; }
    .masthead-title .word { opacity: 1; transform: none; }
}
