/* ══════════════════════════════════════════════════════════
   CORRECCIONES APLICADAS (jun 2026):
   • Dimensiones móvil: min-height en vh → svh (estable, sin saltos por
     la barra de URL) y la side-nav a dvh.
   • Secciones vacías que se aplastaban (#about y #skills traían
     min-height:auto): ahora tienen altura real para que no salgan
     encimadas. Cuando les pongas contenido puedes ajustar/quitar eso.
   Nota: los selectores duplicados (.pillar, .loader-code, #loader, #hero…)
   se dejaron como estaban: se sobre-escriben entre sí y el aspecto final
   depende de ese orden; consolidarlos a ciegas cambiaría el diseño.
   ══════════════════════════════════════════════════════════ */

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

html {
    scroll-behavior: smooth
}

body {
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    background: #000
}

.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    background: white;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    transition: width .25s, height .25s
}

.cursor-ring {
    position: fixed;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    pointer-events: none;
    z-index: 9998;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    transition: width .3s, height .3s, border-color .3s
}

#glCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0
}

#cloudCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none
}

/* ── NAV FLOTANTE — cuadrado, pegado arriba, ancho completo ── */
/* nav wrapper — completamente transparente en el centro */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 52px;
    background: transparent;
    pointer-events: none;
    transition: opacity .5s, transform .5s;
}

nav.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* La hamburguesa SIEMPRE visible en TODA la página, sobre cualquier capa */
.nav-pill-right {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    position: fixed !important;
    top: 18px;
    right: 28px;
    z-index: 9999 !important;
    visibility: visible !important;
    display: flex !important;
    background: transparent !important;
    -webkit-tap-highlight-color: transparent;
}

@media(max-width:768px) {
    .nav-pill-right {
        top: 14px;
        right: 18px;
    }
}

/* Reforzar que la hamburguesa misma siempre esté visible */
.nav-hamburger {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.nav-pill-left {
    pointer-events: all;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

.nav-pill-right {
    pointer-events: all;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

.nav-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 300;
    letter-spacing: .18em;
    color: rgba(250, 243, 228, 0.92);
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: 0 0 18px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 1);
    transition: color .3s, text-shadow .3s;
}

.nav-logo:hover {
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.25), 0 0 40px rgba(0, 0, 0, 0.9);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: rgba(195, 210, 235, 0.82);
    text-decoration: none;
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    transition: color .3s, text-shadow .3s;
    text-shadow: 0 0 14px rgba(0, 0, 0, 0.9), 0 1px 3px rgba(0, 0, 0, 1);
}

.nav-links a:hover {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.20), 0 0 30px rgba(0, 0, 0, 0.8);
}

#navTrigger {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 99;
}

.scroll-wrap {
    position: relative;
    z-index: 10
}

section {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 52px;
    position: relative
}

#hero {
    align-items: center;
    text-align: center;
    padding-top: 80px
}

.hero-eyebrow {
    font-size: 10px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp 1.4s .4s forwards
}

/* ── NOMBRE HERO con efecto neon azul al hover ── */
.hero-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(56px, 8vw, 120px);
    font-weight: 300;
    line-height: 1;
    color: rgba(250, 243, 228, 0.96);
    letter-spacing: -.02em;
    opacity: 0;
    animation: fadeUp 1.4s .6s forwards;
    /* efecto 3D con sombras apiladas (manteniendo el serif elegante) */
    text-shadow:
        0 1px 0 rgba(125, 211, 252, 0.18),
        0 2px 0 rgba(125, 211, 252, 0.14),
        0 4px 0 rgba(125, 211, 252, 0.10),
        0 6px 0 rgba(125, 211, 252, 0.06),
        0 12px 28px rgba(0, 0, 0, 0.55),
        0 0 50px rgba(125, 211, 252, 0.12);
    /* perspectiva 2D/3D leve */
    transform: perspective(1600px) rotateX(3deg);
    transform-origin: center bottom;
}

.hero-name:hover {
    border-color: transparent;
    box-shadow: none;
}

.hero-name em {
    font-style: italic;
    color: rgba(195, 210, 235, 0.90)
}

.hero-role {
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(232, 213, 183, 0.65);
    margin-top: 32px;
    font-weight: 300;
    opacity: 0;
    animation: fadeUp 1.4s .8s forwards
}

.scroll-hint {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeUp 1.4s 1.4s forwards
}

.scroll-hint span {
    font-size: 9px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35)
}

.scroll-line {
    width: 1px;
    height: 56px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
    animation: lineAnim 2s 1.8s ease infinite
}

/* ── SECCIÓN ABOUT — 4 cuadrantes ── */
#about {
    padding: 100px 52px;
    display: grid;
    grid-template-columns: 3fr 4fr;
    grid-template-rows: auto auto;
    gap: 20px;
    align-items: start;
    /* estaba en auto y aplastaba la sección vacía; le damos altura real */
    min-height: 80vh;
    min-height: 80svh;
}

.about-left {
    display: contents;
}

/* foto */
.about-photo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.35);
    box-shadow: 0 0 18px rgba(125, 211, 252, 0.22), 0 0 50px rgba(125, 211, 252, 0.08);
}

.about-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(4, 4, 28, 0.95), rgba(10, 20, 60, 0.90));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(60, 120, 255, 0.6);
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.about-photo-placeholder svg {
    opacity: .4;
}

/* cards de info debajo de la foto */
.about-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about-card {
    background: rgba(6, 10, 26, 0.72);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(125, 211, 252, 0.20);
    border-radius: 8px;
    padding: 14px 18px;
    transition: border-color .3s, box-shadow .3s;
}

.about-card:hover {
    border-color: rgba(125, 211, 252, 0.48);
    box-shadow: 0 0 16px rgba(125, 211, 252, 0.20);
}

.about-card-icon {
    font-size: 16px;
    margin-bottom: 5px;
}

.about-card-title {
    font-size: 9px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(125, 211, 252, 0.75);
    margin-bottom: 4px;
}

.about-card-val {
    font-size: 12px;
    color: rgba(250, 243, 228, 0.88);
    font-weight: 300;
    line-height: 1.55;
}

/* columna derecha */
.about-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* recuadro bio */
.about-bio {
    background: rgba(6, 10, 26, 0.78);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(125, 211, 252, 0.30);
    border-radius: 8px;
    padding: 36px;
    transition: border-color .4s, box-shadow .4s;
}

.about-bio:hover {
    border-color: rgba(125, 211, 252, 0.58);
    box-shadow: 0 0 20px rgba(125, 211, 252, 0.28), 0 0 48px rgba(125, 211, 252, 0.10);
}

.about-bio-label {
    font-size: 9px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(125, 211, 252, 0.70);
    margin-bottom: 16px;
}

.about-bio-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 300;
    line-height: 1.45;
    color: rgba(250, 243, 228, 0.95);
}

.about-bio-text em {
    font-style: italic;
    color: rgba(125, 211, 252, 0.85);
}

/* constelación Leo — sin recuadro, flotando en el espacio */
.about-leo-wrap {
    position: relative;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

#leoCanvas {
    display: block;
    width: 100%;
    height: 420px;
}

.about-leo-label {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 9px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(60, 140, 255, 0.45);
    font-family: 'Space Grotesk', sans-serif;
}

/* seccion glass — mantener para otras partes */
.section-glass {
    background: rgba(0, 0, 0, 0.32);
    -webkit-backdrop-filter: blur(28px);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 44px;
    transition: border-color .4s, box-shadow .4s;
}

.section-glass:hover {
    border-color: rgba(40, 140, 255, 0.6);
    box-shadow: 0 0 10px rgba(40, 140, 255, 0.35), 0 0 30px rgba(40, 140, 255, 0.15);
}

.about-label {
    font-size: 9px;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 20px
}

.about-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 300;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.9)
}

.about-text em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.6)
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 0
}

.about-item {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 18px 0
}

.about-item:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07)
}

.about-item-label {
    font-size: 9px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 5px
}

.about-item-val {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    line-height: 1.5
}

@media(max-width:768px) {
    #about {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .about-photo-wrap {
        max-width: 100%;
        aspect-ratio: 1/1;
    }
}

#work {
    padding: 80px 52px 100px
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 52px
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(38px, 5vw, 68px);
    font-weight: 300;
    color: rgba(250, 243, 228, 0.95);
    letter-spacing: -.01em;
    line-height: 1
}

