/* ═══════════════════════════════════════════════
   SYS.TERMINAL — Design System
   ═══════════════════════════════════════════════ */

:root {
    --bg-void: #030305;
    --acid-green: #ccff00;
    --elec-blue: #1800ff;
    --text-white: #f0f0f0;
    --text-dim: rgba(204, 255, 0, 0.4);

    --font-mono: 'Space Mono', monospace;
    --font-display: 'Anton', sans-serif;

    --border-thin: 1px solid var(--text-dim);
    --border-blue: 1px solid var(--elec-blue);
}

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

body {
    background-color: var(--bg-void);
    color: var(--acid-green);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.4;
    height: 100vh;
    overflow: hidden;
    display: flex;
    cursor: crosshair;
}

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

/* ── Layout Grid ── */

.layout-grid {
    display: grid;
    grid-template-columns: 240px 1fr 60px 140px;
    width: 100%;
    height: 100%;
}

/* ── Scanlines Overlay ── */

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.1)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 100;
}

/* ── Crosshairs ── */

.crosshair {
    position: absolute;
    width: 15px;
    height: 15px;
}

.crosshair::before,
.crosshair::after {
    content: '';
    position: absolute;
    background: var(--acid-green);
}

.crosshair::before { top: 7px; left: 0; width: 15px; height: 1px; }
.crosshair::after { left: 7px; top: 0; height: 15px; width: 1px; }

.ch-tl { top: 20px; left: 20px; }
.ch-tr { top: 20px; right: 20px; }
.ch-bl { bottom: 20px; left: 20px; }
.ch-br { bottom: 20px; right: 20px; }

/* ── Glitch Text ── */

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-void);
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, 2px);
    color: var(--elec-blue);
    z-index: -1;
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
    opacity: 0;
}

.glitch-text:hover::before,
.glitch-text:hover::after {
    opacity: 1;
}

