/* =========================================
   VARIABLES & BASE
========================================= */
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-latin-variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/jetbrains-mono-latin-variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --bg-main: #06090e; --bg-secondary: #0b1016; --bg-accent: #111a26;
  --accent: #0ea5e9; /* Sky Blue - Azul ultra profesional y limpio */
  --accent-alt: #e2e8f0; /* Platinum Silver - Sofisticado y premium */
  --accent-glow: rgba(14, 165, 233, 0.15); 
  --text-primary: #f8fafc; --text-secondary: #a1a1aa; --text-muted: #52525b;
  --glass-bg: rgba(255, 255, 255, 0.02); --glass-border: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --font-display: 'Plus Jakarta Sans', sans-serif; --font-body: 'Inter', sans-serif; --font-mono: 'JetBrains Mono', monospace;
  --trans-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1); --trans-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; overflow-x: hidden; width: 100%; position: relative; }

/* =========================================
   SCROLLBAR PERSONALIZADA (Transparente y Fina)
========================================= */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; border: 4px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); border: 4px solid transparent; background-clip: content-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
body { font-family: var(--font-body); background-color: var(--bg-main); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; cursor: none; }
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.2; }
.text-gradient { background: linear-gradient(135deg, #fff 0%, var(--accent) 100%); -webkit-background-clip: text; color: transparent; }
.text-accent { color: var(--accent); } .text-alt { color: var(--accent-alt); }
a { text-decoration: none; color: inherit; }

.section-padding { padding: 150px 0; } 
@media (max-width: 768px) { .section-padding { padding: 80px 0; } .hero { padding-top: 100px !important; min-height: auto !important; padding-bottom: 40px; } }

.divider-ultra-fine {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.05) 30%, 
        rgba(14, 165, 233, 0.6) 50%, 
        rgba(255, 255, 255, 0.05) 70%, 
        transparent 100%
    );
    opacity: 0.2;
    filter: blur(0.4px);
}

.container { max-width: 1480px; margin: 0 auto; padding: 0 clamp(28px, 4vw, 72px); }

.container-relative { position: relative; z-index: 2; }
.glass-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--glass-shadow); }

/* Buttons & Badges */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; transition: var(--trans-smooth); cursor: pointer; }
.btn-primary { background: var(--accent); color: #000; box-shadow: 0 0 20px rgba(0, 224, 255, 0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 25px var(--accent-glow); background: #fff; }
.btn-secondary { background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); }
.btn-outline { border: 1px solid var(--glass-border); } .btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,224,255,0.05); }
.btn-full { width: 100%; margin-top: auto; }

.project-actions { margin-top: auto; }

.project-link-detail {
    color: var(--accent);
    font-size: 0.72rem; /* ~15% más pequeño */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    padding: 8px 0;
    opacity: 0.7;
    margin-top: 10px;
}

.project-link-detail::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s ease;
}

.project-link-detail:hover {
    opacity: 1;
    letter-spacing: 3px;
    color: #fff;
}

.project-link-detail:hover::before {
    width: 100%;
    background: #fff;
}

.project-link-detail span {
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.4s ease;
}

.project-link-detail:hover span {
    transform: translateX(8px);
}


.badge { display: inline-block; padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; font-family: var(--font-mono); margin-bottom: 24px; text-transform: uppercase;}
.badge-accent { background: rgba(14, 165, 233, 0.1); color: var(--accent); border: 1px solid rgba(14,165,233,0.2); }
.badge-ai { background: rgba(226, 232, 240, 0.05); color: var(--accent-alt); border: 1px solid rgba(226, 232, 240, 0.2); padding: 4px 10px; border-radius: 12px; font-size: 0.7rem; margin-left: 8px;}

/* Header Titles */
.section-header { margin-bottom: 70px; max-width: 860px; }
.section-tag { font-family: var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; display: block; margin-bottom: 12px; }
.section-title { font-size: clamp(1.8rem, 4vw, 3.5rem); font-weight: 800; margin-bottom: 16px; position: relative; display: inline-block; }

/* Trayectoria: Subrayado tecnológico */
#trayectoria .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 0;
    width: 0; height: 3px;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.revealed#trayectoria .section-title::after, 
#trayectoria.revealed .section-title::after { width: 100%; }

/* Proyectos: Corchetes neón */
#proyectos .section-title::before, #proyectos .section-title::after {
    content: '';
    position: absolute;
    width: 10px; height: 100%;
    border: 2px solid var(--accent);
    opacity: 0.3;
    transition: all 0.6s ease;
}
#proyectos .section-title::before { left: -30px; border-right: 0; border-radius: 12px 0 0 12px; }
#proyectos .section-title::after { right: -30px; border-left: 0; border-radius: 0 12px 12px 0; }
#proyectos:hover .section-title::before, #proyectos:hover .section-title::after { opacity: 1; width: 20px; color: var(--accent); }

/* Habilidades: Efecto de escaneo */
#habilidades .section-title { overflow: hidden; }
#habilidades .section-title::after {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.2), transparent);
    animation: title-scan 5s infinite;
}
@keyframes title-scan {
    0% { left: -150%; }
    30% { left: 150%; }
    100% { left: 150%; }
}

/* Contacto: Brillo pulsante */
#contacto .c-title {
    text-shadow: 0 0 30px rgba(14, 165, 233, 0);
    transition: all 0.6s ease;
}
#contacto:hover .c-title {
    text-shadow: 0 0 40px rgba(14, 165, 233, 0.5);
    transform: scale(1.02);
}

/* NAVBAR (Floating Glass Pill Premium) */
.navbar { position: fixed; top: 25px; width: 100%; z-index: 1000; transition: top 0.3s ease; }
.navbar.scrolled { top: 10px; }
.navbar-progress { display: none; } /* Ocultamos la barra de progreso general para no romper la estética de la píldora */

.nav-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 8px 30px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    
    /* Glassphantom Fino y Elegante */
    background: rgba(10, 15, 25, 0.25);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.logo { font-size: 1.4rem; font-weight: 800; text-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }
.nav-links { display: flex; align-items: center; gap: 32px; font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase;}
.nav-link { color: var(--text-secondary); transition: var(--trans-fast); }
.nav-link:hover { color: var(--text-primary); text-shadow: 0 0 10px rgba(255,255,255,0.5);}
.nav-github { display: inline-flex; align-items: center; justify-content: center; }
.nav-github svg { width: 18px; height: 18px; fill: currentColor; }

