/* =========================
   Reset, Scrollbar & Theme
   ========================= */
* {
    box-sizing: border-box;
    margin: 0;

}

html {
    scrollbar-gutter: stable
}

/* Ocultar scrollbars (sigue habiendo scroll) */
html,
body {
    -ms-overflow-style: none;
    scrollbar-width: none
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent
}

:root {
    --bg: #000000;
    --bg-soft: #1a1a1a;
    --fg: #fff;
    --muted: rgba(182, 182, 182, .65);
    --line: rgba(255, 255, 255, .12);
    --accent: #ffffff;

    --title-fs: 1.2rem;
    --title-lh: 1.3;
    --title-lines: 2;
    --title-pad: 16px;
    --card-pad-y: 16px;

    --header-h: 64px;
    --main-pt: 32px;
}

html,
body {
    height: 100%
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
    padding-top: var(--header-h);
}

.no-scroll {
    overflow: hidden
}

.container {
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 20px
}

.is-hidden {
    display: none !important
}

/* ---- Brand (logo + texto) ---- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--fg);
    line-height: 1
}

.brand-logo {
    height: calc(var(--header-h) - 20px);
    width: auto;
    display: block;
    object-fit: contain
}

@media (max-width:540px) {
    .brand-logo {
        display: none
    }

    .brand {
        gap: 0
    }

    .brand-text {
        font-size: 1rem;
        letter-spacing: .12em
    }
}

.brand-text {
    font-weight: 700;
    letter-spacing: .1em;
    white-space: nowrap
}

/* =================
   Header & Nav Bar
   ================= */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    z-index: 100;
    background: rgba(25, 25, 25, .75);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px)
}

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.brand {
    letter-spacing: .1em;
    font-weight: 700;
    text-decoration: none;
    color: var(--fg)
}

.site-nav {
    display: flex;
    gap: 18px
}

.nav-link {
    position: relative;
    display: inline-block;
    padding: 6px 4px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: .03em
}

.nav-link:hover {
    color: var(--fg)
}

.nav-link.is-active {
    color: var(--fg)
}

.nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px
}

/* Burger */
.burger {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, .35);
    border-radius: 12px;
    color: #fff;
    cursor: pointer
}

.burger-lines {
    width: 20px;
    height: 2px;
    background: #fff;
    position: relative;
    display: block
}

.burger-lines::before,
.burger-lines::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: #fff
}

.burger-lines::before {
    top: -6px
}

.burger-lines::after {
    top: 6px
}

@media (max-width:859px) {
    .site-nav {
        display: none
    }

    .burger {
        display: inline-flex
    }
}

/* Drawer móvil */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 360px);
    background: rgba(18, 18, 18, .98);
    border-left: 1px solid var(--line);
    box-shadow: -20px 0 60px rgba(0, 0, 0, .45);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 120;
    padding: 18px;
    display: none
}

.mobile-drawer.open {
    transform: translateX(0)
}

.drawer-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 22px;
    cursor: pointer
}

.drawer-list {
    list-style: none;
    margin-top: 56px;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.drawer-link {
    display: block;
    padding: 12px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--fg);
    background: transparent;
    border: 1px solid transparent
}

.drawer-link:hover {
    background: rgba(255, 255, 255, .06);
    border-color: var(--line)
}

.mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 110;
    display: none
}

.mobile-backdrop.open {
    opacity: 1;
    pointer-events: auto
}

@media (max-width:859px) {
    .mobile-drawer {
        display: block
    }

    .mobile-backdrop {
        display: block
    }
}

/* ==============================
   Fondo global patrón + degradado
   ============================== */
.page-bg {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 0;
    pointer-events: none;
    --pattern-strong: rgba(255, 255, 255, .01);
    --pattern-fine: rgba(255, 255, 255, .02);
    background-color: #080808;
    background-image:
        linear-gradient(var(--pattern-strong) 2px, transparent 2px),
        linear-gradient(90deg, var(--pattern-strong) 2px, transparent 2px),
        linear-gradient(var(--pattern-fine) 1px, transparent 1px),
        linear-gradient(90deg, var(--pattern-fine) 1px, #080808 1px);
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
    background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
}

.page-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to right, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, .12) 3%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0) 90%, rgba(0, 0, 0, .12) 97%, rgba(0, 0, 0, .28) 100%)
}

