:root {
    --bg: #050505;
    --text: #e0e0e0;
    --accent: #ffffff;
    --accent-dim: rgba(255, 255, 255, 0.65);
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.02);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

::-webkit-scrollbar {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    * {
        cursor: none;
    }

    #custom-cursor,
    #cursor-follower {
        display: flex;
    }
}

@media (hover: none),
(pointer: coarse) {

    #custom-cursor,
    #cursor-follower {
        display: none !important;
    }

    * {
        cursor: auto;
    }
}

body {
    background-color: var(--bg);
    /* Fallback gradient if WebGL fails */
    background-image: radial-gradient(circle at 50% 50%, #111111 0%, #050505 100%);
    color: var(--text);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.lang-toggle {
    cursor: none;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 2px;
    position: relative;
    color: var(--accent-dim);
    transition: color 0.3s;
    z-index: 100;
    pointer-events: auto;
    padding: 10px;
}

.lang-toggle:hover {
    color: var(--accent);
}

/* --- AUDIO GATE (Chrome autoplay unlock) --- */
#audio-gate {
    position: fixed;
    inset: 0;
    background: #050505;
    z-index: 1001;
    /* Above preloader (1000) */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    /* Visible by default */
    pointer-events: all;
    transition: opacity 0.5s ease;
}

#audio-gate.audio-gate--dismissed {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

/* Anti-flicker: hide immediately if user already made a choice */
html.skip-audio-gate #audio-gate {
    display: none !important;
}

.audio-gate__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.audio-gate__icon {
    color: rgba(255, 255, 255, 0.3);
    animation: audio-gate-pulse 2s ease-in-out infinite;
}

@keyframes audio-gate-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.08);
    }
}

.audio-gate__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.audio-gate-btn {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 16px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.audio-gate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.04);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audio-gate-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
}

.audio-gate-btn:hover::before {
    opacity: 1;
}

.audio-gate__bracket {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 100;
    transition: color 0.3s ease;
}

.audio-gate-btn:hover .audio-gate__bracket {
    color: rgba(255, 255, 255, 0.6);
}

.audio-gate__text {
    position: relative;
    z-index: 1;
}

.audio-gate__hint {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- PRELOADER --- */
#preloader {
    position: fixed;
    inset: 0;
    background: #050505;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loader-num {
    font-family: var(--font-mono);
    font-size: 5vw;
    font-weight: 100;
    letter-spacing: -2px;
}

.loader-text-wrapper {
    height: 20px;
    overflow: hidden;
    margin-top: 10px;
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-dim);
    text-align: center;
}

.loader-text span {
    display: block;
    height: 20px;
    line-height: 20px;
}

.loader-bar {
    width: 0%;
    height: 1px;
    background: white;
    margin-top: 20px;
}

/* --- WEBGL CANVAS --- */
#webgl-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    z-index: -1;
    pointer-events: none;
}

/* --- CURSOR --- */
#custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
}

#cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 0.5px solid var(--accent-dim);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    letter-spacing: 1px;
    color: #000;
    opacity: 0;
    text-transform: uppercase;
}

/* --- MENU OVERLAY --- */
#menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.menu-links {
    list-style: none;
    text-align: center;
}

.menu-link-item {
    margin: 2vh 0;
    overflow: hidden;
}

.menu-link {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 4.5rem);
    line-height: 1.1;
    word-wrap: break-word;
    word-break: break-word;
    color: var(--text);
    text-decoration: none;
    display: inline-block;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
    position: relative;
    pointer-events: none;
}

#menu-overlay.active .menu-link {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#menu-overlay.active .menu-link-item:nth-child(1) .menu-link {
    transition-delay: 0.10s;
}

#menu-overlay.active .menu-link-item:nth-child(2) .menu-link {
    transition-delay: 0.15s;
}

#menu-overlay.active .menu-link-item:nth-child(3) .menu-link {
    transition-delay: 0.20s;
}

#menu-overlay.active .menu-link-item:nth-child(4) .menu-link {
    transition-delay: 0.25s;
}

#menu-overlay.active .menu-link-item:nth-child(5) .menu-link {
    transition-delay: 0.30s;
}

#menu-overlay.active .menu-link-item:nth-child(6) .menu-link {
    transition-delay: 0.35s;
}

#menu-overlay.active .menu-link-item:nth-child(7) .menu-link {
    transition-delay: 0.40s;
}