/* Logo como mini-avatar redondo */
.logo.logo-avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; overflow: hidden; border: 2px solid rgba(14,165,233,.3); border-radius: 50%; background: rgba(255,255,255,.04); transition: border-color .25s ease, transform .25s ease; }
.logo.logo-avatar:hover { border-color: rgba(14,165,233,.7); transform: scale(1.06); }
.logo.logo-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.logo.logo-avatar-wordmark { width: auto; gap: 10px; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.logo.logo-avatar-wordmark:hover { border-color: transparent; transform: none; }
.logo.logo-avatar-wordmark img { width: 40px; height: 40px; flex: 0 0 40px; border: 2px solid rgba(14,165,233,.3); border-radius: 50%; transition: border-color .25s ease, transform .25s ease; }
.logo.logo-avatar-wordmark:hover img { border-color: rgba(14,165,233,.7); transform: scale(1.06); }
.logo.logo-avatar-wordmark > span { color: var(--text-primary); white-space: nowrap; }

/* Trayectoria resumida en home */
.trayectoria-resumen { max-width: 760px; margin: 0 auto; padding: 40px 0; text-align: center; }
.trayectoria-lead { margin-bottom: 32px; color: var(--text-secondary); font-size: 1.12rem; line-height: 1.75; }
.trayectoria-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.trayectoria-chips .chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.04); color: var(--text-secondary); font-family: var(--font-mono); font-size: .86rem; }
.trayectoria-chips .chip strong { margin-right: 4px; color: #fff; }
.trayectoria-chips .chip-accent { border-color: rgba(14,165,233,.3); background: rgba(14,165,233,.08); color: var(--accent); }
.trayectoria-chips .chip-accent strong { color: var(--accent); }
.trayectoria-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn-ghost { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: #cbd5e1; }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }

/* Cómo trabajo: nave, contexto y enlace al CV */
.work-section { overflow: hidden; }
.work-header-wrap { position: relative; }
.work-header-ship { position: absolute; top: -24px; left: clamp(-220px,-14vw,-100px); z-index: 1; width: clamp(300px,38vw,510px); height: auto; opacity: 0; pointer-events: none; filter: drop-shadow(0 28px 52px rgba(14,165,233,.24)); transform: translate3d(-190px,-10px,0) rotate(5deg); transition: opacity .55s ease; will-change: transform, opacity; }
.work-section.ship-in-view .work-header-ship { opacity: .88; }
.work-header-wrap { position: relative; z-index: 2; max-width: 760px; }
.work-intro { max-width: 760px; margin: 0 auto 56px; padding: 0 20px; text-align: center; }
.work-intro p { color: var(--text-secondary); font-size: 1.08rem; line-height: 1.8; }
.work-intro strong { color: #fff; font-weight: 600; }
.work-cta { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; margin-top: 64px; padding: 36px; border: 1px solid rgba(14,165,233,.18); border-radius: 8px; background: linear-gradient(135deg,rgba(14,165,233,.06),rgba(168,85,247,.04)),rgba(10,15,25,.6); }
.work-cta-text h3 { margin-bottom: 8px; color: #fff; font-size: 1.25rem; }
.work-cta-text p { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.work-cta-btn { display: inline-flex; align-items: center; white-space: nowrap; }
@media (max-width:880px){.work-header-ship{display:none}}
@media (max-width:720px){.work-cta{grid-template-columns:1fr;padding:28px 22px;text-align:center}}

/* Accesibilidad: respetar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
    .space-deathstar, .space-ship, .tl-header-ship, .work-header-ship, .flying-paca-container, #paca-police-anim, .work-board-visual, #hero-canvas, #roadmap-canvas, #portfolio-canvas, #skills-canvas { animation: none !important; opacity: .5; }
    .cv-card-3d { animation: none !important; transform: none !important; }
}

.mobile-toggle { display: none; background: transparent; border: none; color: white; cursor:none;}

/* SUBMENU PREMIUM */
.nav-item.has-submenu { position: relative; display: flex; align-items: center; }
.nav-link .nav-icon { font-size: 0.7rem; margin-left: 6px; transition: transform 0.4s ease; display: inline-block; color: var(--accent); text-shadow: 0 0 5px rgba(14, 165, 233, 0.5); opacity: 0.8; }
.has-submenu:hover .nav-icon,
.has-submenu.keyboard-open .nav-icon { transform: rotate(90deg); opacity: 1; }



.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(4, 6, 10, 0.98); /* Mucho más oscuro y opaco */
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px;
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.8), inset 0 1px 1px rgba(255,255,255,0.05);
    z-index: 100;
}

.has-submenu:hover .submenu,
.has-submenu.keyboard-open .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(15px);
}

.submenu-link {
    display: flex;
    flex-direction: column;
    padding: 14px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

/* Separador fino entre items */
.submenu-link:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
}

.submenu-link:hover,
.submenu-link:focus-visible {
    background: rgba(255, 255, 255, 0.03);
    padding-left: 25px; /* Micro-movimiento fluido */
}

/* Indicador elegante (barra lateral restaurada y afinada) */
.submenu-link::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 2px; /* Más fina y elegante */
    height: 16px;
    background: var(--accent);
    border-radius: 4px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.4); /* Brillo bajado */
}

.submenu-link:hover::before,
.submenu-link:focus-visible::before {
    transform: translateY(-50%) scaleY(1);
}



.sub-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
}

.sub-desc {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.submenu-link:hover .sub-title,
.submenu-link:focus-visible .sub-title { color: var(--accent); }

.mobile-menu { display: none; }
@media (max-width: 900px), (hover: none) and (pointer: coarse) and (max-width: 1100px) { 
    .nav-container { margin: 0 20px; padding: 12px 25px; } 
    .nav-links{display:none;} 
    .mobile-toggle{display:block;} 
    .mobile-menu{position:fixed;top:85px;left:20px;right:20px;width:auto;margin:0;z-index:1000;border-radius:20px;background:rgba(6, 9, 14, 0.95);backdrop-filter:blur(20px);padding:20px;display:flex;flex-direction:column;gap:20px;transform:translateY(-120%);opacity:0;visibility:hidden;border:1px solid rgba(255, 255, 255, 0.08);pointer-events:none;transition:transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),opacity .3s ease,visibility 0s linear .4s;} 
    .mobile-menu.active{transform:translateY(0);opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s;} 
    #hero-canvas { display: none !important; }
}

/* Sci-Fi Space Elements */
.space-elements { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: visible; }
@media (max-width: 900px) { .space-elements { display: none; } }

/* Wrapper: define la POSICIÓN fija. La imagen rota dentro sin mover el origen */
.planet-wrapper {
    position: absolute;
    top: -45%;
    right: -20%;
    width: 1200px;
    height: 1200px;
    pointer-events: none;
}

.space-planet {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    margin-top: -50%;
    margin-left: -50%;
    object-fit: contain;
    opacity: 0.95;
    mix-blend-mode: screen;
    
    /* Mask radial más ajustado para eliminar el borde negro por completo */
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 48%, rgba(0,0,0,0.5) 58%, transparent 68%);
    mask-image: radial-gradient(circle at 50% 50%, black 48%, rgba(0,0,0,0.5) 58%, transparent 68%);

    /* Bob muy sutil: igual que la nave pero más lento y con menos recorrido */
    animation: planet-bob 12s ease-in-out infinite;
}

@keyframes planet-bob {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-18px); }
}

.space-deathstar {
    position: absolute;
    top: 15%;
    left: -5%;
    width: 900px;
    opacity: 0.85;
    animation: float-deathstar 20s ease-in-out infinite;
    filter: drop-shadow(0 0 50px rgba(0, 224, 255, 0.15));
}