/* ==========
   Main
   ========== */
.main-content {
    padding-top: var(--main-pt);
    position: relative;
    z-index: 1
}

/* Home */
#section-home {
    min-height: calc(100vh - var(--header-h) - var(--main-pt));
    min-height: calc(100svh - var(--header-h) - var(--main-pt));
    display: grid;
    place-items: center
}

#section-home .hero {
    margin: 0
}

/* HERO */
.hero {
    display: grid;
    justify-content: center;
    align-items: center;
    margin-block: clamp(3rem, 6vw, 8rem);
    gap: clamp(16px, 2vw, 28px);
    grid-template-columns: repeat(2, minmax(520px, 1fr))
}

.hero-card {
    position: relative;
    display: block;
    padding: 0;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-soft);
    transition: transform .15s ease, box-shadow .2s ease;
    aspect-ratio: 16/9;
    width: 100%;
    max-width: 900px;
    justify-self: center
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: blur(2px) saturate(.9) brightness(.85);
    transform: scale(1.01);
    transition: filter .35s ease, opacity .35s ease, transform .35s ease
}

.hero-dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .28);
    transition: opacity .35s ease
}

.hero-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(8px, 1vw, 12px) clamp(12px, 1.5vw, 18px);
    border-radius: 16px;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(3px);
    color: #fff;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: clamp(1.6rem, 6vw, 3.2rem);
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
    opacity: 1;
    transform: scale(1);
    transition: opacity .25s ease, transform .25s ease, background .25s ease
}

.hero-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(.92);
    transition: opacity .2s ease, transform .2s ease
}

.hero-play::before {
    content: "";
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .45)
}

.hero-play::after {
    content: "";
    position: absolute;
    margin-left: 6px;
    border-style: solid;
    border-width: 16px 0 16px 26px;
    border-color: transparent transparent transparent #111
}

.hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45)
}

.hero-card:hover img {
    filter: none;
    transform: none
}

.hero-card:hover .hero-dim {
    opacity: .15
}

.hero-card:hover .hero-label {
    opacity: 0;
    transform: scale(.98)
}

.hero-card:hover .hero-play {
    opacity: 1;
    transform: scale(1)
}

.hero-card:focus-visible .hero-label {
    opacity: 0;
    transform: scale(.98)
}

.hero-card:focus-visible .hero-play {
    opacity: 1;
    transform: scale(1)
}

@media (max-width:1200px) {
    .hero {
        grid-template-columns: 1fr;
        max-width: min(1100px, 100%);
        margin-inline: auto
    }

    .hero-card {
        max-width: 1100px
    }
}

@media (max-width:540px) {
    .hero-card {
        max-width: 100%;
        border-radius: 14px
    }

    .hero-play::before {
        width: 70px;
        height: 70px
    }

    .hero-play::after {
        border-width: 12px 0 12px 20px
    }
}

/* Secciones & Grid Cards */
.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 20px
}

.grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr))
}

/* Card de proyecto */
.card {
    background: rgba(25, 25, 25, .75);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow .2s ease;
    padding-bottom: var(--card-pad-y);
    margin-right: 6px;
    font-size: 14px;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .6)
}

.card-header {
    padding: var(--title-pad);
    min-height: calc(var(--title-fs) * var(--title-lh) * var(--title-lines) + (var(--title-pad) * 2));
    display: grid;
    align-content: center
}

.card-title {
    margin: 0;
    font-size: var(--title-fs);
    line-height: var(--title-lh);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 2;
    max-height: calc(var(--title-fs) * var(--title-lh) * var(--title-lines))
}

/* Thumbs 16:9 – que SIEMPRE llenen el card, también siendo <button> */
.thumb {
    position: relative;
    display: block;
    width: 100%;
    /* quita métricas de button por defecto */
    padding: 0;
    border: 0;
    background: #000;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.thumb img {
    position: absolute;
    /* clave: que el img se adapte al contenedor */
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* recorta si la miniatura no es 16:9 */
    display: block;
}

