/* Basic page setup */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color-scheme: light dark;
    background: radial-gradient(circle at center, #1a1a1a, #000);
    color: #eee;
    overflow: hidden;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: inherit;
}

em {
    color: #ff9999;
}

/* Page container (vertical scroll-by-pages) */
#pages {
    position: relative;
    width: 100vw;
    transform: translateY(0);
    transition: transform .75s cubic-bezier(.25, .8, .25, 1);
    will-change: transform;
}

/* Each fullscreen section */
.screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Text container */
.page-content {
    text-align: center;
    max-width: 2000px;
    padding: 2rem;
    line-height: 1.8;
}

.page-content h1 {
    font-size: 3.2rem;
    margin-bottom: .3em;
    color: #eee;
    animation: flicker 2s infinite;
    text-shadow: 0 0 10px #ff3333, 0 0 20px #ff0000;
}

.page-content h2 {
    font-size: 2.3rem;
}

.page-content p {
    font-size: 1.2rem;
    margin: .6rem 0;
}

/* Neon flicker animation */
@keyframes flicker {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.3;
    }
}

/* Background grid */
.grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(#222 2px, transparent 2px),
        linear-gradient(90deg, #222 2px, transparent 2px);
    background-size: 40px 40px;
    animation: drift 15s linear infinite;
    opacity: 0.15;
    pointer-events: none;
}

@keyframes drift {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(40px, 40px);
    }
}

/* Green raining binary characters */
.rain span {
    position: absolute;
    top: -20px;
    color: #0f0;
    opacity: 0.8;
    font-family: monospace;
    animation: fall linear infinite;
    white-space: pre;
}

@keyframes fall {
    to {
        transform: translateY(110vh);
    }
}

/* CRT overlay lines */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 2px,
            transparent 3px);
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* Screen blur + glitch */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    backdrop-filter: blur(.8px);
    animation: crt-glitch 4s infinite;
    pointer-events: none;
}

@keyframes crt-glitch {

    0%,
    50%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-1px, 0);
    }

    20% {
        transform: translate(1px, 0);
    }

    30% {
        transform: translate(-2px, 0);
    }

    40% {
        transform: translate(2px, 0);
    }

    60% {
        opacity: 1;
    }

    61% {
        opacity: .6;
    }

    62% {
        opacity: 1;
    }
}

/* Floating ghost-error text */
#ghost {
    position: fixed;
    font-family: monospace;
    color: #ff4444;
    font-size: 2.1rem;
    opacity: 0;
    text-shadow: 0 0 8px #ff0000;
    animation: ghostFlash 1s infinite;
    pointer-events: none;
}

@keyframes ghostFlash {

    0%,
    85%,
    90%,
    100% {
        opacity: 0;
    }

    86% {
        opacity: 1;
    }
}

/* Noise texture */
#noise {
    position: fixed;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
    animation: noiseMove .2s infinite;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAABlBMVEUAAP8AAABa4Jr2AAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=');
}

@keyframes noiseMove {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(1px, -1px);
    }

    100% {
        transform: translate(-1px, 1px);
    }
}

/* Scroll indicator */
#scroll-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: #0f0;
    font-family: monospace;
    font-size: 1rem;
    animation: pulse 2s infinite;
    opacity: 0.7;
    text-shadow: 0 0 5px #0f0;
}

@keyframes pulse {

    0%,
    100% {
        opacity: .7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

img {
    border-radius: 14px;
}