:root {
    --bg-dark: #0b0c1e;
    --text-main: #1fd8ff;
    --text-glowing: #fff;
    --accent-red: #ff1f1f;
    --accent-dark-red: #8b0000;
    --crt-glow: rgba(31, 216, 255, 0.15);
    --pixel-border: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 6 6'%3E%3Cpath d='M0 2h2V0h2v2h2v2H4v2H2V4H0V2z' fill='%231fd8ff'/%3E%3C/svg%3E");
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: none;
    font-smooth: never;
}

body {
    font-family: 'Press Start 2P', cursive;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    line-height: 1.8;
    overflow-x: hidden;
    text-shadow: 0 0 5px var(--crt-glow), 0 0 10px var(--crt-glow);
}

body::before, body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

body::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='4' height='4' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.1;
}

body::after {
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.8) 100%), linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%);
    background-size: 100% 100%, 100% 4px;
    animation: flicker 0.15s infinite;
}

header {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 5rem;
    width: 100%;
    max-width: 800px;
}

h1 {
    font-size: 2.2rem;
    color: var(--text-glowing);
    text-shadow: 0 0 8px var(--text-main), 0 0 15px var(--text-main);
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--accent-red);
    text-shadow: 0 0 5px var(--accent-dark-red);
}

.main-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Link reset */
a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card {
    background-color: rgba(0, 0, 0, 0.3);
    border: 4px solid var(--text-main);
    border-image: var(--pixel-border) 2 repeat;
    padding: 2rem;
    position: relative;
    transition: transform 0.1s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: scale(1.02);
    background-color: rgba(31, 216, 255, 0.05);
}

.project-card:hover h2 {
    animation: glitch 0.3s infinite;
}

.project-card h2 {
    font-size: 1.2rem;
    color: var(--text-glowing);
    margin-bottom: 1.5rem;
    position: relative;
}

.project-card h2::before {
    content: "> ";
    color: var(--accent-red);
}

.project-card p {
    font-size: 0.75rem;
    line-height: 2;
    color: var(--text-main);
    opacity: 0.9;
}

.status-line {
    margin-top: 2rem;
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
    color: var(--accent-red);
}

.blink { animation: blink 1s step-end infinite; }

.nav-link {
    color: var(--text-glowing);
    font-size: 0.8rem;
    margin-top: 2rem;
    text-align: center;
    display: inline-block;
    border-bottom: 2px solid var(--text-main);
    padding-bottom: 5px;
}

.nav-link:hover {
    color: var(--accent-red);
    border-bottom-color: var(--accent-red);
}

.terminal-log {
    font-size: 0.75rem;
    line-height: 2.5;
    color: var(--text-main);
    padding: 2rem;
    border: 2px dashed rgba(31, 216, 255, 0.3);
    background: rgba(0,0,0,0.5);
    margin-bottom: 2rem;
}

footer {
    margin-top: auto;
    padding: 4rem 1rem 1rem;
    font-size: 0.6rem;
    color: rgba(31, 216, 255, 0.5);
    text-align: center;
    width: 100%;
}

@keyframes flicker { 0% { opacity: 0.97; } 50% { opacity: 1; } 100% { opacity: 0.98; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes glitch {
    0% { text-shadow: 2px 0 var(--accent-red), -2px 0 var(--text-main); }
    25% { text-shadow: -2px 0 var(--accent-red), 2px 0 var(--text-main); }
    50% { text-shadow: 2px 0 var(--accent-red), -2px 0 var(--text-main); }
    75% { text-shadow: -2px 0 var(--accent-red), 2px 0 var(--text-main); }
    100% { text-shadow: 2px 0 var(--accent-red), -2px 0 var(--text-main); }
}

@media (max-width: 600px) {
    h1 { font-size: 1.4rem; }
    .project-card { padding: 1.5rem; }
}