.thumb .play-btn {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 1;
    pointer-events: none;
    background: transparent;
}

/* Placeholder “sin vídeo” mantiene el mismo tamaño */
.thumb.is-missing {
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px dashed rgba(255, 255, 255, .22);
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 10px, transparent 10px 20px),
        #0e0e0e;
}


.missing-label {
    font-size: .9rem;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .55);
    background: rgba(0, 0, 0, .45);
    padding: 6px 10px;
    border-radius: 8px;
    text-transform: uppercase
}

.info-list li.is-missing {
    color: rgba(255, 255, 255, .55);
    font-style: italic
}

.info-list li.is-missing strong {
    color: rgba(255, 255, 255, .8);
    font-style: normal
}

/* Quitar borde de miniaturas con vídeo */
.thumb[data-video],
.thumb.thumb--clean {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: #000
}

.thumb[data-video] img,
.thumb.thumb--clean img {
    border: 0;
    outline: 0;
    box-shadow: none
}

/* ===== ABOUT: diseño contraste ===== */
.about {
    display: grid;
    gap: clamp(16px, 2vw, 28px);
    margin-bottom: clamp(28px, 4vw, 48px)
}

.about--contrast {
    grid-template-columns: minmax(280px, .9fr) 1.1fr
}

@media (max-width:1000px) {
    .about--contrast {
        grid-template-columns: 1fr
    }
}

/* Tarjetas */
.card-light {
    background: #f5f5f5;
    color: #131313;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 20px;
    padding: clamp(16px, 2vw, 22px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.card-dark {
    background: #0b0b0b;
    color: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(18px, 2.4vw, 28px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, .35);
}

/* Perfil (izquierda) */
.profile-media {
    width: 260px;
    height: 260px;
    max-width: 100%;
    margin: 6px 0 18px 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .08);
    background: #e9e9e9;
}

.profile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.profile-text {
    margin-bottom: 18px
}

.profile-name {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
    color: #0b0b0b
}

.profile-role {
    color: #333;
    opacity: .85
}

.btn-primary {
    display: inline-block;
    margin-top: 6px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, .12);
    background: #1f1f1f;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .02em;
}

.btn-primary:hover {
    background: #2a2a2a
}

.social-list {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 14px;
    margin: 4px 0 0;         
    padding: 0;              
    padding-inline-start: 0;
}

.social-list img {
    width: 26px;
    height: 26px;
    display: block;
    filter: none;
}

/* Bio (derecha) */
.about-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900;
    letter-spacing: .02em;
    margin-bottom: 14px
}

.about-copy {
    display: grid;
    gap: 12px;
    color: #ddd
}

.about-copy p {
    color: #e9e9e9
}

.studio-logos {
    margin-top: clamp(14px, 2vw, 22px);
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 16px;
    align-items: stretch;
    /* que todas las “cards” midan lo mismo en la fila */
}

/* Responsive: reduce columnas en pantallas más estrechas */
@media (max-width: 1100px) {
    .studio-logos {
        grid-template-columns: repeat(3, minmax(110px, 1fr));
    }
}

@media (max-width: 700px) {
    .studio-logos {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }
}

.studio-logo {
    display: flex;
    padding: 12px 10px;
}

.studio-logo:hover,
.studio-logo:focus-visible {
    border-color: rgba(255, 255, 255, .22);
    transform: translateY(-1px);
}

.studio-logo img {
    width: 100%;
    max-width: 180px;
    /* límite para que no “revienten” el card */
    max-height: 64px;
    /* respeta tu altura máxima */
    object-fit: contain;
    filter: saturate(0) brightness(.9);
    /* look en B/N de base */
    transition: filter .2s ease, transform .2s ease;
    display: block;
}

.studio-logo:hover img,
.studio-logo:focus-visible img {
    filter: none;
    /* vuelve a color en hover/focus */
    transform: scale(1.02);
}


