/* Base Setup */
body {
    background-color: #000;
    color: #33ff00;
    /* Classic glowing green */
    font-family: 'VT323', monospace;
    margin: 0;
    overflow-x: hidden;
    text-shadow: 0 0 5px #33ff00, 0 0 10px #33ff00;
    /* Ensure body takes full height for flex container to work */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* CRT Scanline Overlay */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    /* Scanline thickness */
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through */
    animation: scanlines 0.2s linear infinite;
}

@keyframes scanlines {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 4px;
    }
}

/* Container */
.container {
    flex: 1;
    /* Take remaining space */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    /* Ensure it fills at least the viewport */
    padding: 2rem 0;
    /* Add some vertical padding */
    box-sizing: border-box;
}

/* Logo with Glitch */
.centered {
    position: relative;
    /* Changed from fixed */
    /* Remove translate/top/left logic since we use flexbox */
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 5px #33ff00);
}

.glitch {
    animation: glitch-anim 2.5s infinite;
}

@keyframes glitch-anim {
    0% {
        transform: skew(0deg);
    }

    20% {
        transform: skew(0deg);
    }

    21% {
        transform: skew(-10deg);
        filter: invert(0.2);
    }

    22% {
        transform: skew(10deg);
        filter: invert(0);
    }

    23% {
        transform: skew(0deg);
    }

    100% {
        transform: skew(0deg);
    }
}

/* Text Styling */
p {
    position: relative;
    /* Changed from fixed */
    /* Remove translate/top/left logic */
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.4;
    width: 80%;
    margin: 0;
    /* Reset margins */
}

.desc {
    margin-bottom: 3rem;
    /* Space between desc and contact */
}

/* Blinking Contact Info */
.contact {
    font-size: 1.8rem;
    margin-top: auto;
    /* Push to bottom if there is extra space */
    margin-bottom: 2rem;
}

.blink {
    animation: blinker 1.5s step-end infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Data Typing Effect Simulation */
.typing-effect {
    animation: flicker 4s infinite;
}

@keyframes flicker {
    0% {
        opacity: 0.9;
    }

    5% {
        opacity: 0.8;
    }

    10% {
        opacity: 1;
    }

    15% {
        opacity: 0.95;
    }

    50% {
        opacity: 1;
    }

    51% {
        opacity: 0.5;
    }

    52% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}


/* Responsive Design */
@media (max-width: 480px) {
    .centered {
        width: 60%;
        margin-top: 2rem;
    }

    .desc {
        font-size: 1.2rem;
        width: 90%;
        flex-grow: 1;
        /* allow desc to take space */
        display: flex;
        align-items: center;
    }

    .contact {
        font-size: 1.5rem;
        margin-bottom: 3rem;
    }
}

@media (min-width: 481px) {
    .centered {
        width: 30%;
        /* Control logo size on desktop */
        margin-top: 5rem;
    }

    .desc {
        font-size: 1.5rem;
        max-width: 800px;
    }

    .contact {
        margin-bottom: 4rem;
    }
}