.section-count {
    font-size: 10px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25)
}

/* ── CATEGORÍAS DE PROYECTOS ── */
.proj-category {
    margin-bottom: 72px;
}

/* badge de categoría — solo texto */
.proj-cat-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(60, 120, 255, 0.15);
    padding-bottom: 12px;
    width: 100%;
}

.proj-cat-num {
    font-size: 9px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(125, 211, 252, 0.55);
}

.proj-cat-pill {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 300;
    color: rgba(250, 243, 228, 0.95);
    letter-spacing: .02em;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
}

/* ── TARJETA — carrusel izq / info der ── */
.proj-card {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 52px;
    display: grid;
    grid-template-columns: 3fr 4fr;
    gap: 52px;
    align-items: center;
}

.proj-card:hover {
    border-color: transparent;
    box-shadow: none;
}

.proj-card-top {
    /* contiene el carrusel */
    padding: 8px 0;
}

.proj-card:hover {
    border-color: rgba(60, 120, 255, 0.40);
    box-shadow: 0 0 24px rgba(60, 120, 255, 0.14);
}

/* ── COVERFLOW estilo imagen de referencia ── */
.proj-coverflow {
    position: relative;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: visible;
}

.proj-coverflow-track {
    position: relative;
    width: 100%;
    height: 170px;
    perspective: 700px;
    transform-style: preserve-3d;
}

.proj-cf-slide {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 200px;
    height: 140px;
    margin-left: -100px;
    margin-top: -70px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(145deg, #060622, #0a1438);
    border: 1px solid rgba(60, 120, 255, 0.20);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    cursor: none;
    transition: transform .55s cubic-bezier(.25, .46, .45, .94),
        opacity .55s, box-shadow .55s;
    transform: translateX(0) scale(0.60) rotateY(45deg);
    opacity: 0;
    z-index: 0;
}

.proj-cf-slide.cf-active {
    transform: translateX(0) scale(1) rotateY(0deg);
    opacity: 1;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(125, 211, 252, 0.50), 0 0 50px rgba(125, 211, 252, 0.15);
    z-index: 3;
}

.proj-cf-slide.cf-prev {
    transform: translateX(-58%) scale(0.78) rotateY(22deg);
    opacity: 0.50;
    z-index: 2;
}

.proj-cf-slide.cf-next {
    transform: translateX(58%) scale(0.78) rotateY(-22deg);
    opacity: 0.50;
    z-index: 2;
}

.proj-cf-slide.cf-far-left {
    transform: translateX(-90%) scale(0.58) rotateY(35deg);
    opacity: 0.18;
    z-index: 1;
}

.proj-cf-slide.cf-far-right {
    transform: translateX(90%) scale(0.58) rotateY(-35deg);
    opacity: 0.18;
    z-index: 1;
}

.proj-cf-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.proj-cf-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: rgba(60, 120, 255, 0.45);
    font-size: 8px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.proj-cf-placeholder svg {
    opacity: .25;
}

.proj-cf-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

/* botones flotantes fuera del track */
.proj-cf-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-70%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(4, 4, 18, 0.90);
    border: 1px solid rgba(125, 211, 252, 0.50);
    color: rgba(250, 243, 228, 0.95);
    font-size: 13px;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s, box-shadow .3s;
    z-index: 10;
}

.proj-cf-btn:hover {
    background: rgba(125, 211, 252, 0.25);
    box-shadow: 0 0 12px rgba(125, 211, 252, 0.55);
}

.proj-cf-btn.prev {
    left: -4px;
}

.proj-cf-btn.next {
    right: -4px;
}

.proj-cf-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.proj-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    cursor: none;
    transition: all .3s;
}

.proj-dot.active {
    background: rgba(125, 211, 252, 0.95);
    box-shadow: 0 0 8px rgba(125, 211, 252, 0.70);
    transform: scale(1.3);
}

/* ── INFO — columna derecha en secciones ── */
.proj-info {
    display: flex;
    flex-direction: column;
    background: rgba(6, 10, 26, 0.90);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(125, 211, 252, 0.32);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 22px rgba(125, 211, 252, 0.18), 0 0 48px rgba(125, 211, 252, 0.06);
}

.proj-info-section {
    padding: 16px 22px;
    border-bottom: 1px solid rgba(60, 120, 255, 0.09);
}

.proj-info-section:last-child {
    border-bottom: none;
}

.proj-info-section-label {
    font-size: 8px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: rgba(125, 211, 252, 0.62);
    margin-bottom: 6px;
}

.proj-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.proj-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(18px, 1.8vw, 24px);
    font-weight: 300;
    color: rgba(250, 243, 228, 0.98);
    line-height: 1.15;
}

.proj-link {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(125, 211, 252, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(125, 211, 252, 0.90);
    font-size: 12px;
    text-decoration: none;
    transition: background .3s, box-shadow .3s;
}

.proj-link:hover {
    background: rgba(125, 211, 252, 0.18);
    box-shadow: 0 0 12px rgba(125, 211, 252, 0.40);
}

.proj-desc-text {
    font-size: 12px;
    color: rgba(240, 232, 218, 0.88);
    line-height: 1.75;
    font-weight: 300;
}

.proj-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.proj-tech {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(125, 211, 252, 0.40);
    color: rgba(186, 230, 253, 0.92);
    background: rgba(125, 211, 252, 0.12);
}

.proj-team {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.proj-member {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(232, 213, 183, 0.22);
    color: rgba(232, 213, 183, 0.82);
    background: rgba(232, 213, 183, 0.04);
}

@media(max-width:768px) {
    .proj-card {
        grid-template-columns: 1fr;
    }

    .proj-cf-slide {
        width: 220px;
        height: 150px;
    }

    .proj-cf-slide.cf-prev {
        transform: translateX(-55%) scale(0.80) rotateY(18deg);
    }

    .proj-cf-slide.cf-next {
        transform: translateX(55%) scale(0.80) rotateY(-18deg);
    }
}

#skills {
    padding: 60px 52px;
    /* estaba en auto y aplastaba la sección vacía; le damos altura real */
    min-height: 80vh;
    min-height: 80svh
}

.skills-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.05)
}

.skill-item {
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 32px 28px;
    transition: background .3s
}

.skill-item:hover {
    background: rgba(255, 255, 255, 0.04)
}

.skill-icon {
    font-size: 22px;
    margin-bottom: 14px;
    opacity: .7;
    color: rgba(125, 211, 252, 0.85);
}

.skill-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 300;
    color: rgba(250, 243, 228, 0.93);
    margin-bottom: 8px
}

.skill-desc {
    font-size: 11px;
    color: rgba(205, 218, 238, 0.62);
    line-height: 1.75;
    font-weight: 300
}

#contact {
    min-height: 80vh;
    min-height: 80svh;
    align-items: center;
    text-align: center
}

.contact-pre {
    font-size: 10px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 28px
}

.contact-big {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(44px, 8vw, 110px);
    font-weight: 300;
    color: rgba(250, 243, 228, 0.95);
    letter-spacing: -.02em;
    margin-bottom: 44px;
    line-height: .95
}

.contact-big em {
    font-style: italic;
    color: rgba(125, 211, 252, 0.70)
}

.contact-email {
    display: inline-block;
    font-size: 13px;
    letter-spacing: .1em;
    color: rgba(232, 213, 183, 0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(232, 213, 183, 0.30);
    padding-bottom: 4px;
    transition: color .3s, border-color .3s
}

.contact-email:hover {
    color: rgba(245, 235, 216, 1);
    border-color: rgba(232, 213, 183, 0.75)
}

.footer-row {
    position: absolute;
    bottom: 28px;
    left: 52px;
    right: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: .08em
}

.socials {
    display: flex;
    gap: 24px
}

.socials a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: color .3s
}

.socials a:hover {
    color: rgba(255, 255, 255, 0.8)
}

.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 1s ease, transform 1s ease
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0)
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes lineAnim {
    0% {
        transform: scaleY(0);
        transform-origin: top
    }

    50% {
        transform: scaleY(1);
        transform-origin: top
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom
    }
}