/* Enlaces claros dentro de tarjeta blanca */
.card-light a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px
}

.card-light a:hover {
    text-decoration-thickness: 2px
}

/* ================
   Modal de vídeo
   ================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: none;
    align-items: center;
    justify-content: center
}

.modal.open {
    display: flex
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(10px)
}

.modal-dialog {
    position: relative;
    width: min(96vw, 1920px);
    aspect-ratio: 16 / 9;
    max-height: 92vh;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    z-index: 1;
    animation: modalIn .18s ease-out
}

.modal-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%
}

.modal-media iframe,
.modal-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    object-fit: contain;
    background: #000
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 28px;
    line-height: 36px;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2
}

@keyframes modalIn {
    from {
        transform: scale(0);
        opacity: .7
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

/* Centrar títulos en Animation y VFX */
#section-animation .card-header,
#section-vfx .card-header {
    text-align: center
}

#section-animation .card-title,
#section-vfx .card-title {
    text-align: center;
    margin-inline: auto
}

/* ===== CV/Breakdown (botonera + visor único estilo hero) ===== */
.cv-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 14px 0 18px;
}

.cv-switch .seg-btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .06);
    color: var(--fg);
    font-weight: 800;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .2s ease, transform .05s ease;
}

.cv-switch .seg-btn.is-active {
    background: rgba(255, 255, 255, .12);
}

.cv-switch .seg-btn:active {
    transform: translateY(1px);
}

/* Card grande inspirado en las hero-cards */
.cv-hero {
    display: grid;
    justify-content: center;
    align-items: center;
    margin-block: clamp(1.2rem, 3.2vw, 2.2rem);
}

.cv-hero-inner {
    position: relative;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-soft);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    transition: transform .15s ease, box-shadow .2s ease;
}

.cv-hero-inner:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}

/* El canvas ocupa todo el ancho; altura se ajusta al PDF */
.cv-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: clamp(420px, 68vh, 1000px);
    /* grande, sin scroll interno */
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #000;
    /* como los thumbs/video */
}

.cv-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
}

/* Controles flotantes (estética overlay como los hero) */
.cv-hero-controls {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}

.btn-ghost {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.btn-ghost:disabled {
    opacity: .45;
    cursor: default;
}

.cv-hero-page {
    opacity: .9;
}

/* --- About: tarjeta blanca centrada --- */
.about-profile {
    /* antes era una card "normal"; ahora centramos todo */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Foto: centrada dentro del card */
.profile-media {
    width: 260px;
    height: 260px;
    max-width: 100%;
    margin: 6px auto 18px;
    /* <- centrado */
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .08);
    background: #e9e9e9;
}

.profile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

/* Tipografía del bloque blanco */
.profile-text {
    margin-bottom: 18px;
    text-align: center;
}

.profile-name {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
    color: #0b0b0b
}

.profile-role {
    color: #333;
    opacity: .85
}

/* Botón principal (estilo correcto, consistente con la app) */
.btn-primary {
    --btn-bg: #111;
    --btn-bg-hover: #1b1b1b;
    --btn-border: rgba(0, 0, 0, .14);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(280px, 100%);
    /* ancho cómodo y centrado */
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
    transition: background .2s ease, transform .08s ease, box-shadow .2s ease;
    margin: 6px 0 16px;
    /* separaciones verticales */
}

.btn-primary:hover {
    background: var(--btn-bg-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .22);
}

.btn-primary:active {
    transform: translateY(0)
}

.btn-primary:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px
}

/* ===== CV/Breakdown – Botones simples (icono izquierda + texto derecha) ===== */
.cv-chooser {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Siempre 3 en desktop */
    gap: 18px;
    align-items: stretch;
}

.cv-pill {
    /* contenedor del botón */
    width: 100%;
    height: clamp(140px, 20vw, 220px);
    /* alto adaptable en desktop */
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(25, 25, 25, .75);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .26), inset 0 0 0 1px rgba(255, 255, 255, .03);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
    position: relative;
    overflow: hidden;
}

/* eliminamos cualquier overlay antiguo */
.cv-pill::after {
    content: none !important;
}

