@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&family=Press+Start+2P&family=Outfit:wght@900&display=swap');

:root {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --accent-color: #ff3366;
    --accent-secondary: #00dbde;
    --terminal-green: #00ff41;
    --crt-overlay: rgba(18, 16, 16, 0.1);
    --grid-unit: 8px;
    --transition-fast: 0.1s steps(2);
    --transition-smooth: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
    font-family: 'IBM+Plex+Mono', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
}

/* CRT Scanline Effect */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 9999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* Flicker Animation */
@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.95; }
    10% { opacity: 1; }
    15% { opacity: 0.9; }
    25% { opacity: 0.95; }
    30% { opacity: 1; }
    100% { opacity: 1; }
}

main {
    animation: flicker 0.15s infinite;
    padding-top: 180px;
    position: relative;
    z-index: 10;
}

/* Branding */
.logo-container img {
    height: 40px; 
    filter: brightness(0) invert(1);
    display: block;
}

.circular-stamp {
    width: 60px;
    height: 60px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    pointer-events: none; /* Prevent parallax overlapping from blocking clicks */
}

/* Terminal Layout */
header.fixed-header, header {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    padding: 15px 20px !important;
    border-bottom: 2px solid var(--accent-color) !important;
    position: fixed !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    background: #050505 !important;
    z-index: 99999 !important; /* Topmost */
    height: 70px !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}



nav a {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 2px;
    padding: 5px 10px;
    border: 1px solid transparent;
}

nav a:hover, nav a.active {
    color: var(--bg-color);
    background: var(--text-color);
    border-color: var(--text-color);
}

/* Sidebar & Menu Toggle */
button.menu-toggle {
    display: none !important;
    background: #050505 !important;
    border: 1px solid var(--text-color) !important;
    color: var(--text-color) !important;
    padding: 10px 15px !important;
    font-family: 'Press Start 2P', cursive !important;
    font-size: 10px !important;
    cursor: pointer !important;
    z-index: 100000 !important;
    position: relative !important;
    pointer-events: auto !important;
}



.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(15px);
    border-left: 2px solid var(--accent-color);
    padding: 100px 40px;
    z-index: 1500;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar.open {
    right: 0;
    box-shadow: -20px 0 50px rgba(0,0,0,0.8);
}

.sidebar nav ul {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar nav a {
    font-size: 18px;
    display: block;
    width: 100%;
    text-align: right;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1400;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mosaic of Vibes */
.mosaic-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 100px;
    gap: 15px;
    padding: 100px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
    pointer-events: auto; /* Ensure items themselves remain clickable */
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(120%);
    transition: var(--transition-smooth);
    opacity: 0.7;
}

.mosaic-item:hover {
    transform: scale(1.02);
    z-index: 20;
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(255, 51, 102, 0.2);
}

.mosaic-item:hover img {
    filter: grayscale(0%) contrast(100%);
    opacity: 1;
}

/* Custom Grids for Mosaic */
.m-large { grid-column: span 6; grid-row: span 4; }
.m-tall { grid-column: span 3; grid-row: span 5; }
.m-wide { grid-column: span 6; grid-row: span 2; }
.m-square { grid-column: span 3; grid-row: span 3; }
.m-small { grid-column: span 3; grid-row: span 2; }

/* Interactive Buttons as Mosaic Items */
.vibe-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background: var(--text-color);
    color: var(--bg-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    line-height: 1.8;
    text-decoration: none;
}

.vibe-btn:hover {
    background: var(--accent-color);
    color: white;
}

/* Typography Overrides */
h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
}

.pixel-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    color: var(--accent-secondary);
}

/* Asset-less Aesthetic: Static & Glitch */
.static-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-radial-gradient(#222 0 0.0001%, #050505 0 0.0002%) 50% 0/2500px 2500px,
        repeating-conic-gradient(#222 0 0.0001%, #050505 0 0.0002%) 60% 50%/2500px 2500px;
    background-blend-mode: difference;
    animation: static-shift 0.2s infinite alternate;
    opacity: 0.15;
    pointer-events: none;
}

@keyframes static-shift {
    100% { background-position: 50% 0, 60% 50.1%; }
}

.glitch-block {
    position: relative;
    width: 100%;
    height: 100%;
    background: #111;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glitch-block::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 2px;
    background: var(--accent-secondary);
    top: 20%;
    left: -25%;
    opacity: 0.3;
    animation: scanline-float 4s linear infinite;
}

@keyframes scanline-float {
    0% { top: -10%; }
    100% { top: 110%; }
}

.glitch-shape {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-color);
    position: relative;
    animation: shape-glitch 2s infinite;
}

@keyframes shape-glitch {
    0%, 100% { transform: skew(0deg); opacity: 0.8; }
    20% { transform: skew(10deg); opacity: 1; border-color: var(--accent-secondary); }
    21% { transform: skew(-30deg); opacity: 0.5; }
    22% { transform: skew(0deg); }
}

#visualizer-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
}

@media (max-width: 900px) {
    .mosaic-container {
        grid-template-columns: repeat(6, 1fr);
    }
    .m-large { grid-column: span 6; }
}

@media (max-width: 768px) {
    header {
        padding: 10px 20px;
    }
    header nav ul { 
        display: none !important; 
    }
    button.menu-toggle {
        display: block !important;
        visibility: visible !important;
    }
}