.space-ship {
    position: absolute;
    top: 60%;
    right: -3%;
    width: 253px;
    animation: ship-bob-subtle 8s ease-in-out infinite;
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.58;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
    z-index: 0;
}

@keyframes rotate-planet {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float-deathstar {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(2deg); }
}

@keyframes ship-enter {
    0% { transform: translate(40vw, -20px) rotate(-15deg) scale(0.9); opacity: 0; }
    100% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.72; }
}

@keyframes ship-bob-subtle {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.72; }
    50% { transform: translate(-8px, -14px) rotate(1.5deg); opacity: 0.58; }
}

/* =========================================
   HERO & AVATAR PARALLAX
========================================= */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative; padding-top: 150px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.98fr) 420px; gap: clamp(44px, 7vw, 110px); align-items: center; }
.hero-title { font-size: clamp(2.2rem, 5vw, 4.5rem); margin-bottom: 24px; position:relative;}
.hero-subtitle { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 34px; max-width: 640px;}
.hero-actions { display: flex; gap: 16px; margin-bottom: 50px; }
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    max-width: 720px;
}
.stat-item {
    display: flex;
    flex-direction: column;
    min-height: 86px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    background: rgba(4, 8, 14, 0.42);
}
.stat-num { font-family: var(--font-display); font-size: 1.65rem; font-weight: 800; color: var(--accent); line-height: 1;}
.stat-label { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-secondary); text-transform: uppercase; margin-top:8px; line-height: 1.35;}

.avatar-parallax-wrapper { position: relative; max-width: 380px; margin: 0 auto; perspective: 1000px; }
.avatar-backdrop { position: absolute; inset: -20px; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%); filter: blur(40px); border-radius: 50%; opacity: 0.6; z-index: 0; }
.avatar-glass-frame { position: relative; z-index: 1; border-radius: 24px; padding: 12px; background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01)); border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 30px 60px rgba(0,0,0,0.6); transition: transform 0.1s ease-out; transform-style: preserve-3d;}
.avatar-image { display: block; width: 100%; height: auto; border-radius: 16px; transform: translateZ(20px); transition: transform 0.3s; }
.floating-badge { position: absolute; z-index: 3; background: var(--glass-bg); backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-radius: 12px; padding: 10px 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; transform: translateZ(50px); }
.badge-top-right { top: -10px; right: -25px; color: var(--accent-alt); }
.badge-bottom-left { bottom: 20px; left: -30px; }
.status-dot { width: 8px; height: 8px; background: #10B981; border-radius: 50%; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
@media (max-width: 1100px) { 
    .hero-grid { grid-template-columns: 1fr; text-align: center; } 
    .hero-visual { justify-self: center !important; margin-right: 0 !important; margin-top: 40px; }
    .hero-subtitle { margin: 0 auto 40px auto; }
    .hero-actions { justify-content: center; }
    .hero-stats{ margin: 0 auto; } 
}
@media (max-width: 480px) {
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }
    .hero-stats { grid-template-columns: 1fr; width: 100%; }
    .stat-num { font-size: 1.8rem; }
    .stat-label { font-size: 0.65rem; }
}

/* =========================================
   TIMELINE — NUEVO DISEÑO (2 columnas compacto)
========================================= */
.roadmap-section {
    position: relative;
    background: transparent; /* Continúa el fondo espacial del hero */
}

/* Transición fluida entre secciones — sin línea de corte visible */
.section-fade-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 250px;
    background: linear-gradient(to bottom, 
        var(--bg-main) 0%, 
        rgba(6, 9, 14, 0.7) 40%,
        transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* Overlap atmosférico: la sección de trayectoria se superpone al hero */
.roadmap-section {
    position: relative;
    background: transparent;
    margin-top: -100px;     /* Overlap para eliminar la línea dura */
    padding-top: 150px;     /* Compensar el overlap en el contenido */
    z-index: 2;
    overflow: visible;      /* Evitar que la nave quede cortada por cualquier clip heredado */
}
.tl-entries {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 50px;
    position: relative;
}

/* Línea vertical decorativa central */
.tl-entries::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(14, 165, 233, 0.3) 20%, rgba(14, 165, 233, 0.3) 80%, transparent);
    transform: translateX(-50%);
    pointer-events: none;
}

/* Entrada individual */
.tl-entry {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    /* Sin transform-style: preserve-3d para evitar distorsiones */
}

/* Número grande decorativo */
.tl-num {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: rgba(14, 165, 233, 0.35);
    text-transform: uppercase;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
}

.tl-num-current {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

/* Dot y línea */
.tl-line-wrap {
    display: none; /* Limpio, sin dots en el nuevo diseño de grid */
}

/* Tarjeta — SIN preserve-3d, SIN translateZ */
.tl-card {
    padding: 28px 30px;
    background: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid rgba(14, 165, 233, 0.3);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    flex: 1;
    cursor: default;
}
@media (max-width: 480px) {
    .tl-card { padding: 20px 15px; }
}

.tl-card:hover {
    transform: translateY(-4px);
    border-left-color: var(--accent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(14, 165, 233, 0.08);
}

.tl-entry-current .tl-card {
    grid-column: 1 / -1;
    border-left-color: var(--accent);
    background: rgba(14, 165, 233, 0.04);
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.08);
}

/* Entry actual ocupa ancho completo */
.tl-entry-current {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 20px;
    align-items: start;
}

.tl-entry-current .tl-num {
    padding-top: 28px;
    font-size: 0.85rem;
}

/* Texto dentro */
.node-content, .tl-card { /* Compatibilidad con snap JS */
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
}

.node-date { 
    font-family: var(--font-mono); 
    font-size: 0.78rem; 
    letter-spacing: 1px; 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 400;
}
.node-title { 
    font-size: 1.15rem; 
    margin-bottom: 4px; 
    font-weight: 700; 
    color: #fff;
    line-height: 1.3;
}
.node-subtitle { 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    margin-bottom: 12px; 
    font-family: var(--font-mono);
}
.tl-card p { 
    color: var(--text-secondary); 
    line-height: 1.7; 
    font-size: 0.92rem; 
    margin-bottom: 16px;
}

/* Tags de tecnologías */
.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}
.tl-tags span {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(14, 165, 233, 0.06);
    border: 1px solid rgba(14, 165, 233, 0.15);
    color: var(--accent);
    font-family: var(--font-mono);
    letter-spacing: 0.03em;
}
.tl-tags-accent span {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
}

