/* ============================================================
   Sheedan Hyman Portfolio — Arcade Cabinet Theme (GSAP)
   ============================================================ */

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
    /* Cabinet */
    --cab-dark: #0c0c18;
    --cab-body: #1a1a2e;
    --cab-edge: #252545;
    --cab-bezel: #10101e;

    /* CRT Screen */
    --screen-bg: #050510;
    --screen-glow: rgba(0, 229, 255, 0.06);

    /* Neon accents */
    --neon-green: #00ff88;
    --neon-pink: #ff2d95;
    --neon-cyan: #00e5ff;
    --neon-yellow: #ffe600;
    --accent: #7c3aed;
    --accent-light: #a78bfa;
    --accent-glow: rgba(124, 58, 237, 0.5);

    /* Text */
    --text-primary: #e8e6f0;
    --text-secondary: #9d9bb0;
    --text-muted: #5a5872;

    /* Surfaces */
    --surface: #1e1e2e;
    --border: #2a2a3e;
    --danger: #ef4444;
    --success: #22c55e;

    /* Typography */
    --font-pixel: 'Press Start 2P', monospace;
    --font-mono: 'Share Tech Mono', 'Courier New', monospace;

    /* Layout */
    --radius: 6px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
}

/* ─── Reset & Base ───────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--cab-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--neon-cyan);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* ─── ARCADE CABINET ─────────────────────────────────────── */
.arcade-cabinet {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--cab-body);
    position: relative;
    overflow: hidden;
}

/* ── Cabinet decorative bolts ─────────────────────────────── */
.arcade-cabinet::before,
.arcade-cabinet::after {
    content: '●';
    position: fixed;
    font-size: 8px;
    color: #3a3a5e;
    z-index: 999;
    pointer-events: none;
}

.arcade-cabinet::before {
    top: 8px;
    left: 8px;
}

.arcade-cabinet::after {
    top: 8px;
    right: 8px;
}

/* ═══════════════════════════════════════════════════════════
   MARQUEE — Illuminated header
   ═══════════════════════════════════════════════════════════ */
.cabinet-marquee {
    flex-shrink: 0;
    background: linear-gradient(180deg, #1c1040 0%, #0e0e28 100%);
    border-bottom: 3px solid var(--accent);
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
    box-shadow:
        0 4px 30px rgba(124, 58, 237, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.marquee-inner {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.marquee-title {
    font-family: var(--font-pixel);
    font-size: clamp(0.7rem, 2.5vw, 1.2rem);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-primary);
    text-shadow:
        0 0 10px var(--accent),
        0 0 30px var(--accent-glow),
        0 0 60px rgba(124, 58, 237, 0.2);
    position: relative;
    white-space: nowrap;
}

.marquee-sub {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-green);
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.lang-switch {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-secondary);
    transition: all var(--transition);
    text-decoration: none;
}

.lang-switch:hover {
    border-color: var(--accent);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════
   CRT SCREEN — Main viewport
   ═══════════════════════════════════════════════════════════ */
.cabinet-screen {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--screen-bg);
    border: 2px solid #1a1a35;
    margin: 0 4px;
    border-radius: 8px 8px 0 0;
    box-shadow:
        inset 0 0 80px rgba(124, 58, 237, 0.05),
        inset 0 0 200px rgba(0, 0, 0, 0.4);
}

/* CRT curvature vignette */
.crt-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.6) 100%);
}

/* Scanlines */
.scanline-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.06) 2px,
            rgba(0, 0, 0, 0.06) 4px);
    opacity: 0.8;
}

/* Stars canvas */
.screen-stars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════
   SCREENS — Swappable content panels
   ═══════════════════════════════════════════════════════════ */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem 1.5rem;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.screen-content {
    max-width: 700px;
    width: 100%;
    text-align: center;
}

#projects {
    align-items: flex-start;
    padding-top: clamp(0.75rem, 3vh, 1.5rem);
}

#projects .screen-content {
    max-width: 760px;
}

#projects .section-title {
    font-size: clamp(0.85rem, 2.4vw, 1.3rem);
    margin-bottom: 1rem;
}