@media(max-width:768px) {
    nav {
        padding: 18px 20px
    }

    section,
    #about,
    #work,
    #skills,
    #contact {
        padding-left: 20px;
        padding-right: 20px
    }

    #about {
        grid-template-columns: 1fr;
        padding-top: 80px;
        padding-bottom: 80px;
        gap: 32px
    }

    .projects-grid {
        grid-template-columns: 1fr
    }

    .project-card:first-child {
        grid-column: auto;
        aspect-ratio: 4/3
    }

    .skills-inner {
        grid-template-columns: 1fr 1fr
    }

    .section-glass {
        padding: 28px
    }
}


/* ──────────────────────────────────────
   LOADER · código → partículas → UI
   ────────────────────────────────────── */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #020208;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1.2s cubic-bezier(.4, 0, .2, 1);
}

#loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

#loader.gone {
    display: none;
}

#loaderCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.loader-code {
    position: relative;
    z-index: 2;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: clamp(10px, 1.1vw, 13px);
    line-height: 1.65;
    color: rgba(245, 235, 216, 0.85);
    max-width: 760px;
    width: 90%;
    padding: 32px 36px;
    background: rgba(4, 6, 16, 0.55);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(125, 211, 252, 0.15);
    border-radius: 6px;
    box-shadow: 0 0 60px rgba(125, 211, 252, 0.08), inset 0 0 30px rgba(0, 0, 0, 0.4);
    white-space: pre-wrap;
    transition: opacity .8s, transform .8s;
}

.loader-code.dispersing {
    opacity: 0;
    transform: scale(0.96) translateY(-12px);
    filter: blur(8px);
}

.tk-key {
    color: #C792EA;
}

/* const, function, if */
.tk-str {
    color: #E8D5B7;
}

/* "strings" */
.tk-fn {
    color: #7DD3FC;
}

/* function names */
.tk-num {
    color: #F5EBD8;
}

/* numbers */
.tk-com {
    color: rgba(168, 181, 209, 0.50);
    font-style: italic;
}

/* comments */
.tk-tag {
    color: #7DD3FC;
}

/* <html> tags */
.tk-attr {
    color: #E8D5B7;
}

/* attr= */
.tk-cur {
    display: inline-block;
    width: 7px;
    height: 1em;
    background: rgba(125, 211, 252, 0.85);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

.loader-status {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(168, 181, 209, 0.65);
}

.loader-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(125, 211, 252, 0.9);
    box-shadow: 0 0 8px rgba(125, 211, 252, 0.6);
    animation: pulse 1.4s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: .5;
    }
}

/* ──────────────────────────────────────
   PILARES FLOTANTES 3D sobre el mar
   ────────────────────────────────────── */
/* (primera definición .pillars eliminada, ver más abajo) */
.pillar {
    position: relative;
    width: clamp(220px, 22vw, 300px);
    padding: 42px 28px 32px;
    background: rgba(4, 8, 22, 0.55);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 4px;
    cursor: pointer;
    transition: transform .55s cubic-bezier(.25, .46, .45, .94),
        background .4s, border-color .4s, box-shadow .55s;
    transform-style: preserve-3d;
    text-align: center;
    overflow: hidden;
}

.pillar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(125, 211, 252, 0.04) 50%,
            rgba(125, 211, 252, 0.12) 100%);
    opacity: 0;
    transition: opacity .5s;
    pointer-events: none;
}



.pillar:hover {
    transform: rotateY(0) translateZ(40px) translateY(-18px);
    background: rgba(6, 12, 28, 0.75);
    border-color: rgba(125, 211, 252, 0.55);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(125, 211, 252, 0.25),
        inset 0 0 30px rgba(125, 211, 252, 0.08);
}

.pillar:hover::before {
    opacity: 1;
}

.pillar-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.18) 0%, transparent 50%);
    opacity: 0;
    transition: opacity .5s;
    pointer-events: none;
}

.pillar:hover .pillar-glow {
    opacity: 1;
    animation: glowMove 3s ease-in-out infinite;
}

@keyframes glowMove {

    0%,
    100% {
        transform: translate(-5%, -5%);
    }

    50% {
        transform: translate(5%, 5%);
    }
}

.pillar-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: .32em;
    color: rgba(125, 211, 252, 0.55);
    margin-bottom: 18px;
}

.pillar-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(28px, 2.6vw, 38px);
    font-weight: 300;
    color: rgba(250, 243, 228, 0.96);
    margin-bottom: 10px;
    line-height: 1;
    letter-spacing: .01em;
}

.pillar-sub {
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(195, 210, 235, 0.62);
    font-weight: 300;
}

.pillar.active {
    background: rgba(8, 14, 32, 0.85);
    border-color: rgba(125, 211, 252, 0.75);
    box-shadow:
        0 0 30px rgba(125, 211, 252, 0.35),
        0 0 80px rgba(125, 211, 252, 0.15);
}

@media(max-width:768px) {
    .pillars {
        flex-direction: column;
        gap: 20px;
        padding: 60px 20px 80px;
        align-items: center;
    }

    .pillar {
        width: 100%;
        max-width: 340px;
        transform: none !important;
    }

    .pillar:hover {
        transform: translateY(-6px) !important;
    }
}

/* ──────────────────────────────────────
   HERO STAGE — transformación nombre ↔ pilares
   ────────────────────────────────────── */
#hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-stage {
    width: 100%;
    text-align: center;
}

.hero-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: opacity .7s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.4, 0, .2, 1), filter .7s;
}

#hero.exploring .hero-stage {
    opacity: 0;
    transform: scale(0.92) translateY(-30px);
    filter: blur(10px);
    pointer-events: none;
}

/* ── ANIMACIÓN TIPO CÓDIGO HTML → TEXTO ── */
/* HN-LINE · contenedor para text scramble JS */
.hn-line {
    display: inline-block;
    position: relative;
    font-family: inherit;
    color: rgba(250, 243, 228, 0.98);
    text-shadow:
        0 1px 0 rgba(125, 211, 252, 0.10),
        0 2px 0 rgba(125, 211, 252, 0.08),
        0 4px 0 rgba(125, 211, 252, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 1;
    /* visible siempre — el fade lo hace .hero-name */
}

.hn-line.italic {
    font-style: italic;
    color: rgba(195, 210, 235, 0.92);
}

/* Caracteres scrambleando */
.dud {
    color: rgba(125, 211, 252, 0.85);
    text-shadow: 0 0 8px rgba(125, 211, 252, 0.4);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-style: normal;
    font-size: 0.7em;
    font-weight: 400;
    letter-spacing: 0;
    opacity: 0.9;
}

/* También pausar eyebrow, role, cta, scroll-hint hasta cargar */
.hero-eyebrow,
.hero-role,
.hero-cta,
.scroll-hint {
    animation-play-state: paused !important;
}

body.loaded .hero-eyebrow,
body.loaded .hero-role,
body.loaded .hero-cta,
body.loaded .scroll-hint {
    animation-play-state: running !important;
}

.hn-line.italic::after {
    font-style: italic;
    color: rgba(168, 181, 209, 0.88);
}

.hn-line.italic::before {
    color: rgba(232, 213, 183, 0.7);
}

@keyframes codeToText {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    15% {
        opacity: 1;
        transform: translateY(0);
    }

    65% {
        opacity: 1;
        filter: blur(0);
    }

    85% {
        opacity: 0;
        filter: blur(6px);
        transform: scale(1.05);
    }

    100% {
        opacity: 0;
    }
}

@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(6px);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* ── BOTÓN EXPLORAR (CTA) ── */
.hero-cta {
    margin-top: 48px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: rgba(6, 12, 28, 0.65);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(125, 211, 252, 0.35);
    border-radius: 48px;
    color: rgba(250, 243, 228, 0.92);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    animation: fadeUp 1.4s 3.4s forwards;
    transition: background .3s, border-color .3s, box-shadow .4s, transform .3s;
}

.hero-cta:hover {
    background: rgba(125, 211, 252, 0.18);
    border-color: rgba(125, 211, 252, 0.65);
    box-shadow: 0 0 24px rgba(125, 211, 252, 0.35), 0 0 60px rgba(125, 211, 252, 0.12);
    transform: translateY(-2px);
}

.hero-cta-icon {
    font-size: 13px;
    transition: transform .3s;
    color: rgba(125, 211, 252, 0.95);
}

.hero-cta:hover .hero-cta-icon {
    transform: translateX(4px);
}

/* ── PILARES (estado oculto por default, visible cuando .exploring) ── */
.pillars {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(20px, 4vw, 72px);
    padding: 0 20px;
    perspective: 1400px;
    opacity: 0;
    transform: scale(0.85) translateY(40px);
    transition: opacity .9s .25s cubic-bezier(.4, 0, .2, 1), transform .9s .25s cubic-bezier(.4, 0, .2, 1);
    pointer-events: none;
    animation: none;
    width: 100%;
}

#hero.exploring .pillars {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

#hero.exploring .pillar:nth-child(1) {
    animation: pillarIn .8s .35s cubic-bezier(.34, 1.56, .64, 1) both;
}

