/* Overrides y fixes rapidos -- editar aqui, NO en styles.css */

/* =============================================================================
   NAV SCROLL OFFSET
   El navbar es position:fixed, ocupa ~76px en desktop y ~66px en movil.
   sin scroll-margin-top el ancla queda tapada por la barra de navegacion.
   ============================================================================= */
#services,
#about,
#cases,
#projects,
#gadgets,
#latest,
#contact {
    scroll-margin-top: 76px;
}

@media (max-width: 768px) {
    #services,
    #about,
    #cases,
    #projects,
    #gadgets,
    #latest,
    #contact {
        scroll-margin-top: 66px;
    }
}

/* =============================================================================
   SECTION-BLOG-LATEST -- Bloque "Ultimos del blog" en index.html
   Estatico (HTML horneado por scripts/inject-blog-index.py) para que Googlebot
   descubra los posts en la primera pasada y reparta autoridad interna desde
   la home. Visible y consistente con el resto de secciones.
   ============================================================================= */
.section-blog-latest {
    padding: 6rem 5vw 5rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.latest-header {
    text-align: center;
    margin-bottom: 3rem;
}

.latest-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: var(--radius-full, 999px);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.latest-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1rem;
    color: var(--text-main);
}

.latest-title .gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.latest-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

.latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2.5rem;
}

.latest-card {
    background: var(--bg-card, rgba(12, 12, 20, 0.85));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-lg, 20px);
    overflow: hidden;
    transition: transform 0.35s var(--ease-out, ease), border-color 0.35s var(--ease-out, ease), box-shadow 0.35s var(--ease-out, ease);
}

.latest-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 40px -10px rgba(0, 240, 255, 0.25);
}

.latest-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.latest-card-media {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(124, 58, 237, 0.08));
}

.latest-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out, ease);
}

.latest-card:hover .latest-card-media img {
    transform: scale(1.04);
}

.latest-card-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--accent-cyan);
    font-size: 2rem;
    opacity: 0.4;
}

.latest-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.latest-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim, #888);
}

.latest-card-cat {
    padding: 0.2rem 0.6rem;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: var(--radius-full, 999px);
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.65rem;
}

.latest-card-cat[data-cat="seo"] {
    background: rgba(0, 255, 157, 0.08);
    border-color: rgba(0, 255, 157, 0.25);
    color: var(--accent-green, #00ff9d);
}

.latest-card-cat[data-cat="cases"] {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    color: var(--accent-purple, #7c3aed);
}

.latest-card-cat[data-cat="negocio"] {
    background: rgba(255, 149, 0, 0.08);
    border-color: rgba(255, 149, 0, 0.25);
    color: var(--accent-orange, #ff9500);
}

.latest-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: var(--text-main);
}

.latest-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-card-cta {
    margin-top: auto;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding-top: 0.5rem;
}

.latest-card-cta i {
    transition: transform 0.3s var(--ease-out, ease);
}

.latest-card:hover .latest-card-cta i {
    transform: translateX(4px);
}

.latest-footer {
    text-align: center;
}

.latest-cta-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #050510;
    border-radius: var(--radius-full, 999px);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: transform 0.3s var(--ease-out, ease), box-shadow 0.3s var(--ease-out, ease);
}

.latest-cta-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -8px rgba(0, 240, 255, 0.45);
}

@media (max-width: 768px) {
    .section-blog-latest {
        padding: 4rem 1.25rem 3rem;
    }

    .latest-grid {
        gap: 1.25rem;
    }

    .latest-card-media {
        height: 170px;
    }
}

/* =============================================================================
   BTN-GADGET-INFO -- Posicionamiento absoluto dentro de cada gadget-card
   La tarjeta ya tiene position:relative. El boton se ancla abajo a la derecha
   sin solaparse con el contenido. En movil se anade padding-bottom a la card.
   ============================================================================= */
.btn-gadget-info {
    position: absolute;
    bottom: 0.8rem;
    right: 1rem;
    z-index: 2;
}

@media (max-width: 768px) {
    .gadget-card {
        padding-bottom: 4rem;
    }

    .btn-gadget-info {
        bottom: 1.25rem;
        right: 0.75rem;
    }
}

/* =============================================================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   Reduce redraws by disabling heavy backdrop-filters, box-shadows and CSS animations 
   on mobile devices.
   ============================================================================= */
@media (max-width: 768px) {
    /* Simplify glassmorphism cards */
    .service-card, .gadget-card, .case-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(12, 12, 20, 0.98);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    }

    /* Pause agent playground cyclic glow */
    .agent-core-glow {
        animation: none !important;
        opacity: 0.2;
    }

    /* Stop rotating orbs and rings in playground to save CPU */
    .agent-core-ring-prev, .agent-core-orbit, .agent-orb {
        animation-duration: 30s !important; /* Slow down drastically instead of stopping entirely to maintain some life */
    }
    
    /* Disable neon button pulsing */
    .btn-expand {
        animation: none !important;
    }
}

/* =============================================================================
   NEON COLORS FOR NEW GADGET CARDS (13-15)
   styles.css only defines nth-child(1) through nth-child(12).
   ============================================================================= */