/* Efecto de Hover Avanzado (Desktop Only) */
@media (hover: hover) and (pointer: fine) {

    /* Dim general de otros enlaces al hacer hover en el contenedor */
    #menu-overlay.active .menu-links:hover .menu-link {
        opacity: 0.2;
    }

    /* Enfoque en el enlace actual */
    #menu-overlay.active .menu-links .menu-link:hover {
        opacity: 1;
        color: #fff;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }

    /* Elementos técnicos pseudo (Corchetes) */
    .menu-link::before,
    .menu-link::after {
        position: absolute;
        top: 50%;
        color: var(--accent);
        font-family: var(--font-mono);
        font-size: 0.5em;
        font-weight: 400;
        opacity: 0;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .menu-link::before {
        content: '[';
        left: -40px;
        transform: translateY(-50%) translateX(20px);
    }

    .menu-link::after {
        content: ']';
        right: -40px;
        transform: translateY(-50%) translateX(-20px);
    }

    #menu-overlay.active .menu-link:hover::before {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }

    #menu-overlay.active .menu-link:hover::after {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.menu-link-sub {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 2px;
    color: var(--accent-dim);
    display: block;
    margin-top: 5px;
}

/* --- UI COMPONENTS --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 100;
    font-size: 0.875rem;
    letter-spacing: 4px;
}

.nav-trigger {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    pointer-events: all;
    position: relative;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
}

.nav-trigger::after {
    content: '';
    position: absolute;
    inset: -10px;
}

/* --- TYPOGRAPHY & COMMON --- */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 5rem);
    margin-bottom: 40px;
    line-height: 1.1;
}

.section-body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.6;
    max-width: 600px;
    color: var(--text);
    opacity: 0.8;
    font-weight: 300;
}

.mono-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-dim);
    margin-bottom: 20px;
    display: block;
}

/* --- SECTIONS --- */
section {
    position: relative;
    padding: clamp(56px, 5vw, 96px) clamp(20px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: auto;
}

.hero,
.manifesto,
.footer {
    min-height: 100dvh;
}

/* HERO */
.hero {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    overflow: hidden;
    background: #050607;
}

.hero-media,
.hero-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-media {
    z-index: -2;
}

.hero-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 72% center;
    filter: brightness(0.64) contrast(1.1) saturate(0.78);
    transform: scale(1.015);
}

.hero-overlay {
    z-index: -1;
    background:
        linear-gradient(90deg,
            rgba(3, 4, 5, 0.96) 0%,
            rgba(3, 4, 5, 0.86) 35%,
            rgba(3, 4, 5, 0.45) 63%,
            rgba(3, 4, 5, 0.16) 100%),
        linear-gradient(0deg,
            rgba(3, 4, 5, 0.65) 0%,
            transparent 42%,
            rgba(3, 4, 5, 0.22) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-video {
        object-position: 68% center;
        filter: brightness(0.5) contrast(1.1) saturate(0.68);
    }

    .hero-overlay {
        background:
            linear-gradient(90deg,
                rgba(3, 4, 5, 0.94) 0%,
                rgba(3, 4, 5, 0.78) 65%,
                rgba(3, 4, 5, 0.42) 100%),
            linear-gradient(0deg,
                rgba(3, 4, 5, 0.72) 0%,
                transparent 55%);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 4.5rem);
    line-height: 1.02;
    font-weight: 300;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-title.italic {
    font-style: italic;
    padding-left: 5vw;
}

.hero-sub {
    margin-top: 40px;
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    max-width: 500px;
    opacity: 0.7;
    line-height: 1.6;
    font-weight: 300;
}

.hero-signature {
    position: absolute;
    bottom: 40px;
    right: 8vw;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 3px;
    color: var(--accent-dim);
}

/* MANIFESTO */
.manifesto-text {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 6rem);
    max-width: 90%;
    line-height: 1.2;
}

.dim {
    color: var(--accent-dim);
    font-style: italic;
}

/* POSITIONING */
.positioning .section-body {
    max-width: 800px;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    line-height: 1.5;
}

/* CATEGORIES */
.categories-container {
    position: relative;
    overflow: clip;
}

.cat-scroll-box {
    position: sticky;
    top: 0;
    height: 82vh;
    min-height: 640px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.cat-track {
    display: flex;
    will-change: transform;
}

.cat-slide {
    flex: 0 0 88vw;
    padding: 0 6vw;
    display: grid;
    grid-template-columns: minmax(280px, 34vw) minmax(320px, 1fr);
    gap: 3vw;
    align-items: center;
}

.cat-info h2 {
    font-family: var(--font-display);
    font-size: 6vw;
    line-height: 1.1;
    margin-bottom: 20px;
}

.cat-info p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    opacity: 0.5;
    letter-spacing: 1px;
}

.cat-info .cat-desc {
    font-family: var(--font-body);
    font-size: 1rem;
    margin-top: 20px;
    max-width: 300px;
    opacity: 0.8;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: normal;
}

.cat-visual {
    width: 100%;
    height: min(46vh, 440px);
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 5px;
    transition: background 0.5s ease, color 0.5s ease, transform 0.5s ease;
    position: relative;
    overflow: hidden;
}

.cat-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.cat-visual:hover::after {
    opacity: 1;
}

/* DESIGN PRINCIPLES */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4vw;
    margin-top: 40px;
}

