@import url('boot.css');
/* --- SUPERVANDAL - RETRO GAMING TERMINAL UI --- */

/* IBM Plex Mono imported in HTML */

:root {
    /* Fun Acid Palette - MODERNIZED */
    --color-bg: #121212;
    --color-bg-secondary: #1e1e1e;
    --color-text-main: #f0f0f0;
    --color-text-dim: #a0a0a0;

    --color-accent-yellow: #f5d742;
    /* Warmer Yellow */
    --color-accent-rgb: 245, 215, 66;
    /* Base RGB for shadows */
    --color-accent-secondary: #f5d742;
    /* FIXED: Matches Yellow by default for consistent init */

    --color-link: #f5d742;

    --border-color: #444;
    --border-thick: 2px;
    /* REVERTED TO 2px */

    --font-main: 'IBM Plex Mono', 'Courier New', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    background-color: #d0d0d0;
    /* Even lighter background with dots */
    color: var(--color-text-main);
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    overflow-y: auto;
    background:
        radial-gradient(circle, #a8a8a8 1px, transparent 1px),
        #d0d0d0;
    background-size: 16px 16px;
    /* Subtle dot pattern */
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- FRAME --- */
.crt-frame {
    width: 95vw;
    max-width: 1400px;
    height: 92vh;
    min-height: 750px;
    margin: auto;

    /* Even darker for max contrast against lighter body */

    display: flex;
    flex-direction: column;
    position: relative;
    background: #111;
    /* FIXED: Restored Background to prevent transparency */
    border: var(--border-thick) solid var(--border-color);
    /* UNIFIED GREY BORDER */
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(var(--color-accent-rgb), 0.1),
        inset 0 -1px 0 rgba(var(--color-accent-rgb), 0.08);
    /* Yellow inner glow kept for depth */

    /* PADDING REMOVED - Applied to Grid instead */

    /* FORCE NO BLUR OR TRANSITION */
    filter: none !important;
    backdrop-filter: none !important;
    transition: none !important;
    animation: none !important;
}

/* Subtle CRT overlay on entire frame */
.crt-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.03),
            rgba(0, 0, 0, 0.03) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 999;
    opacity: 0.3;
}

/* --- HEADER --- */
.top-header {
    height: 44px;
    background: #333333;
    /* LIGHTER ANTHRACITE - More distinct from background */
    border-bottom: 1px solid var(--border-color);
    /* Standard grey border */
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px 0 15px;
    /* FIXED: 8px Right padding to match button gap */
    color: #888;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sys-id {
    font-size: 14px;
    letter-spacing: 0.1em;
    color: #ffffff;
    /* FIXED: White */
    font-weight: bold;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
    padding: 4px 10px;
    transition: 0.15s ease;
    border-radius: 2px;
    pointer-events: auto;
}

.lang-btn:hover {
    background: var(--color-accent-yellow);
    color: var(--color-bg);
    border-color: var(--color-accent-yellow);
}

.win-controls {
    display: flex;
    gap: 8px;
    /* FIXED: 8px to match margins */
    align-items: center;
    margin-left: 15px;
    pointer-events: auto;
}

.win-btn {
    width: 28px;
    /* FIXED: 28px size */
    height: 28px;
    background: #333;
    /* Dark Theme adaptation of Win 3.1 Grey */
    border-top: 2px solid #777;
    /* Highlight */
    border-left: 2px solid #777;
    border-right: 2px solid #000;
    /* Shadow */
    border-bottom: 2px solid #000;
    color: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    /* Larger text */
    font-weight: bold;
    font-family: sans-serif;
    cursor: default;
    /* "Rien ne se passe" but clickable feel */
    line-height: 1;
    user-select: none;
}

.win-btn:active {
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    border-right: 2px solid #777;
    border-bottom: 2px solid #777;
    padding-top: 2px;
    /* Visual shift for text */
    padding-left: 2px;
}