/* Entrada revelada por scroll */
.tl-entry { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.tl-entry.revealed { opacity: 1; transform: translateY(0); }
.tl-entry:nth-child(2) { transition-delay: 0.1s; }
.tl-entry:nth-child(3) { transition-delay: 0.15s; }
.tl-entry:nth-child(4) { transition-delay: 0.2s; }
.tl-entry:nth-child(5) { transition-delay: 0.25s; }

/* Dots de navegación (ocultos — no necesarios con grid) */
.timeline-nav-dots { display: none; }

/* Nave del Timeline: entra desde la izquierda proporcional al scroll */
.tl-header-ship {
    position: absolute;
    top: 160px;
    right: 14%;           /* más espacio desde el borde derecho */
    width: 430px;         /* más ancho para que los propulsores queden dentro del recuadro */
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    transform: translateX(-110vw) rotate(-12deg);
    filter: drop-shadow(0 0 40px rgba(14, 165, 233, 0.7));
    will-change: transform, opacity;
    /* object-fit para que la imagen llene bien el ancho */
    object-fit: contain;
}

/* Animación de levitación una vez posicionada */
@keyframes tl-ship-bob {
    0%, 100% { transform: translateY(0px)   rotate(0deg); }
    50%       { transform: translateY(-18px) rotate(1.5deg); }
}

.tl-header-ship.floating {
    opacity: 1;
    animation: tl-ship-bob 7s ease-in-out infinite;
    transition: opacity 0.5s ease;
}

@media (max-width: 1200px) {
    .tl-header-ship { display: none; }
}
@media (max-width: 900px) {
    .tl-entries { grid-template-columns: 1fr; }
    .tl-entries::before { display: none; }
    .tl-entry-current { grid-template-columns: 1fr; }
    .tl-entry-current .tl-num { padding-top: 0; }
}


/* Compatibilidad con CSS antiguo del snap (ahora no snap) */
.tl-card-hidden-up, .tl-card-hidden-down { opacity: 0.2; transform: translateY(20px); }
.tl-card-active { opacity: 1; transform: translateY(0); }
.node-dot { display: none; } /* Limpio, nuevo diseño */
.node-dot-pulse { display: none; }
.border-accent { border-left-color: var(--accent) !important; box-shadow: 0 0 30px rgba(14, 165, 233, 0.1) !important; }

/* =========================================
   PROYECTOS TIPO GRID (Reverted to Master Showcase)
========================================= */
.master-projects { display: flex; flex-direction: column; gap: 100px; padding-top: 40px; overflow: hidden; }
.project-showcase { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.project-reverse { direction: rtl; } 
.project-reverse > * { direction: ltr; }

/* Mockups CSS-drawn */
.project-mockup {
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-accent);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.browser-header { background: rgba(0, 0, 0, 0.6); padding: 16px; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.dots span { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; }
.url-bar { background: rgba(255,255,255,0.08); border-radius: 6px; padding: 6px 12px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); flex-grow: 1; text-align: center; }

.app-mockup .browser-header { justify-content: center; position: relative; }
.app-header { background: rgba(5, 8, 12, 0.85); padding: 14px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, 0.03);}
.app-title { font-family: var(--font-body); font-weight: 500; font-size: 0.85rem; color: #a1a1aa; }

.browser-body { 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    background: #0a0a0c;
    border-radius: 0 0 24px 24px;
}
.img-contained { 
    height: 350px; /* Volvemos al tamaño original solicitado */
    width: 100%; 
    overflow: hidden; 
    position: relative;
}
.img-contained img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: top; 
    transition: transform 0.6s ease; 
    image-rendering: -webkit-optimize-contrast; 
    image-rendering: high-quality;
    cursor: zoom-in;
}

/* Hint flotante para ampliar */
.img-hint {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 0.85rem;
    font-family: var(--font-body);
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-mockup:hover .img-hint {
    opacity: 1;
}

.project-mockup:hover .img-contained img { transform: scale(1.05); }

.bg-app { background: linear-gradient(135deg, #05070a, #0b111a); }

/* =========================================
   PORTFOLIO — DISEÑO DINÁMICO & CAROUSEL
========================================= */
#portfolio-categories-container {
    display: flex;
    flex-direction: column;
    gap: 120px;
    margin-top: 60px;
}

.portfolio-category {
    position: relative;
    width: 100%;
}

.category-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 50px;
    padding-left: 20px;
    border-left: 4px solid var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* === Estilo Distintivo: WEBS === */
#category-webs .category-title { border-color: var(--accent); }

/* === Estilo Distintivo: TIENDAS === */
#category-tiendas .category-title { 
    border-color: #f59e0b; 
    background: linear-gradient(135deg, #f59e0b 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-shimmer {
    background: linear-gradient(90deg, #f59e0b, #fff, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}
@keyframes shine {
    to { background-position: 200% center; }
}


/* === Estilo Distintivo: APPS === */
#category-apps .category-title { 
    border-color: #22d3ee;
    background: linear-gradient(135deg, #22d3ee 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}




/* Colores de tags por categoría */
#category-tiendas .tl-tags span { 
    color: #f59e0b; 
    border-color: rgba(245, 158, 11, 0.3); 
    background: rgba(245, 158, 11, 0.05); 
}
#category-tiendas .btn-outline { 
    border-color: rgba(245, 158, 11, 0.4); 
    color: #f59e0b; 
}
#category-tiendas .btn-outline:hover { 
    background: #f59e0b; 
    color: #000; 
}

#category-apps .tl-tags span { 
    color: #22d3ee; 
    border-color: rgba(34, 211, 238, 0.3); 
    background: rgba(34, 211, 238, 0.05); 
}
#category-apps .btn-secondary {
    border-color: rgba(34, 211, 238, 0.4);
    color: #22d3ee;
}



.carousel-container {
    position: relative;
    width: 100%;
}

.carousel-track {
    position: relative;
    width: 100%;
}

/* Offset para compensar el navbar fijo en el scroll por anclas */
.portfolio-category {
    scroll-margin-top: 100px;
}

/* =========================================
   CAROUSEL INTEGRADO (CardSwap original)
========================================= */
.carousel-integrated {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
@media (max-width: 968px) {
    .carousel-integrated { grid-template-columns: 1fr; gap: 40px; }
}

/* Contenedor de cartas - EXACTO al original CardSwap */
.mockups-stack {
    position: relative;
    width: 100%;
    height: 500px;
    perspective: 900px;
    overflow: visible;
}

/* Cada carta - EXACTO al original .card pero con width para adaptarse al grid */
.stacked-mockup {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    border-radius: 12px;
    transform-style: preserve-3d;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Columna de texto: grid stacking simple */
.details-fader {
    width: 100%;
    padding-top: 20px;
}

.fader-stack-inner {
    display: grid;
    width: 100%;
}

/* Todos los textos apilados en la misma celda */
.fader-detail {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* GSAP controla las animaciones ahora */
}

/* Solo el activo tiene pointer-events - controlado por JS con classList.toggle */
.fader-detail.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}










/* =========================================
   CONTROLES Y PUNTOS DE CARRUSEL
========================================= */
.carousel-controls {
    position: absolute;
    bottom: -30px;
    right: 0;
    display: flex;
    gap: 15px;
    z-index: 40;
}

.carousel-arrow {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-secondary);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: var(--accent);
    color: #000;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
    border-color: var(--accent);
}

.carousel-indicators {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 30px;
    position: relative;
    z-index: 40;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.carousel-indicator::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--accent);
    opacity: 0;
    transition: all 0.4s ease;
}

