/* --- RESET & BASICS --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --terminal-green: #33ff00;
    --terminal-dim: #1a8000;
    --error-red: #ff003c;
    --bg-black: #050505;
    --scanline-color: rgba(0, 0, 0, 0.5);
}

body {
    background-color: var(--bg-black);
    color: var(--terminal-green);
    font-family: 'Courier New', Courier, monospace;
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 16px;
    padding-bottom: 50px;
}

/* 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.2) 50%,
        rgba(0, 0, 0, 0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
    animation: scrollLines 10s linear infinite;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 998;
}

@keyframes scrollLines {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

/* TYPOGRAPHY & GLITCH*/
h1, h2, h3 {
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.system-msg {
    color: var(--error-red);
    font-size: 0.9rem;
}

a {
    color: var(--terminal-green);
    text-decoration: none;
    border-bottom: 1px solid var(--terminal-dim);
    transition: 0.3s;
}

a:hover {
    background-color: var(--terminal-green);
    color: var(--bg-black);
    cursor: help;
}

.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.glitch-text {
    position: relative;
    color: var(--terminal-green);
    font-size: 2.5rem; 
    text-align: center;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-black);
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 var(--error-red);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00ffff;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(14px, 9999px, 122px, 0); }
    5% { clip: rect(69px, 9999px, 25px, 0); }
    10% { clip: rect(6px, 9999px, 131px, 0); }
    15% { clip: rect(142px, 9999px, 14px, 0); }
    20% { clip: rect(85px, 9999px, 131px, 0); }
    25% { clip: rect(32px, 9999px, 52px, 0); }
    30% { clip: rect(78px, 9999px, 11px, 0); }
    35% { clip: rect(98px, 9999px, 48px, 0); }
    40% { clip: rect(18px, 9999px, 72px, 0); }
    45% { clip: rect(122px, 9999px, 4px, 0); }
    50% { clip: rect(54px, 9999px, 116px, 0); }
    55% { clip: rect(14px, 9999px, 66px, 0); }
    60% { clip: rect(90px, 9999px, 126px, 0); }
    65% { clip: rect(106px, 9999px, 73px, 0); }
    70% { clip: rect(4px, 9999px, 61px, 0); }
    75% { clip: rect(66px, 9999px, 107px, 0); }
    80% { clip: rect(117px, 9999px, 2px, 0); }
    85% { clip: rect(79px, 9999px, 102px, 0); }
    90% { clip: rect(21px, 9999px, 56px, 0); }
    95% { clip: rect(138px, 9999px, 93px, 0); }
    100% { clip: rect(32px, 9999px, 114px, 0); }
}

/* LAYUOT */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/*  BOOT SCREEN */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-black);
    z-index: 10000;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-size: 14px;
}
.boot-line { margin-bottom: 5px; opacity: 0; }
.boot-cursor { animation: blink 0.8s infinite; display: inline-block; width: 10px; height: 18px; background: var(--terminal-green); vertical-align: middle;}

/* MAIN PROJECT */
.project-frame {
    border: 2px solid var(--terminal-green);
    padding: 10px;
    margin-bottom: 40px;
    box-shadow: 0 0 15px var(--terminal-dim);
    position: relative;
}

.project-frame::before {
    content: "FILE_ID: 800_800_FINAL.MOV";
    position: absolute;
    top: -12px;
    left: 10px;
    background: var(--bg-black);
    padding: 0 5px;
    font-size: 0.8rem;
    color: var(--terminal-green);
}

.main-gif-container {
    width: 100%;
    max-width: 800px; 
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    background: #111;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ARTIST STATEMENT  */
.statement-section {
    border-left: 4px solid var(--terminal-green);
    padding-left: 20px;
    margin-bottom: 50px;
}

.statement-text {
    text-align: justify;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.metadata {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    font-family: monospace;
}

/*  DATA DUMP */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    border: 1px solid var(--terminal-dim);
    height: auto; 
    display: flex;
    flex-direction: column;
    transition: 0.2s;
    background: rgba(0, 20, 0, 0.2);
}

.gallery-item:hover {
    border-color: var(--error-red);
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.2);
}

.video-wrapper {
    position: relative;
    width: 100%;
    /* 16:9 issue*/
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px dashed var(--terminal-dim);
}

.gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(120%);
    transition: filter 0.3s;
    border: none; 
}

.gallery-item:hover .gallery-video {
    filter: grayscale(0%) contrast(100%);
}

.gallery-info {
    padding: 10px;
    font-size: 0.8rem;
}

.gallery-desc {
    margin-bottom: 10px;
    color: #ccc;
    font-weight: bold;
}

.gallery-meta {
    display: flex;
    align-items: center;
    font-family: monospace;
    font-size: 12px;
    color: var(--terminal-dim);
}

.gallery-meta span {
    color: var(--terminal-green);
}

/* FOOTER */
footer {
    margin-top: 50px;
    text-align: center;
    border-top: 1px dashed var(--terminal-dim);
    padding-top: 20px;
    font-size: 0.8rem;
}

.blink { animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* MOBILE STUFF */
@media (max-width: 600px) {
    .glitch-text { font-size: 1.8rem; }
    .container { padding: 10px; }
    .statement-section { border-left: 2px solid var(--terminal-green); padding-left: 10px; }
    .gallery-grid { grid-template-columns: 1fr; }
}