.section-gadgets .gadget-card:nth-child(13) { --neon: #ff2a6d; --neon-rgb: 255, 42, 109; }
.section-gadgets .gadget-card:nth-child(14) { --neon: #00f0ff; --neon-rgb: 0, 240, 255; }
.section-gadgets .gadget-card:nth-child(15) { --neon: #7c3aed; --neon-rgb: 124, 58, 237; }

/* =============================================================================
   COMING SOON GADGET CARDS
   Placeholder cards for upcoming gadgets. Visually muted and non-interactive.
   ============================================================================= */
.gadget-card--coming-soon {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.3);
    user-select: none;
}

.gadget-card--coming-soon .btn-gadget {
    cursor: default;
    opacity: 0.5;
}

.gadget-card--coming-soon .gadget-badge {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-dim, #52525b) !important;
}

/* =============================================================================
   GADGET FILTER BAR — Cyberpunk selector
   ============================================================================= */
.gf-bar {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 2rem auto 2.5rem;
    max-width: 520px;
    perspective: 600px;
}
.gf-track {
    position: relative;
    display: flex;
    gap: 0;
    background: rgba(12, 12, 20, 0.7);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 14px;
    padding: 4px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 0 20px rgba(0, 240, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

/* Sliding neon indicator — color changes per filter */
.gf-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(33.333% - 2.67px);
    border-radius: 10px;
    background: var(--gf-bg, linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(124, 58, 237, 0.12)));
    border: 1px solid var(--gf-border, rgba(0, 240, 255, 0.3));
    box-shadow: 0 0 12px var(--gf-glow, rgba(0, 240, 255, 0.2)), 0 0 30px var(--gf-glow-soft, rgba(0, 240, 255, 0.06));
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    z-index: 0;
}
.gf-indicator[data-pos="1"] { transform: translateX(100%); }
.gf-indicator[data-pos="2"] { transform: translateX(200%); }

/* All = cyan-purple gradient */
.gf-indicator[data-filter="all"] {
    --gf-bg: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(124, 58, 237, 0.12));
    --gf-border: rgba(0, 240, 255, 0.3);
    --gf-glow: rgba(0, 240, 255, 0.2);
    --gf-glow-soft: rgba(0, 240, 255, 0.06);
}
/* Business = green */
.gf-indicator[data-filter="business"] {
    --gf-bg: linear-gradient(135deg, rgba(0, 255, 157, 0.18), rgba(0, 200, 120, 0.1));
    --gf-border: rgba(0, 255, 157, 0.35);
    --gf-glow: rgba(0, 255, 157, 0.25);
    --gf-glow-soft: rgba(0, 255, 157, 0.08);
}
/* Tech = orange-red */
.gf-indicator[data-filter="tech"] {
    --gf-bg: linear-gradient(135deg, rgba(255, 149, 0, 0.18), rgba(255, 42, 109, 0.12));
    --gf-border: rgba(255, 149, 0, 0.35);
    --gf-glow: rgba(255, 149, 0, 0.25);
    --gf-glow-soft: rgba(255, 149, 0, 0.08);
}

/* Buttons */
.gf-btn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-body, 'Space Grotesk', sans-serif);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.gf-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}
.gf-btn.gf-active {
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}
.gf-btn.gf-active[data-filter="business"] {
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}
.gf-btn.gf-active[data-filter="tech"] {
    text-shadow: 0 0 10px rgba(255, 149, 0, 0.5);
}
.gf-icon {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
}
.gf-active .gf-icon {
    opacity: 1;
    transform: scale(1.1);
}
.gf-count {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.35);
    transition: background 0.3s, color 0.3s;
}
.gf-active .gf-count {
    background: rgba(0, 240, 255, 0.15);
    color: var(--accent-cyan, #00f0ff);
}
.gf-active[data-filter="business"] .gf-count {
    background: rgba(0, 255, 157, 0.15);
    color: var(--accent-green, #00ff9d);
}
.gf-active[data-filter="tech"] .gf-count {
    background: rgba(255, 149, 0, 0.15);
    color: var(--accent-orange, #ff9500);
}

/* Scanline sweep on click */
.gf-scanline {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 240, 255, 0.08) 45%, rgba(0, 240, 255, 0.15) 50%, rgba(0, 240, 255, 0.08) 55%, transparent 100%);
    border-radius: 14px;
    pointer-events: none;
    z-index: 2;
}
.gf-scanline.gf-sweep {
    animation: gf-sweep 0.6s ease-out forwards;
}
@keyframes gf-sweep {
    0%   { left: -100%; }
    100% { left: 100%; }
}

/* ─── Card filter animations ─── */
.gadget-card {
    transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}
.gadget-card.gf-hiding {
    opacity: 0;
    transform: scale(0.88) rotateX(8deg);
    filter: blur(4px);
    pointer-events: none;
}
.gadget-card.gf-hidden {
    display: none !important;
}
.gadget-card.gf-showing {
    animation: gf-reveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes gf-reveal {
    0%   { opacity: 0; transform: scale(0.9) translateY(20px); filter: blur(3px); }
    60%  { filter: blur(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .gf-track { backdrop-filter: none; -webkit-backdrop-filter: none; }
    .gf-btn { padding: 0.5rem 0.8rem; font-size: 0.7rem; gap: 0.3rem; }
    .gf-icon { font-size: 0.6rem; }
    .gf-count { font-size: 0.55rem; }
    .gf-bar { margin: 1.5rem auto 1.8rem; }
}
@media (max-width: 480px) {
    .gf-btn { padding: 0.45rem 0.6rem; font-size: 0.65rem; }
    .gf-label { display: none; }
    .gf-icon { font-size: 0.75rem; opacity: 1; }
}

/* =============================================================================
   GADGET CATEGORY LABELS
   Subtle category badge via data-category attribute (business / tech).
   ============================================================================= */
.gadget-card[data-category] {
    padding-top: 2.8rem;
}
.gadget-card[data-category]::before {
    position: absolute;
    top: 0.7rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    z-index: 2;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    white-space: nowrap;
}
.gadget-card[data-category="business"]::before {
    content: 'NEGOCIO';
    background: rgba(0, 255, 157, 0.12);
    color: var(--accent-green, #00ff9d);
    border: 1px solid rgba(0, 255, 157, 0.2);
}
.gadget-card[data-category="tech"]::before {
    content: 'TECH DEMO';
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan, #00f0ff);
    border: 1px solid rgba(0, 240, 255, 0.18);
}

/* English labels via html[lang="en"] */
html[lang="en"] .gadget-card[data-category="business"]::before { content: 'BUSINESS'; }
html[lang="en"] .gadget-card[data-category="tech"]::before { content: 'TECH DEMO'; }

/* =============================================================================
   STASIS CAPSULE — Sci-fi evolution pod (desktop only)
   Sticky capsule with liquid, bubbles, crossfading specimens, and timeline symbiosis.
   ============================================================================= */
.evo-capsule { display: none; }

@media (min-width: 1025px) {
    /* ─── Wrapper: flex layout for timeline + capsule ─── */
    .timeline-evo-wrapper {
        display: flex;
        gap: 1.5rem;
        align-items: flex-start;
        position: relative;
        min-height: 600px; /* ensure enough scroll room for sticky */
    }
    .timeline-evo-wrapper > .timeline {
        flex: 1;
        min-width: 0;
    }

    /* ─── Capsule: JS-driven sticky (bypasses body overflow-x:hidden bug) ─── */
    .evo-capsule {
        display: block;
        position: relative;
        top: 0;
        width: 220px;
        flex-shrink: 0;
        z-index: 3;
        align-self: flex-start;
        will-change: transform;
    }
    .evo-capsule-frame {
        position: relative;
        width: 220px;
        height: 370px; /* 28 top + 266 glass + 72 bottom ≈ 366, slight overlap ok */
    }

    /* ─── Top cap — realistic brushed metal, flush with glass ─── */
    .evo-cap-top {
        position: absolute;
        top: 0; left: 50%; transform: translateX(-50%);
        width: 158px; height: 28px;
        background:
            linear-gradient(180deg,
                #5a6a7a 0%, #3a4a5a 4%, #4a5a6a 8%, /* highlight rim */
                #2a3a4a 15%, #1d2d3d 30%, #1a2a3a 50%, /* body */
                #15252f 70%, #0f1f2f 90%, #0d1a28 100% /* shadow */
            );
        border-radius: 24px 24px 0 0;
        border: 1.5px solid var(--evo-glow, rgba(0, 240, 255, 0.2));
        border-bottom: none;
        z-index: 4;
        box-shadow:
            0 -4px 16px var(--evo-glow-soft, rgba(0, 240, 255, 0.1)),
            inset 0 2px 6px rgba(255,255,255,0.12),
            inset 0 -1px 3px rgba(0,0,0,0.4);
        transition: border-color 0.8s, box-shadow 0.8s;
    }
    /* Brushed metal horizontal line */
    .evo-cap-top::before {
        content: ''; position: absolute; top: 4px; left: 10%; right: 10%; height: 1px;
        background: linear-gradient(90deg,
            transparent, rgba(255,255,255,0.15) 20%, rgba(255,255,255,0.08) 40%,
            rgba(255,255,255,0.18) 60%, rgba(255,255,255,0.05) 80%, transparent);
    }
    /* Status LED indicator */
    .evo-cap-top::after {
        content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
        width: 32px; height: 5px; border-radius: 3px;
        background: var(--evo-glow, rgba(0, 240, 255, 0.3));
        box-shadow: 0 0 10px var(--evo-glow, rgba(0, 240, 255, 0.4));
        transition: background 0.8s, box-shadow 0.8s;
    }

    /* ─── Glass dome — flush with metal caps ─── */
    .evo-glass {
        position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
        width: 155px; height: 272px;
        border-radius: 0;
        border: 1.5px solid var(--evo-glow, rgba(0, 240, 255, 0.18));
        overflow: hidden; z-index: 2;
        box-shadow:
            inset 0 0 40px rgba(0, 60, 80, 0.5),
            0 0 25px var(--evo-glow-soft, rgba(0, 240, 255, 0.08)),
            0 0 80px var(--evo-glow-faint, rgba(0, 240, 255, 0.03));
        transition: border-color 0.8s, box-shadow 0.8s;
    }

    /* ─── Liquid — dense, layered fluid ─── */
    .evo-liquid {
        position: absolute; inset: 0;
        background: linear-gradient(180deg,
            rgba(0, 20, 30, 0.3) 0%,        /* thin at surface */
            rgba(0, 40, 55, 0.4) 15%,
            rgba(0, 55, 70, 0.5) 40%,        /* denser mid */
            rgba(0, 70, 85, 0.55) 65%,
            rgba(0, 50, 65, 0.7) 85%,        /* heavy at bottom */
            rgba(0, 35, 50, 0.8) 100%);
        transition: background 1.2s ease;
    }

    /* ─── Liquid surface — animated meniscus line ─── */
    .evo-liquid::before {
        content: ''; position: absolute; top: 6px; left: 0; right: 0; height: 3px;
        background: linear-gradient(90deg,
            transparent 5%,
            var(--evo-glow, rgba(0, 240, 255, 0.15)) 20%,
            var(--evo-glow, rgba(0, 240, 255, 0.3)) 50%,
            var(--evo-glow, rgba(0, 240, 255, 0.15)) 80%,
            transparent 95%);
        filter: blur(1px);
        animation: evo-surface 3s ease-in-out infinite;
        z-index: 6;
        transition: background 0.8s;
    }
    @keyframes evo-surface {
        0%, 100% { transform: scaleX(1) translateY(0); opacity: 0.7; }
        30%      { transform: scaleX(1.03) translateY(1px); opacity: 1; }
        70%      { transform: scaleX(0.97) translateY(-1px); opacity: 0.8; }
    }

    /* ─── Caustic light refractions — slow moving light patterns ─── */
    .evo-liquid::after {
        content: ''; position: absolute; inset: 0;
        background:
            radial-gradient(ellipse 40px 20px at 30% 25%, var(--evo-glow, rgba(0,240,255,0.08)), transparent),
            radial-gradient(ellipse 30px 15px at 70% 55%, var(--evo-glow, rgba(0,240,255,0.06)), transparent),
            radial-gradient(ellipse 50px 25px at 50% 80%, var(--evo-glow, rgba(0,240,255,0.05)), transparent);
        animation: evo-caustics 8s ease-in-out infinite;
        pointer-events: none; z-index: 1;
        mix-blend-mode: screen;
        transition: background 1.2s;
    }
    @keyframes evo-caustics {
        0%, 100% { opacity: 0.4; transform: translateX(0) scale(1); }
        33%      { opacity: 0.7; transform: translateX(5px) scale(1.05); }
        66%      { opacity: 0.5; transform: translateX(-4px) scale(0.95); }
    }

    /* ─── Bubbles ─── */
    .evo-bubble {
        position: absolute; border-radius: 50%;
        background: radial-gradient(circle at 30% 30%, var(--evo-bubble, rgba(0, 240, 255, 0.3)), transparent 70%);
        border: 1px solid var(--evo-bubble-edge, rgba(0, 240, 255, 0.12));
        animation: evo-rise linear infinite; opacity: 0;
        transition: background 0.8s, border-color 0.8s;
    }
    @keyframes evo-rise {
        0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
        8%   { opacity: 0.8; }
        40%  { transform: translateY(-100px) translateX(3px) scale(0.85); opacity: 0.6; }
        70%  { transform: translateY(-190px) translateX(-2px) scale(0.6); opacity: 0.35; }
        100% { transform: translateY(-270px) translateX(1px) scale(0.3); opacity: 0; }
    }
    /* Main bubbles — varied sizes and timing */
    .evo-b1 { width: 6px; height: 6px; left: 18%; bottom: 8px; animation-duration: 4.2s; animation-delay: 0s; }
    .evo-b2 { width: 4px; height: 4px; left: 68%; bottom: 4px; animation-duration: 3.6s; animation-delay: 1.1s; }
    .evo-b3 { width: 9px; height: 9px; left: 42%; bottom: 12px; animation-duration: 5.0s; animation-delay: 0.5s; }
    .evo-b4 { width: 3px; height: 3px; left: 78%; bottom: 6px; animation-duration: 3.0s; animation-delay: 2.0s; }
    .evo-b5 { width: 5px; height: 5px; left: 28%; bottom: 10px; animation-duration: 3.8s; animation-delay: 2.8s; }
    .evo-b6 { width: 4px; height: 4px; left: 55%; bottom: 5px; animation-duration: 4.6s; animation-delay: 1.6s; }
    .evo-b7 { width: 7px; height: 7px; left: 12%; bottom: 18px; animation-duration: 5.3s; animation-delay: 0.2s; }

    /* ─── Sediment particles — tiny floating debris for density ─── */
    .evo-sediment {
        position: absolute; border-radius: 50%; pointer-events: none;
        background: var(--evo-glow, rgba(0, 240, 255, 0.2));
        animation: evo-drift linear infinite; opacity: 0;
        transition: background 0.8s;
    }
    @keyframes evo-drift {
        0%   { opacity: 0; transform: translate(0, 0); }
        15%  { opacity: 0.5; }
        50%  { opacity: 0.3; transform: translate(8px, -40px); }
        85%  { opacity: 0.15; }
        100% { opacity: 0; transform: translate(-5px, -80px); }
    }
    .evo-s1 { width: 2px; height: 2px; left: 22%; bottom: 30%; animation-duration: 7s; animation-delay: 0.3s; }
    .evo-s2 { width: 1.5px; height: 1.5px; left: 60%; bottom: 50%; animation-duration: 9s; animation-delay: 1.5s; }
    .evo-s3 { width: 2.5px; height: 2.5px; left: 38%; bottom: 65%; animation-duration: 6s; animation-delay: 3s; }
    .evo-s4 { width: 1px; height: 1px; left: 75%; bottom: 20%; animation-duration: 8s; animation-delay: 4.2s; }
    .evo-s5 { width: 2px; height: 2px; left: 15%; bottom: 45%; animation-duration: 10s; animation-delay: 2s; }

    /* ─── Specimens — submerged look with subtle tint ─── */
    .evo-specimens {
        position: absolute; inset: 0;
        display: flex; align-items: center; justify-content: center;
        padding: 8px 4px 10px;
        z-index: 3;
    }
    .evo-img {
        position: absolute;
        width: 96%; height: 92%;
        object-fit: contain;
        opacity: 0;
        transition: opacity 1s ease, transform 1s cubic-bezier(0.16,1,0.3,1), filter 0.8s ease;
        transform: scale(0.88) translateY(6px);
        filter: brightness(0.4) blur(3px) saturate(0.5);
        animation: evo-float 5s ease-in-out infinite;
    }
    .evo-img.evo-active {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: brightness(0.9) blur(0.3px) saturate(0.85)
            drop-shadow(0 0 12px var(--evo-glow-soft, rgba(0,240,255,0.2)));
    }
    @keyframes evo-float {
        0%, 100% { margin-top: 0; }
        50%      { margin-top: -5px; }
    }

    /* ─── Glass reflection — vertical streak ─── */
    .evo-reflection {
        position: absolute; top: 0; left: -15%; width: 45%; height: 100%;
        background: linear-gradient(105deg,
            transparent,
            rgba(255,255,255,0.02) 35%,
            rgba(255,255,255,0.06) 48%,
            rgba(255,255,255,0.09) 50%,
            rgba(255,255,255,0.06) 52%,
            rgba(255,255,255,0.02) 65%,
            transparent);
        pointer-events: none; z-index: 7;
    }

    /* ─── Glass condensation — faint fog near bottom ─── */
    .evo-glass::after {
        content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40%;
        background: linear-gradient(180deg, transparent 0%, rgba(0, 40, 55, 0.15) 60%, rgba(0, 30, 45, 0.25) 100%);
        pointer-events: none; z-index: 6;
    }

    /* ─── Bottom base — realistic brushed metal with integrated panel ─── */
    .evo-cap-bottom {
        position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
        width: 158px; height: 72px;
        background:
            linear-gradient(180deg,
                #0d1a28 0%, #15252f 3%, /* dark top edge flush with glass */
                #1d2d3d 8%, #2a3a4a 15%, /* brightening */
                #1a2a3a 40%, #15252f 60%, /* body */
                #1d2d3d 75%, #3a4a5a 92%, /* brightening toward bottom rim */
                #4a5a6a 96%, #5a6a7a 100% /* highlight rim */
            );
        border-radius: 0 0 24px 24px;
        border: 1.5px solid var(--evo-glow, rgba(0, 240, 255, 0.15));
        border-top: 1px solid rgba(255,255,255,0.05);
        z-index: 4;
        box-shadow:
            0 8px 24px rgba(0,0,0,0.6),
            inset 0 1px 0 rgba(255,255,255,0.05),
            inset 0 -2px 6px rgba(255,255,255,0.1),
            inset 0 3px 4px rgba(0,0,0,0.4);
        transition: border-color 0.8s;
    }
    /* Rivet LEDs */
    .evo-cap-bottom::before, .evo-cap-bottom::after {
        content: ''; position: absolute; top: 10px; width: 6px; height: 6px; border-radius: 50%;
        background: radial-gradient(circle, var(--evo-glow, rgba(0,240,255,0.5)), transparent);
        box-shadow: 0 0 6px var(--evo-glow-soft, rgba(0,240,255,0.3));
        transition: background 0.8s, box-shadow 0.8s;
    }
    .evo-cap-bottom::before { left: 14px; }
    .evo-cap-bottom::after { right: 14px; }

    /* ─── Digital panel — centered label + full-width progress bar ─── */
    .evo-panel {
        position: absolute; top: calc(50% + 4px); left: 50%; transform: translate(-50%, -50%);
        width: 136px;
        background: linear-gradient(180deg, #060e16, #040a10);
        border: 1px solid var(--evo-glow, rgba(0,240,255,0.12));
        border-radius: 6px;
        display: flex; flex-direction: column; align-items: center;
        padding: 5px 10px 6px;
        z-index: 5;
        box-shadow: inset 0 0 8px rgba(0,0,0,0.5), 0 0 6px var(--evo-glow-faint, rgba(0,240,255,0.04));
        transition: border-color 0.8s;
    }
    /* Top row: dot + label */
    .evo-panel-top {
        display: flex; align-items: center; gap: 6px; width: 100%; justify-content: center;
        margin-bottom: 4px;
    }
    .evo-panel-dot {
        width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
        background: var(--evo-dot, #00ff9d);
        box-shadow: 0 0 8px var(--evo-dot, #00ff9d);
        animation: evo-pulse 2s ease-in-out infinite;
        transition: background 0.8s, box-shadow 0.8s;
    }
    @keyframes evo-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
    .evo-panel-label {
        font-family: var(--font-mono, 'JetBrains Mono', monospace);
        font-size: 0.58rem; font-weight: 600; letter-spacing: 0.1em;
        color: var(--evo-text, rgba(0,240,255,0.85));
        text-transform: uppercase; white-space: nowrap;
        transition: opacity 0.3s, color 0.8s;
    }
    /* Progress bar — full width */
    .evo-panel-bar {
        width: 100%; height: 4px;
        background: rgba(255,255,255,0.06);
        border-radius: 3px; overflow: hidden;
    }
    .evo-panel-fill {
        height: 100%; width: 25%; border-radius: 3px;
        background: linear-gradient(90deg, var(--evo-fill-a, #00f0ff), var(--evo-fill-b, #7c3aed));
        transition: width 0.6s ease, background 0.8s;
    }

    /* ═══ STAGE COLOR THEMES — Symbiosis with timeline ═══ */
    /* Stage 0: Habilis — raw cyan */
    .timeline-evo-wrapper[data-stage="0"] {
        --evo-glow: rgba(0, 240, 255, 0.25); --evo-glow-soft: rgba(0, 240, 255, 0.12);
        --evo-glow-faint: rgba(0, 240, 255, 0.04); --evo-bubble: rgba(0, 240, 255, 0.25);
        --evo-bubble-edge: rgba(0, 240, 255, 0.1); --evo-dot: #00f0ff;
        --evo-text: rgba(0, 240, 255, 0.85); --evo-fill-a: #00f0ff; --evo-fill-b: #0099cc;
        --evo-timeline: rgba(0, 240, 255, 0.3);
    }
    /* Stage 1: Erectus — teal/emerald */
    .timeline-evo-wrapper[data-stage="1"] {
        --evo-glow: rgba(0, 255, 157, 0.25); --evo-glow-soft: rgba(0, 255, 157, 0.12);
        --evo-glow-faint: rgba(0, 255, 157, 0.04); --evo-bubble: rgba(0, 255, 157, 0.25);
        --evo-bubble-edge: rgba(0, 255, 157, 0.1); --evo-dot: #00ff9d;
        --evo-text: rgba(0, 255, 157, 0.85); --evo-fill-a: #00ff9d; --evo-fill-b: #00b8d4;
        --evo-timeline: rgba(0, 255, 157, 0.3);
    }
    /* Stage 2: Sapiens — purple */
    .timeline-evo-wrapper[data-stage="2"] {
        --evo-glow: rgba(124, 58, 237, 0.3); --evo-glow-soft: rgba(124, 58, 237, 0.15);
        --evo-glow-faint: rgba(124, 58, 237, 0.05); --evo-bubble: rgba(124, 58, 237, 0.25);
        --evo-bubble-edge: rgba(124, 58, 237, 0.12); --evo-dot: #7c3aed;
        --evo-text: rgba(124, 58, 237, 0.85); --evo-fill-a: #7c3aed; --evo-fill-b: #a855f7;
        --evo-timeline: rgba(124, 58, 237, 0.35);
    }
    /* Stage 3: Hybrid — cyan↔purple gradient */
    .timeline-evo-wrapper[data-stage="3"] {
        --evo-glow: rgba(0, 240, 255, 0.2); --evo-glow-soft: rgba(124, 58, 237, 0.15);
        --evo-glow-faint: rgba(0, 240, 255, 0.06); --evo-bubble: rgba(200, 150, 255, 0.25);
        --evo-bubble-edge: rgba(0, 240, 255, 0.1); --evo-dot: #c084fc;
        --evo-text: rgba(200, 180, 255, 0.9); --evo-fill-a: #00f0ff; --evo-fill-b: #7c3aed;
        --evo-timeline: rgba(0, 240, 255, 0.25);
    }

    /* ─── Timeline symbiosis: marker + line glow with stage color ─── */
    .timeline-evo-wrapper .timeline-marker {
        transition: box-shadow 0.8s, border-color 0.8s, background 0.8s;
    }
    .timeline-evo-wrapper .timeline-item.evo-current .timeline-marker {
        border-color: var(--evo-timeline, rgba(0,240,255,0.3));
        box-shadow: 0 0 12px var(--evo-glow-soft, rgba(0,240,255,0.12));
        background: var(--evo-timeline, rgba(0,240,255,0.3));
    }
    .timeline-evo-wrapper .timeline-item.evo-current .timeline-content {
        border-color: var(--evo-glow, rgba(0,240,255,0.15));
        box-shadow: 0 0 20px var(--evo-glow-faint, rgba(0,240,255,0.04));
        transition: border-color 0.8s, box-shadow 0.8s;
    }
    .timeline-evo-wrapper .timeline-item.evo-current .timeline-date {
        color: var(--evo-text, rgba(0,240,255,0.85));
        transition: color 0.8s;
    }
}

/* =============================================================================
   ACCESSIBILITY — Focus indicators
   Visible outline on keyboard navigation (:focus-visible), invisible on mouse click.
   ============================================================================= */
:focus-visible {
    outline: 2px solid var(--accent-cyan, #00f0ff);
    outline-offset: 2px;
}

/* Buttons and interactive elements */
.btn-expand:focus-visible,
.btn-gadget:focus-visible,
.btn-gadget-info:focus-visible,
.lang-toggle:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--accent-cyan, #00f0ff);
    outline-offset: 3px;
    border-radius: var(--radius-sm, 6px);
}

/* =============================================================================
   ACCESSIBILITY — Reduced motion
   Respects user OS-level preference for reduced motion.
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================================================
   HERO TERMINAL — Interactive CLI widget
   ============================================================================= */
.hero-terminal {
    margin-top: 2rem;
    max-width: 560px;
    border-radius: var(--radius-md, 12px);
    background: rgba(6, 8, 16, 0.92);
    border: 1px solid rgba(0, 240, 255, 0.12);
    box-shadow:
        0 0 30px rgba(0, 240, 255, 0.04),
        inset 0 1px 0 rgba(255,255,255,0.03);
    overflow: hidden;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.78rem;
    line-height: 1.6;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Title bar */
.ht-titlebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(12, 14, 24, 0.8);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ht-dots { display: flex; gap: 6px; }
.ht-dot { width: 10px; height: 10px; border-radius: 50%; }
.ht-dot-red { background: #ff5f57; }
.ht-dot-yellow { background: #ffbd2e; }
.ht-dot-green { background: #28c840; }
.ht-title {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.04em;
}

/* Scrollable area */
.ht-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding: 12px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,240,255,0.15) transparent;
}
.ht-scroll::-webkit-scrollbar { width: 4px; }
.ht-scroll::-webkit-scrollbar-track { background: transparent; }
.ht-scroll::-webkit-scrollbar-thumb { background: rgba(0,240,255,0.15); border-radius: 2px; }

/* Output blocks */
.ht-block { margin-bottom: 8px; }
.ht-line { white-space: nowrap; }
.ht-result {
    margin: 2px 0 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: rgba(255,255,255,0.75);
}

/* Input line */
.ht-input-line {
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 0;
}
.ht-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: rgba(255,255,255,0.9);
    font-family: inherit;
    font-size: inherit;
    padding: 0 0 0 6px;
    caret-color: var(--accent-cyan, #00f0ff);
}
.ht-input::placeholder { color: rgba(255,255,255,0.15); }

/* Cursor blink when focused */
.ht-input-line.ht-focused .ht-input { animation: ht-cursor 1s step-end infinite; }

/* Prompt colors */
.ht-prompt-user { color: var(--accent-green, #00ff9d); }
.ht-prompt-at { color: rgba(255,255,255,0.3); }
.ht-prompt-host { color: var(--accent-cyan, #00f0ff); }
.ht-prompt-sep { color: rgba(255,255,255,0.3); }
.ht-prompt-path { color: var(--accent-purple, #7c3aed); }
.ht-prompt-dollar { color: rgba(255,255,255,0.5); margin-right: 6px; }

/* Output styling */
.ht-cmd-title { color: var(--accent-cyan, #00f0ff); font-weight: 600; }
.ht-hl { color: var(--accent-cyan, #00f0ff); }
.ht-accent { color: var(--accent-green, #00ff9d); font-weight: 700; }
.ht-dim { color: rgba(255,255,255,0.35); }
.ht-error { color: var(--accent-red, #ff2a6d); }
.ht-typed { color: rgba(255,255,255,0.9); }
.ht-link {
    color: var(--accent-cyan, #00f0ff);
    text-decoration: underline;
    text-decoration-color: rgba(0,240,255,0.3);
    text-underline-offset: 2px;
}
.ht-link:hover { text-decoration-color: var(--accent-cyan, #00f0ff); }

/* Skill bars */
.ht-bar-fill { color: var(--accent-cyan, #00f0ff); }
.ht-bar-empty { color: rgba(255,255,255,0.1); }

/* Gadget tags */
.ht-tag-biz {
    display: inline-block; font-size: 0.6rem; font-weight: 700;
    padding: 1px 5px; border-radius: 3px; margin-right: 4px;
    background: rgba(0, 255, 157, 0.12); color: var(--accent-green, #00ff9d);
    border: 1px solid rgba(0, 255, 157, 0.2);
}
.ht-tag-tech {
    display: inline-block; font-size: 0.6rem; font-weight: 700;
    padding: 1px 5px; border-radius: 3px; margin-right: 4px;
    background: rgba(255, 149, 0, 0.12); color: var(--accent-orange, #ff9500);
    border: 1px solid rgba(255, 149, 0, 0.2);
}

/* Scanline overlay */
.hero-terminal::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 240, 255, 0.008) 2px,
        rgba(0, 240, 255, 0.008) 4px
    );
    pointer-events: none;
    border-radius: inherit;
}
.hero-terminal { position: relative; }

/* Mobile: smaller terminal */
@media (max-width: 768px) {
    .hero-terminal {
        margin-top: 1.5rem;
        font-size: 0.7rem;
    }
    .ht-scroll { max-height: 180px; padding: 10px 12px; }
}

/* =============================================================================
   BLOG — Energy Meter (reading progress)
   Sci-fi styled reading progress indicator for blog posts.
   ============================================================================= */
.energy-meter {
    position: fixed;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    width: 8px;
    height: 200px;
    background: rgba(12, 12, 20, 0.7);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 0 20px rgba(0, 240, 255, 0.04),
        inset 0 0 8px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.energy-meter.em-visible { opacity: 1; }

/* Fill bar — grows from bottom */
.energy-meter-fill {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 0%;
    background: linear-gradient(0deg, #00f0ff 0%, #7c3aed 100%);
    border-radius: 20px;
    transition: height 0.15s ease-out;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

/* Segments overlay */
.energy-meter::before {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
        180deg,
        transparent 0px,
        transparent 18px,
        rgba(6, 8, 16, 0.6) 18px,
        rgba(6, 8, 16, 0.6) 20px
    );
    z-index: 2;
    border-radius: 20px;
    pointer-events: none;
}

/* Pulsing glow when near 100% */
.energy-meter.em-charged .energy-meter-fill {
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.6), 0 0 40px rgba(124, 58, 237, 0.3);
    animation: em-pulse 1.5s ease-in-out infinite;
}
@keyframes em-pulse {
    0%, 100% { box-shadow: 0 0 16px rgba(0, 240, 255, 0.6), 0 0 40px rgba(124, 58, 237, 0.3); }
    50% { box-shadow: 0 0 24px rgba(0, 240, 255, 0.9), 0 0 60px rgba(124, 58, 237, 0.5); }
}

/* Percentage tooltip */
.energy-meter-pct {
    position: absolute;
    right: 16px;
    top: 50%; transform: translateY(-50%);
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.6rem;
    color: var(--accent-cyan, #00f0ff);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}
.energy-meter:hover .energy-meter-pct { opacity: 1; }

/* Flash on 100% completion */
.energy-meter.em-complete::after {
    content: '✦';
    position: absolute;
    top: -14px; left: 50%; transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--accent-cyan, #00f0ff);
    animation: em-flash 2s ease-in-out infinite;
}
@keyframes em-flash {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.3); }
}

/* Mobile: hide on small screens */
@media (max-width: 768px) {
    .energy-meter { display: none; }
}

/* =============================================================================
   RELATED POSTS — unified design (match generated posts)
   ============================================================================= */
.related-posts {
    margin: 3rem auto !important;
    max-width: 800px !important;
}
.related-posts h3 {
    font-family: var(--font-display) !important;
    font-size: 1.4rem !important;
    margin-bottom: 1.25rem !important;
    text-align: center !important;
}
.related-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.25rem !important;
}
.related-card {
    border-radius: var(--radius-md) !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}
.related-card-image {
    height: 140px;
    width: 100%;
    overflow: hidden;
    background: #000;
}
.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease-out);
}
.related-card:hover .related-card-image img {
    transform: scale(1.05);
}
.related-card-content {
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    text-align: center !important;
    align-items: center !important;
}
.related-card-content h4 {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.3;
    text-align: center;
}
.related-card-cat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
    text-align: center;
}
@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =============================================================================
   SECCIÓN PROYECTOS (03)
   Grid de proyectos destacados entre #cases y #gadgets. Card featured (Hesperia)
   con tratamiento grande, card secundaria (Lustre) como caso de estudio.
   ============================================================================= */
.section-projects {
    padding: 4rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-featured {
    border-color: rgba(0, 240, 255, 0.15);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.03), rgba(157, 78, 221, 0.03));
}

.project-featured:hover {
    border-color: rgba(157, 78, 221, 0.35);
    box-shadow: 0 20px 60px -20px rgba(0, 240, 255, 0.2), 0 0 40px -10px rgba(157, 78, 221, 0.15);
}

.project-card:not(.project-featured):hover {
    border-color: rgba(0, 240, 255, 0.25);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

/* Desktop: two-column layout, cover left / content right */
@media (min-width: 900px) {
    .project-card {
        display: grid;
        grid-template-columns: 45% 1fr;
        align-items: stretch;
        /* Ambas cards comparten talla: el contenido de Hesperia marca la
           altura y la cover de Lustre estira hasta igualarla. */
        min-height: 432px;
    }

    .project-cover {
        min-height: 320px;
    }

    .project-body {
        padding: 2rem;
    }

    /* La cover de Lustre ancla a la izquierda: el titular "Las cartas que
       todos quieren" arranca en el borde y el recorte sobrante cae a la derecha. */
    .project-card:not(.project-featured) .project-cover img {
        object-position: left center;
    }

    /* La ficha expandible ancla al pie en ambas cards para que el resumen
       quede a la misma altura aunque el contenido central difiera. */
    .project-body .project-ficha {
        margin-top: auto;
    }
}

/* Boton secundario de la card de Lustre: demo en outline dorado, mismo cuerpo
   que el boton primario de Hesperia. Doble clase para ganar al primario, que
   se define mas abajo con la misma especificidad simple. */
.btn-project-play.btn-project-demo {
    background: transparent;
    border: 1px solid rgba(255, 170, 0, 0.55);
    color: var(--accent-orange);
    box-shadow: none;
}

.btn-project-play.btn-project-demo:hover {
    background: rgba(255, 170, 0, 0.12);
    box-shadow: 0 0 18px rgba(255, 170, 0, 0.25);
    color: var(--accent-orange);
}

.project-cover {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #050508;
}

/* La imagen va en absoluto para que su altura intrinseca JAMAS pueda inflar
   la fila del grid: la talla de la card la dicta solo el contenido + min-height,
   identica en ambos proyectos. */
.project-cover img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(3, 3, 8, 0.85) 100%);
    pointer-events: none;
}

@media (max-width: 899px) {
    .project-cover {
        height: 220px;
    }
}

.project-cover-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

.project-stack-badges {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.project-stack-badges span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-dim);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.project-badge-live {
    background: rgba(0, 255, 157, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(0, 255, 157, 0.35);
}

.project-badge-live i {
    font-size: 0.45rem;
    animation: project-badge-pulse 2s ease-in-out infinite;
}

@keyframes project-badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.project-badge-study {
    background: rgba(255, 170, 0, 0.12);
    color: var(--accent-orange);
    border: 1px solid rgba(255, 170, 0, 0.35);
}

.project-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-body h3 {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.project-tagline {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.project-metrics {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.project-metrics li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.project-metrics i {
    color: var(--accent-cyan);
    width: 1em;
    text-align: center;
    flex-shrink: 0;
}

.btn-project-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    align-self: flex-start;
    padding: 0.85rem 1.75rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #050510;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.btn-project-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -8px rgba(0, 240, 255, 0.45);
}

/* Ficha técnica / caso de estudio */
.project-ficha {
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.9rem;
}

.project-ficha summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    padding: 0.2rem 0;
}

.project-ficha summary::-webkit-details-marker {
    display: none;
}

.project-ficha summary::after {
    content: '+';
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.3s var(--ease-out);
}

.project-ficha[open] summary::after {
    content: '×';
    transform: rotate(90deg);
}

.project-ficha > p,
.project-ficha > img,
.project-ficha > .project-shots {
    margin-top: 0.9rem;
    animation: project-ficha-reveal 0.35s var(--ease-out);
}

@keyframes project-ficha-reveal {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-ficha p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.project-ficha-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-style: italic;
}

.project-ficha img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.project-shots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.project-shots img {
    margin-top: 0 !important;
}

/* Accessibility: keyboard focus */
.project-ficha summary:focus-visible,
.btn-project-play:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Mobile */
@media (max-width: 768px) {
    .section-projects {
        padding: 3rem 0;
    }

    .projects-grid {
        gap: 1.5rem;
    }

    .project-card,
    .project-featured {
        background: rgba(12, 12, 20, 0.98);
    }

    .project-card,
    .project-card:hover,
    .project-featured:hover,
    .project-card:not(.project-featured):hover {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .project-body {
        padding: 1.25rem;
        gap: 0.85rem;
    }

    .project-metrics {
        gap: 0.6rem;
    }

    .project-stack-badges span,
    .project-badge {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .project-shots {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   SECCIÓN SERVICIOS (01) — Grid comercial + banner Auditoría 197€
   Nueva narrativa: la home vende las 4 líneas de servicio con precios reales
   y destaca la auditoría productizada como producto estrella.
   ============================================================================= */
.section-services {
    padding: 5rem 0 4rem;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.svc-card {
    --svc-accent: var(--accent-cyan, #00f0ff);
    --svc-rgb: 0, 240, 255;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.75rem 1.5rem 1.4rem;
    background: var(--bg-card, rgba(12, 12, 20, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg, 20px);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.svc-card[data-accent="purple"] { --svc-accent: var(--accent-purple, #7c3aed); --svc-rgb: 124, 58, 237; }
.svc-card[data-accent="green"]  { --svc-accent: var(--accent-green, #00ff9d);  --svc-rgb: 0, 255, 157; }
.svc-card[data-accent="orange"] { --svc-accent: var(--accent-orange, #ff9500); --svc-rgb: 255, 149, 0; }

/* Línea de acento superior que crece al hover */
.svc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--svc-accent), transparent 75%);
    transform: scaleX(0.25);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.svc-card:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--svc-rgb), 0.4);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7), 0 0 40px -10px rgba(var(--svc-rgb), 0.25);
}

.svc-card:hover::before { transform: scaleX(1); }

.svc-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md, 12px);
    background: rgba(var(--svc-rgb), 0.1);
    border: 1px solid rgba(var(--svc-rgb), 0.25);
    color: var(--svc-accent);
    font-size: 1.15rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.svc-card:hover .svc-icon { transform: scale(1.08) rotate(-4deg); }

.svc-card h3 {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main, #e4e4e7);
}

.svc-pitch {
    font-size: 0.88rem;
    color: var(--text-secondary, #a1a1aa);
    line-height: 1.55;
    margin: 0;
}

.svc-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.svc-points li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.78rem;
    color: var(--text-dim, #71717a);
    line-height: 1.5;
    font-family: var(--font-body, 'Space Grotesk', sans-serif);
}

.svc-points li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--svc-accent);
    opacity: 0.7;
}

.svc-footer {
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.svc-price {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--svc-accent);
    white-space: nowrap;
}

.svc-price em {
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 400;
    color: var(--text-dim, #71717a);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 0.2rem;
}

.svc-price small {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary, #a1a1aa);
}

.svc-arrow {
    color: var(--svc-accent);
    font-size: 0.85rem;
    opacity: 0.5;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s;
}

.svc-card:hover .svc-arrow {
    transform: translateX(5px);
    opacity: 1;
}

/* ─── Banner Auditoría 197€ — momento firma ─── */
.audit-banner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2.5rem;
    align-items: center;
    padding: 2.5rem 3rem;
    border-radius: var(--radius-xl, 30px);
    background:
        radial-gradient(ellipse 60% 120% at 85% 50%, rgba(0, 240, 255, 0.07), transparent),
        linear-gradient(135deg, rgba(12, 12, 22, 0.95), rgba(10, 8, 20, 0.92));
    border: 1px solid rgba(0, 240, 255, 0.18);
    overflow: hidden;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Halo orbital sutil */
.audit-banner::before {
    content: '';
    position: absolute;
    top: -60%; right: -10%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.14), transparent 65%);
    pointer-events: none;
}

.audit-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.9rem;
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.3);
    border-radius: var(--radius-full, 999px);
    color: var(--accent-orange, #ff9500);
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.audit-left h3 {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 0.75rem;
    color: var(--text-main, #e4e4e7);
}

.audit-left > p {
    font-size: 0.95rem;
    color: var(--text-secondary, #a1a1aa);
    line-height: 1.6;
    margin: 0 0 1.1rem;
    max-width: 560px;
}

.audit-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 0.5rem 1.5rem;
}

.audit-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.82rem;
    color: var(--text-secondary, #a1a1aa);
    line-height: 1.45;
}

.audit-points i {
    color: var(--accent-green, #00ff9d);
    font-size: 0.7rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.audit-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding-left: 2.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.audit-price {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: clamp(4rem, 7vw, 6rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #00f0ff 15%, #7c3aed 85%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 24px rgba(0, 240, 255, 0.25));
}

.audit-price span {
    font-size: 0.45em;
    vertical-align: baseline;
}

.audit-price-note {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.68rem;
    color: var(--text-dim, #71717a);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.audit-cta {
    margin-top: 0.75rem;
    white-space: nowrap;
}

/* Responsive servicios */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .audit-banner {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        padding: 2rem 1.5rem;
    }
    .audit-right {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
        padding-left: 0;
        padding-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .section-services { padding: 3.5rem 0 2.5rem; }
    .svc-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(12, 12, 20, 0.98);
    }
    .svc-card:hover { transform: none; }
    .audit-points { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* =============================================================================
   ATMÓSFERA — Haz de luz superior en el hero (estilo product-launch)
   ============================================================================= */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, 90vw);
    height: 480px;
    background:
        radial-gradient(ellipse 50% 60% at 50% 0%, rgba(0, 240, 255, 0.09), transparent 70%),
        radial-gradient(ellipse 30% 45% at 50% 0%, rgba(124, 58, 237, 0.07), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* =============================================================================
   SECCIÓN STATEMENT — Manifiesto tipográfico gigante
   Tipografía como arquitectura: una sola afirmación, mucho aire.
   ============================================================================= */
.section-statement {
    position: relative;
    padding: clamp(6rem, 14vh, 11rem) 1.5rem;
    text-align: center;
    overflow: hidden;
}

.section-statement::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(760px, 90vw);
    height: 70%;
    background: radial-gradient(ellipse, rgba(0, 240, 255, 0.05), transparent 65%);
    pointer-events: none;
}

.statement-kicker {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent-cyan, #00f0ff);
    opacity: 0.7;
    margin: 0 0 1.75rem;
}

.statement-title {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: clamp(2.6rem, 8vw, 6.5rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.03em;
    margin: 0 0 2rem;
    color: var(--text-main, #f0f0f5);
}

.statement-dim {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.statement-sub {
    max-width: 560px;
    margin: 0 auto 2.5rem;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    line-height: 1.7;
    color: var(--text-secondary, #a1a1aa);
}

.statement-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

@media (max-width: 768px) {
    .section-statement {
        padding: 4.5rem 1.25rem;
    }
}

/* =============================================================================
   PROCESS STRIP — Cómo trabajo (3 pasos, cierre de Servicios)
   ============================================================================= */
.process-strip {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    margin-top: 2.5rem;
    padding: 1.75rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg, 20px);
}

.process-step {
    flex: 1;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.process-num {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(180deg, rgba(0, 240, 255, 0.9), rgba(0, 240, 255, 0.15));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
}

.process-body h4 {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--text-main, #e4e4e7);
}

.process-body p {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-dim, #71717a);
    margin: 0;
}

.process-arrow {
    display: flex;
    align-items: center;
    color: rgba(0, 240, 255, 0.35);
    font-size: 1.1rem;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .process-strip {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.5rem 1.25rem;
    }
    .process-arrow {
        transform: rotate(90deg);
        justify-content: flex-start;
        padding-left: 0.6rem;
    }
}

/* =============================================================================
   TRUST BAR — Señales de confianza sobre el formulario de contacto
   ============================================================================= */
.trust-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 2.25rem;
    margin: 0 auto 3rem;
    padding: 0.9rem 1.5rem;
    max-width: 900px;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary, #a1a1aa);
    white-space: nowrap;
}

.trust-item i {
    color: var(--accent-cyan, #00f0ff);
    font-size: 0.7rem;
    opacity: 0.8;
}

/* =============================================================================
   HERO PHOTO — Integración en el dark theme
   La foto vertical con fondo claro rompía la atmósfera: duotono suave,
   fundido inferior hacia el fondo y aro de luz de marca.
   ============================================================================= */
.hero-photo-container {
    position: relative;
    border-radius: var(--radius-lg, 20px);
    overflow: hidden;
}

.hero-photo-container .hero-photo {
    filter: saturate(0.85) contrast(1.06) brightness(0.94);
    transition: filter 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-photo-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 55%, rgba(3, 3, 8, 0.72) 100%),
        linear-gradient(135deg, rgba(0, 240, 255, 0.08), transparent 40%, rgba(124, 58, 237, 0.1));
    pointer-events: none;
    border-radius: inherit;
}

.hero-photo-container:hover .hero-photo {
    filter: saturate(1) contrast(1.05) brightness(1);
    transform: scale(1.015);
}

/* =============================================================================
   PARTNER MARQUEE — Fundido en los bordes
   ============================================================================= */
.partner-scroll {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

/* =============================================================================
   SCROLL — nativo (Lenis retirado 25-ago: desesperaba). Solo las anclas
   internas van suaves, por CSS y gratis.
   ============================================================================= */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* =============================================================================
   TIPOGRAFÍA DISPLAY — Clash Display tiene espacios de palabra muy prietos
   de fábrica: los abrimos en todos los usos display para recuperar legibilidad.
   ============================================================================= */
.section-title,
.hero-title,
.statement-title,
.latest-title,
.contact-title,
.audit-left h3,
.svc-card h3,
.about-heading,
.project-body h3 {
    word-spacing: 0.14em;
    letter-spacing: -0.008em;
}

/* =============================================================================
   MICRO-DETALLES DE MARCA
   ============================================================================= */
::selection {
    background: rgba(0, 240, 255, 0.85);
    color: #05050d;
}

::-moz-selection {
    background: rgba(0, 240, 255, 0.85);
    color: #05050d;
}

/* Aurora tras el hero — ESTÁTICA (la versión animada con blur(40px) forzaba
   re-raster por frame y contribuía al lag; el glow fijo cuesta cero) */
@media (min-width: 1025px) {
    #hero::after {
        content: '';
        position: absolute;
        top: 8%;
        right: -6%;
        width: 520px;
        height: 520px;
        border-radius: 50%;
        background:
            radial-gradient(circle at 35% 35%, rgba(0, 240, 255, 0.07), transparent 55%),
            radial-gradient(circle at 70% 65%, rgba(124, 58, 237, 0.08), transparent 55%);
        filter: blur(40px);
        pointer-events: none;
        z-index: -1;
    }
}

/* =============================================================================
   WOW — Spotlight que sigue al cursor en las cards de servicios
   (initSpotlightCards ya alimenta --mouse-x/--mouse-y en .service-card)
   ============================================================================= */
@media (hover: hover) and (pointer: fine) {
    .svc-card::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient(240px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(var(--svc-rgb), 0.1), transparent 65%);
        opacity: 0;
        transition: opacity 0.4s ease;
        pointer-events: none;
    }
    .svc-card:hover::after { opacity: 1; }
}

/* =============================================================================
   WOW — Destello periódico en el banner de la auditoría
   ============================================================================= */
.audit-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(0, 240, 255, 0.055) 45%, rgba(255, 255, 255, 0.05) 50%, transparent 60%);
    transform: skewX(-12deg);
    animation: audit-shine 7s ease-in-out infinite;
    pointer-events: none;
}
@keyframes audit-shine {
    0%, 72% { left: -70%; }
    88%, 100% { left: 140%; }
}

@media (prefers-reduced-motion: reduce) {
    .audit-banner::after { animation: none; }
}

/* ====================================================
   HERRAMIENTAS (/herramientas/*.html) — gadget Pro montado inline
   El host conserva la clase .gadget-expand-backdrop porque
   gadget-popups.css scopa ahí los estilos de los gadgets.
   ==================================================== */
.gadget-expand-backdrop.gadget-inline {
    position: relative;
    inset: auto;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    z-index: 1;
    padding: 0;
    transition: none;
    margin: 1.5rem auto 2.5rem;
    max-width: 1150px;
}
.gadget-inline .gadget-expand-content {
    transform: none;
    transition: none;
    max-height: none;
    height: min(82vh, 860px);
    min-height: 560px;
}
.gadget-inline .close-expand { display: none; }
@media (max-width: 768px) {
    .gadget-inline .gadget-expand-content { height: min(88vh, 900px); min-height: 520px; }
}
.tool-page .tool-hero { padding: 7.5rem 0 1rem; max-width: 900px; margin: 0 auto; text-align: center; }
.tool-page .tool-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; line-height: 1.15; margin: 1rem 0; background: linear-gradient(135deg, #fff 0%, #94a3b8 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.tool-page .tool-hero p.lead { font-size: 1.12rem; color: var(--text-secondary); line-height: 1.75; max-width: 760px; margin: 0 auto 1.25rem; }
.tool-page .tool-pills { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: .5rem; }
.tool-page .tool-pills span { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; padding: .35rem .8rem; border-radius: 999px; border: 1px solid rgba(0,240,255,.35); color: var(--accent-cyan); background: rgba(0,240,255,.06); }
.tool-page .tool-content { max-width: 800px; margin: 0 auto; padding: 1rem 0 2rem; }
.tool-page .tool-content h2 { font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border-subtle); }
.tool-page .tool-content h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin: 1.75rem 0 .75rem; }
.tool-page .tool-content p, .tool-page .tool-content li { font-size: 1.03rem; color: var(--text-secondary); line-height: 1.8; }
.tool-page .tool-content p { margin-bottom: 1.2rem; }
.tool-page .tool-content ul, .tool-page .tool-content ol { margin: 1rem 0 1.4rem; padding-left: 1.4rem; }
.tool-page .tool-content li { margin-bottom: .5rem; }
.tool-page .tool-content strong { color: var(--text-main); }
.tool-page .tool-content a { color: var(--accent-cyan); text-decoration: underline; text-underline-offset: 3px; }
.tool-page .tool-content table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.75rem; font-size: .92rem; }
.tool-page .tool-content th { background: rgba(0,240,255,.06); padding: .6rem .85rem; text-align: left; font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-cyan); border-bottom: 2px solid var(--border-light); }
.tool-page .tool-content td { padding: .6rem .85rem; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.tool-page .tool-faq details { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: .9rem 1.2rem; margin-bottom: .7rem; background: rgba(255,255,255,.02); }
.tool-page .tool-faq summary { cursor: pointer; font-weight: 600; color: var(--text-main); font-size: 1.02rem; }
.tool-page .tool-faq details p { margin: .8rem 0 0; }
.tool-page .tool-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0 2rem; }
.tool-page .tool-related a { display: block; padding: 1rem 1.1rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-card); color: var(--text-main); text-decoration: none; font-size: .95rem; line-height: 1.4; transition: all .25s; }
.tool-page .tool-related a:hover { border-color: var(--accent-cyan); transform: translateY(-3px); }
.tool-page .tool-related a span { display: block; font-family: var(--font-mono); font-size: .68rem; color: var(--accent-cyan); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .35rem; }
.tool-page .tool-cta { margin: 2.5rem 0 1rem; padding: 1.75rem; border: 1px solid rgba(0,240,255,.25); border-radius: 16px; background: linear-gradient(135deg, rgba(0,240,255,.06), rgba(124,58,237,.08)); text-align: center; }
.tool-page .tool-cta p.t { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; margin: 0 0 .5rem; }
.tool-page .tool-cta a.btn-cta { display: inline-block; padding: 12px 26px; background: linear-gradient(90deg, #00f0ff, #7c3aed); color: #030308; font-weight: 700; border-radius: 9999px; text-decoration: none; margin-top: .5rem; }
.tool-page .tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.tool-page .tools-grid a { display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--bg-card); color: inherit; text-decoration: none; transition: all .25s; }
.tool-page .tools-grid a:hover { border-color: var(--accent-cyan); transform: translateY(-4px); box-shadow: 0 0 20px rgba(0,240,255,.08); }
.tool-page .tools-grid h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 0; color: var(--text-main); border: 0; padding: 0; }
.tool-page .tools-grid p { font-size: .93rem; color: var(--text-secondary); margin: 0; line-height: 1.6; }
.tool-page .tools-grid .tg-ico { font-size: 1.6rem; color: var(--accent-cyan); }
@media (max-width: 768px) {
    .tool-page .tool-hero { padding-top: 6rem; }
    .tool-page .tool-related { grid-template-columns: 1fr; }
}

/* ====================================================
   HUBS DE CATEGORÍA (/blog/categoria/*.html, /blog/categorias/)
   ==================================================== */
a.article-category { text-decoration: none; }
a.article-category:hover { background: rgba(0,240,255,.2); }
.hub-page .hub-hero { padding: 7.5rem 0 1rem; max-width: 900px; margin: 0 auto; }
.hub-page .hub-hero .article-breadcrumb { display: flex; align-items: center; gap: .4rem; font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); margin-bottom: 1.25rem; }
.hub-page .hub-hero .article-breadcrumb a { color: var(--text-dim); text-decoration: none; }
.hub-page .hub-hero .article-breadcrumb a:hover { color: var(--accent-cyan); }
.hub-page .hub-hero .article-breadcrumb .sep { opacity: .4; }
.hub-page .hub-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; line-height: 1.15; margin: 0 0 1rem; background: linear-gradient(135deg, #fff 0%, #94a3b8 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hub-page .hub-lead { font-size: 1.12rem; color: var(--text-secondary); line-height: 1.75; max-width: 760px; }
.hub-page .hub-intro { max-width: 900px; margin: 0 auto; padding: .5rem 0 1rem; }
.hub-page .hub-intro p { font-size: 1.03rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 1.1rem; }
.hub-page .hub-intro a { color: var(--accent-cyan); text-decoration: underline; text-underline-offset: 3px; }
.hub-page .hub-count { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin: 1.5rem 0 1rem; text-align: center; }
.hub-page .hub-list { max-width: 1100px; margin: 0 auto; }
.hub-page .hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.hub-page .hub-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; transition: all .3s; }
.hub-page .hub-card:hover { border-color: var(--accent-cyan); transform: translateY(-4px); box-shadow: 0 0 20px rgba(0,240,255,.08); }
.hub-page .hub-card a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.hub-page .hub-card-img { aspect-ratio: 1200/630; overflow: hidden; background: #000; }
.hub-page .hub-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-page .hub-card-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .45rem; }
.hub-page .hub-card-meta { font-family: var(--font-mono); font-size: .7rem; color: var(--text-dim); letter-spacing: .04em; }
.hub-page .hub-card h2 { font-family: var(--font-display); font-size: 1.08rem; line-height: 1.35; margin: 0; color: var(--text-main); }
.hub-page .hub-card p { font-size: .9rem; color: var(--text-secondary); line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hub-page .hub-others { max-width: 900px; margin: 3rem auto 0; text-align: center; }
.hub-page .hub-others h2 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 1rem; }
.hub-page .hub-others-links { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.hub-page .hub-others-links a { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .04em; padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--border-light); color: var(--text-secondary); text-decoration: none; transition: all .2s; }
.hub-page .hub-others-links a span { color: var(--accent-cyan); margin-left: .3rem; }
.hub-page .hub-others-links a:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.hub-page .hub-group { max-width: 900px; margin: 0 auto 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border-subtle); }
.hub-page .hub-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hub-page .hub-group-head h2 { font-family: var(--font-display); font-size: 1.35rem; margin: 0 0 .4rem; }
.hub-page .hub-group-head h2 a { color: var(--text-main); text-decoration: none; }
.hub-page .hub-group-head h2 a:hover { color: var(--accent-cyan); }
.hub-page .hub-group-head span { font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); }
.hub-page .hub-group > p { color: var(--text-secondary); font-size: .97rem; line-height: 1.7; margin: 0 0 .9rem; }
.hub-page .hub-group > p a { color: var(--accent-cyan); text-decoration: none; }
.hub-page .hub-group-list { list-style: none; margin: 0; padding: 0; }
.hub-page .hub-group-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed var(--border-subtle); font-size: .95rem; }
.hub-page .hub-group-list a { color: var(--text-main); text-decoration: none; }
.hub-page .hub-group-list a:hover { color: var(--accent-cyan); }
.hub-page .hub-group-list span { font-family: var(--font-mono); font-size: .7rem; color: var(--text-dim); white-space: nowrap; }
@media (max-width: 768px) {
    .hub-page .hub-hero { padding-top: 6rem; }
    .hub-page .hub-group-list li { flex-direction: column; gap: .1rem; }
}


/* ====================================================
   FUENTES DE RESPALDO CON MÉTRICAS AJUSTADAS (CLS del swap, sep-2026)
   Calibrado en el DOM (alturas de H1/H2 en un post a 390 px): la cara bold (700-900, local Arial Bold) necesita 103,1 % y la regular 106,9 %;
   Space Grotesk 400 = 108 % de Arial. (canvas.measureText NO respeta size-adjust: medir siempre en DOM.)
   Con size-adjust el texto ocupa las mismas líneas antes y después del swap.
   ==================================================== */
@font-face { font-family: "Clash Display Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Liberation Sans Bold"); font-weight: 700 900; size-adjust: 103.1%; }
@font-face { font-family: "Clash Display Fallback"; src: local("Arial"), local("ArialMT"), local("Helvetica"), local("Liberation Sans"); font-weight: 100 600; size-adjust: 106.9%; }
@font-face { font-family: "Space Grotesk Fallback"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); size-adjust: 108.1%; }
:root {
    --font-display: 'Clash Display', 'Clash Display Fallback', 'Syne', sans-serif;
    --font-body: 'Space Grotesk', 'Space Grotesk Fallback', sans-serif;
}

/* ══════════════════════════════════════════════════════════════
   BOOT SCREEN v2 (sep-2026): intro corta (~4 s), legible en móvil,
   salida con cualquier gesto. Lógica en script.js (sección BOOT).
   ══════════════════════════════════════════════════════════════ */
#boot-screen { cursor: pointer; }
#skip-intro:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }
@media (max-width: 768px) {
    /* Composición centrada (antes quedaba un tercio vacío arriba) */
    .linux-desktop-overlay { justify-content: center; gap: 10px; padding-top: 0; }
    .linux-terminal-window { height: clamp(150px, 26vh, 220px); }
    .linux-terminal-body { font-size: 0.78rem; padding: 10px 12px; line-height: 1.55; }
    /* Texto del terminal legible: ~12 px (antes 7-10 px) */
    .terminal-line { font-size: 0.74rem; margin-bottom: 4px; }
    .terminal-cursor { width: 7px; height: 12px; }
    .linux-top-title, .linux-top-status { font-size: 0.56rem; }
    #profile-progress-text { font-size: 0.66rem; }
    /* El botón deja de flotar sobre la esquina: va debajo del avatar, centrado */
    #skip-intro { position: static; align-self: center; margin-top: 8px; padding: 10px 20px; font-size: 0.7rem; }
}
@media (max-width: 480px) {
    .terminal-line { font-size: 0.72rem; }
    .linux-terminal-window { height: clamp(140px, 24vh, 200px); }
}
@media (max-width: 360px) {
    .terminal-line { font-size: 0.68rem; }
}
