:root {
    --primary-red: #E50914;
    --text-color: #EAEAEA;
    --dark-gray: #1a1a1a;
    --font-header: 'Bebas Neue', cursive;
    --font-body: 'Roboto Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background: #0a0a0a;
    overflow: hidden;
}

/* === Background Rain Canvas === */
#background {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: #0a0a0a;
z-index: -2;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

canvas#rain-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* === Header === */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--dark-gray);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-header);
    font-size: 2rem;
    color: var(--primary-red);
    letter-spacing: 2px;
    text-shadow: 0 0 6px rgba(229, 9, 20, 0.6);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    color: var(--primary-red);
    text-shadow: 0 0 5px var(--primary-red);
}

/* === Hero Section === */
#hero {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 0 5%;
position: relative;
z-index: 10;
}

.hero-content h1 {
    font-family: var(--font-header);
    font-size: 5rem;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    position: relative;
}

.hero-content .manifesto {
    font-size: 1.1rem;
    max-width: 60ch;
    margin: 0 auto;
    color: #bbbbbb;
    line-height: 1.6;
}

/* === Glitch Effect === */
.glitch {
    position: relative;
    color: var(--text-color);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary-red);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 #00ffff;
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(15% 0 86% 0);
    }
    100% {
        clip-path: inset(80% 0 1% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(50% 0 10% 0);
    }
    100% {
        clip-path: inset(2% 0 90% 0);
    }
}

/* === Terminal Loader === */
.terminal-loader {
    max-width: 600px;
    margin: 3rem auto 0 auto;
    background: #111;
    border: 1px solid #333;
    border-radius: 5px;
}

.terminal-header {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: #222;
    border-radius: 5px 5px 0 0;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.red {
    background: #ff5f56;
}
.terminal-button.yellow {
    background: #ffbd2e;
}
.terminal-button.green {
    background: #27c93f;
}

.terminal-content {
    padding: 1rem;
    font-family: var(--font-body);
}

.line-1 {
    width: 61ch;
    animation: typing 3.5s steps(61), blink 0.5s step-end infinite alternate;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid rgba(200, 255, 200, 0.7);
    color: rgba(150, 255, 180, 0.8);
    margin: 0 auto;
}

@keyframes typing {
    from {
        width: 0;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* === Content Sections === */
.content-section {
    padding: 100px 5%;
    background: rgba(10, 10, 10, 0.87);
    border-top: 1px solid var(--dark-gray);
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 10;
}

.content-section h2 {
    font-family: var(--font-header);
    font-size: 2.8rem;
    color: var(--primary-red);
    margin-bottom: 1.8rem;
    text-shadow: 0 0 6px rgba(229, 9, 20, 0.6);
}

/* === Cards === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.4rem;
}

.card {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid #222;
    padding: 1.4rem;
    border-radius: 5px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-red);
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.4);
}

.card h3 {
    color: var(--primary-red);
    margin-bottom: 0.4rem;
}

.card p {
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 1.4rem;
}

.card a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
}

.card a:hover {
    color: var(--primary-red);
}

/* === Footer === */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: #666;
    background: rgba(18, 18, 18, 0.9);
    position: relative;
    z-index: 10;
}

/* === Responsive === */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content .manifesto {
        font-size: 1rem;
        max-width: 90%;
    }

    .terminal-loader {
        max-width: 100%;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}