/* --- NAV --- */
/* --- NAV - TABBED UI --- */

.nav-row {
    padding: 8px 20px 1px 20px;
    /* Reduced top, added 1px bottom for underline visibility */
    display: flex;
    justify-content: center;
    /* FIXED: Centered on Desktop */
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, #0f0f0f 0%, #121212 100%);
    flex-shrink: 0;
    overflow-x: auto;
    /* Allow horizontal scrolling */
    overflow-y: hidden;
    /* Prevent vertical scroll */
    flex-wrap: nowrap;
    /* Single line */
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for Chrome/Safari/Opera */
.nav-row::-webkit-scrollbar {
    display: none;
}

.nav-item {
    cursor: pointer;
    color: #888;
    font-size: 15px;
    /* Increased from 13px */
    letter-spacing: 0.05em;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    transition: 0.15s ease;
    background: rgba(255, 255, 255, 0.02);
    font-weight: 500;
    /* Medium base weight */
    margin-bottom: -1px;
    white-space: nowrap;
    pointer-events: auto;
}

.nav-item:hover {
    color: var(--color-text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--color-accent-secondary);
    /* FIXED: Active tab in Pink/Magenta */
    background: linear-gradient(180deg, #141414 0%, #121212 100%);
    /* Active tab depth */
    border-color: var(--border-color);
    border-top-color: rgba(var(--color-accent-rgb), 0.6);
    /* Dynamic Accent Top */
    /* Subtle yellow accent top */
    border-bottom-color: var(--color-bg);
    z-index: 2;
    text-shadow: 0 0 5px rgba(var(--color-accent-rgb), 0.3);
    /* Subtle dynamic glow */
    font-weight: bold;
    /* FIXED: Bold when active */
}

/* --- MARQUEE --- */
.marquee-row {
    height: 36px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(90deg, #0d0d0d 0%, #121212 50%, #0d0d0d 100%);
    /* Subtle horizontal gradient */
    overflow: hidden;
    position: relative;
    color: var(--color-text-dim);
    font-size: 12px;
    flex-shrink: 0;
}

.marquee-inner {
    position: absolute;
    white-space: nowrap;
    line-height: 32px;
    animation: scroll 35s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* --- GRID --- */
.term-grid {
    flex: 1;
    display: flex;
    gap: 20px;
    /* FIXED: Gap between Main and Sidebar */
    min-height: 0;
    padding: 0;
    padding-right: 20px;
    /* Space on right edge */
}

/* MAIN DISPLAY */
.main-display {
    flex: 1;
    position: relative;
    z-index: 1;
    background: linear-gradient(160deg, #161616 0%, #1c1a14 50%, #121212 100%);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    /* Custom Scrollbar space */

    padding-right: 2px;
    /* Custom Scrollbar space */

    border-right: var(--border-thick) solid var(--border-color);
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.main-display::-webkit-scrollbar {
    display: none;
}

.centered-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: var(--color-text-main);
}

/* Merged ASCII styling */
.ascii-merged {
    font-size: 12px;
    line-height: 1.2;
    white-space: pre;
    color: var(--color-accent-yellow);
    text-shadow: 0 0 2px rgba(var(--color-accent-rgb), 0.2);
    /* Reduced glow - 60% less */
    margin-bottom: 40px;
    font-family: var(--font-main);
    font-weight: 700;
}

.centered-box p {
    font-size: 13px;
    color: var(--color-text-dim);
    max-width: 750px;
    line-height: 1.8;
}

/* CONTENT with line-by-line reveal */
.content-box {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
    /* Fills main display and handles scrolling */
    scroll-behavior: smooth;
    height: 100%;
}

/* Hide scrollbar visually but keep functionality */
.content-box::-webkit-scrollbar,
.side-list::-webkit-scrollbar,
.tags-list::-webkit-scrollbar {
    width: 4px;
}

.content-box::-webkit-scrollbar-thumb,
.side-list::-webkit-scrollbar-thumb,
.tags-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.content-box::-webkit-scrollbar-thumb:hover,
.side-list::-webkit-scrollbar-thumb:hover,
.tags-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.content-box::-webkit-scrollbar-track,
.side-list::-webkit-scrollbar-track,
.tags-list::-webkit-scrollbar-track {
    background: transparent;
}

.detail-title {
    font-size: 24px;
    color: var(--color-accent-yellow);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    text-shadow: 0 0 5px rgba(204, 255, 0, 0.4);
}

.detail-meta {
    font-size: 12px;
    color: var(--color-text-dim);
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.detail-desc {
    font-size: 14px;
    /* SMALLER TEXT */
    line-height: 1.6;
    color: #bbbbbb;
    /* DARKER/GRAYER TEXT */
    margin-bottom: 30px;
    max-width: 900px;
}

.box-header {
    background: transparent;
    color: var(--color-accent-secondary);
    /* CYAN for Headers */
    padding: 15px 20px;
    font-size: 13px;
    /* Smaller, sharper */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    /* Tracked out */
    border-bottom: none;
    /* Clean */
    margin-bottom: 10px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--color-accent-yellow);
    color: var(--color-accent-yellow);
    font-size: 10px;
    cursor: pointer;
    background: transparent;
    font-family: inherit;
    margin-right: 14px;
    margin-bottom: 10px;
    transition: 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: auto;
}

.btn:hover {
    background: var(--color-accent-yellow);
    background: linear-gradient(135deg, var(--color-accent-yellow) 0%, #ffdd33 100%);
    /* Vibrant gradient */
    color: var(--color-bg);
    box-shadow: 0 0 15px rgba(var(--color-accent-rgb), 0.4);
    /* Subtle glow */
}

.btn.secondary {
    border-color: var(--color-text-dim);
    color: var(--color-text-dim);
}

.btn.secondary:hover {
    background: var(--color-text-dim);
    color: var(--color-bg);
}

/* SIDEBAR WRAPPER (Transparent) */
.sidebar {
    width: 25%;
    min-width: 250px;
    max-width: 400px;
    background: transparent;
    /* No background wrapper */
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    padding-top: 64px;
    /* Move Projects down */
    /* Align with Nav Bar */
    border: none;
    box-shadow: none;
    gap: 10px;
    /* Pull Skills up */
    /* Gap between boxes */
}

/* FLOATING WINDOW BOXES */
.side-box {
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    /* Restored border */
    background: #111;
    /* Solid background */
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    /* Depth */
}

.side-box:last-child {
    border-bottom: none;
}

/* RESTORED YELLOW HEADER */
.box-header {
    background: var(--color-accent-yellow);
    background: linear-gradient(90deg, var(--color-accent-yellow) 0%, #ffdd33 100%);
    color: #000;
    /* Reverted to Black on Yellow */
    padding: 12px 20px;
    /* Reduced back to smaller size */
    /* Increased height significantly (1.5x visual) */
    /* Slight increase */
    font-size: 14px;
    /* Increased */
    font-weight: 800;
    /* Extra Bold */
    border-bottom: var(--border-thick) solid var(--border-color);
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(var(--color-accent-rgb), 0.2);
    text-align: center;
    /* FIXED: Centered */
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.side-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
    /* Allow scrolling if list is too long */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.side-list::-webkit-scrollbar {
    display: none;
}

.side-list li {
    padding: 16px 20px;
    /* Increased padding ("aérer") */
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    color: var(--color-text-dim);
    font-size: 13px;
    transition: 0.1s ease;
    pointer-events: auto;
}

.side-list li:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-main);
}

.side-list li.active {
    /* Use box-shadow to prevent layout shift instead of border-left */
    box-shadow: inset 7px 0 0 0 var(--color-accent-yellow);
    /* EVEN THICKER indicator */
    color: var(--color-accent-yellow);
    background: rgba(var(--color-accent-rgb), 0.08);
    /* Adjusted to use RGB var */
}

/* SKILLS CLICKABLE */
.tags-list li {
    font-size: 11px;
    padding: 14px 20px;
    /* Increased padding */
    color: #888;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    pointer-events: auto;
}

.tags-list li a:hover {
    color: var(--color-accent-yellow);
}

/* FOOTER */
.footer-bar {
    border-top: var(--border-thick) solid var(--border-color);
    padding: 0 20px;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    font-size: 11px;
    line-height: 28px;
    color: var(--color-text-dim);
    display: flex;
    justify-content: space-between;
    flex: 0 0 auto;
    align-items: center;
    background: linear-gradient(90deg, #161313 0%, #1c1818 50%, #161313 100%);
    /* Subtle horizontal gradient */
    z-index: 10;
    letter-spacing: 0.04em;
    overflow: hidden;
}

/* SCANLINES - ENHANCED */
.scanlines {
    position: absolute;
    /* Restricted to frame */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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;
    /* Horizontal scan lines */
    pointer-events: none;
    z-index: 99;
    opacity: 0.6;
    /* More visible */
    mix-blend-mode: overlay;
}

/* Add a second scanline layer for better texture if needed, or keep simple */
.crt-frame::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 998;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% {
        opacity: 0.015;
    }

    5% {
        opacity: 0.02;
    }

    10% {
        opacity: 0.015;
    }

    15% {
        opacity: 0.025;
    }

    20% {
        opacity: 0.015;
    }

    100% {
        opacity: 0.015;
    }
}

/* LINE-BY-LINE REVEAL ANIMATION */
@keyframes lineReveal {
    from {
        opacity: 0;
        transform: translateX(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.line-reveal {
    opacity: 0;
    animation: lineReveal 0.15s ease-out forwards;
}

/* --- SCROLLABLE NAVIGATION STYLES --- */

/* Projects scroll container */
.projects-scroll-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

/* Category header (ASCII + intro) */
.category-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px 40px 40px;
    color: var(--color-text-main);
}

.category-header .ascii-title {
    font-size: 12px;
    line-height: 1.2;
    white-space: pre;
    color: var(--color-accent-yellow);
    text-shadow: 0 0 2px rgba(var(--color-accent-rgb), 0.2);
    /* Reduced glow - 60% less */
    margin-bottom: 40px;
    font-family: var(--font-main);
    font-weight: 700;
}

.category-header .category-intro {
    font-size: 13px;
    color: var(--color-text-dim);
    max-width: 750px;
    line-height: 1.8;
    margin: 0;
}

/* Project section */
.project-section {
    position: relative;
    scroll-margin-top: 20px;
    /* For smooth scroll targeting */
}

/* Project separator - SUBTLE DITHERED STYLE */
.project-separator {
    text-align: center;
    margin: 50px auto 40px auto;
    color: var(--color-accent-secondary);
    /* Vivid Magenta */
    font-size: 14px;
    letter-spacing: 1px;
    opacity: 0.85;
    text-shadow: 0 0 3px rgba(var(--color-accent-rgb), 0.3);
    /* Reduced glow - 60% less */
    max-width: 95%;
    overflow: hidden;
}

.project-separator::before {
    content: none;
}

.project-section:first-child .project-separator {
    display: none;
    /* No separator before first project */
}

/* Project content */
.project-content {
    padding: 0 28px 28px 28px;
}

/* Subtle pulse for active project */
.project-section.in-view .project-content {
    animation: fadeIn 0.3s ease-in-out;
    scrollbar-width: none;
    /* Firefox */
}

.content-box::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Edge */
}

@keyframes projectPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.96;
    }
}

/* UTILS */
.hidden {
    display: none !important;
}

/* RETRO TURN-ON REMOVED FOR CLARITY */

/* .crt-frame { animation: turnOn ... } */
.crt-frame {
    opacity: 1;
    /* Instant visibility after boot */
    transform: none;
}

/* RESPONSIVE */
@media (max-width: 1150px) {

    /* Intermediate size: Reduce nav size to prevent clipping */
    .nav-row {
        justify-content: flex-start;
        /* Align start to allow scroll without clipping left */
        padding: 5px 10px 0 10px;
        gap: 2px;
    }

    .nav-item {
        font-size: 13px;
        /* Smaller text */
        padding: 10px 14px;
        /* Smaller padding */
    }

    .sidebar {
        min-width: 220px;
        /* Shrink sidebar slightly */
        max-width: 260px;
    }
}

@media (max-width: 800px) {
    body {
        /* Allow natural scroll on mobile */
        overscroll-behavior-y: auto;
        background: #000;
        /* Ensure background matches */
    }

    .crt-frame {
        width: 100%;
        height: auto;
        min-height: 100vh;
        /* Fill at least the screen */
        max-width: none;
        border: none;
        box-shadow: none;
        margin: 0;
        display: block;
        /* Break flex container behavior */
        overflow: visible !important;
        /* FIXED: Ensure Sticky works */
        transform: none !important;
    }

    /* --- HEADER --- */
    /* --- HEADER --- */
    .top-header {
        position: relative;
        /* SCROLL ALLOWED - Not sticky anymore */
        padding: 0 10px;
        height: 50px;
        /* Taller for touch */
        background: #1a1a1a;
        /* Solid background for sticky */
    }

    .sys-id {
        font-size: 11px;
        max-width: 60%;
    }

    .win-controls {
        display: none;
    }

    /* --- MARQUEE --- */
    .marquee-row {
        position: relative;
        z-index: 90;
    }

    /* --- LAYOUT --- */
    .term-grid {
        display: flex;
        flex-direction: column;
        height: auto;
        /* Let it grow */
        overflow: visible;
        padding-right: 0;
        /* REMOVE MARGIN ON MOBILE */
    }

    /* ASCII SCALING FIX */
    .ascii-merged,
    .ascii-logo,
    .category-header .ascii-title {
        font-size: 6px !important;
        /* 50% SMALLER */
        line-height: 1.1;
        max-width: 100%;
        overflow: hidden;
        white-space: pre;
    }

    .main-display {
        flex: none;
        /* Don't try to fill space, just exist */
        height: auto;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        display: block;
        /* Standard block layout */
        overflow: visible;
    }

    /* --- NAV --- */
    .nav-row {
        position: -webkit-sticky;
        /* iOS Safari support */
        position: sticky;
        top: 0;
        z-index: 1000;
        /* Ensure on top */
        background: #080808;
        padding: 0;
        gap: 0;
        justify-content: flex-start;
        border-bottom: 1px solid #333;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    .nav-row::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari/Edge */
    }



    .nav-item {
        flex: 0 1 auto;
        /* Allow shrinking */
        font-size: 13px;
        padding: 10px 12px;
        /* Reduced padding */
        background: #111;
        border: 1px solid #333;
        border-bottom: none;
        margin-right: -1px;
        /* Overlap borders */
        min-width: fit-content;
    }

    .nav-item.active {
        background: #222;
        color: var(--color-accent-yellow);
        border-bottom: 3px solid var(--color-accent-yellow);
    }

    /* --- CONTENT --- */
    #screen-idle {
        display: flex !important;
        /* Restore visibility so users see the intro */
        min-height: auto;
        /* Allow it to be short */
        padding: 40px 0;
    }

    .centered-box {
        padding: 10px;
        /* Reduce padding */
        min-height: 0;
    }

    .ascii-logo {
        font-size: 8px;
        /* Much smaller, fixed monospace size */
        white-space: pre-wrap;
        /* Allow wrapping if desperate */
        overflow-x: hidden;
        margin: 10px 0;
    }

    .ascii-merged {
        display: none !important;
    }

    #ascii-cat-art {
        /* The specific category art */
        font-size: 6px !important;
        /* Force small */
        line-height: 8px;
        overflow-x: hidden;
    }

    .content-box {
        padding: 15px;
        height: auto;
        /* Grow with content */
        overflow: visible;
    }

    .detail-title {
        font-size: 18px;
        margin-top: 10px;
        word-wrap: break-word;
    }

    .detail-desc {
        font-size: 14px;
        line-height: 1.5;
    }

    /* --- SIDEBAR --- */
    .sidebar {
        width: 100%;
        max-width: none;
        border-left: none;
        flex: none;
        height: auto;
        padding: 0;
        background: #111;
    }

    .side-box {
        border-right: none;
        border-bottom: 1px solid #333;
        flex: none;
        /* Don't expand */
        height: auto;
        max-height: 300px;
        /* Limit scrolling per box */
    }

    .box-header {
        position: sticky;
        top: 0;
        z-index: 10;
        padding: 10px;
    }

    .side-list {
        max-height: 250px;
    }

    /* Footer at normal bottom of page */
    .footer-bar {
        position: relative;
        width: 100%;
        background: #000;
    }

    /* Reduce modern effects on mobile for performance */
    #particles-canvas {
        opacity: 0.08;
    }

    .side-box:hover {
        transform: none;
    }

    .nav-item:hover {
        transform: translateY(-2px) scale(1.02);
    }
}

/* ====================================
   MODERN ENHANCEMENTS - NO NEON
==================================== */

/* --- SIMPLE GLASSMORPHISM (No Transform) --- */
.side-box {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
}

.side-box:hover {
    background: rgba(35, 35, 35, 0.65);
}

.main-display {
    background: #121212;
    /* Solid background instead of blur effect */
}

/* --- NO COLORED SHADOWS --- */

/* --- SPRING ANIMATIONS (Smooth Bounce) --- */
/* --- TERMINAL REVEAL ANIMATION (Opacity only) --- */
@keyframes terminalReveal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.content-box>* {
    animation: terminalReveal 0.2s ease-out forwards;
}

/* --- MINIMAL HOVER STATES --- */
.nav-item {
    transition: color 0.15s ease, background 0.15s ease;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--color-accent-yellow);
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.nav-item:hover::after {
    width: 70%;
}

.side-list li {
    transition: all 0.15s ease;
    position: relative;
}

.side-list li:hover {
    background: rgba(255, 255, 255, 0.04);
}

.btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--color-accent-yellow);
    color: var(--color-bg);
}