#hero.exploring .pillar:nth-child(2) {
    animation: pillarIn .8s .50s cubic-bezier(.34, 1.56, .64, 1) both;
}

#hero.exploring .pillar:nth-child(3) {
    animation: pillarIn .8s .65s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes pillarIn {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.85) rotateY(20deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateY(0);
    }
}

/* ── BOTÓN VOLVER ── */
.hero-back {
    position: absolute;
    top: 88px;
    left: 52px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(6, 12, 28, 0.65);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(125, 211, 252, 0.25);
    border-radius: 24px;
    color: rgba(195, 210, 235, 0.85);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity .5s, transform .5s, background .3s, border-color .3s;
    pointer-events: none;
    z-index: 20;
}

#hero.exploring .hero-back {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    transition-delay: .5s;
}

.hero-back:hover {
    background: rgba(125, 211, 252, 0.18);
    border-color: rgba(125, 211, 252, 0.55);
    color: rgba(250, 243, 228, 1);
}

@media(max-width:768px) {
    .pillars {
        flex-direction: column;
        padding: 60px 20px;
    }

    .pillar {
        width: 100%;
        max-width: 340px;
    }

    .hero-back {
        top: 72px;
        left: 20px;
    }

    .hero-cta {
        margin-top: 32px;
    }
}

/* ══════════════════════════════════════════════════════════
   FASE 1+2 · LOADER EXTENDIDO (esqueleto del sitio renderizando)
   ══════════════════════════════════════════════════════════ */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #020208 0%, #04061a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    will-change: opacity, filter;
    transition: opacity 2.2s cubic-bezier(.22, 1, .36, 1), transform 2.3s cubic-bezier(.22, 1, .36, 1), filter 2.2s cubic-bezier(.22, 1, .36, 1);
}

#loader.fade-out {
    opacity: 0;
    transform: translateY(-40px);
    filter: blur(14px);
    pointer-events: none;
}

#loader.gone {
    display: none;
}

#loaderCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    clip-path: inset(0 100% 0 0);
    -webkit-clip-path: inset(0 100% 0 0);
    will-change: clip-path;
}

.loader-rays {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 100%, rgba(125, 211, 252, 0) 0%, transparent 70%);
    transition: background 1.4s;
}

#loader.transitioning .loader-rays {
    background: radial-gradient(ellipse at 50% 100%, rgba(125, 211, 252, 0.18) 0%, transparent 70%);
}

/* Código crudo flotando — sin recuadro, sin marcos */
.loader-code {
    position: relative;
    z-index: 3;
    width: min(820px, 88vw);
    max-height: 72vh;
    overflow: hidden;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: clamp(11px, 1vw, 14px);
    line-height: 1.65;
    color: rgba(245, 235, 216, 0.85);
    white-space: pre-wrap;
    text-align: left;
    will-change: opacity, filter, transform;
    transition: opacity .8s, filter .8s, transform .8s;
}

.loader-code.dispersing {
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.98) translateY(-8px);
}

.tk-key {
    color: #C792EA;
}

.tk-str {
    color: #E8D5B7;
}

.tk-fn {
    color: #7DD3FC;
}

.tk-num {
    color: #F5EBD8;
}

.tk-com {
    color: rgba(168, 181, 209, 0.50);
    font-style: italic;
}

.tk-tag {
    color: #7DD3FC;
}

.tk-attr {
    color: #E8D5B7;
}

.tk-bracket {
    color: rgba(168, 181, 209, 0.60);
}

.tk-cur {
    display: inline-block;
    width: 7px;
    height: 1em;
    background: rgba(125, 211, 252, 0.85);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}



/* ══════════════════════════════════════════════════════════
   FASE 3 · PÍLDORAS DE LENGUAJES (HTML → píldora)
   ══════════════════════════════════════════════════════════ */
.explore-stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .6s;
}

#hero.exploring .explore-stage {
    opacity: 1;
    pointer-events: auto;
    transition-delay: .25s;
}

.lang-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
    max-width: 720px;
    padding: 0 20px;
}

.lang-pill {
    position: relative;
    display: inline-block;
    padding: 8px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(125, 211, 252, 0.85);
    background: rgba(125, 211, 252, 0.06);
    border: 1px solid rgba(125, 211, 252, 0.30);
    border-radius: 24px;
    letter-spacing: .05em;
    cursor: default;
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1),
        background .3s, border-color .3s, box-shadow .4s, color .3s;
    opacity: 0;
}

.lang-pill::before {
    /* estado HTML inicial */
    content: '<span>' attr(data-text) '</span>';
}

.lang-pill.morphed {
    color: rgba(186, 230, 253, 0.95);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.lang-pill.morphed::before {
    content: attr(data-text);
}

#hero.exploring .lang-pill {
    opacity: 1;
    animation: langPillIn .6s forwards;
}

#hero.exploring .lang-pill:nth-child(1) {
    animation-delay: .40s;
}

#hero.exploring .lang-pill:nth-child(2) {
    animation-delay: .45s;
}

#hero.exploring .lang-pill:nth-child(3) {
    animation-delay: .50s;
}

#hero.exploring .lang-pill:nth-child(4) {
    animation-delay: .55s;
}

#hero.exploring .lang-pill:nth-child(5) {
    animation-delay: .60s;
}

#hero.exploring .lang-pill:nth-child(6) {
    animation-delay: .65s;
}

#hero.exploring .lang-pill:nth-child(7) {
    animation-delay: .70s;
}

#hero.exploring .lang-pill:nth-child(8) {
    animation-delay: .75s;
}

@keyframes langPillIn {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.92);
    }

    60% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lang-pill:hover {
    transform: translateY(-3px) scale(1.06);
    background: rgba(125, 211, 252, 0.18);
    border-color: rgba(125, 211, 252, 0.65);
    color: rgba(245, 235, 216, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 24px rgba(125, 211, 252, 0.35);
}

/* pilares con etiquetas que morfean (Trabajo, Música, Sobre mí) */
/* Pillar label: tamaño moderado para caber en el recuadro */
.pillar-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(28px, 2.6vw, 38px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: .01em;
    margin-bottom: 10px;
    min-height: 1.1em;
    color: rgba(250, 243, 228, 0.96);
    text-shadow:
        0 1px 0 rgba(125, 211, 252, 0.10),
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(125, 211, 252, 0.12);
    transition: color .4s, text-shadow .4s, -webkit-text-stroke .4s;
}

/* HOVER pilar-label: solo contorno cian (efecto outline) */
.pillar:hover .pillar-label {
    color: transparent;
    -webkit-text-stroke: 1px rgba(125, 211, 252, 0.95);
    text-shadow:
        0 0 24px rgba(125, 211, 252, 0.45),
        0 0 48px rgba(125, 211, 252, 0.20);
}

/* efecto agua en pilares (micro-interacción de cristal/reflejo) */
.pillar-water {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
    opacity: 0;
    transition: opacity .4s;
}

.pillar-water::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
            rgba(125, 211, 252, 0.25) 0%,
            rgba(125, 211, 252, 0.10) 20%,
            transparent 50%);
    filter: blur(6px);
    transition: opacity .3s;
}

.pillar:hover .pillar-water {
    opacity: 1;
}

/* Pilares con recuadro (diseño con borde + glass) */
.pillar {
    position: relative;
    width: clamp(220px, 22vw, 300px);
    padding: 42px 28px 32px;
    background: rgba(4, 8, 22, 0.55);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(125, 211, 252, 0.20);
    border-radius: 6px;
    cursor: pointer;
    transform-style: preserve-3d;
    text-align: center;
    overflow: hidden;
    transition: transform .55s cubic-bezier(.25, .46, .45, .94),
        background .4s, border-color .4s, box-shadow .55s;
}

.pillar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
            transparent 30%,
            rgba(125, 211, 252, 0.15) 50%,
            transparent 70%);
    transform: translateX(-100%);
    transition: transform .8s cubic-bezier(.25, .46, .45, .94);
    pointer-events: none;
}