@keyframes glitch-anim-1 {
    0%   { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
    20%  { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    40%  { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
    60%  { clip-path: inset(80% 0  5% 0); transform: translate(2px, -2px); }
    80%  { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
    100% { clip-path: inset(30% 0 40% 0); transform: translate(1px, -1px); }
}

/* ── Barcode ── */

.barcode {
    font-family: monospace;
    letter-spacing: -1px;
    font-size: 16px;
    color: var(--text-dim);
    user-select: none;
}

/* ═══════════════════════════════════════════════
   Column: Navigation (left sidebar)
   ═══════════════════════════════════════════════ */

.col-nav {
    border-right: var(--border-blue);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.sys-header {
    margin-bottom: 40px;
}

.sys-header span {
    display: block;
    color: var(--text-dim);
    font-size: 10px;
    margin-bottom: 4px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-link {
    text-decoration: none;
    color: var(--acid-green);
    font-weight: 700;
    display: flex;
    align-items: center;
    transition: all 0.1s steps(2);
}

.nav-list-ext {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--text-dim);
}

.nav-link::before {
    content: '[ ';
    color: var(--elec-blue);
    margin-right: 8px;
    opacity: 0.5;
}

.nav-link::after {
    content: ' ]';
    color: var(--elec-blue);
    margin-left: 8px;
    opacity: 0.5;
}

.nav-link:hover,
.nav-link.active {
    background: var(--acid-green);
    color: var(--bg-void);
}

.nav-link:hover::before,
.nav-link:hover::after,
.nav-link.active::before,
.nav-link.active::after {
    color: var(--bg-void);
    opacity: 1;
}

/* ── Telemetry Stream ── */

.telemetry-stream {
    font-size: 10px;
    color: var(--elec-blue);
    overflow: hidden;
    height: 150px;
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 50%, rgba(0,0,0,0));
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 50%, rgba(0,0,0,0));
}

.telemetry-stream p {
    animation: scroll-up 10s linear infinite;
}

@keyframes scroll-up {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* ═══════════════════════════════════════════════
   Column: Main Content (center)
   ═══════════════════════════════════════════════ */

.col-main {
    padding: 40px 60px;
    position: relative;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--elec-blue) var(--bg-void);
}

.col-main::-webkit-scrollbar { width: 4px; }
.col-main::-webkit-scrollbar-track { background: var(--bg-void); }
.col-main::-webkit-scrollbar-thumb { background: var(--elec-blue); }

.data-block {
    margin-bottom: 50px;
    position: relative;
}

.block-title {
    color: var(--elec-blue);
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid var(--elec-blue);
    padding-bottom: 4px;
    margin-bottom: 15px;
    display: inline-block;
    padding-right: 40px;
}

.block-title::before {
    content: '>> ';
    color: var(--acid-green);
}

.content-text {
    color: var(--text-white);
    max-width: 65ch;
    margin-bottom: 15px;
    text-align: justify;
}

.content-text .highlight {
    color: var(--acid-green);
    background: rgba(204, 255, 0, 0.1);
    padding: 0 4px;
}

/* ── Status OK Block ── */

.status-ok-block {
    position: absolute;
    right: 0;
    top: 20%;
    border: 4px solid var(--acid-green);
    padding: 15px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(90deg);
    transform-origin: right top;
    background: var(--bg-void);
    z-index: 10;
}

.status-ok-block span {
    font-family: var(--font-display);
    font-size: 48px;
    line-height: 1;
    color: var(--acid-green);
    letter-spacing: 4px;
    transform: scaleY(1.2);
}

/* ── Background Coords ── */

.bg-coords {
    text-align: right;
    color: var(--text-dim);
    font-size: 10px;
    line-height: 1.2;
    margin-top: 40px;
}

/* ═══════════════════════════════════════════════
   Column: Blue sidebar
   ═══════════════════════════════════════════════ */

.col-blue {
    background-color: var(--elec-blue);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    border-left: 1px solid var(--bg-void);
    border-right: 1px solid var(--bg-void);
}

.blue-text {
    font-size: 14px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.blue-text .divider {
    color: var(--acid-green);
    font-weight: bold;
}

/* ═══════════════════════════════════════════════
   Column: Green sidebar (right)
   ═══════════════════════════════════════════════ */

.col-green {
    background-color: var(--acid-green);
    color: var(--bg-void);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.name-monolith {
    font-family: var(--font-display);
    font-size: 160px;
    line-height: 0.8;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
    letter-spacing: -2px;
    margin: 0;
    -webkit-text-stroke: 1px var(--bg-void);
}

.green-micro-data {
    position: absolute;
    bottom: 10px;
    left: 10px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 9px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    color: var(--bg-void);
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════
   Page: PROFILE.DAT (index) — Skills Matrix
   ═══════════════════════════════════════════════ */

.skills-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
    font-size: 12px;
}

.skill-item {
    border: 1px solid rgba(24, 0, 255, 0.3);
    padding: 8px;
    display: flex;
    justify-content: space-between;
}

.skill-item span:last-child {
    color: var(--elec-blue);
}

/* ═══════════════════════════════════════════════
   Page: PROJECTS.EXE — Project Cards
   ═══════════════════════════════════════════════ */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.project-card {
    border: 1px solid var(--elec-blue);
    padding: 15px;
    position: relative;
    background: rgba(24, 0, 255, 0.05);
    transition: border-color 0.2s;
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    border-color: var(--acid-green);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.codename {
    font-size: 18px;
    font-weight: 700;
    color: var(--acid-green);
}

.status-badge {
    font-size: 10px;
    padding: 2px 6px;
    border: 1px solid currentColor;
}

.status-active { color: var(--acid-green); }
.status-archived { color: var(--text-dim); }
.status-classified { color: #ff0055; }
.status-launching { color: var(--acid-green); animation: blink 1s step-end infinite; }

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

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.tag {
    font-size: 9px;
    background: var(--elec-blue);
    color: white;
    padding: 1px 5px;
}

.progress-container {
    margin-top: 15px;
}

.progress-label {
    font-size: 10px;
    color: var(--text-dim);
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.ascii-bar {
    font-family: monospace;
    color: var(--acid-green);
    letter-spacing: 1px;
    font-size: 12px;
}

/* ═══════════════════════════════════════════════
   Page: ARCHIVE.LOG — Log Entries
   ═══════════════════════════════════════════════ */

.log-entry {
    border-left: 2px solid var(--elec-blue);
    padding-left: 20px;
    margin-bottom: 40px;
    position: relative;
}

.log-entry::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 8px;
    height: 8px;
    background: var(--acid-green);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.timestamp {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.operative-id {
    color: var(--acid-green);
    font-weight: 700;
    font-size: 18px;
}

.uptime-metric {
    display: inline-block;
    background: rgba(24, 0, 255, 0.2);
    color: var(--text-white);
    padding: 2px 8px;
    font-size: 11px;
    border: 1px solid var(--elec-blue);
    margin-bottom: 12px;
}

.system-outputs {
    list-style: none;
    color: var(--text-white);
}

.output-line {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 12px;
}

.output-line .prompt {
    color: var(--elec-blue);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   Page: COMM_LINK — Contact
   ═══════════════════════════════════════════════ */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.contact-item {
    border: 1px solid var(--elec-blue);
    padding: 15px;
    background: rgba(24, 0, 255, 0.05);
    transition: border-color 0.2s;
}

.contact-item:hover {
    border-color: var(--acid-green);
}

.contact-label {
    font-size: 10px;
    color: var(--text-dim);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.contact-value {
    color: var(--acid-green);
    font-weight: 700;
    font-size: 14px;
    display: block;
}

.contact-value:hover {
    color: var(--text-white);
}

.terminal-prompt {
    color: var(--text-white);
    margin-top: 30px;
    padding: 15px;
    border: 1px solid rgba(24, 0, 255, 0.3);
    font-size: 12px;
    line-height: 2;
}

.terminal-prompt .cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--acid-green);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    margin-left: 4px;
}

/* ═══════════════════════════════════════════════
   MOBILE — Responsive
   ═══════════════════════════════════════════════ */

@media (max-width: 860px) {

    body {
        height: auto;
        overflow: auto;
    }

    .layout-grid {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    /* ── Green banner (name) — move to top ── */

    .col-green {
        order: -2;
        height: 60px;
        padding: 10px 20px;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .name-monolith {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 40px;
        letter-spacing: 2px;
        -webkit-text-stroke: none;
    }

    .green-micro-data {
        writing-mode: horizontal-tb;
        transform: none;
        position: static;
        margin-left: auto;
        font-size: 8px;
    }

    /* ── Navigation — horizontal under banner ── */

    .col-nav {
        order: -1;
        border-right: none;
        border-bottom: var(--border-blue);
        padding: 12px 20px;
    }

    .col-nav > div:first-of-type {
        display: contents;
    }

    .sys-header {
        display: none;
    }

    .crosshair {
        display: none;
    }

    .mode-toggle {
        top: auto;
        bottom: 12px;
        right: 12px;
    }

    .telemetry-stream {
        display: none;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .nav-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-link {
        font-size: 11px;
    }

    .nav-list-ext {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        border-left: none;
        padding-left: 0;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* ── Main content — full width ── */

    .col-main {
        padding: 20px;
        order: 0;
        flex: 1;
    }

    .status-ok-block {
        position: static;
        transform: none;
        margin-bottom: 20px;
        display: inline-flex;
    }

    .status-ok-block span {
        font-size: 32px;
    }

    .bg-coords {
        position: static;
        text-align: left;
        margin-top: 40px;
    }

    /* ── Blue bar — horizontal ── */

    .col-blue {
        order: 1;
        writing-mode: horizontal-tb;
        transform: none;
        flex-direction: row;
        padding: 10px 20px;
        min-height: auto;
    }

    .blue-text {
        flex-direction: row;
        flex-wrap: wrap;
        font-size: 10px;
        gap: 10px;
    }

    /* ── Content adjustments ── */

    .skills-matrix {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .log-header {
        flex-direction: column;
        gap: 4px;
    }

    .operative-id {
        font-size: 14px;
    }

    .content-text {
        text-align: left;
    }
}

/* ═══════════════════════════════════════════════
   MONOCHROME MODE
   ═══════════════════════════════════════════════ */

body.monochrome {
    --acid-green: #d0d0d0;
    --elec-blue: #707070;
    --text-white: #e8e8e8;
    --text-dim: rgba(200, 200, 200, 0.4);
    --border-thin: 1px solid var(--text-dim);
    --border-blue: 1px solid var(--elec-blue);
}

body.monochrome .col-green {
    background-color: #d0d0d0;
}

body.monochrome .col-blue {
    background-color: #707070;
}

body.monochrome .tag {
    background: #707070;
}

body.monochrome .scanlines {
    opacity: 0.3;
}

/* ── Mode Toggle Button ── */

.mode-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: transparent;
    border: none;
    color: var(--acid-green);
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.mode-toggle:hover {
    opacity: 1;
}

.mode-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.mode-icon--mono {
    display: none;
}

body.monochrome .mode-icon--color {
    display: none;
}

body.monochrome .mode-icon--mono {
    display: block;
}

/* ── Theme Toggle Link ── */

.theme-toggle-link {
    color: var(--elec-blue) !important;
}

.theme-toggle-link:hover {
    background: var(--elec-blue) !important;
    color: var(--text-white) !important;
}

.lang-switcher {
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 0 15px;
    margin-top: -8px;
    margin-bottom: 5px;
    border-bottom: 1px solid var(--text-dim);
    text-transform: uppercase !important;
}

.lang-switcher::before {
    content: '[ ';
    color: var(--elec-blue);
    margin-right: 8px;
    opacity: 0.5;
}

.lang-switcher::after {
    content: ' ]';
    color: var(--elec-blue);
    margin-left: 8px;
    opacity: 0.5;
}

.lang-opt {
    color: var(--text-dim);
    text-decoration: none;
    padding: 2px 4px;
    transition: color 0.15s;
    text-transform: uppercase !important;
}

.lang-opt:hover {
    color: var(--text-white);
}

.lang-opt.active {
    color: var(--acid-green);
}

@media (max-width: 480px) {

    .skills-matrix {
        grid-template-columns: 1fr;
    }

    .name-monolith {
        font-size: 28px;
    }

    .nav-link {
        font-size: 10px;
    }

    .col-main {
        padding: 15px;
    }
}
