:root {
    --bg-retro: #000000;
    --text-retro: #39ff14;
    /* Neon Green */
    --border-color: #39ff14;
    --hover-bg: #39ff14;
    --hover-text: #000000;
}

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

body.retro-theme {
    font-family: 'Press Start 2P', monospace;
    background-color: var(--bg-retro);
    color: var(--text-retro);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    text-transform: uppercase;
}

/* CRT Scanline Effect */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
    z-index: 999;
}

/* Animated Retro Grid Background */
.retro-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-retro);
    background-image:
        linear-gradient(rgba(57, 255, 20, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57, 255, 20, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
    animation: gridMove 5s linear infinite;
    transform: perspective(500px) rotateX(60deg) scale(2);
    transform-origin: bottom center;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 30px;
    }
}

.wrapper {
    width: 100%;
    max-width: 460px;
    padding: 0 8px;
    z-index: 10;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.retro-container {
    width: 100%;
    padding: 20px;
    border: 4px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: var(--bg-retro);
    box-shadow: 0 0 10px var(--border-color);
}

.profile-wrapper {
    margin-bottom: 20px;
}

.profile-img {
    width: 100px;
    height: 100px;
    border: 2px solid var(--border-color);
    image-rendering: pixelated;
    /* Makes the image blocky if scaled */
    filter: contrast(1.5) grayscale(100%) brightness(0.8) sepia(100%) hue-rotate(80deg) saturate(300%);
}

.title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 0 #005000;
}

.subtitle {
    font-size: 0.7rem;
    margin-bottom: 8px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.location {
    font-size: 0.6rem;
    opacity: 0.8;
}

.divider {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    margin: 16px 0;
}

.links-section {
    width: 100%;
    margin-bottom: 16px;
}

.section-label {
    font-size: 0.6rem;
    margin-bottom: 12px;
}

.links-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.links-grid-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-retro {
    display: block;
    padding: 10px;
    border: 2px solid var(--border-color);
    color: var(--text-retro);
    text-decoration: none;
    font-size: 0.65rem;
    transition: all 0.1s;
    background: transparent;
}

.btn-retro:hover {
    background: var(--hover-bg);
    color: var(--hover-text);
    box-shadow: 0 0 10px var(--hover-bg);
}

.btn-secondary {
    font-size: 0.55rem;
    padding: 8px;
}

.btn-back {
    margin-top: 10px;
    border-style: dashed;
}

.footer-text {
    margin-top: 20px;
    font-size: 0.5rem;
    opacity: 0.7;
}

@media (max-height: 700px) {
    .wrapper {
        min-height: 100vh;
        height: auto;
    }

    .retro-container {
        padding: 10px;
    }

    .profile-img {
        width: 75px;
        height: 75px;
    }

    .title {
        font-size: 1rem;
    }
}