@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700&family=Orbitron:wght@400;700;900&display=swap');

:root {
    --safe: #00ff41;
    --safe-glow: rgba(0, 255, 65, 0.3);
    --danger: #ff003c;
    --danger-glow: rgba(255, 0, 60, 0.6);
    --secondary: #00f2fe;
    --bg: #030303;
    --font: 'Inter', sans-serif;
    --font-tech: 'Orbitron', sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    background-color: var(--bg);
    color: var(--safe);
    font-family: var(--font);
    overflow: hidden;
    height: 100vh;
    cursor: none;
}

/* --- OVERLAYS --- */
body::before {
    content: "";
    position: fixed; inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 2px, 2px 100%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.4;
}

body.glitch-active { animation: screen-shake 0.01s infinite; }
@keyframes screen-shake {
    0% { transform: translate(0,0); }
    50% { transform: translate(3px, -3px); filter: hue-rotate(90deg); }
    100% { transform: translate(-3px, 3px); }
}

/* --- CUSTOM CURSOR --- */
.cursor-follower {
    position: fixed;
    width: 10px; height: 10px;
    border: 2px solid var(--safe);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: width 0.3s, height 0.3s, transform 0.05s linear;
    transform: translate3d(-50%, -50%, 0);
}
.cursor-follower.active {
    width: 15px; height: 15px;
    border-color: var(--danger);
    background: rgba(255, 0, 60, 0.1);
    box-shadow: 0 0 20px var(--danger-glow);
    
}


/* --- TERMINAL SHELL --- */
.terminal {
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    position: relative;
    z-index: 10;
}

.header { padding: 2rem; border-bottom: 1px solid rgba(0, 255, 65, 0.1); }

/* --- MASTER GLITCH HEADER --- */
.header h1 {
    margin: 0;
    font-family: var(--font-tech);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 15px;
    text-transform: uppercase;
    color: #fff;
    position: relative;
    animation: periodic-jerk 5s infinite, shadow-vibrate 0.1s infinite;
}

.header h1::before,
.header h1::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg);
}

.header h1::before {
    left: 4px;
    text-shadow: -3px 0 var(--danger);
    animation: glitch-slices-1 2s infinite linear alternate-reverse;
}

.header h1::after {
    left: -4px;
    text-shadow: -3px 0 var(--secondary), 3px 3px var(--danger);
    animation: glitch-slices-2 1.5s infinite linear alternate-reverse;
}

/* NEW: HOVER AGGRESSION */
.header h1:hover {
    animation: periodic-jerk 0.2s infinite, shadow-vibrate 0.05s infinite, flash-shake 0.1s infinite !important;
}

@keyframes flash-shake {
    0% { filter: invert(0); transform: translate(0); }
    50% { filter: invert(1); transform: translate(5px, -5px); }
}

@keyframes shadow-vibrate {
    0% { text-shadow: 2px 0 var(--danger), -2px 0 var(--secondary); }
    50% { text-shadow: -2px -2px var(--danger), 2px 2px var(--secondary); }
    100% { text-shadow: 2px 0 var(--danger), -2px 0 var(--secondary); }
}

@keyframes periodic-jerk {
    0%, 19%, 21%, 23%, 39%, 41%, 59%, 61%, 89%, 91%, 100% { transform: translate(0,0) skew(0deg); }
    20% { transform: translate(-15px, 5px) skew(10deg); }
    22% { transform: translate(15px, -5px) skew(-10deg); }
    40% { transform: translate(-25px, 0); }
    90% { transform: translate(10px, 0) scale(1.05); }
}

@keyframes glitch-slices-1 {
    0% { clip-path: inset(80% 0 1% 0); }
    50% { clip-path: inset(10% 0 80% 0); }
    100% { clip-path: inset(50% 0 20% 0); }
}

@keyframes glitch-slices-2 {
    0% { clip-path: inset(10% 0 80% 0); transform: translate(5px); }
    50% { clip-path: inset(80% 0 10% 0); transform: translate(-5px); }
    100% { clip-path: inset(40% 0 40% 0); transform: translate(10px); }
}

/* --- CARDS --- */
.content {
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem; padding: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 255, 65, 0.1);
    border-radius: 8px; padding: 2rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 250px;
    display: flex; flex-direction: column;
}

.project-card:hover {
    background: #000;
    border-color: var(--danger);
    transform: perspective(1000px) rotateX(10deg) scale(1.05);
    box-shadow: 0 20px 60px var(--danger-glow);
    animation: card-shake 0.1s infinite;
    z-index: 100;
}

@keyframes card-shake {
    0% { transform: perspective(1000px) rotateX(10deg) translate(2px, -2px); }
    100% { transform: perspective(1000px) rotateX(10deg) translate(-2px, 2px); }
}

.project-card h3 { margin: 0; font-family: var(--font-tech); font-size: 1.2rem; color: #fff; }
.project-card:hover h3 { color: var(--danger); animation: text-jitter 0.1s infinite; }
@keyframes text-jitter { 0% { transform: translate(0); } 50% { transform: translate(-3px, 2px); } }

.launch-btn {
    margin-top: auto; padding: 10px;
    background: transparent; border: 1px solid var(--safe);
    color: var(--safe); text-align: center; text-decoration: none;
    font-size: 0.8rem; font-weight: 900;
}
.project-card:hover .launch-btn { background: var(--danger); color: #fff; border-color: #fff; animation: btn-vibe 0.1s infinite; }
@keyframes btn-vibe { 0% { transform: scale(1.05); } 100% { transform: scale(1.08); } }

footer {
    padding: 1.5rem; border-top: 1px solid rgba(0, 255, 65, 0.1);
    display: flex; justify-content: space-between; font-size: 0.7rem; opacity: 0.5;
}

#boot-screen {
    position: fixed; inset: 0; background: #000; z-index: 9999;
    padding: 5rem; display: flex; flex-direction: column;
}
.typewriter { margin: 5px 0; font-size: 1.2rem; color: var(--safe); overflow: hidden; white-space: nowrap; width: 0; animation: typing 0.4s steps(40) forwards; }
@keyframes typing { from { width: 0; } to { width: 100%; } }
.hidden { display: none !important; }

.scanline {
    position: fixed; top: 0; left: 0; width: 100%; height: 5px;
    background: rgba(255, 0, 60, 0.05); z-index: 1001;
    pointer-events: none; animation: scanning 8s linear infinite;
}
@keyframes scanning { 0% { top: -10%; } 100% { top: 110%; } }

@media (max-width: 768px) {
    .content { grid-template-columns: 1fr; }
    .header h1 { font-size: 1.8rem; letter-spacing: 5px; }
}