/* Icono PDF (usa --bg:url('...') que ya pones inline). Puedes cambiar el PNG/SVG. */
.cv-pill::before {
    content: "";
    flex: 0 0 clamp(42px, 6vw, 72px);
    aspect-ratio: 1;
    border-radius: 10px;
    background-image: var(--icon, var(--bg));
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

/* Texto a la derecha (anula el estilo anterior absoluto) */
.cv-pill-label {
    position: static !important;
    margin: 0;
    color: #fff;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    text-shadow: none;
    opacity: .95;
}

/* Hover/active */
.cv-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .2);
    background: rgba(30, 30, 30, .9);
}

.cv-pill:active {
    transform: translateY(0);
}

/* Accesibilidad */
.cv-pill:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ===== Móvil: 1 columna, 3 filas iguales que rellenan el alto visible ===== */
@media (max-width:880px) {
    #section-cv {
        min-height: calc(100svh - var(--header-h) - var(--main-pt));
        display: grid;
        grid-template-rows: auto 1fr;
        /* título + botones */
    }

    #section-cv .section-title {
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .cv-chooser {
        height: 100%;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, 1fr);
        /* 3 filas iguales */
        gap: 10px;
        align-content: stretch;
        justify-items: stretch;
    }

    .cv-pill {
        height: 100%;
        /* cada botón llena su fila */
        border-radius: 14px;
        padding: 16px;
        gap: 14px;
    }

    .cv-pill::before {
        flex: 0 0 clamp(40px, 9.5vh, 60px);
        /* icono más grande proporcional al alto */
    }

    .cv-pill-label {
        font-size: clamp(.95rem, 3.6vw, 1.15rem);
        letter-spacing: .14em;
    }
}


/* ===== Fade de secciones (0.25s) ===== */
.main-content>section {
    opacity: 1;
    transition: opacity .25s ease;
}

/* Estado temporal mientras se anima */
.main-content>section.is-appearing,
.main-content>section.is-hiding {
    opacity: 0;
}

/* ===== Transición de secciones secuencial (0.25s) ===== */
.main-content>section {
    opacity: 1;
    transition: opacity .25s ease;
}

/* Fade OUT (se mantiene visible hasta que acabe la animación) */
.main-content>section.is-hiding {
    opacity: 0;
}

/* Estado inicial del Fade IN (se muestra con opacity:0 y luego sube a 1) */
.main-content>section.is-showing {
    opacity: 0;
}

/* =========================
   CV buttons – Mobile list
   ========================= */
@media (max-width:880px) {

    /* La sección ocupa la altura útil, título arriba y lista debajo */
    #section-cv {
        min-height: calc(100svh - var(--header-h) - var(--main-pt));
        display: grid;
        grid-template-rows: auto 1fr;
    }

    #section-cv .section-title {
        margin-bottom: 10px;
        line-height: 1.2;
    }

    /* Lista vertical de botones, con buen espacio entre ellos */
    .cv-chooser {
        display: block;
        height: 100%;
        overflow: hidden;
        /* sin scroll de más */
        padding-bottom: 2px;
        /* micro respiro óptico */
    }

    /* Botón simple: icono a la izquierda que “encaja” a la altura del botón,
     texto a la derecha que escala con el alto */
    .cv-pill {
        width: 100%;
        min-height: clamp(64px, 14svh, 92px);
        margin: clamp(8px, 1.8svh, 12px) 0;
        padding: clamp(10px, 3svh, 16px) clamp(12px, 4svh, 18px);
        border-radius: 14px;
        border: 1px solid var(--line);
        background: rgba(25, 25, 25, .78);
        display: flex;
        align-items: stretch;
        /* el icono puede ocupar el alto total */
        gap: clamp(10px, 3svw, 16px);
        cursor: pointer;
        box-shadow: 0 6px 16px rgba(0, 0, 0, .26), inset 0 0 0 1px rgba(255, 255, 255, .03);
        transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
        touch-action: manipulation;
    }

    .cv-pill:active {
        transform: translateY(1px);
    }

    /* El icono: cuadrado, encaja a la altura interna del botón */
    .cv-pill::before {
        content: "";
        height: 100%;
        aspect-ratio: 1;
        background-image: var(--bg);
        /* sigues usando style="--bg:url('...')" */
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        /* respeta proporción del icono */
        border-radius: 10px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, .25);
    }

    /* Texto adaptativo y alineado verticalmente */
    .cv-pill-label {
        position: static !important;
        display: flex;
        align-items: center;
        color: #fff;
        font-weight: 900;
        letter-spacing: .12em;
        text-transform: uppercase;
        font-size: clamp(1rem, 4.2svw, 1.2rem);
        line-height: 1.1;
        opacity: .96;
    }
}