/* --- SCREEN BULGE REMOVED FOR CLICKABILITY --- */
/* .crt-frame { transform-style: preserve-3d; perspective: 1000px; } */
/* .crt-frame>*:not(.scanlines) { transform: perspective(1000px) rotateY(0deg) rotateX(0deg); } */

/* Subtle barrel distortion */
/* REMOVED: Distortion filter kills mouse events in Firefox
@supports (filter: url()) {
    .main-display {
        filter: url('#crt-distortion');
    }
} 
*/

/* --- SUBTLE ASCII GLOW (REDUCED) --- */
.ascii-logo,
.ascii-merged {
    /* filter: drop-shadow(0 0 4px rgba(255, 225, 0, 0.4));  REMOVED BLUR */
    text-shadow: 0 0 2px rgba(255, 225, 0, 0.2);
    /* Sharper shadow */
}

/* --- PARALLAX BACKGROUND --- */
@keyframes parallaxShift {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 100%;
    }
}



/* --- CASCADE ANIMATIONS FOR SIDEBAR --- */
@keyframes cascadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.side-list li {
    opacity: 0;
    animation: cascadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.side-list li:nth-child(1) {
    animation-delay: 0.05s;
}

.side-list li:nth-child(2) {
    animation-delay: 0.1s;
}

.side-list li:nth-child(3) {
    animation-delay: 0.15s;
}

.side-list li:nth-child(4) {
    animation-delay: 0.2s;
}

.side-list li:nth-child(5) {
    animation-delay: 0.25s;
}

.side-list li:nth-child(6) {
    animation-delay: 0.3s;
}

.side-list li:nth-child(7) {
    animation-delay: 0.35s;
}

.side-list li:nth-child(8) {
    animation-delay: 0.4s;
}

.side-list li:nth-child(9) {
    animation-delay: 0.45s;
}

.side-list li:nth-child(10) {
    animation-delay: 0.5s;
}

/* --- RIPPLE EFFECT SETUP --- */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 225, 0, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* --- PARTICLES REMOVED --- */

/* --- SMOOTH SCROLLING --- */
html {
    scroll-behavior: smooth;
}

.content-box,
.side-list {
    scroll-behavior: smooth;
}

/* --- ENHANCED TYPOGRAPHY --- */
.detail-title,
.box-header,
.nav-item {
    font-variation-settings: 'wght' 600;
    transition: font-variation-settings 0.3s;
}

.detail-title:hover,
.nav-item.active {
    font-variation-settings: 'wght' 700;
}

/* --- LOADING/BOOT SEQUENCE --- */
@keyframes bootSequence {
    0% {
        opacity: 0;
        filter: blur(10px);
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
        filter: blur(0);
    }
}

.crt-frame {
    animation: bootSequence 1.5s ease-out;
}

/* --- SIMPLE MICRO-INTERACTIONS --- */
.lang-btn {
    transition: all 0.15s ease;
}

.lang-btn:hover {
    background: var(--color-accent-yellow);
    color: var(--color-bg);
}

.win-controls {
    transition: all 0.15s ease;
}

.win-controls:hover {
    color: var(--color-accent-yellow);
}

/* --- IMPROVED FOCUS STATES --- */
.nav-item:focus,
.btn:focus,
.lang-btn:focus {
    outline: 2px solid rgba(255, 225, 0, 0.5);
    outline-offset: 3px;
}

/* --- ENHANCED SCROLLBAR --- */
.content-box::-webkit-scrollbar-thumb,
.side-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
            rgba(255, 225, 0, 0.3) 0%,
            rgba(255, 225, 0, 0.15) 100%);
    box-shadow: inset 0 0 6px rgba(255, 225, 0, 0.4);
}

