:root {
    --bg: #0d0d0d;
    --text: rgba(255, 255, 255, 0.85);
    --accent: #4ade80;
    --muted: rgba(255, 255, 255, 0.4);
    --border: rgba(255, 255, 255, 0.07);
    --game-h: 130px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Anonymous Pro', 'Courier New', monospace;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dot-grid background */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
    z-index: 0;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 1.25em 2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.08em;
}

.nav-contact {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85em;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}

.nav-contact:hover {
    color: var(--text);
}

/* Main */
main {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Abajo deja sitio al minijuego y al footer */
    padding: 4em 2em calc(var(--game-h) + 3em);
}

/* Hero */
.hero {
    text-align: center;
    max-width: 640px;
    width: 100%;
}

.greeting {
    font-size: 0.85em;
    color: var(--accent);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 0.6em;
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.2s forwards;
}

h1 {
    font-size: clamp(1.8em, 5vw, 3.2em);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.4em;
    line-height: 1.1;
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.4s forwards;
}

.role-line {
    font-size: clamp(0.95em, 2.5vw, 1.25em);
    color: var(--muted);
    min-height: 1.8em;
    margin: 0 0 2.5em;
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.6s forwards;
}

/* Social links */
.social-links {
    display: flex;
    gap: 1.4em;
    justify-content: center;
    margin-bottom: 2.5em;
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.8s forwards;
}

.social-links a {
    color: var(--muted);
    transition: color 0.2s, transform 0.2s;
    display: flex;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

.social-links svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* CTA button */
.cta {
    display: inline-block;
    padding: 0.75em 2em;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.9em;
    letter-spacing: 0.08em;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    opacity: 0;
    animation: fadeInUp 0.5s ease 1s forwards;
}

.cta:hover {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 0 24px rgba(74, 222, 128, 0.25);
}

/* Typed cursor */
#typed-strings {
    display: none;
}

.typed-cursor {
    color: var(--accent);
    opacity: 1;
    animation: blink 0.7s infinite;
}

/* Minijuego + footer, fijos abajo; el borde del footer hace de suelo */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

#game {
    display: block;
    width: 100%;
    height: var(--game-h);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Footer */
footer {
    padding: 1em 2em;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.75em;
    color: var(--muted);
    margin: 0;
}

/* Animations */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 675px) {
    :root {
        --game-h: 110px;
    }
    header {
        padding: 1em 1.5em;
    }
    main {
        padding: 4em 1.5em calc(var(--game-h) + 3em);
    }
    .bg-grid {
        background-size: 28px 28px;
    }
}

@media (max-width: 430px) {
    .social-links {
        gap: 1em;
    }
}

/* En pantallas bajas (móvil en horizontal) el minijuego taparía el hero */
@media (max-height: 540px) {
    :root {
        --game-h: 0px;
    }
    #game {
        display: none;
    }
}