.pillar:hover::after {
    transform: translateX(100%);
}

.pillar:hover {
    transform: translateY(-10px);
    background: rgba(6, 12, 28, 0.75);
    border-color: rgba(125, 211, 252, 0.55);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(125, 211, 252, 0.25),
        inset 0 0 30px rgba(125, 211, 252, 0.08);
}

.pillar-water {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
    opacity: 0;
    transition: opacity .4s;
}

.pillar-water::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
            rgba(125, 211, 252, 0.25) 0%,
            rgba(125, 211, 252, 0.10) 20%,
            transparent 50%);
    filter: blur(6px);
}

.pillar:hover .pillar-water {
    opacity: 1;
}

.pillar-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.18) 0%, transparent 50%);
    opacity: 0;
    transition: opacity .5s;
    pointer-events: none;
}

.pillar:hover .pillar-glow {
    opacity: 1;
}

/* ══════════════════════════════════════════════════════════
   FASE 4 · NAV HAMBURGER (estilo estrellas/constelación)
   ══════════════════════════════════════════════════════════ */
.nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: transparent !important;
    border: none;
    cursor: pointer;
    color: rgba(245, 235, 216, 0.92);
    transition: color .3s, transform .3s;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.nav-hamburger:hover {
    color: rgba(125, 211, 252, 1);
    transform: scale(1.08);
}

.nav-hamburger .ham-star {
    animation: hamStar 2.4s ease-in-out infinite;
    transform-origin: 12px 12px;
}

@keyframes hamStar {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* SIDE NAV estilo Van Holtz */
.side-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 90vw);
    height: 100vh;
    height: 100dvh;
    background: transparent;
    border-left: none;
    z-index: 200;
    transform: translateX(110%);
    transition: transform .7s cubic-bezier(.7, 0, .3, 1);
    display: flex;
    flex-direction: column;
    padding: 72px 0 32px 32px;
    pointer-events: none;
    visibility: hidden;
}

.side-nav.open {
    visibility: visible;
}

.side-nav.open {
    pointer-events: auto;
}

.side-nav.open {
    transform: translateX(0);
}

.side-nav-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(125, 211, 252, 0.20);
    border-radius: 50%;
    color: rgba(245, 235, 216, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s;
}

.side-nav-close:hover {
    background: rgba(125, 211, 252, 0.15);
    border-color: rgba(125, 211, 252, 0.55);
    color: rgba(125, 211, 252, 1);
    transform: rotate(90deg);
}

.side-nav-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.side-nav-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    padding: 0 24px 32px 0;
    border-bottom: 1px solid rgba(125, 211, 252, 0.15);
}

.side-nav-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(125, 211, 252, 0.50);
    letter-spacing: .2em;
}

.side-nav-meta {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    color: rgba(168, 181, 209, 0.70);
    letter-spacing: .08em;
}

.side-nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* alinear a la derecha */
    gap: 4px;
    margin-top: 48px;
}

.side-nav-links a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    padding: 6px 0;
    padding-right: 24px;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(28px, 3.5vw, 52px);
    font-weight: 300;
    line-height: 1.05;
    color: rgba(250, 243, 228, 0.92);
    text-decoration: none;
    letter-spacing: -.015em;
    position: relative;
    /* SIN rotación — letras normales */
    transition: color .45s cubic-bezier(.22, 1, .36, 1),
        text-shadow .45s cubic-bezier(.22, 1, .36, 1),
        -webkit-text-stroke .45s;
    text-shadow:
        0 1px 0 rgba(125, 211, 252, 0.15),
        0 2px 0 rgba(125, 211, 252, 0.10),
        0 3px 0 rgba(125, 211, 252, 0.06),
        0 5px 14px rgba(0, 0, 0, 0.5);
}

/* Hover handled en .html-phase arriba */
/* número arriba a la derecha del link */
.side-nav-links a::before {
    content: attr(data-num);
    position: absolute;
    top: 6px;
    right: -22px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(125, 211, 252, 0.45);
    letter-spacing: .2em;
    transition: color .4s, opacity .4s;
}

.side-nav-links a:hover::before {
    color: rgba(125, 211, 252, 0.85);
}

/* bullet "/" que se desliza desde la izquierda */
.snl-bullet {
    display: none;
    /* ocultar los / bullets — no se usan en el menú HTML */
}

/* texto del link con animación de deslizamiento */
.snl-text {
    display: inline-block;
    transform: translateX(-30px);
    transition: transform .55s cubic-bezier(.34, 1.56, .64, 1);
}

.side-nav-links a:hover {
    color: transparent;
    -webkit-text-stroke: 1.2px rgba(125, 211, 252, 0.95);
    text-stroke: 1.2px rgba(125, 211, 252, 0.95);
    text-shadow:
        0 0 30px rgba(125, 211, 252, 0.35),
        0 0 60px rgba(125, 211, 252, 0.18);
}

.side-nav-links a:hover::before {
    color: rgba(125, 211, 252, 0.85);
}

.side-nav-links a:hover .snl-bullet {
    transform: translateX(0);
    opacity: 1;
}

.side-nav-links a:hover .snl-text {
    transform: translateX(0);
}

/* línea inferior delgada que aparece al hover */
.side-nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: rgba(125, 211, 252, 0.35);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .6s cubic-bezier(.7, 0, .3, 1);
}

.side-nav-links a:hover::after {
    transform: scaleX(1);
}

/* panel más ancho para acomodar letras grandes */
.side-nav {
    width: min(560px, 95vw);
    padding: 80px 56px 40px;
}

@media(max-width:768px) {
    .side-nav {
        padding: 80px 28px 32px;
        width: 100vw;
    }

    .side-nav-links a {
        font-size: clamp(40px, 11vw, 64px);
    }

    .side-nav-links a::before {
        font-size: 9px;
    }
}

.side-nav-footer {
    padding: 24px 24px 0 0;
    border-top: 1px solid rgba(125, 211, 252, 0.10);
}

.side-nav-social {
    display: flex;
    gap: 24px;
    justify-content: flex-end;
}

.side-nav-social a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(168, 181, 209, 0.65);
    text-decoration: none;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: color .3s;
}

.side-nav-social a:hover {
    color: rgba(125, 211, 252, 1);
}



@media(max-width:768px) {
    .side-nav {
        padding: 80px 28px 32px;
    }

    .side-nav-links a {
        font-size: clamp(28px, 8vw, 40px);
    }
}


/* Side-nav text container (rellenado por JS scramble) */
.snl-text {
    display: inline-block;
    color: inherit;
    position: relative;
    transition: transform .55s cubic-bezier(.34, 1.56, .64, 1);
}

/* Silueta layered (duplicado offset detrás) — estilo Van Holtz */
/* silueta layered desactivada — se ve raro con el HTML permanente */
.snl-text::before {
    display: none;
}






/* Cursor del typewriter durante la fase HTML */
.tw-cursor {
    display: inline-block;
    width: 0.5em;
    height: 1em;
    background: rgba(125, 211, 252, 0.9);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: twBlink 0.7s infinite;
    box-shadow: 0 0 8px rgba(125, 211, 252, 0.5);
}

@keyframes twBlink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/* Ajuste de la fase HTML para que el código se vea limpio */
.html-phase {
    font-family: 'JetBrains Mono', 'Courier New', monospace !important;
    font-size: max(0.55em, 20px) !important;
    color: rgba(125, 211, 252, 0.95) !important;
    font-style: normal !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    text-shadow: 0 0 16px rgba(125, 211, 252, 0.50) !important;
    -webkit-text-stroke: 0 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    transform: none !important;
    display: inline-block;
    white-space: nowrap;
}

/* HOVER del link → BLANCO BRILLANTE (con todos los selectores posibles) */
.side-nav-links a:hover .html-phase,
.side-nav-links a:hover,
.side-nav-links a:hover .snl-text,
.side-nav-links a:focus .html-phase {
    color: rgba(255, 255, 255, 1) !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.65),
        0 0 40px rgba(125, 211, 252, 0.35),
        0 0 70px rgba(125, 211, 252, 0.18) !important;
}

/* Asegurar que el cambio sea SUAVE */
.side-nav-links a,
.side-nav-links a .html-phase,
.side-nav-links a .snl-text {
    transition: color .4s cubic-bezier(.22, 1, .36, 1),
        text-shadow .4s cubic-bezier(.22, 1, .36, 1) !important;
}