.principle h3 {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    margin-bottom: 15px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.principle p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.7;
    font-weight: 300;
}

/* LIST SECTIONS (Services, Process, Studies) */
.list-container {
    margin-top: 40px;
    border-top: 1px solid var(--border);
}

.list-item {
    display: grid;
    grid-template-columns: minmax(220px, 0.95fr) minmax(0, 2.05fr);
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    gap: 24px;
    transition: padding-left 0.3s ease, background 0.3s ease;
}

.list-item:hover {
    padding-left: 20px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.list-item h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
}

.list-item p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.8;
    font-weight: 300;
}

@media (max-width: 768px) {
    .list-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ARSENAL */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 50px;
}

.tech-card {
    padding: 40px;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.tech-card:hover {
    background: white;
    color: black;
    transform: translateY(-5px);
}

.tech-card h3 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.tech-card p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.8;
}

.tech-card:hover p {
    opacity: 1;
}

/* CERTIFICATES */
.cert-marquee-container {
    width: 100%;
    margin-top: 6vw;
    position: relative;
    padding: 20px 0;
    overflow: hidden;
    display: flex;
}

.cert-marquee-container::before,
.cert-marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15vw;
    z-index: 2;
    pointer-events: none;
}

.cert-marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}

.cert-marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

.cert-marquee-track {
    --cert-gap: 20px;
    display: flex;
    gap: var(--cert-gap);
    flex-wrap: nowrap;
    width: max-content;
    animation: certMarquee 80s linear infinite;
}

.cert-marquee-container:hover .cert-marquee-track {
    animation-play-state: paused;
}

/* CUSTOM CERT FRAME REDESIGN */
.cert-item {
    text-decoration: none;
    display: block;
    width: clamp(220px, 18vw, 260px);
    margin-right: 40px;
    outline: none;
}

.cert-frame {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.cert-item:hover .cert-label {
    color: var(--accent);
}

.cert-image-container {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    background: #0a0a0a;
    transition: border-color 0.3s;
    overflow: hidden;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-item:hover .cert-image-container {
    border-color: rgba(255, 255, 255, 0.3);
}

.cert-corner {
    position: absolute;
    width: 6px;
    height: 6px;
    border-color: rgba(255, 255, 255, 0.3);
    border-style: solid;
    transition: border-color 0.3s;
    z-index: 5;
}

.cert-item:hover .cert-corner {
    border-color: var(--accent);
}

.cert-corner.top-left {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.cert-corner.bottom-right {
    bottom: -1px;
    right: -1px;
    border-width: 0 1px 1px 0;
}

.cert-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.7);
    transition: filter 0.4s ease, transform 0.4s ease;
    position: relative;
    z-index: 2;
}

.cert-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.6);
    z-index: 3;
    transition: background 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
    .cert-item:hover .cert-img {
        filter: grayscale(0%) brightness(1);
        transform: scale(1.05);
    }

    .cert-item:hover .cert-overlay {
        background: rgba(5, 5, 5, 0);
    }
}

@media (max-width: 767px) {
    .cert-item {
        width: 180px;
        margin-right: 20px;
    }

    .cert-image-container {
        height: 120px;
    }
}

/* EDITORIAL CERTIFICATE MODAL */
.cert-modal {
    position: fixed;
    inset: 0;
    z-index: 9900;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.cert-modal.active {
    opacity: 1;
    pointer-events: all;
}

.cert-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1;
    cursor: pointer;
    /* Starry/particle effect fallback overlay */
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
}

.cert-modal-wrapper {
    position: fixed;
    z-index: 2;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cert-modal-content {
    display: flex;
    width: 100%;
    height: 100%;
    opacity: 0;
    flex-direction: column;
}

@media (min-width: 768px) {
    .cert-modal-content {
        flex-direction: row;
    }
}

/* LEFT COLUMN */
.cert-modal-left {
    flex: 0 0 45%;
    background: #050505;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.cert-modal-left img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.cert-btn-secondary {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.cert-btn-secondary:hover {
    background: var(--accent);
    color: black;
}

/* RIGHT COLUMN */
.cert-modal-right {
    flex: 1;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.cert-modal-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.1;
    margin-bottom: 15px;
}

.cert-modal-meta {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 40px;
}

.cert-modal-skills h4,
.cert-modal-impact h4 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-dim);
    margin-bottom: 15px;
}