/* ── Hero Screen ─────────────────────────────────────────── */
.hero-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.15rem;
}

.hero-badge {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-green);
    letter-spacing: 2px;
    line-height: 1.7;
    max-width: min(100%, 34rem);
    margin-bottom: 0.4rem;
    overflow-wrap: anywhere;
}

.hero-name {
    font-family: var(--font-pixel);
    font-size: clamp(1.5rem, 6vw, 3rem);
    letter-spacing: 3px;
    line-height: 1.3;
    color: var(--neon-cyan);
    text-shadow:
        0 0 10px rgba(0, 229, 255, 0.8),
        0 0 24px rgba(0, 255, 136, 0.35),
        0 0 36px rgba(255, 45, 149, 0.25);
}

.hero-name .char {
    display: inline-block;
    color: var(--char-color, var(--text-primary));
    -webkit-text-fill-color: currentColor;
    text-shadow:
        0 0 8px currentColor,
        0 0 18px rgba(0, 229, 255, 0.35);
}

.hero-name .char:nth-child(4n + 1) {
    --char-color: var(--neon-cyan);
}

.hero-name .char:nth-child(4n + 2) {
    --char-color: var(--neon-green);
}

.hero-name .char:nth-child(4n + 3) {
    --char-color: var(--accent-light);
}

.hero-name .char:nth-child(4n + 4) {
    --char-color: var(--neon-pink);
}

.hero-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 450px;
    margin-top: 0.35rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}

.hero-hint {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 1.5rem;
}

/* ── Section Titles ──────────────────────────────────────── */
.section-kicker {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    color: var(--neon-yellow);
    letter-spacing: 3px;
    border: 1px solid rgba(255, 230, 0, 0.3);
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-pixel);
    font-size: clamp(1rem, 3vw, 1.5rem);
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--neon-cyan));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* ── About Screen ────────────────────────────────────────── */
.about-text {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.skill-chip {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--neon-cyan);
    background: rgba(0, 229, 255, 0.05);
    transition: all var(--transition);
}

.skill-chip:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
    transform: translateY(-2px);
}

/* ── Projects Screen ─────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    text-align: left;
    align-items: start;
}

.project-card {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 0 25px var(--accent-glow);
}

.project-cover {
    aspect-ratio: 1200 / 630;
    min-height: 0;
    overflow: hidden;
    background: rgba(5, 5, 16, 0.95);
    display: block;
    border-bottom: 1px solid var(--border);
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.project-card:hover .project-cover img {
    transform: none;
}

.project-body {
    padding: 1rem;
}

.project-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.project-year {
    font-size: 0.65rem;
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-pixel);
}

.project-tag {
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--surface);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.project-title {
    font-family: var(--font-pixel);
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.project-summary {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.project-title-link {
    color: inherit;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.empty-state {
    color: var(--text-muted);
    padding: 2rem 0;
}

/* ── Arcade Screen ───────────────────────────────────────── */
.arcade-intro {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.arcade-wrapper {
    max-width: 320px;
    margin: 0 auto;
}

.ttt-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-bottom: 1rem;
    background: var(--border);
    padding: 5px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
}

.ttt-cell {
    aspect-ratio: 1;
    background: rgba(26, 26, 46, 0.9);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-pixel);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ttt-cell:hover:not([disabled]) {
    background: var(--surface);
    box-shadow: inset 0 0 10px var(--accent-glow);
}

.ttt-cell[disabled] {
    cursor: not-allowed;
}