/* ── Transición HTML → texto final (super fluida) ── */
.html-out {
    opacity: 0 !important;
    filter: blur(10px) !important;
    transform: scale(1.06) translateY(-8px) !important;
    transition: opacity .28s cubic-bezier(.4, 0, .2, 1),
        filter .28s cubic-bezier(.4, 0, .2, 1),
        transform .28s cubic-bezier(.4, 0, .2, 1) !important;
}

.text-in {
    animation: textIn .65s cubic-bezier(.22, 1, .36, 1) forwards;
    will-change: opacity, filter, transform;
}

@keyframes textIn {
    0% {
        opacity: 0;
        filter: blur(7px);
        transform: translateY(10px) scale(0.96);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1);
    }
}


/* ── Slide-up del contenido principal al cargar ── */
.scroll-wrap {
    opacity: 0;
    filter: blur(24px) saturate(0.7);
    transform: translateY(120px);
    will-change: opacity, transform, filter;
    transition: opacity 3.0s .5s cubic-bezier(.22, 1, .36, 1),
        filter 3.0s .5s cubic-bezier(.22, 1, .36, 1),
        transform 3.0s .5s cubic-bezier(.22, 1, .36, 1);
}

body.loaded .scroll-wrap {
    opacity: 1;
    filter: blur(0) saturate(1);
    transform: translateY(0);
}

@media(max-width:768px) {
    .scroll-wrap {
        filter: blur(10px) saturate(0.85);
        transform: translateY(50px);
    }
}


/* ── Contador de progreso del loader ── */
.loader-progress-ui {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.loader-pct {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: clamp(48px, 7vw, 96px);
    font-weight: 300;
    color: rgba(125, 211, 252, 0.95);
    letter-spacing: -.04em;
    line-height: 1;
    text-shadow:
        0 0 30px rgba(125, 211, 252, 0.45),
        0 0 60px rgba(125, 211, 252, 0.20);
    will-change: contents;
}

.loader-pct::after {
    content: '%';
    font-size: 0.5em;
    color: rgba(168, 181, 209, 0.55);
    margin-left: 6px;
    letter-spacing: 0;
    vertical-align: top;
}

.loader-pct-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(168, 181, 209, 0.55);
    letter-spacing: .3em;
    text-transform: uppercase;
}


/* ── Hamburger toggle: rotación cuando está abierto ── */
.nav-hamburger {
    transition: color .3s, transform .4s cubic-bezier(.4, 0, .2, 1);
}

.nav-hamburger.is-open {
    transform: rotate(45deg) scale(1.05);
    color: rgba(125, 211, 252, 1);
}

.nav-hamburger.is-open .ham-star {
    animation: none;
    opacity: 1;
}

/* Asegurar que el nav (donde vive el hamburger) siempre visible cuando side-nav abierto */
nav.hidden:has(.nav-hamburger.is-open) {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}


/* Cursor nativo restaurado para mejor rendimiento */
.cursor,
.cursor-ring {
    display: none !important;
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE · todos los dispositivos
   ═══════════════════════════════════════════════════════ */

/* ── TABLET (≤1024px) ── */
@media(max-width:1024px) {
    .pillars {
        gap: clamp(14px, 3vw, 40px);
        padding: 0 24px;
    }

    .pillar {
        width: clamp(180px, 28vw, 260px);
        padding: 32px 22px 26px;
    }

    .pillar-label {
        font-size: clamp(24px, 3vw, 34px);
    }

    .side-nav {
        width: min(400px, 80vw);
    }

    .side-nav-links a {
        font-size: clamp(28px, 4.5vw, 46px);
    }
}

/* ── MÓVIL (≤768px) ── */
@media(max-width:768px) {

    /* Hero: ajustar tamaños */
    #hero {
        padding: 0 20px;
        padding-top: 80px;
    }

    .hero-eyebrow {
        font-size: 9px;
        margin-bottom: 22px;
    }

    .hero-name {
        font-size: clamp(44px, 11vw, 72px);
        line-height: 0.95;
    }

    .hero-role {
        font-size: 10px;
        letter-spacing: .18em;
        margin-top: 24px;
    }

    .hero-cta {
        margin-top: 36px;
        padding: 12px 24px;
        font-size: 10px;
    }

    .scroll-hint {
        bottom: 32px;
    }

    /* Nav superior */
    nav {
        padding: 18px 20px;
    }

    .nav-pill-left,
    .nav-pill-right {
        padding: 0;
    }

    .nav-logo {
        font-size: 10px;
        letter-spacing: .10em;
    }

    .nav-hamburger {
        width: 38px;
        height: 38px;
    }

    /* Pilares: una columna */
    .pillars {
        flex-direction: column;
        gap: 14px;
        padding: 0 24px;
        width: 100%;
    }

    .pillar {
        width: 100%;
        max-width: 340px;
        padding: 24px 22px;
    }

    .pillar-label {
        font-size: clamp(24px, 7vw, 32px);
    }

    .pillar-sub {
        font-size: 9px;
    }

    .pillar-num {
        font-size: 10px;
        margin-bottom: 12px;
    }

    /* Botón volver */
    .hero-back {
        top: 72px;
        left: 20px;
        padding: 8px 14px;
        font-size: 9px;
    }

    /* Side-nav móvil */
    .side-nav {
        width: 100vw;
        padding: 80px 0 32px 28px;
    }

    .side-nav-links {
        margin-top: 24px;
    }

    .side-nav-links a {
        font-size: clamp(36px, 9vw, 52px);
        padding-right: 32px;
    }

    .side-nav-links a::before {
        right: -26px;
        font-size: 8px;
    }

    /* About */
    #about {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 60px 20px 80px;
        gap: 24px;
    }

    .about-leo-wrap {
        grid-column: 1;
        grid-row: 1;
    }

    #leoCanvas {
        height: 240px;
    }

    .about-photo-wrap {
        grid-column: 1;
        grid-row: 2;
        aspect-ratio: 4/3;
    }

    .about-bio {
        grid-column: 1;
        grid-row: 3;
        padding: 24px 20px;
    }

    .about-bio-text {
        font-size: clamp(16px, 4.5vw, 22px);
    }

    .about-cards {
        grid-column: 1;
        grid-row: 4;
    }

    .about-card {
        padding: 14px;
    }

    /* Proyectos */
    #work {
        padding: 60px 20px 80px;
    }

    .section-title {
        font-size: clamp(34px, 9vw, 52px);
    }

    .proj-category {
        margin-bottom: 44px;
    }

    .proj-card {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 32px;
    }

    .proj-coverflow-track {
        height: 150px;
    }

    .proj-cf-slide {
        width: 200px;
        height: 130px;
    }

    .proj-info-section {
        padding: 12px 16px;
    }

    .proj-name {
        font-size: clamp(18px, 5vw, 24px);
    }

    /* Skills */
    #skills {
        padding: 50px 20px 60px;
    }

    .skills-inner {
        grid-template-columns: 1fr;
    }

    .skill-item {
        padding: 24px 20px;
    }

    /* Contacto */
    #contact {
        padding: 0 20px;
    }

    .contact-big {
        font-size: clamp(40px, 12vw, 72px);
    }

    /* Loader */
    .loader-code {
        width: 92vw;
        font-size: clamp(10px, 2.5vw, 13px);
        padding: 0 8px;
    }

    .loader-pct {
        font-size: clamp(56px, 18vw, 96px);
    }

    .loader-pct-label {
        font-size: 9px;
        letter-spacing: .25em;
    }

    .loader-progress-ui {
        bottom: 40px;
    }
}

/* ── MÓVIL pequeño (≤480px) ── */
@media(max-width:480px) {
    .hero-name {
        font-size: clamp(40px, 12vw, 58px);
    }

    .nav-logo {
        font-size: 9px;
    }

    .nav-hamburger {
        width: 34px;
        height: 34px;
    }

    .side-nav-links a {
        font-size: clamp(32px, 10vw, 46px);
    }

    .pillar-label {
        font-size: clamp(22px, 7vw, 28px);
    }
}

/* ── PANTALLAS pequeñas (≤380px) ── */
@media(max-width:380px) {
    .hero-name {
        font-size: 44px;
    }

    .side-nav-links a {
        font-size: 36px;
    }
}