.cert-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.cert-tag-pill {
    font-family: var(--font-body);
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
    cursor: default;
}

.cert-tag-pill:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cert-modal-impact p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
    font-weight: 300;
}

/* CONTROLS */
.cert-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    font-family: var(--font-mono);
    line-height: 1;
    z-index: 10;
    transition: color 0.3s, transform 0.3s;
}

.cert-modal-close:hover {
    color: var(--accent-dim);
    transform: scale(1.1);
}

.cert-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    font-family: var(--font-display);
    z-index: 10;
    padding: 20px;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}

.cert-modal-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.cert-modal-nav.prev {
    left: -80px;
}

.cert-modal-nav.next {
    right: -80px;
}

@media (max-width: 1200px) {
    .cert-modal-nav.prev {
        left: 10px;
    }

    .cert-modal-nav.next {
        right: 10px;
    }
}

@media (max-width: 767px) {
    .cert-modal-wrapper {
        flex-direction: column;
        overflow-y: auto;
    }

    .cert-modal-left {
        flex: none;
        padding: 30px 20px;
    }

    .cert-modal-right {
        flex: none;
        padding: 30px 20px;
    }

    .cert-modal-nav {
        display: none;
    }
}

/* VISUAL LAB & BUILT FOR */
.columns {
    display: flex;
    gap: 8vw;
    flex-wrap: wrap;
}

.col {
    flex: 1;
    min-width: 300px;
}

ul.styled-list {
    list-style: none;
    margin-top: 30px;
}

ul.styled-list li {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    letter-spacing: 1px;
    opacity: 0.7;
    display: flex;
    align-items: center;
}

ul.styled-list li::before {
    content: '+';
    margin-right: 15px;
    color: var(--accent);
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    padding: 30px 0;
    font-family: var(--font-display);
    font-size: 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--accent-dim);
}

.faq-icon {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 300;
    transition: transform 0.4s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), padding 0.6s ease;
}

.faq-answer p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.8;
    padding-bottom: 30px;
    max-width: 700px;
    font-weight: 300;
}

.faq-item.active .faq-answer {
    max-height: 600px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* FOOTER / CONTACT */
.footer {
    text-align: center;
    align-items: center;
    justify-content: center;
}

.contact-cta {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 10rem);
    text-decoration: none;
    color: inherit;
    transition: all 0.5s ease;
    line-height: 1;
    display: inline-block;
}

.contact-cta:hover {
    font-style: italic;
    letter-spacing: -2px;
    transform: scale(1.02);
}

.footer-sub {
    font-family: var(--font-body);
    font-size: 1.2rem;
    opacity: 0.6;
    margin-top: 30px;
    max-width: 400px;
}