/* =========================
   CV buttons – Desktop wide
   (mantiene 3 columnas que cubren el ancho)
   ========================= */
@media (min-width:541px) {
    .cv-chooser {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        align-items: stretch;
    }

    .cv-pill {
        height: clamp(120px, 18vw, 200px);
        border-radius: 16px;
        padding: 16px 18px;
        display: flex;
        align-items: center;
        /* basta con centrar vertical en desktop */
        gap: 18px;
        border: 1px solid var(--line);
        background: rgba(25, 25, 25, .75);
        cursor: pointer;
        box-shadow: 0 6px 16px rgba(0, 0, 0, .26), inset 0 0 0 1px rgba(255, 255, 255, .03);
        transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
    }

    .cv-pill::before {
        content: "";
        flex: 0 0 clamp(42px, 6vw, 72px);
        aspect-ratio: 1;
        background-image: var(--bg);
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
    }

    .cv-pill-label {
        position: static !important;
        color: #fff;
        font-weight: 900;
        letter-spacing: .12em;
        text-transform: uppercase;
        font-size: clamp(1rem, 1.6vw, 1.25rem);
        line-height: 1.1;
    }

    .cv-pill:hover {
        transform: translateY(-2px);
        border-color: rgba(255, 255, 255, .2);
        background: rgba(30, 30, 30, .9);
        box-shadow: 0 14px 28px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 255, 255, .06);
    }

    .cv-pill:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 2px;
    }
}

/* ==================================
   Project cards – tipografía & hover
   ================================== */

/* Caja y hover más elegante */
.card {
    background: linear-gradient(180deg, rgba(25, 25, 25, .82) 0%, rgba(18, 18, 18, .86) 100%);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
    transition: transform .14s ease, box-shadow .22s ease, border-color .2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, .2);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .45);
}

/* Título black, más presencia */
.card-title {
    font-weight: 900;
    /* black */
    letter-spacing: .02em;
    font-size: clamp(1.05rem, 1.1rem + .2vw, 1.35rem);
    text-wrap: balance;
}

/* Subrayado sutil en hover del card */
.card:hover .card-title {
    text-shadow: 0 0 0 rgba(0, 0, 0, 0);
    /* placeholder para suavizar rendering */
}

.card-header {
    position: relative;
}

.card-header::after {
    content: "";
    position: absolute;
    left: var(--title-pad);
    right: var(--title-pad);
    bottom: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
    opacity: .6;
}

/* Labels en “small caps/uppercase” y valores en cursiva */
.info-list {
    padding-top: 12px;
}

.info-list li {
    font-style: italic;
    /* valores en cursiva */
    color: rgba(235, 235, 235, .9);
}

.info-list li strong {
    font-style: normal;
    /* label no cursiva */
    font-weight: 800;
    /* black-ish */
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    opacity: .9;
    margin-right: 6px;
}

/* “No video” mejor integrado */
.thumb.is-missing {
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .045) 0 10px, transparent 10px 20px),
        #0e0e0e;
    border: 1px dashed rgba(255, 255, 255, .22);
}

.missing-label {
    font-weight: 800;
    letter-spacing: .14em;
}

/* Play overlay un pelín más suave (consistente con el resto) */
.thumb .play-btn::before {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .05);
}

/* ---- Thumbs dentro de cards: llenar 16:9 y play arriba ---- */
.card .thumb {
    position: relative;
    aspect-ratio: 16/9;
    display: block;
    width: 100%;
    overflow: hidden
}