/* --- SUBTLE FRAME SHADOW --- */
.crt-frame {
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

/* --- INTERACTIVE FOOTER --- */
.footer-bar span {
    transition: all 0.2s ease;
}

.footer-bar span:hover {
    color: var(--color-accent-yellow);
    transform: scale(1.05);
    text-shadow: 0 0 8px rgba(255, 225, 0, 0.5);
}

/* --- SIMPLE IMAGES --- */
iframe.yt-embed,
img {
    transition: opacity 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

iframe.yt-embed:hover,
img:hover {
    opacity: 0.95;
}

/* --- PROJECT DETAILS & MEDIA FIXES --- */

.detail-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-accent-yellow);
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--border-color);
    letter-spacing: 1px;
    /* Retro Scanline Text Effect */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.2) 50%);
    background-size: 100% 4px;
    line-height: 1.2;
}

.yt-embed {
    width: 100%;
    aspect-ratio: 16/9;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    display: block;
    position: relative;
    z-index: 2000;
    /* FIXED: Must be > 999 (Overlay) */
    pointer-events: auto;
}

/* GLOBAL OVERLAY FLUSH */
.scanlines,
.crt-frame::before,
.crt-frame::after {
    pointer-events: none !important;
}

.project-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    display: block;
    object-fit: containment;
    /* Ensure image isn't cropped weirdly but covers area if needed */
}