.footer-bottom {
    margin-top: 100px;
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 2px;
    opacity: 0.5;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

/* --- FORM STYLES --- */
.contact-form {
    max-width: 800px;
    margin: 0 auto 60px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-input {
    flex: 1;
    min-width: 250px;
    padding: 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: var(--font-mono);
    font-size: 1rem;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

textarea.form-input {
    resize: vertical;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.form-select option {
    color: black;
}

.form-submit {
    padding: 16px 32px;
    background: #ffffff;
    color: #050607;
    font-weight: 600;
    border: none;
    font-family: var(--font-mono);
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    align-self: flex-start;
    transition: opacity 0.3s ease;
}

.form-submit:hover {
    opacity: 0.8;
}

/* --- ANIMATION HELPERS --- */
.reveal-box {
    overflow: hidden;
}

.line {
    display: block;
    transform: translateY(110%);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

/* --- RESPONSIVE BREAKPOINTS --- */
html,
body {
    overflow-x: clip;
}

@media (max-width: 1024px) {
    .header {
        padding: 24px 20px;
    }

    .hero-signature {
        right: 20px;
        bottom: 24px;
    }

    .principles-grid,
    .tech-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cat-slide {
        padding: 0 6vw;
        gap: 4vw;
    }

    .cat-visual {
        width: 42vw;
        height: 42vh;
    }
}

@media (max-width: 768px) {
    section {
        padding: 88px 20px;
        min-height: auto;
    }

    .hero {
        min-height: 100svh;
        justify-content: center;
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .hero-title {
        font-size: clamp(3rem, 16vw, 5.5rem);
        line-height: 0.9;
    }

    .hero-title.italic {
        padding-left: 0;
    }

    .hero-sub,
    .section-body,
    .faq-answer p,
    .list-item p {
        font-size: 1rem;
        max-width: 100%;
    }

    .hero-signature {
        position: static;
        margin-top: 32px;
        font-size: 0.625rem;
    }

    .section-title {
        font-size: clamp(2rem, 10vw, 3rem);
        margin-bottom: 24px;
    }

    .principles-grid,
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .columns {
        flex-direction: column;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-cta {
        font-size: clamp(2.5rem, 14vw, 4.5rem);
    }

    .header {
        mix-blend-mode: normal;
        background: var(--bg);
    }

    .categories-container {
        height: auto !important;
    }

    .cat-scroll-box {
        position: relative;
        height: auto;
        padding: 20px 20px 40px 20px;
        display: flex;
        flex-direction: row;
        gap: 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .cat-slide {
        flex: 0 0 75vw;
        width: 75vw;
        min-height: auto;
        padding: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        align-items: start;
        scroll-snap-align: center;
    }

    .cat-info h2 {
        font-size: clamp(2.2rem, 12vw, 3.6rem);
    }

    .cat-visual {
        width: 100%;
        height: 240px;
    }

    .cat-visual,
    .tech-card,
    .menu-overlay {
        backdrop-filter: blur(8px);
    }

    .tech-card:hover,
    .contact-cta:hover,
    .list-item:hover {
        transform: none;
        padding-left: 0;
        background: none;
    }
}

@media (max-width: 480px) {

    /* Grid collapse for mobile */
    .principles-grid,
    .tech-grid,
    .faq-question,
    .menu-links,
    .list-item,
    .hero-title,
    .menu-link {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        font-size: clamp(1.5rem, 8vw, 3rem) !important;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 4rem) !important;
    }

    .menu-link {
        font-size: clamp(1.5rem, 5vw, 3.5rem) !important;
    }

    .list-item,
    .tech-card,
    .cat-slide {
        min-height: 44px;
        padding: 12px 16px;
    }

    .cert-marquee-track {
        display: flex !important;
        flex-direction: row !important;
        animation: certMarquee 50s linear infinite !important;
        width: max-content !important;
    }

    .cat-visual,
    .tech-card {
        backdrop-filter: none;
        background: rgba(255, 255, 255, 0.06);
    }

    html.site-light *,
    html.site-reduced * {
        animation: none !important;
        transition: none !important;
    }

    /* Mobile Native Slider (Desactiva GSAP) */
    @media (max-width: 768px) {
        .cat-track {
            gap: 20px;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
        }

        .cat-slide {
            min-width: 80%;
            flex: 0 0 auto;
            scroll-snap-align: start;
            padding: 0 4vw;
        }
    }

    /* Formulario y Header en mÃ³vil */
    @media (max-width: 640px) {
        .header {
            padding: 20px;
            flex-wrap: wrap;
            gap: 10px;
        }

        .logo {
            font-size: 0.625rem;
            letter-spacing: 2px;
            text-align: center;
            width: 100%;
        }

        .header>div {
            width: 100%;
            justify-content: center;
        }

        .lang-toggle {
            padding: 5px;
        }

        .contact-form .form-row {
            flex-direction: column;
            gap: 16px;
        }

        .contact-form input,
        .contact-form select,
        .contact-form textarea,
        .contact-form button {
            width: 100%;
            min-width: 0;
            box-sizing: border-box;
            min-height: 56px;
            /* Aumentado para mejor objetivo tÃ¡ctil */
        }

        .hero-signature {
            gap: 6vw;
        }
    }
}

@media (min-width: 769px) {
    .desktop-only {
        display: inline-block !important;
    }

    .desktop-only-block {
        display: block !important;
    }
}

@media (max-width: 768px) {

    .desktop-only,
    .desktop-only-block {
        display: none !important;
    }
}


/* GLOBAL SCROLL INDICATOR */
.desktop-only-scroll {
    position: fixed;
    top: 0;
    right: 0;
    width: 60px;
    height: 100dvh;
    z-index: 8000;
    pointer-events: none;
    display: none;
}

@media (min-width: 1025px) {
    .desktop-only-scroll {
        display: block;
    }
}

.scroll-track {
    position: absolute;
    right: 30px;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
}

/* Invisible hit-area expansion for easier drag */
.scroll-track::before {
    content: '';
    position: absolute;
    left: -20px;
    right: -20px;
    top: 0;
    bottom: 0;
    z-index: 10;
}

.scroll-progress {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 1);
    transform-origin: top;
    transform: scaleY(0);
}

.scroll-mark {
    position: absolute;
    right: -5px;
    width: 11px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    transform-origin: right;
    transition: background 0.3s;
}

.scroll-mark.minor {
    width: 5px;
    right: -2px;
    background: rgba(255, 255, 255, 0.15);
}

.scroll-mark-label {
    position: absolute;
    right: 20px;
    top: -6px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.scroll-mark.active .scroll-mark-label {
    opacity: 1;
}

/* Mobile */
.mobile-only-scroll {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 9999;
    display: block;
    pointer-events: none;
}

.mobile-scroll-progress {
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform-origin: left;
    transform: scaleX(0);
}

@media (min-width: 1025px) {
    .mobile-only-scroll {
        display: none;
    }
}

.operations-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #050505;
    background-image:
        linear-gradient(90deg,
            rgba(5, 5, 5, 0.88) 0%,
            rgba(5, 5, 5, 0.62) 45%,
            rgba(5, 5, 5, 0.28) 100%),
        url("../img/operations-bg.webp");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* ==========================================================================
   MOBILE OVERRIDES (max-width: 767px)
   ========================================================================== */
@media (max-width: 767px) {

    body {
        overflow-x: hidden;
    }

    h1 {
        font-size: clamp(2.45rem, 12vw, 4.25rem);
        line-height: 0.92;
        letter-spacing: -0.055em;
        overflow-wrap: anywhere;
    }

    h2 {
        font-size: clamp(1.9rem, 8.5vw, 3rem);
        line-height: 0.98;
        letter-spacing: -0.04em;
        overflow-wrap: anywhere;
    }

    p,
    li,
    input,
    select,
    textarea {
        font-size: 16px;
        line-height: 1.55;
    }

    .eyebrow,
    .section-number,
    .meta-label {
        font-size: 0.68rem;
        letter-spacing: 0.11em;
    }

    .expertise-grid,
    .skills-grid,
    .services-grid,
    .projects-grid,
    .pricing-grid,
    .arsenal-grid,
    .certifications-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .card,
    .project-card,
    .pricing-card,
    .skill-card {
        min-height: 0;
        padding: 1.25rem;
    }

    .project-card {
        display: flex;
        flex-direction: column;
    }

    .project-card .project-results {
        order: 2;
    }

    .project-card .project-links {
        order: 3;
    }

    .project-card .project-context,
    .project-card .project-role,
    .project-card .project-stack {
        order: 4;
    }

    .project-card a,
    .button,
    button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .case-image {
        width: 100%;
        border-radius: 12px;
    }

    .case-image--workshop,
    .case-image--team {
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    .case-image--process-board {
        height: auto;
        max-height: none;
        object-fit: contain;
        background: #111;
    }

    .case-figure {
        margin: 1.25rem 0 2.25rem;
    }

    .case-caption {
        margin-top: 0.65rem;
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .custom-cursor,
    .cursor-follower,
    .grain-heavy,
    .desktop-only-webgl {
        display: none !important;
    }

    .parallax-layer {
        transform: none !important;
        will-change: auto;
    }

    [data-scroll],
    .reveal,
    .fade-up {
        transition-duration: 0.35s;
        transition-delay: 0s !important;
    }

    .contact-form {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea,
    .contact-form button {
        width: 100%;
        min-height: 48px;
    }

    .certifications-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .certification-card {
        flex: 0 0 min(82vw, 300px);
        scroll-snap-align: start;
    }
}

html.site-light *,
html.site-light *::before,
html.site-light *::after,
html.site-reduced *,
html.site-reduced *::before,
html.site-reduced *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}


/* ==========================================================================
   MOBILE EXPAND AND REORDERING
   ========================================================================== */
@media (max-width: 767px) {
    #smooth-content {
        display: flex;
        flex-direction: column;
    }

    /* Force sections to follow the new order */
    section {
        order: 50;
    }

    .services {
        order: 50;
    }

    .principles {
        order: 50;
    }

    .certificates {
        order: 50;
    }

    #pin-section {
        order: 50;
    }

    .hero {
        order: 1;
    }

    #value-prop {
        order: 2;
    }

    .stack {
        order: 3;
    }

    .studies {
        order: 4;
    }

    .experience {
        order: 5;
    }

    .it-support {
        order: 6;
    }

    .tech {
        order: 7;
    }

    .process {
        order: 8;
    }

    .footer {
        order: 100;
    }


    .mobile-expand-control {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
        margin-top: 1.5rem;
        padding: 10px 20px;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        font-family: var(--font-mono);
        font-size: 0.8rem;
        cursor: pointer;
        text-transform: uppercase;
        border-radius: 4px;
        width: 100%;
        justify-content: center;
    }

    /* When expanded, show everything */
    .is-expanded .expertise-card,
    .is-expanded .certification-card,
    .is-expanded .principle,
    .is-expanded .service {
        display: block !important;
    }
}

/* ==========================================================================
   KIMBALL CARD COMPONENT
   ========================================================================== */
.kimball-card {
    overflow: hidden;
    background: #090a0b;
    border: 1px solid rgba(255, 255, 255, 0.09);
    margin-top: 40px;
}

.kimball-card__image {
    position: relative;
    height: clamp(180px, 24vw, 300px);
    overflow: hidden;
    background: #050505;
}

.kimball-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(5, 6, 7, 0.72) 0%,
            rgba(5, 6, 7, 0.22) 48%,
            rgba(5, 6, 7, 0.05) 100%);
    pointer-events: none;
}

.kimball-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: right center;
    filter: brightness(0.7) contrast(1.08) saturate(0.72);
    transform: scale(1.02);
    transition: transform 1s ease, filter 0.8s ease;
}

.kimball-card:hover .kimball-card__image img {
    transform: scale(1.07);
    filter: brightness(0.82) contrast(1.1) saturate(0.8);
}

/* ==========================================================================
   MEJORAS DE HOVER (PC) - Añadido para UI/UX
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {

    /* Efecto de elevación para tarjetas */
    .project-card,
    .kimball-card,
    .tech-card {
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    }

    .project-card:hover,
    .kimball-card:hover,
    .tech-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* Zoom sutil a imágenes dentro de tarjetas */
    .project-card img,
    .kimball-card__image img {
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .project-card:hover img,
    .kimball-card:hover .kimball-card__image img {
        transform: scale(1.04);
    }

    /* Hover en botones CTA */
    .contact-cta,
    .button {
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    }

    .contact-cta:hover,
    .button:hover {
        transform: scale(1.02);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    }

    /* Hover en listas */
    .list-item {
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
    }

    .list-item:hover {
        transform: translateX(8px);
        color: var(--accent, #fff);
    }
}


/* ==========================================================================
   SECTION WORK — Glassmorphism Project Cards
   ========================================================================== */
.section-work {
    padding: 120px 5vw 100px;
}

.section-work .work-header {
    margin-bottom: 60px;
}

.section-work .section-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.25em;
    color: #666;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

/* ===== GRID ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

/* ===== CARD BASE ===== */
.section-work .project-card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.3s ease, transform 0.3s ease;
    cursor: default;
    --accent: #00ff88;
    /* Reset inherited rules from other .project-card contexts */
    min-height: 0;
    padding: 0;
}

.section-work .project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.section-work .project-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-4px);
}

.section-work .project-card:hover::before {
    opacity: 1;
}

/* Per-card accent colors via data attribute */
.section-work .project-card[data-accent="#ff0088"] {
    --accent: #ff0088;
}

.section-work .project-card[data-accent="#00ff88"] {
    --accent: #00ff88;
}

.section-work .project-card[data-accent="#0088ff"] {
    --accent: #0088ff;
}

.section-work .project-card[data-accent="#ff6600"] {
    --accent: #ff6600;
}

/* ===== BACKGROUND IMAGE ===== */
.section-work .card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    /* Much brighter base image */
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 0;
}