/* ── ALTURA pequeña (móvil horizontal, ≤500px alto) ── */
@media(max-height:500px) {
    .hero-name {
        font-size: clamp(36px, 7vh, 56px);
    }

    .hero-eyebrow {
        margin-bottom: 14px;
    }

    .hero-role {
        margin-top: 16px;
    }

    .scroll-hint {
        display: none;
    }

    .loader-pct {
        font-size: clamp(48px, 12vh, 80px);
    }
}

/* ── Touch devices: tap targets más grandes ── */
@media(hover:none) and (pointer:coarse) {
    .pillar {
        min-height: 64px;
    }

    .side-nav-links a {
        padding: 10px 0;
        padding-right: 24px;
    }

    .nav-hamburger {
        padding: 8px;
    }

    /* Mostrar hover state al touch */
    .side-nav-links a:active {
        color: rgb(125, 211, 252);
    }

    .pillar:active {
        transform: translateY(-4px);
    }
}

/* ── Animaciones reducidas para usuarios que las prefieren ── */
@media(prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    /* Mantener visible el contenido aunque se reduzcan animaciones */
    .hero-eyebrow,
    .hero-name,
    .hero-role,
    .hero-cta,
    .scroll-hint {
        opacity: 1 !important;
    }

    .hn-line {
        opacity: 1 !important;
    }
}


/* ═══════════════════════════════════════════════════════
   OPTIMIZACIONES PARA TODOS LOS FORMATOS
   ═══════════════════════════════════════════════════════ */

/* Pantallas ultra-anchas (4K, ultrawide) */
@media(min-width:1920px) {
    .hero-name {
        font-size: clamp(80px, 7vw, 160px);
    }

    .pillars {
        max-width: 1400px;
        margin: 0 auto;
    }

    .section-title {
        font-size: clamp(48px, 4vw, 84px);
    }
}

/* Pantallas ultra-pequeñas (apple watch, embedded) */
@media(max-width:320px) {
    .hero-name {
        font-size: 38px;
    }

    .side-nav-links a {
        font-size: 28px;
    }

    .pillar-label {
        font-size: 18px;
    }

    .loader-pct {
        font-size: 48px;
    }
}

/* Mejorar rendering en GPUs lentas (móviles antiguos) */
@media(max-width:768px) {

    /* Reducir blur intensos en móvil (consume mucha GPU) */
    .pillar {
        -webkit-backdrop-filter: blur(12px) saturate(120%);
        backdrop-filter: blur(12px) saturate(120%);
    }

    .about-bio {
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }

    /* Sombras 3D más simples en móvil */
    .hero-name {
        text-shadow:
            0 2px 0 rgba(125, 211, 252, 0.15),
            0 4px 0 rgba(125, 211, 252, 0.08),
            0 8px 20px rgba(0, 0, 0, 0.5);
    }
}

