:root {
    --bg: #0a0b0f;
    --panel: rgba(255, 255, 255, 0.06);
    --stroke: rgba(255, 255, 255, 0.12);
    --txt: #eef2ff;
    --txt-dim: rgba(238, 242, 255, 0.7);
    --accent: #1e88e5;
}

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

html,
body {
    height: 100%;
}

body {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background:
        radial-gradient(1200px 1200px at 15% 10%, rgba(30, 136, 229, 0.25), transparent 60%),
        radial-gradient(900px 900px at 85% 0%, rgba(98, 0, 234, 0.18), transparent 60%),
        var(--bg);
    color: var(--txt);
    overflow-x: hidden;
}

/* Topbar simple */
.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 30px;
    z-index: 20;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .35), transparent);
    backdrop-filter: blur(6px);
}

.topbar .brand {
    color: #ffffffd3;
    width: 100%;
    text-align: center;
    font-weight: 700;
    letter-spacing: .2px;
}


/* HERO 3D */
.hero {
    position: relative;
    height: 120vh;
    /* más alto para tener recorrido de scroll */
    border-bottom: 1px solid var(--stroke);
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    pointer-events: none;
    padding-top: 56px;
}

.hero-title {
    font-size: clamp(42px, 7vw, 96px);
    line-height: 1;
}

.hero-sub {
    margin-top: 12px;
    color: var(--txt-dim);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-hint {
    margin-top: 18px;
    font-size: 14px;
    color: rgba(238, 242, 255, .6);
}

/* ABOUT */
.about {
    padding: 80px 24px;
    border-top: 1px solid var(--stroke);
}

.about-wrap {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 48px;
}

.about h2 {
    font-size: 32px;
    margin-bottom: 14px;
}

.about .lead {
    font-size: 18px;
    color: var(--txt-dim);
    margin-bottom: 24px;
}

.services {
    list-style: none;
    display: grid;
    gap: 16px;
}

.services li {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    background: var(--panel);
    border: 1px solid var(--stroke);
    padding: 14px 16px;
    border-radius: 16px;
}

.services .emoji {
    font-size: 22px;
    display: grid;
    place-items: center;
}

.services h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.services p {
    color: var(--txt-dim);
}

.about-media .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.ph {
    background: linear-gradient(135deg, rgba(30, 136, 229, .35), rgba(255, 255, 255, .08));
    border: 1px solid var(--stroke);
    border-radius: 16px;
    min-height: 130px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.ph-1 {
    min-height: 180px;
}

.ph-4 {
    min-height: 180px;
}

.hint {
    display: block;
    margin-top: 10px;
    color: var(--txt-dim);
    font-size: 12px;
}

/* LINKS */
.links {
    padding: 80px 24px;
    border-top: 1px solid var(--stroke);
    display: grid;
    place-items: center;
}

.links-card {
    width: 100%;
    max-width: 640px;
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.avatar {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    margin-bottom: 10px;
}

.link-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.link-btn {
    display: block;
    padding: 14px 18px;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    border: 1px solid rgba(30, 136, 229, .6);
    background: rgba(30, 136, 229, .18);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.link-btn:hover {
    transform: translateY(-2px);
    background: rgba(30, 136, 229, .28);
    box-shadow: 0 18px 44px rgba(30, 136, 229, .35);
}

.foot-note {
    color: var(--txt-dim);
    font-size: 12px;
}

/* Responsivo básico (por si alguien abre en móvil) */
@media (max-width: 900px) {
    .about-wrap {
        grid-template-columns: 1fr;
    }
}


/* ====== Mejora: reveal/parallax para galería ====== */
.about-media .grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transform: translateY(18px) scale(.98);
    opacity: 0;
    transition: transform .6s ease, opacity .6s ease, box-shadow .3s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.about-media .grid img.is-in {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ====== Mejora: botones magnéticos ====== */
.link-btn {
    position: relative;
    overflow: hidden;
}

.link-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .15), transparent 40%);
    opacity: 0;
    transition: opacity .15s;
}

.link-btn:hover::after {
    opacity: 1;
}

/* ====== Accesibilidad: reducir animaciones si el usuario lo pide ====== */
@media (prefers-reduced-motion: reduce) {

    .about-media .grid img,
    .link-btn,
    .hero-title {
        transition: none !important;
    }
}