.section-work .project-card:hover .card-bg {
    opacity: 1.0;
    /* Full brightness on hover */
    transform: scale(1.04);
}

.section-work .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.0) 0%,
            rgba(0, 0, 0, 0.4) 60%,
            rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
}

/* ===== CONTENT ===== */
.section-work .card-content {
    position: relative;
    z-index: 2;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 420px;
}

.section-work .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-work .card-badge {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.15em;
    padding: 4px 10px;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-transform: uppercase;
    border-radius: 2px;
    white-space: nowrap;
}

.section-work .badge--prod {
    border-color: #ff6600;
    color: #ff6600;
}

.section-work .card-index {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
}

.section-work .card-title {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    color: #f0f0f0;
    line-height: 1.3;
    letter-spacing: -0.01em;
    font-family: var(--font-body);
    margin-bottom: 0;
}

.section-work .card-context {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    flex-grow: 1;
    font-family: var(--font-body);
    font-weight: 300;
    opacity: 1;
    margin-bottom: 0;
}

/* ===== STACK TAGS ===== */
.section-work .card-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.section-work .card-stack span {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 2px;
    letter-spacing: 0.05em;
}

/* ===== RESULTS ===== */
.section-work .card-results {
    display: flex;
    gap: 20px;
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-work .result-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section-work .result-value {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
}

.section-work .result-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== LINKS ===== */
.section-work .card-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.section-work .card-link {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
    min-height: 0;
}

.section-work .card-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

.section-work .card-link--primary {
    color: var(--accent);
    opacity: 0.8;
}

.section-work .card-link--primary:hover {
    opacity: 1;
    color: var(--accent);
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
    .section-work {
        padding: 80px 4vw 70px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-work .card-content {
        padding: 20px;
        min-height: auto;
    }

    .section-work .card-results {
        gap: 12px;
    }

    .section-work .result-value {
        font-size: 13px;
    }
}

/* BENTO BOX GRID */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 20px;
}

.bento-card {
    position: relative;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: rgba(20, 20, 20, 0.8);
}

.bento-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bento-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 15px;
    display: inline-block;
    letter-spacing: 1px;
}

