:root {
    --bg: #000000;
    --bg-darker: #020202;
    --text-main: #d0d0d0; /* Muted white so it isn't painfully bright */
    --text-bright: #ffffff;
    --text-muted: #555555;
    --accent: #ff003c; /* Stark NTLAP-style recording red */
    --crt-blue: #00ffff;
    --crt-red: #ff0000;
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none !important; }

html { scroll-behavior: smooth; background-color: var(--bg); }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Roboto Mono', monospace;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ----------------------------------
   CRT / BLURISH DOTISH TV EFFECTS
   ---------------------------------- */
.crt-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 9997; pointer-events: none; mix-blend-mode: overlay;
}
.scanlines {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    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));
    background-size: 100% 4px, 3px 100%;
    z-index: 9998; pointer-events: none; opacity: 0.6;
}
.crt-vignette {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
    z-index: 9999; pointer-events: none;
}

/* Custom Cursor */
.cursor-dot {
    width: 4px; height: 4px; background-color: var(--text-bright);
    position: fixed; border-radius: 50%; z-index: 100000; pointer-events: none;
    transform: translate(-50%, -50%); box-shadow: 0 0 10px var(--text-bright);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Layout */
.content { max-width: 1000px; margin: 0 auto; padding: 2rem; position: relative; z-index: 10; }

header { display: flex; justify-content: space-between; align-items: center; padding: 2rem 0 10vh; }
.logo { font-family: 'Unbounded', sans-serif; font-weight: 900; font-size: 1.2rem; letter-spacing: 2px; color: var(--text-bright); }

.status-indicator { display: flex; align-items: center; gap: 10px; font-size: 0.7rem; color: var(--text-muted); letter-spacing: 2px; }
.recording-dot { width: 8px; height: 8px; background-color: var(--accent); border-radius: 50%; animation: rec-blink 1s infinite; box-shadow: 0 0 8px var(--accent); }
@keyframes rec-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.3; } }

/* Hero */
.hero { min-height: 40vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; position: relative; }
.monolith { 
    font-family: 'Koulen', display; font-size: clamp(6rem, 16vw, 12rem); 
    line-height: 0.8; margin-bottom: 1rem; 
    color: var(--text-bright); position: relative;
    text-shadow: 2px 2px 0px rgba(255,0,0,0.5), -2px -2px 0px rgba(0,255,255,0.5); /* Chromatic aberration */
    z-index: 2;
}
.manifesto { font-family: 'Roboto Mono', monospace; font-size: 1rem; color: var(--text-muted); letter-spacing: 4px; text-transform: uppercase; }

/* Boot Sequence */
#boot-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #000; z-index: 1000000;
    display: flex; align-items: center; justify-content: center;
}
#boot-text {
    color: var(--text-bright); font-size: 2rem; text-align: center; font-family: 'VT323', monospace;
    text-shadow: 2px 0 0 rgba(255,0,0,0.8), -2px 0 0 rgba(0,255,255,0.8);
}
.crt-off { animation: crt-flash 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards; }
@keyframes crt-flash {
    0% { transform: scale(1, 1); opacity: 1; filter: brightness(1); }
    40% { transform: scale(1, 0.005); opacity: 1; filter: brightness(10); background: #fff; }
    100% { transform: scale(0, 0.005); opacity: 0; background: #fff; }
}

/* Glitch Animation */
.glitch-text:hover { animation: skew-glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite; color: var(--accent); }
@keyframes skew-glitch {
    0% { transform: skew(0deg); }
    20% { transform: skew(-10deg); }
    40% { transform: skew(10deg); }
    60% { transform: skew(-5deg); }
    80% { transform: skew(5deg); }
    100% { transform: skew(0deg); }
}

/* Sections */
.informative-section { padding: 6rem 0; border-top: 1px dashed rgba(255,255,255,0.1); }
.section-header { margin-bottom: 3rem; }
.section-header h2 { font-family: 'Unbounded', sans-serif; font-size: 0.9rem; letter-spacing: 4px; color: var(--text-main); font-weight: 300; }
/* Systems Terminal Tabs */
.systems-terminal { 
    border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.4); 
    backdrop-filter: blur(5px); margin-bottom: 2rem; 
}
.terminal-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.1); }
.tab { 
    flex: 1; padding: 1.5rem 0; text-align: center; cursor: pointer; 
    color: var(--text-muted); font-family: 'VT323', monospace; font-size: 1.5rem; 
    transition: background 0.3s, color 0.3s, text-shadow 0.3s; 
}
.tab:hover { background: rgba(255,255,255,0.02); color: var(--text-bright); }
.tab.active { 
    color: var(--text-bright); background: rgba(255,0,60,0.05); 
    border-bottom: 2px solid var(--accent); text-shadow: 0 0 10px rgba(255,0,60,0.5); 
}
.terminal-content { padding: 4rem 2rem; min-height: 250px; display: flex; align-items: center; justify-content: center; text-align: center; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: crt-flash 0.3s ease-out; }
.tab-pane h3 { font-family: 'Unbounded', sans-serif; font-size: 1.2rem; margin-bottom: 1.5rem; letter-spacing: 4px; color: var(--text-bright); font-weight: 700; }
.tab-pane p { font-size: 0.95rem; line-height: 1.8; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: 1fr; gap: 6rem; }
.project-card { cursor: none; }

