:root {
    --violet: #8a4fff;
    --violet-2: #b18bff;
    --coral: #ff6f61;
    --blue: #63a4ff;
    --bg: #0d0f12;
    --bg-2: #0b0d10;
    --text: #e9edf1;
    --muted: #b8c0cc;
    --card: rgba(255,255,255,0.06);
    --stroke: rgba(255,255,255,0.12);
    --shadow: 0 20px 60px rgba(0,0,0,.35);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f6f7fb;
        --bg-2: #ffffff;
        --text: #121318;
        --muted: #586174;

        --card: rgba(0,0,0,0.06);
        --stroke: rgba(0,0,0,0.10);
        --shadow: 0 18px 48px rgba(0,0,0,.12);
    }
}

body.dark {
    --bg: #0d0f12;
    --bg-2: #0b0d10;
    --text:#e9edf1;
    --muted:#b8c0cc;
    --card:rgba(255,255,255,.06);
    --stroke:rgba(255,255,255,.12);
    --shadow:0 20px 60px rgba(0,0,0,.35);
}
body.light {
    --bg: #f6f7fb;
    --bg-2: #ffffff;
    --text:#121318;
    --muted:#586174;
    --card:rgba(0,0,0,.06);
    --stroke:rgba(0,0,0,.10);
    --shadow:0 18px 48px rgba(0,0,0,.12);
}

/* Estilos globales y fondo*/
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg), var(--bg-2));
}
a { color: inherit; text-decoration: none; }

.bg-blobs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.blob {
    position: absolute;
    filter: blur(40px);
    opacity: .55;
    mix-blend-mode: screen;
    animation: float 14s ease-in-out infinite;
}
.blob-violet { width:420px;height:420px;background:radial-gradient(circle,var(--violet),transparent 70%);top:-80px;left:-60px; }
.blob-coral { width:360px;height:360px;background:radial-gradient(circle,var(--coral),transparent 70%);top:120px;right:-80px;animation-delay:-4s; }
.blob-blue { width:460px;height:460px;background:radial-gradient(circle,var(--blue),transparent 70%);bottom:-100px;left:40%;animation-delay:-8s; }

@keyframes float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-25px); }
}

/*header*/
.site-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    backdrop-filter: blur(18px) saturate(160%);
    background: color-mix(in oklab, var(--card) 75%, transparent);
    border-bottom: 1px solid var(--stroke);
    z-index: 10;
}
.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}
.logo-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--coral));
    box-shadow: 0 0 12px var(--violet),0 0 18px var(--coral);
}
.nav a {
    margin: 0 8px;
    font-weight: 600;
    opacity: .85;
}
.nav a:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* botones */
.btn {
    border-radius: 16px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: .25s;
    border: 1px solid var(--stroke);
}
.btn-primary {
    background: linear-gradient(135deg,var(--violet),var(--coral));
    color: #fff;
    border: none;
    box-shadow: 0 10px 24px rgba(138,79,255,.35);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-outline { background: transparent; }
.btn-outline:hover { background: var(--card); }
.btn-ghost { background: var(--card); }

/* --- */
.section { padding: 90px 24px; display: grid; place-items: center; }
.hero { min-height: 70vh; text-align: center; }

.title { font-size: clamp(2rem,6vw,3.5rem); font-weight: 800; }
.grad {
    background: linear-gradient(90deg,var(--violet),var(--coral),var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.subtitle { opacity: .85; font-size: 1.2rem; }
.typed { display: inline-block; min-width: 12ch; }

/* tarjetass */
.floatin { animation: levitate 8s infinite ease-in-out; }
@keyframes levitate {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.stat { text-align: center; }
.kpi { font-size: 1.2rem; font-weight: 800; }
.label { color: var(--muted); font-size: .8rem; }
.divider { width: 1px; height: 30px; background: var(--stroke); }

/* tarjetas de los proyectos*/
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12,1fr); width: 100%; max-width: 1100px; }
.projects .card { grid-column: span 12; }
@media(min-width:768px) {
    .projects .card { grid-column: span 4; }
}
.card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 18px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    transition: .25s;
}
.card:hover { transform: translateY(-6px) scale(1.02); }
/* contact */
.contact-form {
    width: min(650px,100%);
    background: var(--card);
    border: 1px solid var(--stroke);
    padding: 22px;
    border-radius: 18px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}
.field { display: grid; gap: 6px; margin-bottom: 12px; }
input,textarea {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: color-mix(in oklab,var(--card) 70%,transparent);
    color: var(--text);
}
input:focus,textarea:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(138,79,255,.3);
}

/* --- */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(4px);
}
.modal.hidden { display: none; }
.modal-content {
    background: var(--bg-2);
    border-radius: 20px;
    padding: 24px;
    width: min(420px,90%);
    border: 1px solid var(--stroke);
    animation: pop .25s ease;
}
@keyframes pop { from{scale:.9;opacity:0;} }
.modal-close {
    float: right;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
}
/* --*/
.card, .section {
    opacity: 0;
    transform: translateY(16px);
    transition: .6s;
}
.visible {
    opacity: 1;
    transform: translateY(0);
}
/* logo*/
.logo-img {
    height: 32px;
    width: auto;
    margin-right: 8px;
}
.about {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.about-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
}
.tech .badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: -20vh;
}
.tech .badges img {
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.25));
}
.cta-section { text-align:center; padding: 40px 0; }
.cta-section p { opacity:.9; margin: 8px 0 16px; font-size:1.05rem; }


.modal.hidden { display: none; }
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999;
}
.modal .game-box {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    width: 900px;
    max-width: 95%;
    height: 600px;
    box-shadow: 0 0 20px rgba(200,100,255,0.4);
    overflow: hidden;
    animation: floatIn .4s ease;
}
.game-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
}
.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    color: white;
    font-size: 28px;
    border: none;
    cursor: pointer;
}
@keyframes floatIn {
    from { transform: scale(.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