.ttt-cell.cell-x {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.ttt-cell.cell-o {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.ttt-cell.cell-win {
    background: rgba(124, 58, 237, 0.2);
    box-shadow: inset 0 0 20px var(--accent-glow);
    transform: scale(1.05);
}

.ttt-status {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: var(--neon-yellow);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.arcade-controls-game {
    text-align: center;
}

.arcade-buttons-game {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* ── Contact Screen ──────────────────────────────────────── */
.contact-intro {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    text-align: center;
    margin-top: 0.5rem;
}

.form-feedback {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    min-height: 1.2em;
}

.feedback-success {
    color: var(--success);
}

.feedback-error {
    color: var(--danger);
}

/* ───── Contact extras — social chips & CV button ───── */
.contact-extras {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.social-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}
.social-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(42,42,72,0.6) 0%, rgba(26,26,48,0.6) 100%);
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.15s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.social-chip:hover {
    color: #fff;
    border-color: var(--primary, #a78bfa);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
    font-size: 0.7rem;
}
.cv-btn {
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   CONTROL PANEL — Bottom navigation
   ═══════════════════════════════════════════════════════════ */
.cabinet-controls {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(0deg, #0e0e22 0%, var(--cab-body) 100%);
    border-top: 2px solid #2a2a4a;
    position: relative;
    z-index: 10;
}

.ctrl-btn {
    font-family: var(--font-pixel);
    font-size: 0.45rem;
    letter-spacing: 1px;
    padding: 0.5rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 50px;
    background: linear-gradient(180deg, #2a2a48 0%, #1a1a30 100%);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 60px;
    position: relative;
    text-transform: uppercase;
    box-shadow:
        0 3px 0 #111,
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.ctrl-icon {
    font-size: 0.8rem;
    line-height: 1;
}

.ctrl-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow:
        0 4px 0 #111,
        0 5px 15px rgba(124, 58, 237, 0.3);
}

.ctrl-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 #111,
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.ctrl-btn.active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: linear-gradient(180deg, #1e2a48 0%, #142040 100%);
    box-shadow:
        0 3px 0 #111,
        0 0 20px rgba(0, 229, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.5rem;
}

.btn-arcade {
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
}

.btn-arcade:hover {
    background: rgba(255, 230, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.3);
}

.btn-glow {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-glow:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    box-shadow: 0 0 25px var(--accent-glow);
}

.btn-outline {
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.btn-outline:hover {
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.btn-jigga {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

.btn-jigga:hover {
    background: rgba(255, 45, 149, 0.1);
    box-shadow: 0 0 15px rgba(255, 45, 149, 0.3);
}

.btn-jigga[aria-pressed="true"] {
    background: var(--neon-pink);
    color: var(--cab-dark);
}

/* ═══════════════════════════════════════════════════════════
   MODAL (preserved from original)
   ═══════════════════════════════════════════════════════════ */
.project-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border: none;
    background: transparent;
    padding: 0;
    z-index: 200;
}

.project-modal::backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-inner {
    background: var(--cab-bezel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 640px;
    max-height: 80vh;
    margin: auto;
    margin-top: 10vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px var(--accent-glow);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-family: var(--font-pixel);
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.btn-modal-close {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all var(--transition);
    font-family: var(--font-mono);
}

.btn-modal-close:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-body h3 {
    font-family: var(--font-pixel);
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.modal-body ul {
    margin-left: 1.2rem;
    margin-bottom: 1rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.modal-loader {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════════════════════════
   CABINET FOOTER
   ═══════════════════════════════════════════════════════════ */
.cabinet-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 0.3rem;
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--cab-dark);
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS & UTILITIES
   ═══════════════════════════════════════════════════════════ */
.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* CRT boot flicker */
.crt-boot .cabinet-screen {
    animation: crtBoot 0.8s steps(4) forwards;
}

@keyframes crtBoot {
    0% {
        opacity: 0;
        filter: brightness(0);
    }

    25% {
        opacity: 0.3;
        filter: brightness(2);
    }

    50% {
        opacity: 0.1;
        filter: brightness(0.5);
    }

    75% {
        opacity: 0.8;
        filter: brightness(1.2);
    }

    100% {
        opacity: 1;
        filter: brightness(1);
    }
}

/* Char animation helper */
.char {
    display: inline-block;
    will-change: transform, opacity;
}

/* Marquee glow pulse */
@keyframes marqueeGlow {

    0%,
    100% {
        text-shadow: 0 0 10px var(--accent), 0 0 30px var(--accent-glow);
    }

    50% {
        text-shadow: 0 0 20px var(--accent), 0 0 50px var(--accent-glow), 0 0 80px rgba(124, 58, 237, 0.15);
    }
}

.marquee-glow .marquee-title {
    animation: marqueeGlow 3s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .cabinet-marquee {
        padding: 0.5rem 1rem;
    }

    .marquee-title {
        font-size: 0.62rem;
        letter-spacing: 2px;
    }

    .marquee-sub {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }

    .cabinet-controls {
        gap: 0.2rem;
        padding: 0.4rem 0.5rem;
        overflow-x: hidden; /* Prevent horizontal scroll as we want it centered and it should fit */
        justify-content: center;
        -webkit-overflow-scrolling: touch;
    }

    .ctrl-btn {
        min-width: 50px;
        padding: 0.4rem 0.5rem;
        font-size: 0.4rem;
    }

    .ctrl-label {
        display: none;
    }

    .ctrl-icon {
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-control {
        font-size: 16px; /* Prevents iOS auto-zoom */
        padding: 0.75rem;
    }

    .screen {
        padding: 1rem 0.75rem;
    }

    .hero-name {
        font-size: clamp(1.2rem, 8vw, 2rem);
    }

    .hero-badge {
        font-size: 0.72rem;
        letter-spacing: 1px;
        margin-bottom: 0.6rem;
    }

    .hero-tagline {
        margin-top: 0.45rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .modal-inner {
        margin-top: 5vh;
        max-height: 90vh;
        width: 95%;
        margin-left: auto;
        margin-right: auto;
    }

    .about-text {
        font-size: 0.85rem;
    }

    .ttt-cell {
        font-size: 1.5rem;
    }
}

@media (max-width: 360px) {
    .marquee-title {
        font-size: 0.54rem;
        letter-spacing: 1px;
    }

    .cabinet-marquee {
        padding: 0.4rem 0.8rem;
    }

}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .char {
        will-change: auto;
    }

    .scanline-overlay {
        display: none;
    }
}

/* ─── Jigga Mode (shake effects) ─────────────────────────── */
.jigga-low {
    animation: jigga-shake-low 0.3s ease-out;
}

.jigga-med {
    animation: jigga-shake-med 0.35s ease-out;
}

.project-detail-body {
    min-height: 100vh;
    display: block;
    overflow: auto;
    background:
        radial-gradient(circle at 20% 10%, rgba(0, 229, 255, 0.08), transparent 28rem),
        radial-gradient(circle at 85% 25%, rgba(0, 255, 136, 0.06), transparent 24rem),
        var(--cab-dark);
}

.project-detail-shell {
    width: min(980px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.project-back-link {
    display: inline-flex;
    margin-bottom: 1.5rem;
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: var(--neon-green);
}

.project-detail {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(16, 16, 30, 0.92);
    padding: clamp(1rem, 4vw, 2rem);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
}

.project-detail-cover {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
}

.project-detail h1 {
    font-family: var(--font-pixel);
    font-size: clamp(1rem, 3vw, 1.7rem);
    line-height: 1.5;
    margin: 1rem 0;
    color: var(--text-primary);
}

.project-detail-summary {
    color: var(--neon-cyan);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.project-detail-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.project-detail-content h2,
.project-detail-content h3 {
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
}

.project-detail-content p,
.project-detail-content ul,
.project-detail-content ol {
    margin-bottom: 1rem;
}

.project-detail-content ul,
.project-detail-content ol {
    padding-left: 1.2rem;
}

.project-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

@keyframes jigga-shake-low {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 1px);
    }

    40% {
        transform: translate(2px, -1px);
    }

    60% {
        transform: translate(-1px, 2px);
    }

    80% {
        transform: translate(1px, -2px);
    }
}

@keyframes jigga-shake-med {

    0%,
    100% {
        transform: translate(0);
    }

    15% {
        transform: translate(-3px, 2px);
    }

    30% {
        transform: translate(3px, -2px);
    }

    45% {
        transform: translate(-2px, 3px);
    }

    60% {
        transform: translate(2px, -1px);
    }

    75% {
        transform: translate(-1px, 2px);
    }
}