.tv-frame {
    padding: 1rem; background: #0a0a0a; border: 1px solid #1a1a1a; border-radius: 10px; margin-bottom: 2rem;
    box-shadow: inset 0 0 20px #000;
}
.project-media {
    width: 100%; height: 50vh; min-height: 400px; background-color: #020202; 
    position: relative; overflow: hidden; border-radius: 4px;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.5) brightness(0.5); transition: filter 0.5s; }
.project-card:hover .project-media img { filter: grayscale(0%) contrast(1.1) brightness(1.2); }

.media-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s; backdrop-filter: blur(8px);
}
.project-card:hover .media-overlay { opacity: 1; }
.media-overlay span { border: 1px solid var(--text-bright); padding: 0.75rem 2rem; font-family: 'Unbounded', sans-serif; font-size: 0.7rem; letter-spacing: 4px; color: var(--text-bright); font-weight: 700; background: rgba(255,255,255,0.1); }

.project-details h3 { font-family: 'Unbounded', sans-serif; font-size: 1.5rem; margin-bottom: 0.5rem; font-weight: 700; letter-spacing: 2px; color: var(--text-bright); }
.project-details p { color: var(--text-muted); line-height: 1.6; font-size: 0.9rem; max-width: 600px; }

/* Canvas Placeholders */
.project-media canvas { width: 100%; height: 100%; display: block; opacity: 0.5; }
.placeholder-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Koulen', display; font-size: 3rem; color: rgba(255,255,255,0.2); letter-spacing: 10px; z-index: 2; pointer-events: none; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 100000; display: flex; align-items: center; justify-content: center; opacity: 1; transition: opacity 0.4s ease; }
.modal.hidden { opacity: 0; pointer-events: none; }
.modal-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(20px); }
.modal-content { position: relative; z-index: 100001; width: 95%; max-width: 1400px; display: flex; flex-direction: column; align-items: flex-end; }
.modal-close { margin-bottom: 1rem; font-family: 'Roboto Mono', monospace; color: var(--text-bright); font-size: 0.8rem; letter-spacing: 4px; transition: color 0.3s; }
.modal-close:hover { color: var(--accent); }

.crt-video-frame {
    width: 100%; position: relative; background: #000; border: 2px solid #222; border-radius: 12px; padding: 2px;
    box-shadow: 0 0 50px rgba(255,255,255,0.05), inset 0 0 20px rgba(0,0,0,1); overflow: hidden;
}
.crt-video-frame video { width: 100%; height: auto; max-height: 80vh; display: block; filter: contrast(1.1) brightness(1.1); }
.modal-scanlines { position: absolute; top: 0; left: 0; width: 100%; height: 100%; 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)); background-size: 100% 3px, 3px 100%; pointer-events: none; opacity: 0.5; }