/* Print: si alguien imprime */
@media print {

    #loader,
    nav,
    .scroll-hint,
    #glCanvas,
    .hero-cta,
    .hero-back {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .hero-name {
        color: black;
        text-shadow: none;
    }

    .scroll-wrap {
        opacity: 1;
        filter: none;
        transform: none;
    }
}

/* Modo oscuro forzado del sistema */
@media(prefers-color-scheme:dark) {
    /* ya estamos en dark, no hay cambios */
}

/* Resolución alta (retina/4k) */
@media(-webkit-min-device-pixel-ratio:2), (min-resolution:2dppx) {

    /* Smoothing para fuentes */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Sin hover (touch puro): subrayar interactividad de otra forma */
@media(hover:none) {
    .side-nav-links a:active .html-phase {
        color: rgba(255, 255, 255, 1) !important;
        text-shadow: 0 0 18px rgba(255, 255, 255, 0.55) !important;
    }
}



/* ═══════════════════════════════════════════════════════
   Secciones VACÍAS (placeholder — solo título)
   El contenido se agregará después
   ═══════════════════════════════════════════════════════ */
.section-empty {
    min-height: 80vh;
    min-height: 80svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    position: relative;
}

.section-empty .section-header {
    text-align: center;
    margin: 0;
}

.section-empty .section-title {
    font-size: clamp(56px, 9vw, 140px);
    line-height: 1.0;
    font-weight: 300;
    color: rgba(250, 243, 228, 0.95);
    letter-spacing: -.02em;
    text-shadow:
        0 2px 0 rgba(125, 211, 252, 0.15),
        0 4px 0 rgba(125, 211, 252, 0.10),
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(125, 211, 252, 0.08);
}

.section-empty .section-title em {
    color: rgba(195, 210, 235, 0.9);
}

@media(max-width:768px) {
    .section-empty {
        min-height: 60vh;
        min-height: 60svh;
        padding: 60px 24px;
    }

    .section-empty .section-title {
        font-size: clamp(44px, 12vw, 82px);
    }
}


/* ═══════════════════════════════════════════════════════
   FIX MÓVIL: backdrop-filter causa cuadros blancos en Android
   → usar fondos sólidos sin blur en pantallas pequeñas
   ═══════════════════════════════════════════════════════ */
@media(max-width:768px) {

    .hero-cta,
    .hero-back {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: rgba(8, 14, 32, 0.85) !important;
    }

    .pillar {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: rgba(6, 12, 30, 0.88) !important;
    }

    .about-card,
    .about-bio,
    .skill-item,
    .proj-info,
    .section-glass {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: rgba(6, 10, 26, 0.92) !important;
    }

    /* hamburguesa: asegurar SIN fondo */
    .nav-hamburger,
    .nav-pill-right {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .nav-hamburger svg {
        background: transparent !important;
    }
}

/* ═══════════════════════════════════════════════════════
   PÁGINA PRINCIPAL SIMPLIFICADA (jun 2026)
   Solo se muestran el nombre (hero) y el contacto ("Hablemos").
   Sobre mí · Proyectos · Skills se moverán a otras páginas.
   OJO: esto solo las OCULTA. Para quitarlas de verdad del HTML y
   que el menú / el botón EXPLORAR apunten a las nuevas páginas,
   hace falta editar el index.html.
   ═══════════════════════════════════════════════════════ */
#about,
#work,
#skills {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════
   SOBRE MÍ · cajas en crema (contraste con el fondo oscuro)
   Fondo claro + texto oscuro para que se lea bien encima.
   Va al final para ganarle al estilo oscuro de arriba (incluido el
   override de móvil que forzaba fondo oscuro con !important).
   ═══════════════════════════════════════════════════════ */
.about-card,
.about-bio {
    background: rgba(244, 238, 224, 0.97) !important;
    border: 1px solid rgba(20, 24, 44, 0.12) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.about-card:hover,
.about-bio:hover {
    border-color: rgba(20, 24, 44, 0.30) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
}

/* texto OSCURO para que se lea sobre la crema */
.about-card-val,
.about-bio-text {
    color: rgba(22, 26, 46, 0.95) !important;
}

.about-card-title,
.about-bio-label {
    color: rgba(70, 90, 120, 0.9) !important;
}

.about-bio-text em {
    color: rgba(45, 90, 140, 1) !important;
}

/* ═══════════════════════════════════════════════════════════
   PARCHE RENDIMIENTO (jun 2026)
   → Copia TODO este bloque y pégalo AL FINAL de tu styles.css ←

   ¿Por qué? Los blur() animados sobre TODA la página eran una causa
   grande de los tirones: al cargar, el navegador desenfocaba y
   re-enfocaba millones de pixeles durante 3 segundos completos
   (blur(24px) en .scroll-wrap) y otra vez al desvanecer el loader
   (blur(14px) de pantalla completa). La entrada ahora usa solo
   opacidad y desplazamiento — que la GPU compone casi gratis — y
   se ve igual de elegante.
   ═══════════════════════════════════════════════════════════ */

/* entrada del contenido: sin blur, solo fade + slide (rapidísimo) */
.scroll-wrap {
    filter: none !important;
    transform: translateY(50px);
    transition: opacity 1.4s .3s cubic-bezier(.22, 1, .36, 1),
        transform 1.4s .3s cubic-bezier(.22, 1, .36, 1) !important;
}

body.loaded .scroll-wrap {
    filter: none !important;
    transform: translateY(0);
}

/* salida del loader: sin blur de pantalla completa */
#loader {
    transition: opacity 1.2s cubic-bezier(.22, 1, .36, 1),
        transform 1.2s cubic-bezier(.22, 1, .36, 1) !important;
}

#loader.fade-out {
    filter: none !important;
}

/* el código del loader se dispersaba con blur(10px): solo fade */
.loader-code.dispersing {
    filter: none !important;
}

/* ═══════════════════════════════════════════════════════════
   PARCHE · HAMBURGUESA CREMA + CANDADO MÓVIL (jun 2026)
   → Copia TODO este bloque y pégalo AL FINAL de tu styles.css ←
   (después del parche de rendimiento que ya pegaste antes)
   ═══════════════════════════════════════════════════════════ */

/* ── candado anti-desborde: nada puede hacer la página más ancha que la
   pantalla del celular (eso causaba el zoom raro y el mal posicionado) ── */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ── HAMBURGUESA estilo CREMA (a juego con las tarjetas de las páginas) ── */
.nav-hamburger {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
    background: #f4eee0 !important;
    border: 1px solid rgba(20, 24, 44, 0.18) !important;
    color: #16182e !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow .35s, background .3s, color .3s, border-color .3s !important;
}

.nav-hamburger:hover {
    transform: translateY(-2px) scale(1.05);
    color: #2d5a8c !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45),
        0 0 24px rgba(125, 211, 252, 0.30) !important;
}

/* abierto: se invierte — tinta oscura con puntos cian, gira 45° */
.nav-hamburger.is-open {
    transform: rotate(45deg) scale(1.02);
    background: #16182e !important;
    color: #7dd3fc !important;
    border-color: rgba(125, 211, 252, 0.50) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45),
        0 0 26px rgba(125, 211, 252, 0.25) !important;
}

/* el puntito central que parpadea se mantiene, ahora en tinta/cian */
.nav-hamburger .ham-star {
    animation: hamStar 2.4s ease-in-out infinite;
}

@media(max-width:768px) {
    .nav-hamburger {
        width: 42px !important;
        height: 42px !important;
        border-radius: 12px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   PARCHE · FLECHITA DE SCROLL CENTRADA (jun 2026)
   → Pégalo AL FINAL de tu styles.css (después de los otros parches) ←

   ¿Por qué estaba descentrada? El indicador se centraba con
   transform: translateX(-50%), pero su animación de entrada (fadeUp)
   pisaba ese transform y lo dejaba pegado a la izquierda del centro.
   Esta animación propia incluye el -50% en todo momento.
   ═══════════════════════════════════════════════════════════ */
.scroll-hint {
    left: 50%;
    transform: translate(-50%, 0);
    animation: scrollHintIn 1.4s 1.4s forwards;
}

@keyframes scrollHintIn {
    from {
        opacity: 0;
        transform: translate(-50%, 28px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ═══════════════════════════════════════════════════════════
   PARCHE · RECUADROS DE EXPLORAR SIN PARPADEO (jun 2026)
   → Pégalo AL FINAL de tu styles.css (después de los otros parches) ←

   ¿Por qué parpadeaban? El hover subía el recuadro 10px; con el cursor
   cerca del borde inferior, el recuadro se salía de debajo del cursor,
   perdía el hover, bajaba, lo recuperaba, volvía a subir... un bucle
   infinito de hover/unhover. Ahora el recuadro CRECE un poco (scale)
   en lugar de moverse: crece hacia todos lados, el cursor nunca queda
   fuera, y el efecto es estable y elegante.
   ═══════════════════════════════════════════════════════════ */

.pillar:hover {
    transform: scale(1.025) !important;
}

/* el brillo que cruza la tarjeta: solo barre al ENTRAR; al salir se
   reinicia en seco (sin barrido de regreso, que era parte del parpadeo) */
.pillar:not(:hover)::after {
    transform: translateX(-100%);
    transition: none;
}

/* en touch (celular) un tap lo hunde apenas, sin crecer */
@media(hover:none) and (pointer:coarse) {
    .pillar:hover {
        transform: none !important;
    }

    .pillar:active {
        transform: scale(0.985) !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   PARCHE v2 · RECUADROS DE EXPLORAR SIN PARPADEO (jun 2026)
   → Si ya pegaste la v1, pega esta v2 DEBAJO (o reemplázala) ←
   → Va AL FINAL de tu styles.css, fuera de cualquier otra regla ←

   Causas del parpadeo (eran varias):
   1. El hover SUBÍA el recuadro → bucle hover/unhover en el borde.
   2. backdrop-filter (desenfoque de fondo) sobre el mar WebGL animado:
      Chrome parpadea con esa combinación al animar el recuadro.
   3. El resplandor interno se movía en bucle infinito (glowMove).
   4. El "agua" que sigue al cursor re-desenfocaba en cada movimiento.
   ═══════════════════════════════════════════════════════════ */

/* 1 — crecer en vez de moverse: el cursor nunca queda fuera */
.pillar:hover {
    transform: scale(1.025) !important;
}

/* 2 — sin desenfoque de fondo: fondo propio un poco más sólido
   (se ve casi igual y elimina el parpadeo de Chrome sobre el mar) */
.pillar {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(6, 11, 28, 0.88) !important;
    will-change: transform;
}

.pillar:hover {
    background: rgba(8, 14, 34, 0.94) !important;
}

/* 3 — el resplandor aparece suave pero ya NO da vueltas en bucle */
.pillar:hover .pillar-glow {
    animation: none !important;
    opacity: .85 !important;
}

/* 4 — el agua que sigue al cursor, sin blur (el blur repintaba
   en cada pixel de movimiento del mouse) */
.pillar-water::before {
    filter: none !important;
}

/* el brillo que cruza: solo barre al ENTRAR, sin barrido de regreso */
.pillar:not(:hover)::after {
    transform: translateX(-100%);
    transition: none;
}

/* en touch (celular) un tap lo hunde apenas */
@media(hover:none) and (pointer:coarse) {
    .pillar:hover {
        transform: none !important;
    }

    .pillar:active {
        transform: scale(0.985) !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   PARCHE · NOMBRE TRANSLÚCIDO EN REPOSO (jun 2026)
   → Pégalo AL FINAL de tu styles.css (después de los otros parches) ←

   El nombre de arriba (logo / marca) se ve translúcido cuando no pasas
   el cursor, dejando ver el fondo; al pasar sobre él sube a opacidad
   completa. Combina con la hamburguesa translúcida (esa la maneja menu.js).
   ═══════════════════════════════════════════════════════════ */

/* INDEX: el logo del nav */
.nav-logo {
    opacity: .55;
    transition: opacity .5s, color .3s, text-shadow .3s;
}

.nav-logo:hover,
.nav-logo:focus-visible {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   PARCHE · FONDO ANCLADO EN CELULARES (jun 2026)
   → Pégalo AL FINAL de tu styles.css (después de los otros parches) ←

   En móvil el fondo "saltaba" o se "desplazaba" al hacer scroll porque:
   1. La barra de URL del navegador aparece/desaparece y cambia la altura
      de la ventana → el canvas (height:100%) se redibujaba y brincaba.
   2. position:fixed en móvil a veces se ancla al documento, no a la
      pantalla, así que el fondo subía con el contenido.

   Solución: fijar el canvas a la pantalla con altura ESTABLE (svh, que
   NO cuenta la barra del navegador) y un tamaño un pelín mayor para que
   aunque la barra aparezca, nunca se vea un borde sin pintar.
   ═══════════════════════════════════════════════════════════ */

/* el lienzo del mar/estrellas: clavado a la pantalla, altura estable */
#glCanvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    /* svh = altura de pantalla SIN contar la barra del navegador (estable).
       Fallbacks para navegadores viejos: vh primero, svh lo pisa si existe. */
    height: 100vh !important;
    height: 100svh !important;
    z-index: -1 !important;
    /* no recibe toques: el scroll pasa "a través" del fondo */
    pointer-events: none !important;
    /* fuerza al fondo a su propia capa de GPU = no se redibuja al hacer scroll */
    transform: translateZ(0);
    will-change: transform;
}

/* el degradado de respaldo (.bg) igual de anclado, por si WebGL tarda */
.bg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100svh !important;
    z-index: -2 !important;
}

/* refuerzo SOLO en móvil: el fondo se hace un poco más alto que la pantalla
   (110svh) para que, cuando la barra de URL se oculte y la ventana crezca,
   nunca quede una franja sin pintar abajo */
@media (max-width: 768px) {

    #glCanvas,
    .bg {
        height: 110svh !important;
    }
}