.card .thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1 !important;
    /* imagen debajo */
}

.card .thumb .play-btn {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    z-index: 2 !important;
    /* play por encima */
}

/* ---- Texto de la lista: sin cursiva, mismo layout ---- */
.card .info-list li {
    font-style: normal !important;
}

/* Distinción solo con peso/mayúsculas (sin cambiar márgenes) */
.card .info-list li strong {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .95;
}

/* Desactiva cualquier antiguo ::before */
#section-cv .cv-pill::before {
    content: none !important;
}

/* Layout del botón (oscuro, estilo About) */
#section-cv .cv-pill {
    display: grid;
    grid-template-columns: 64px 1fr 10px;
    align-items: center;
    gap: 14px;
    height: 88px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #0b0b0b 0%, #121212 100%);
    box-shadow: 0 10px 32px rgba(0, 0, 0, .35);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}

#section-cv .cv-pill:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .22);
    background: linear-gradient(180deg, #0e0e0e 0%, #151515 100%);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}

/* El icono se convierte en “cuadro blanco” */
#section-cv .cv-pill .cv-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    justify-self: start;
    display: block;
    padding: 10px;
    /* espacio interno para que el pictograma respire */
    background: linear-gradient(180deg, #f5f5f5 0%, #e9e9e9 100%);
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    object-fit: contain;
    /* centra y mantiene proporción del PNG/SVG */
}

/* Chevron sutil a la derecha */
#section-cv .cv-pill::after {
    content: "";
    justify-self: end;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255, 255, 255, .75);
    border-bottom: 2px solid rgba(255, 255, 255, .75);
    transform: rotate(-45deg);
    opacity: .9;
}

/* Etiqueta consistente con About */
#section-cv .cv-pill .cv-pill-label {
    position: static;
    margin: 0;
    color: #fff;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.15;
    opacity: .95;

    display: block;
    width: 100%;
    text-align: center;
}

/* Móvil */
@media (max-width:880px) {
    #section-cv .cv-pill {
        grid-template-columns: 56px 1fr 10px;
        height: 72px;
        padding: 12px 14px;
        border-radius: 16px;
    }

    #section-cv .cv-pill .cv-icon {
        width: 56px;
        height: 56px;
        border-radius: 12px;
        padding: 8px;
    }
}

/* Desktop only: centrar verticalmente el panel de botones del breakdown */
@media (min-width: 860px) {
    #section-cv {
        /* ocupa la altura útil bajo el header */
        min-height: calc(100vh - var(--header-h) - var(--main-pt));
        min-height: calc(100svh - var(--header-h) - var(--main-pt));
        /* mejor en móviles modernos */
        display: grid;
        grid-template-rows: auto 1fr;
        /* fila 1: título | fila 2: zona para centrar los botones */
    }

    #section-cv .cv-chooser {
        margin-top: 16rem;
        /* reparte el espacio libre arriba/abajo por igual */
    }
}

/* Asegura orden de capas y fade in/out del botón */
.card .thumb img {
    z-index: 1 !important;
    cursor: pointer;
    transition: filter .25s ease, transform .25s ease;
}

.card .thumb:hover img {
    filter: blur(2px) saturate(.95) brightness(.9);
    transform: scale(1.01);
}

.card .thumb .play-btn {
    z-index: 2 !important;
    /* por encima de la miniatura */
    opacity: 0;
    transform: scale(.98);
    transition: opacity .25s ease, transform .25s ease;
}

/* Dibuja el icono de play (círculo + triángulo) */
.card .thumb .play-btn::before {
    content: "";
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .05);
}

.card .thumb .play-btn::after {
    content: "";
    position: absolute;
    margin-left: 6px;
    border-style: solid;
    border-width: 14px 0 14px 22px;
    border-color: transparent transparent transparent #111;
}

/* Mostrar al hacer hover o con focus del teclado */
.card .thumb:hover .play-btn,
.card .thumb:focus-visible .play-btn {
    opacity: 1;
    transform: scale(1);
}