/* VCR OSD & Fonts */
.vcr-text { font-family: 'VT323', monospace; text-shadow: 3px 0 0 rgba(255,0,0,0.8), -3px 0 0 rgba(0,255,255,0.8); }
.vcr-osd { position: absolute; bottom: 20px; left: 20px; color: #fff; font-family: 'VT323', monospace; font-size: 2rem; z-index: 10; text-shadow: 2px 2px 0 #000; letter-spacing: 2px; }
.vcr-rec { color: #ff003c; animation: rec-blink 1s infinite; margin-bottom: 5px; display: block; }
.vcr-play { color: #00ffcc; display: block; text-shadow: 0 0 10px #00ffcc; }

/* The Minimal Vector Footer */
#vector-footer { padding: 8rem 2rem; display: flex; justify-content: center; align-items: center; background: #000; border-top: 1px dashed rgba(255,255,255,0.1); margin-top: 5rem; }
.vector-grid { display: flex; gap: 4rem; width: 100%; max-width: 900px; justify-content: space-between; flex-wrap: wrap; }
.vector-item { text-align: center; flex: 1; min-width: 200px; cursor: none; }
.crt-svg { width: 120px; height: 120px; color: var(--text-muted); transition: color 0.3s, filter 0.3s, transform 0.3s; filter: drop-shadow(0 0 2px rgba(255,255,255,0.1)); }
.vector-item:hover .crt-svg { color: var(--text-bright); transform: scale(1.1); filter: drop-shadow(0 0 15px rgba(255,255,255,0.8)) drop-shadow(4px 0 0 rgba(255,0,0,0.8)) drop-shadow(-4px 0 0 rgba(0,255,255,0.8)); }
.vector-label { margin-top: 2rem; font-family: 'VT323', monospace; font-size: 1.8rem; letter-spacing: 4px; color: var(--text-muted); transition: color 0.3s; }
.vector-item:hover .vector-label { color: var(--text-bright); text-shadow: 2px 0 0 rgba(255,0,0,0.8), -2px 0 0 rgba(0,255,255,0.8); }

/* Animations */
.reveal { opacity: 0; transform: translateY(20px); filter: blur(5px); transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); filter: blur(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; }
::-webkit-scrollbar-thumb:hover { background: var(--text-bright); }

/* =========================================================================
   THE NTLAP 0.000001% VECTOR INTERACTIONS
   ========================================================================= */

/* ENERGY: Power Surge Glitch */
#energy-surge {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #fff; mix-blend-mode: difference; z-index: 100000;
    pointer-events: none; display: none;
}
.surge-active #energy-surge { display: block; animation: surge-flash 0.4s steps(5) forwards; }
.surge-active .content, .surge-active footer { animation: surge-glitch 0.4s steps(5); }

@keyframes surge-flash {
    0% { opacity: 0; } 20% { opacity: 1; background: #ff003c; } 40% { opacity: 0; } 
    60% { opacity: 1; background: #00ffff; } 100% { opacity: 0; }
}
@keyframes surge-glitch {
    0% { transform: translate(0, 0) skewX(0); filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
    20% { transform: translate(-20px, 10px) skewX(10deg); filter: drop-shadow(10px 0 0 red); }
    40% { transform: translate(20px, -10px) skewX(-10deg); filter: drop-shadow(-10px 0 0 cyan); }
    60% { transform: translate(10px, 10px) skewX(5deg); filter: invert(1); }
    100% { transform: translate(0, 0) skewX(0); filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
}

/* FREQUENCY: Radar Sweep */
#freq-sweep {
    position: fixed; top: -20vh; left: 0; width: 100vw; height: 20vh;
    background: linear-gradient(to bottom, transparent, rgba(0, 255, 204, 0.2), #00ffcc);
    box-shadow: 0 10px 30px #00ffcc;
    mix-blend-mode: screen; pointer-events: none; z-index: 99999; display: none;
}
.sweep-active #freq-sweep { display: block; animation: radar-sweep 1s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.sweep-active .crt-screen { animation: crt-flash 1s ease-out; }
@keyframes radar-sweep { 0% { top: -20vh; opacity: 1; } 100% { top: 100vh; opacity: 0; } }

/* VIBRATION: Kinetic Shockwave */
.vibration-active .content, .vibration-active footer { animation: violent-shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes violent-shake {
    0%, 100% { transform: translate3d(0, 0, 0); filter: blur(0); }
    10%, 30%, 50%, 70%, 90% { transform: translate3d(-15px, 5px, 0); filter: blur(2px); }
    20%, 40%, 60%, 80% { transform: translate3d(15px, -5px, 0); filter: blur(4px); }
}
.shockwave {
    position: fixed; transform: translate(-50%, -50%);
    border: 4px solid var(--text-bright); border-radius: 50%;
    pointer-events: none; z-index: 100000;
    animation: shockwave-pulse 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}
@keyframes shockwave-pulse {
    0% { width: 0; height: 0; opacity: 1; border-width: 20px; box-shadow: 0 0 40px var(--text-bright); }
    100% { width: 150vw; height: 150vw; opacity: 0; border-width: 1px; box-shadow: 0 0 0 var(--text-bright); }
}

/* =========================================================================
   MOBILE & RESPONSIVE TWEAKS
   ========================================================================= */

@media (max-width: 768px) {
    /* Layout & Padding */
    .content { padding: 1.5rem; }
    header { padding: 1rem 0 5vh; flex-direction: column; gap: 1rem; align-items: flex-start; }
    
    /* Typography */
    .manifesto { font-size: 0.8rem; letter-spacing: 2px; }
    
    /* Grids & Cards */
    .tab { font-size: 1.2rem; padding: 1rem 0; }
    .terminal-content { padding: 2rem 1rem; }
    .informative-section { padding: 4rem 0; }
    .projects-grid { gap: 3rem; }
    
    /* TV Frame & Media */
    .project-media { min-height: 250px; height: 35vh; }
    .vcr-osd { font-size: 1.2rem; bottom: 10px; left: 10px; }
    .placeholder-text { font-size: 2rem; letter-spacing: 5px; text-align: center; width: 100%; }
    
    /* Modal */
    .crt-video-frame { border-width: 1px; }
    
    /* Vector Footer */
    #vector-footer { padding: 4rem 1rem; }
    .vector-grid { flex-direction: row; gap: 1rem; align-items: center; justify-content: space-between; }
    .vector-item { min-width: unset; flex: 1; }
    .crt-svg { width: 45px; height: 45px; }
    .vector-label { font-size: 0.7rem; margin-top: 0.5rem; letter-spacing: 1px; }
}

/* Fix cursor for touch devices */
@media (pointer: coarse) {
    * { cursor: auto !important; }
    .cursor-dot { display: none !important; }
}