.carousel-indicator.active {
    width: 32px;
    border-radius: 5px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.carousel-indicator.active::after {
    opacity: 1;
}

/* Text Details of Projects */
.project-details { display: flex; flex-direction: column; justify-content: center; }
.project-pills { display: flex; gap: 12px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; }
.project-type { font-weight: bold; font-family: var(--font-mono); font-size: 0.75rem;}
.type-web { color: #3b82f6; } .type-store { color: #f59e0b; } .type-app { color: #8b5cf6; }

.status-live { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; font-family: var(--font-mono); text-transform: uppercase; color: #4ade80; background: rgba(74, 222, 128, 0.1); padding: 6px 12px; border-radius: 20px; border: 1px solid rgba(74, 222, 128, 0.2);}
.status-live .pulse { animation: pulse-green 2s infinite; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; display: inline-block;}
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

.project-name { font-size: 2.2rem; margin-bottom: 20px; }
.project-text { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 30px; line-height: 1.8; }
.tech-stack-row { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 40px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); }
.tech-stack-row span::before { content: '>'; margin-right: 5px; opacity: 0.5; }

@media (max-width: 968px) {
    .project-showcase, .project-reverse { grid-template-columns: 1fr; gap: 40px; text-align: left;}
    .master-projects { gap: 80px; }
}

/* =========================================
   HABILIDADES & STACKS (Phase 2 Form)
========================================= */
.skills-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.skills-subtitle { font-size: 1.4rem; margin-bottom: 24px; border-bottom: 1px solid var(--glass-border); padding-bottom: 12px; }
.aptitude-list { display: flex; flex-direction: column; gap: 16px; }
.aptitude-list li { display: flex; align-items: center; gap: 12px; color: var(--text-primary); font-weight: 500; }
.mt-8 { margin-top: 40px; }

.lang-bars { display: flex; flex-direction: column; gap: 20px; }
.lang-item .lang-info { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; }
.progress-bg { width: 100%; height: 6px; background: var(--glass-border); border-radius: 10px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 10px; box-shadow: 0 0 10px var(--accent-glow); }

.tech-cloud { display: flex; flex-wrap: wrap; gap: 16px; }
.tech-orb { padding: 12px 24px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 30px; font-family: var(--font-mono); font-size: 0.85rem; transition: var(--trans-smooth); }
.tech-orb:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 224, 255, 0.1); }

@media (max-width: 850px) { .skills-wrapper { grid-template-columns: 1fr; gap: 40px; } }

/* =========================================
   CONTACTO MINIMALISTA SOBRIO (Stars Bg)
========================================= */
.contact-ultra-minimalist { position: relative; overflow: hidden; min-height: 80vh; display: flex; align-items: center; justify-content: center; }