.bento-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.bento-card p {
    font-size: 0.95rem;
    opacity: 0.7;
    line-height: 1.5;
}

.tech-tags {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tags span {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Grid sizing */
.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-medium {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.bento-small {
    grid-column: span 1;
    grid-row: span 1;
}

.text-center {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Glow Effect */
.bento-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.bento-card:hover .bento-glow {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-large,
    .bento-medium {
        grid-column: span 2;
    }

    .bento-tall,
    .bento-small {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-large,
    .bento-medium,
    .bento-tall,
    .bento-small {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* ========================================================= */
/* 02 / TRABAJO: SERVER LEDGER (AWS CONSOLE STYLE)           */
/* ========================================================= */
.server-ledger-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-align: left;
    min-width: 800px;
}

.ledger-table th {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ledger-row {
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ledger-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ledger-row td {
    padding: 20px;
    vertical-align: middle;
}

.stack-col {
    color: rgba(255, 255, 255, 0.6);
}

.status-indicator {
    font-size: 0.8rem;
    margin-right: 6px;
    text-shadow: 0 0 10px currentColor;
}

/* --- DRAWER (PANEL LATERAL) --- */
.project-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    justify-content: flex-end;
}

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.drawer-panel {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100%;
    background: #080808;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-sizing: border-box;
}

.project-drawer.is-open {
    pointer-events: auto;
}

.project-drawer.is-open .drawer-overlay {
    opacity: 1;
}

.project-drawer.is-open .drawer-panel {
    transform: translateX(0);
}

.drawer-header {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.drawer-close-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 8px 16px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.drawer-hero {
    position: relative;
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.drawer-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #080808, transparent 50%, rgba(0, 0, 0, 0.5));
}

.drawer-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 40px;
    width: 100%;
}

.drawer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.drawer-sys-id {
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
}

.drawer-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.drawer-body {
    padding: 40px;
    flex-grow: 1;
}

.drawer-category {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.8rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.drawer-context {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.drawer-section-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.drawer-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.drawer-stack span {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 4px;
}

.drawer-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.drawer-result-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid var(--accent);
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.drawer-res-val {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.drawer-res-lbl {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.drawer-actions {
    display: flex;
    gap: 20px;
    margin-top: auto;
}

.drawer-actions a {
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: background 0.3s;
}

.drawer-actions a.card-link--primary {
    background: white;
    color: black;
}

.drawer-actions a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.drawer-actions a.card-link--primary:hover {
    background: #e0e0e0;
}

/* --- GLASSMORPHISM (Platform UI) --- */
.glass-section {
    position: relative;
    overflow: hidden;
    background: rgba(5, 5, 5, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin: 4vw 4vw 8vw 4vw;
    /* Floating card effect */
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.glass-section::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(800px circle at var(--mouse-x, -9999px) var(--mouse-y, -9999px),
            rgba(255, 255, 255, 0.06),
            transparent 40%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.glass-section:hover::before {
    opacity: 1;
}

/* Ensure inner content stays above glow */
.glass-section>* {
    position: relative;
    z-index: 1;
}

.glass-section:hover {
    background: rgba(5, 5, 5, 0.70);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.manifesto-glass {
    background: radial-gradient(circle at center, rgba(5, 5, 5, 0.8) 0%, rgba(5, 5, 5, 0.4) 50%, transparent 80%);
    padding: 10vw 4vw;
    border-radius: 24px;
    text-align: center;
}

/* Mobile Adjustments for Premium Canvas */
@media (max-width: 768px) {
    .glass-section {
        margin: 4vw 2vw 8vw 2vw;
        padding: 2rem 1.5rem;
    }

    #scroll-canvas {
        object-position: center 20%;
    }
}