/* LLUVIA DE ESTRELLAS GRANDES (Polvo) */
.contact-stars-bg.large-dust { position: absolute; inset: 0; background: radial-gradient(ellipse at center, #111a26 0%, #06090e 100%); z-index: 0;}
.contact-stars-bg.large-dust::after { content:''; position: absolute; width: 200vw; height: 200vh; background-image: radial-gradient(rgba(255,255,255,0.8) 2.5px, transparent 2.5px); background-size: 150px 150px; opacity: 0.15; animation: rotating-stars 60s linear infinite; }
@keyframes rotating-stars { 0% { transform: translate(-50%,-50%) rotate(0deg); } 100% { transform: translate(-50%,-50%) rotate(360deg); } }

.contact-night-bg {
    background: radial-gradient(ellipse at 20% 100%, #1a0533 0%, transparent 50%),
                radial-gradient(ellipse at 80% 0%, #0a1a2e 0%, transparent 60%),
                linear-gradient(to bottom, #02040a 0%, #070d1a 40%, #0b1628 70%, #111f38 100%);
}

/* Aurora en la parte superior */
.contact-night-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: radial-gradient(ellipse at 30% 0%, rgba(0,224,255,0.07) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 0%, rgba(120,0,255,0.06) 0%, transparent 55%);
    animation: aurora-shift 12s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}
/* Silueta de colinas/árboles en el fondo inferior */
.contact-night-bg::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 38%;
    background:
        radial-gradient(ellipse at 10% 100%, #050a10 48%, transparent 50%),
        radial-gradient(ellipse at 22% 100%, #050a10 55%, transparent 57%),
        radial-gradient(ellipse at 35% 100%, #050a10 42%, transparent 44%),
        radial-gradient(ellipse at 50% 100%, #050a10 60%, transparent 62%),
        radial-gradient(ellipse at 65% 100%, #050a10 50%, transparent 52%),
        radial-gradient(ellipse at 78% 100%, #050a10 45%, transparent 47%),
        radial-gradient(ellipse at 90% 100%, #050a10 52%, transparent 54%),
        linear-gradient(to top, #050a10 30%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

@keyframes aurora-shift {
    0%   { opacity: 0.6; transform: scaleX(1); }
    100% { opacity: 1;   transform: scaleX(1.08); }
}

/* LLUVIA DE ESTRELLAS FUE ELIMINADA */
.contact-header-minimal { margin-bottom: 50px; position:relative; z-index:5; }
.flying-paca-container { position: absolute; width: 140px; height: 140px; z-index: 3; top: 8%; right: -150px; padding: 0; border: 0; background: transparent; animation: fly-across 20s linear infinite, paca-hover-y 6s ease-in-out infinite; pointer-events: auto; cursor: pointer; border-radius: 50%;}
.flying-paca-container:hover { animation-play-state: paused; }
.flying-paca-container:focus-visible { right: 24px; animation: none; transform: none; opacity: 1; outline: 3px solid #f28c28; outline-offset: 6px; }
html[data-motion='reduced'] .flying-paca-container { right: 24px; animation: none !important; transform: none !important; opacity: .8; }
@media (prefers-reduced-motion: reduce) {
    .flying-paca-container { right: 24px; opacity: .8; }
}
.paca-voladora { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.paca-frame-1 { animation: paca-flap 0.35s infinite alternate; }
.paca-frame-2 { animation: paca-flap-alt 0.35s infinite alternate; }

@keyframes paca-hover-y { 0%, 100% { margin-top: 0; } 50% { margin-top: -40px; } }
@keyframes paca-flap { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes paca-flap-alt { 0%, 49% { opacity: 0; } 50%, 100% { opacity: 1; } }
@keyframes fly-across {
    0% { transform: translateX(0) scaleX(-1); }
    100% { transform: translateX(calc(-100vw - 300px)) scaleX(-1); }
}

.paca-dialog-overlay { position: fixed; inset: 0; z-index: 99998; display: grid; place-items: center; padding: 24px; background: rgba(3, 8, 16, .74); backdrop-filter: blur(7px); animation: fadein-overlay .25s ease; cursor: default; }
.paca-dialog { position: relative; width: min(100%, 480px); padding: 42px 36px 34px; color: #101923; text-align: center; background: #fffaf0; border: 2px solid #101923; border-radius: 22px; box-shadow: 10px 10px 0 #101923, 0 24px 70px rgba(0, 0, 0, .35); animation: popup-enter .3s cubic-bezier(.34, 1.56, .64, 1); }
.paca-dialog:focus { outline: none; }
.paca-dialog-close { position: absolute; top: 12px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; color: #101923; font-size: 1.2rem; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.paca-dialog-close:hover, .paca-dialog-close:focus-visible { color: #fffaf0; background: #101923; outline: none; }
.paca-dialog-icon { display: block; margin-bottom: 10px; font-size: 2.8rem; }
.paca-dialog h3 { margin: 0 0 12px; font-size: clamp(1.45rem, 4vw, 2rem); }
.paca-dialog p { margin: 0 auto 26px; max-width: 39ch; color: #48515a; line-height: 1.65; }
.paca-dialog-actions { display: grid; justify-items: center; gap: 14px; }
.paca-dialog-email { color: #101923; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.paca-dialog a:focus-visible { outline: 3px solid #f28c28; outline-offset: 4px; }

.contact-header-minimal { margin-bottom: 50px; }
.pulse-ring { width: 80px; height: 80px; margin: 0 auto 30px; border-radius: 50%; border: 1px solid var(--accent-alt); animation: ring-out 2s infinite; position: relative;}
.pulse-ring::before { content:''; position: absolute; inset: 20px; background: var(--accent-alt); border-radius: 50%; box-shadow: 0 0 20px rgba(226, 232, 240, 0.3);}
@keyframes ring-out { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

.c-title { font-size: clamp(3rem, 6vw, 4.5rem); }
.contact-pill-links { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;}
.pill-btn { display: flex; align-items: center; gap: 15px; padding: 18px 40px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: 40px; font-size: 1.1rem; font-weight: 600; color: white; transition: var(--trans-smooth); }
.logo-sep { 
    font-size: 1.4rem; 
    margin: 0 4px; 
    vertical-align: middle; 
    font-weight: 800;
    text-shadow: 0 0 10px var(--accent-glow);
    display: inline-block;
    transform: translateY(-1px);
}
.logo { font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: -0.5px; transition: 0.3s; position: relative; }
.pill-btn:hover { background: rgba(255,255,255,0.08); transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.pill-accent { background: rgba(0, 224, 255, 0.1); border-color: rgba(0, 224, 255, 0.3); color: var(--accent); }
.pill-accent:hover { background: var(--accent); color: black; box-shadow: 0 10px 30px var(--accent-glow); }

/* =========================================
   FOOTER PREMIUM
========================================= */
.footer { border-top: 1px solid var(--glass-border); padding: 50px 0; background: var(--bg-main); font-family: var(--font-mono); font-size: 0.85rem; }
.footer-content { max-width: 1200px; margin: 0 auto; padding: 0 5%; display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); }
.social-links { display: flex; gap: 20px; }
.social-links a { color: var(--text-muted); transition: 0.3s; display: inline-flex; align-items: center; justify-content: center; }
.social-links a:hover { color: var(--accent); transform: translateY(-4px); filter: drop-shadow(0 0 10px rgba(0,224,255,0.5)); }

@media (max-width: 600px) {
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
}

/* =========================================
   PACA POLICE & EGGS
========================================= */
#paca-police-anim { position: fixed; right: 20px; bottom: -300px; width: 160px; z-index: 10000; transition: bottom 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); pointer-events: none; }
.police-active { bottom: -10px !important; }

#police-sirens-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 9999; opacity: 0; transition: opacity 0.3s; background: transparent; }
.sirens-active { opacity: 1 !important; animation: flash-sirens 0.8s ease-in-out infinite alternate; }
@keyframes flash-sirens { 
    0% { box-shadow: inset 0 150px 150px -80px rgba(255, 0, 0, 0.4), inset 50px 0 100px -50px rgba(255, 0, 0, 0.3), inset -50px 0 100px -50px rgba(255, 0, 0, 0.3); } 
    100% { box-shadow: inset 0 150px 150px -80px rgba(0, 80, 255, 0.4), inset 50px 0 100px -50px rgba(0, 80, 255, 0.3), inset -50px 0 100px -50px rgba(0, 80, 255, 0.3); } 
}

.primary-btn-glow { background: rgba(0, 224, 255, 0.1); border: 1px solid var(--accent); color: var(--accent); padding: 12px 26px; border-radius: 30px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.primary-btn-glow:hover { background: var(--accent); color: #000; box-shadow: 0 0 25px var(--accent-glow); transform: scale(1.05); }

.egg-plus-anim { position: fixed; color: var(--accent-alt); font-size: 1.2rem; font-family: var(--font-mono); font-weight: bold; z-index: 10000; pointer-events: none; animation: rise-fade 1s forwards; text-shadow: 0 0 10px rgba(0,0,0,0.8);}
@keyframes rise-fade { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-40px) scale(1.5); } }

/* =========================================
   LAYOUT HABILIDADES V5
========================================= */
.skills-grid-v5 { display: grid; grid-template-columns: 1fr 400px; gap: 50px; align-items: start; margin-top: 40px; }
.skills-v5-content { display: flex; flex-direction: column; gap: 35px; }

.v5-highlights { display: flex; flex-direction: column; gap: 20px; }
.v5-card { padding: 30px; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); transition: 0.3s;}
.v5-card:hover { background: rgba(255,255,255,0.03); transform: translateX(10px); }
.left-border-accent { border-left: 4px solid var(--accent) !important; }
.left-border-alt { border-left: 4px solid var(--accent-alt) !important; }
.v5-title { font-size: 1.35rem; margin-bottom: 12px; font-family: var(--font-display); color: #fff;}
.v5-desc { color: var(--text-secondary); line-height: 1.6; font-size: 1rem; margin: 0; }
.v5-tech-grid { }
/* CASE STUDY BOXES (Problema / Solución) */
.project-case-study {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 25px 0;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.04);
}

/* =========================================
   SERVICIOS, METODO Y CONTACTO DIRECTO
========================================= */
.services-section,
.work-section {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0)),
        radial-gradient(circle at 12% 20%, rgba(14, 165, 233, 0.08), transparent 36%);
}

.services-section.section-padding {
    padding: 110px 0 90px;
}

.work-section.section-padding {
    padding: 95px 0 105px;
}

.service-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(14,165,233,0.09), transparent 42%),
        rgba(8, 13, 21, 0.72);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.service-card {
    display: flex;
    flex-direction: column;
    min-height: 380px;
    background: transparent;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 0;
    padding: clamp(26px, 2.4vw, 36px);
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.service-card:last-child {
    border-right: 0;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), transparent 48%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.service-card:hover::before {
    opacity: 1;
}

.service-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.service-kicker {
    display: inline-flex;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.service-index {
    color: rgba(255, 255, 255, 0.14);
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.8rem);
    font-weight: 800;
    line-height: 0.8;
}

.service-card h3 {
    font-size: clamp(1.18rem, 1.5vw, 1.55rem);
    margin-bottom: 12px;
    max-width: 760px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.62;
    max-width: 760px;
}

.service-card ul {
    display: grid;
    gap: 8px;
    margin: 20px 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.service-meta {
    margin-top: auto;
    color: var(--accent-alt);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding-top: 8px;
}

.work-board {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: clamp(28px, 5vw, 70px);
    align-items: center;
    padding: clamp(28px, 4vw, 52px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(14,165,233,0.08), transparent 40%),
        rgba(8, 13, 21, 0.68);
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    position: relative;
}

.work-board-visual {
    position: relative;
    min-height: 320px;
    perspective: 900px;
}

.work-orbit {
    position: absolute;
    inset: 42px 20px;
    border: 1px solid rgba(14, 165, 233, 0.28);
    border-radius: 50%;
    transform: rotateX(62deg) rotateZ(-18deg);
    box-shadow: 0 0 34px rgba(14, 165, 233, 0.08);
}

.work-cube {
    position: absolute;
    width: 92px;
    height: 92px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(14,165,233,0.26), rgba(255,255,255,0.035));
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 24px 40px rgba(0,0,0,0.35);
    transform: rotateX(58deg) rotateZ(45deg);
}

.work-cube-1 { top: 34px; left: 124px; }
.work-cube-2 { top: 128px; left: 40px; width: 72px; height: 72px; opacity: 0.72; }
.work-cube-3 { top: 180px; right: 54px; width: 78px; height: 78px; opacity: 0.82; }

.work-flow {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    position: relative;
}

.work-flow::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(14,165,233,0.45), transparent);
}

.work-step {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0 14px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    position: relative;
}

.work-step span {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(6, 9, 14, 0.92);
    border: 1px solid rgba(14, 165, 233, 0.24);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.86rem;
    box-shadow: 0 0 24px rgba(14, 165, 233, 0.08);
}

.work-step h3 {
    font-size: 0.98rem;
    margin-bottom: 8px;
}

.work-step p {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.55;
}

.timeline-split {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 28px;
    margin-top: 50px;
}

.timeline-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-column-title {
    color: var(--accent-alt);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.timeline-column-featured .tl-entry-current .tl-card {
    padding: 34px;
    background: rgba(10, 15, 25, 0.78);
}

.contact-direct {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto 22px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    color: var(--text-secondary);
}

.contact-direct span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-direct a {
    color: #fff;
    font-weight: 700;
}

#contactProjectType option {
    color: #111827;
}

@media (max-width: 1000px) {
    .service-layout,
    .work-board,
    .work-flow,
    .timeline-split {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    }

    .service-card:last-child {
        border-bottom: 0;
    }

    .work-board-visual {
        display: none;
    }

    .work-flow {
        gap: 22px;
    }

    .work-flow::before {
        display: none;
    }

    .work-step {
        display: grid;
        grid-template-columns: 70px minmax(0, 1fr);
        padding: 20px;
        border: 1px solid rgba(255,255,255,0.075);
        border-radius: 16px;
        background: rgba(10, 15, 25, 0.45);
    }
}

@media (max-width: 640px) {
    .service-card,
    .work-step {
        padding: 20px;
    }

    .contact-direct {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 14px;
    }

    .work-step {
        grid-template-columns: 1fr;
    }

    .work-board {
        padding: 18px;
        border-radius: 18px;
    }
}

.case-box {
    position: relative;
    padding-left: 15px;
}

.case-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 4px;
    opacity: 0.8;
}

.case-box p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.case-box::before {
    content: '';
    position: absolute;
    left: 0; top: 5px; bottom: 5px;
    width: 2px;
    background: var(--accent);
    opacity: 0.3;
}

.tech-cloud-v5 { justify-content: flex-start; }


/* === SPECIALTY CARDS === */
.specialty-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 22px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    transition: var(--trans-smooth);
    position: relative;
    overflow: hidden;
}
.specialty-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: 16px;
}
.specialty-card:hover { transform: translateY(-4px); }
.specialty-card:hover::before { opacity: 1; }

.specialty-ia { border-left: 4px solid var(--accent); }
.specialty-ia::before { background: linear-gradient(135deg, rgba(0,224,255,0.06) 0%, transparent 60%); }
.specialty-ia:hover { box-shadow: 0 8px 30px rgba(0,224,255,0.15); border-color: var(--accent); }

.specialty-web { border-left: 4px solid var(--accent-alt); }
.specialty-web::before { background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 60%); }
.specialty-web:hover { box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1); border-color: var(--accent-alt); }

.specialty-icon-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
}
.specialty-ia .specialty-icon-wrap { background: rgba(0,224,255,0.08); border-color: rgba(0,224,255,0.2); }
.specialty-web .specialty-icon-wrap { background: rgba(232,124,30,0.08); border-color: rgba(232,124,30,0.2); }

.specialty-body { flex: 1; }
.specialty-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.specialty-title { font-size: 1.1rem; font-family: var(--font-display); color: #fff; margin: 0; }
.specialty-badge { font-size: 0.7rem; padding: 3px 10px; border-radius: 20px; font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.badge-ai { background: rgba(14, 165, 233, 0.08); color: var(--accent); border: 1px solid rgba(14, 165, 233, 0.2); }
.badge-web { background: rgba(226, 232, 240, 0.05); color: var(--accent-alt); border: 1px solid rgba(226, 232, 240, 0.2); }
.specialty-desc { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.6; margin-bottom: 14px; }
.specialty-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.specialty-tags span { font-size: 0.72rem; padding: 3px 10px; border-radius: 20px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); color: var(--text-secondary); font-family: var(--font-mono); }

/* === TECH ORB HOVER POR LENGUAJE === */
.tech-orb { transition: all 0.25s ease; cursor: default; }
.tech-orb[data-tech="html"]:hover { border-color: #E34F26; color: #E34F26; box-shadow: 0 0 16px rgba(227,79,38,0.4); transform: scale(1.08); }
.tech-orb[data-tech="js"]:hover  { border-color: #F7DF1E; color: #F7DF1E; box-shadow: 0 0 16px rgba(247,223,30,0.4); transform: scale(1.08); background: rgba(247,223,30,0.06); }
.tech-orb[data-tech="electron"]:hover { border-color: #47848F; color: #47848F; box-shadow: 0 0 16px rgba(71,132,143,0.4); transform: scale(1.08); }
.tech-orb[data-tech="php"]:hover  { border-color: #777BB4; color: #a8abdf; box-shadow: 0 0 16px rgba(119,123,180,0.5); transform: scale(1.08); }
.tech-orb[data-tech="sql"]:hover  { border-color: #F29111; color: #F29111; box-shadow: 0 0 16px rgba(242,145,17,0.4); transform: scale(1.08); }
.tech-orb[data-tech="python"]:hover { border-color: #3776AB; color: #FFD43B; box-shadow: 0 0 16px rgba(55,118,171,0.4), 0 0 8px rgba(255,212,59,0.2); transform: scale(1.08); background: rgba(55,118,171,0.08); }


.skills-v5-paca { display: flex; justify-content: center; position: relative; }
.paca-exterior-wrapper { position: relative; display: inline-block; margin-top: 80px;}

.paca-camera-card-v5 { position: relative; border-radius: 20px; overflow: hidden; border: 2px solid rgba(0, 224, 255, 0.3); box-shadow: 0 15px 40px rgba(0,224,255,0.15); display: inline-block; padding: 0; background: linear-gradient(180deg, #111a26 0%, #080c12 100%); line-height: 0; }
.paca-fit-img { width: 340px; height: auto; display: block; filter: drop-shadow(0 -10px 20px rgba(0,0,0,0.8)); transition: transform 0.4s ease; position: relative; z-index: 5; }

.paca-speech-bubble-exterior { position: absolute; bottom: calc(100% - 15px); right: -80px; left: auto; width: 250px; background: #fffadc; color: #111; padding: 18px 24px; font-family: var(--font-body); font-weight: 800; font-size: 0.85rem; line-height: 1.5; z-index: 20; pointer-events:none; border: 4px solid #111; border-radius: 16px; box-shadow: inset -4px -4px 0 rgba(0,0,0,0.08), 6px 6px 0 #111; animation: float-chat 3.5s ease-in-out infinite;}
.paca-speech-bubble-exterior::before { content: ''; position: absolute; left: 40px; bottom: -22px; border-right: 18px solid #111; border-top: 22px solid #111; border-bottom: 0px solid transparent; border-left: 0px solid transparent; }
.paca-speech-bubble-exterior::after { content: ''; position: absolute; left: 44px; bottom: -12px; border-right: 12px solid #fffadc; border-top: 16px solid #fffadc; border-bottom: 0px solid transparent; border-left: 0px solid transparent; }

@keyframes float-chat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse-chat-pixel { 0% { box-shadow: -4px 0 0 #fff, 4px 0 0 #fff, 0 -4px 0 #fff, 0 4px 0 #fff, inset -4px -4px 0 rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.3); } 50% { box-shadow: -4px 0 0 #fff, 4px 0 0 #fff, 0 -4px 0 #fff, 0 4px 0 #fff, inset -4px -4px 0 rgba(0,0,0,0.1), 0 10px 30px rgba(255,255,255,0.4); } 100% { box-shadow: -4px 0 0 #fff, 4px 0 0 #fff, 0 -4px 0 #fff, 0 4px 0 #fff, inset -4px -4px 0 rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.3); } }

@media (max-width: 968px) {
    .skills-grid-v5 { grid-template-columns: 1fr; gap: 40px; }
    .skills-v5-paca { justify-content: center; }
    .paca-fit-img { width: 100%; max-width: 320px; }
}
@media (max-width: 480px) {
    .paca-speech-bubble-exterior { left: 50%; right: auto; width: 240px; margin-left: -120px; }
}

/* =========================================
   CONFETTI & POPUP ANIMATIONS
========================================= */
@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
@keyframes fadein-overlay { from { opacity: 0; } to { opacity: 1; } }
@keyframes popup-enter { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* =========================================
   LIGHTBOX (ZOOM DE IMÁGENES)
========================================= */
.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    z-index: 2;
    top: clamp(14px, 3vw, 30px);
    right: clamp(14px, 3vw, 40px);
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    appearance: none;
    color: #fff7eb;
    background: rgba(7, 17, 22, .76);
    border: 1px solid rgba(235, 107, 53, .68);
    border-radius: 50%;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .32), inset 0 0 0 1px rgba(255, 247, 235, .05);
    font-size: 31px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: color .25s ease, background-color .25s ease, border-color .25s ease, transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease;
    font-family: var(--font-body);
}

.lightbox-close:hover {
    color: #fff;
    background: rgba(185, 59, 45, .9);
    border-color: #f09a58;
    box-shadow: 0 14px 38px rgba(185, 59, 45, .28), inset 0 0 0 1px rgba(255, 247, 235, .14);
    transform: rotate(90deg) scale(1.05);
}

.lightbox-close:focus-visible {
    outline: 3px solid #f09a58;
    outline-offset: 4px;
}

@media (max-width: 560px) {
    .lightbox-close { width: 46px; height: 46px; font-size: 28px; }
    .lightbox-content { max-width: calc(100% - 24px); max-height: calc(100% - 96px); }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox,
    .lightbox-content,
    .lightbox-close { transition: none; }

    .lightbox-close:hover { transform: none; }
}


/* =========================================
   WP-STYLE EDITOR BLOCKS (CMS)
   ========================================= */
.wp-block-section { margin: 50px 0; padding: 20px; background: rgba(15, 23, 42, 0.3); border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); }
.wp-block-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; margin-top: 0; margin-bottom: 25px; color: #fff; line-height: 1.2; letter-spacing: -0.5px; }
.wp-block-title.h2 { font-size: 2.2rem; }
.wp-block-title.h3 { font-size: 1.8rem; }
.wp-block-title.h4 { font-size: 1.4rem; }
.wp-block-title.h5 { font-size: 1.2rem; color: #38bdf8; }

.wp-block-row { display: flex; gap: 30px; flex-wrap: wrap; align-items: stretch; }
.wp-block-col { flex: 1; min-width: 250px; display: flex; flex-direction: column; justify-content: center; }
.wp-block-col.col-33 { flex: 0 0 calc(33.333% - 15px); }
.wp-block-col.col-50 { flex: 0 0 calc(50% - 15px); }
.wp-block-col.col-66 { flex: 0 0 calc(66.666% - 15px); }

.wp-block-image { width: 100%; height: 100%; max-height: 400px; object-fit: cover; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); }
.wp-block-text { color: #94a3b8; line-height: 1.8; font-size: 1.05rem; }
.wp-block-text p { margin-bottom: 15px; }
.wp-block-text p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
    .wp-block-col.col-33, .wp-block-col.col-50, .wp-block-col.col-66 { flex: 0 0 100%; }
    .wp-block-title.h2 { font-size: 1.8rem; }
    .wp-block-section { padding: 15px; }
}

/* =========================================
   RESPONSIVE V19 · contención compartida
========================================= */
main,
section,
.container,
.container > *,
.wp-block-section,
.wp-block-row,
.wp-block-col { min-width: 0; }

main :where(h1, h2, h3, h4, p, li) { overflow-wrap: break-word; }

img,
video,
canvas { max-inline-size: 100%; }

input,
select,
textarea,
button { max-width: 100%; }

@media (max-width: 900px) {
    .mobile-menu {
        max-height: calc(100dvh - 104px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
}

@media (max-width: 768px) {
    .wp-block-row { gap: 18px; }

    .wp-block-col,
    .wp-block-col.col-33,
    .wp-block-col.col-50,
    .wp-block-col.col-66 {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .wp-block-title { overflow-wrap: anywhere; }
}

@media (max-width: 430px) {
    .container { padding-inline: 18px; }
    .btn { padding-inline: 19px; }
    .wp-block-section { margin-block: 30px; padding: 13px; }
    .wp-block-text { font-size: .96rem; line-height: 1.7; }
}
