:root {
    --bg: #fbfbf8;
    --card: #f1f1ed;
    --card-hover: #eaeae4;
    --panel: #ffffff;
    --ink: #111111;
    --muted: #7c7c74;
    --line: #e5e5df;
    --frame: #f2ed4a;
    --pink: #ff5fc4;
    --yellow: #f2ed4a;
    --peach: #ffc48a;
    --r: 22px;
    --r-sm: 14px;
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #121211;
    --card: #1d1d1b;
    --card-hover: #242422;
    --panel: #2a2a27;
    --ink: #f6f6f2;
    --muted: #9b9b93;
    --line: #2e2e2b;
    --frame: #2a2a27;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.frame {
    position: fixed;
    inset: 0;
    border: 9px solid var(--frame);
    pointer-events: none;
    z-index: 60;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.08;
}

p {
    margin: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wrap {
    width: min(1180px, calc(100% - 4rem));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: var(--bg);
    padding: .75rem 1.25rem;
    border-radius: 0 0 12px 0;
    z-index: 100;
}

.skip-link:focus {
    left: 0;
}

/* Navegación */
.nav {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    translate: -50% 0;
    z-index: 55;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem;
    border-radius: 100px;
    background: var(--panel);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .07);
}

.nav-brand {
    padding: .4rem .8rem;
    font-weight: 800;
    font-size: .95rem;
    letter-spacing: -.03em;
}

.nav-links {
    display: flex;
    gap: .15rem;
}

.nav-links a {
    display: block;
    padding: .45rem .85rem;
    border-radius: 100px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--muted);
    transition: color .18s, background-color .18s;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--ink);
    background: var(--card);
}

.nav-tools {
    display: flex;
    gap: .2rem;
    padding-left: .3rem;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    transition: color .18s, background-color .18s;
}

.icon-btn:hover {
    color: var(--ink);
    background: var(--yellow);
}

[data-theme="dark"] .icon-btn:hover {
    background: var(--panel);
}

.icon-btn svg {
    width: 17px;
    height: 17px;
}

/* Secciones */
main {
    padding: 8.5rem 0 4rem;
}

.section {
    margin-bottom: 3.5rem;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.25rem;
    padding-inline: .35rem;
}

.eyebrow {
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: .35rem;
}

.section-title {
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
}

.section-note {
    max-width: 40ch;
    color: var(--muted);
    font-size: .9rem;
}

.section-note a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Grilla bento */
.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: .85rem;
}

.card {
    grid-column: span 12;
    padding: 1.5rem;
    border-radius: var(--r);
    background: var(--card);
    transition: background-color .2s;
}

.card-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
}

.card-label span {
    font-weight: 500;
    opacity: .7;
}

/* Presentación */
.card-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: 2.2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    align-self: flex-start;
    padding: .35rem .85rem;
    border-radius: 100px;
    background: var(--yellow);
    color: #111;
    font-size: .8rem;
    font-weight: 600;
}

.badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #111;
}

.hero-name {
    font-size: clamp(2.3rem, 5.6vw, 3.7rem);
    letter-spacing: -.045em;
}

.hero-name em {
    font-style: normal;
    background: var(--pink);
    color: #fff;
    padding: 0 .25rem;
    border-radius: 10px;
}

.hero-role {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 600;
    color: var(--muted);
}

.hero-text {
    max-width: 54ch;
    color: var(--muted);
    font-size: .96rem;
}

.hero-text strong {
    color: var(--ink);
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: .3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.25rem;
    border-radius: 100px;
    font-size: .9rem;
    font-weight: 700;
    transition: background-color .18s, color .18s;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--ink);
    color: var(--bg);
}

.btn-primary:hover {
    background: var(--pink);
    color: #fff;
}

.btn-ghost {
    background: var(--panel);
    color: var(--ink);
}

.btn-ghost:hover {
    background: var(--yellow);
    color: #111;
}

/* Foto */
.card-photo {
    position: relative;
    min-height: 240px;
    padding: 0;
    overflow: hidden;
}

.photo-frame {
    position: absolute;
    inset: 0;
    background: var(--pink);
}

.photo-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

.photo-frame .shot-b {
    opacity: 0;
}

.card-photo:hover .shot-a {
    opacity: 0;
}

.card-photo:hover .shot-b {
    opacity: 1;
}

.photo-caption {
    position: absolute;
    left: .8rem;
    right: .8rem;
    bottom: .8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem .9rem;
    border-radius: var(--r-sm);
    background: var(--panel);
    font-size: .82rem;
    font-weight: 600;
}

/* Datos */
.card-stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -.05em;
    line-height: 1;
}

.stat-label {
    margin-top: .45rem;
    font-size: .88rem;
    color: var(--muted);
}

.stat-meta {
    margin-top: auto;
    padding-top: 1rem;
    font-size: .8rem;
    color: var(--muted);
}

.card-accent {
    background: var(--pink);
    color: #fff;
}

.card-accent .stat-label,
.card-accent .stat-meta {
    color: rgba(255, 255, 255, .85);
}

.card-accent .card-icon {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.card-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 1rem;
    border-radius: 11px;
    background: var(--panel);
    color: var(--ink);
}

.card-icon svg {
    width: 18px;
    height: 18px;
}

/* Ubicación */
.card-location .job-name {
    font-size: 1.15rem;
}

/* Trayectoria */
.job-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .9rem;
}

.job-logo {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 6px;
    border-radius: 12px;
    background: var(--panel);
}

.job-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.job-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.job-type {
    font-size: .82rem;
    color: var(--muted);
}

.job-head a {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-left: auto;
    border-radius: 10px;
    background: var(--panel);
    color: var(--muted);
    transition: background-color .18s, color .18s;
}

.job-head a:hover {
    background: var(--yellow);
    color: #111;
}

.job-head svg {
    width: 15px;
    height: 15px;
}

.job-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .9rem;
    padding: .25rem .7rem;
    border-radius: 100px;
    background: var(--panel);
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
}

.job-status.is-current {
    background: var(--yellow);
    color: #111;
}

.job-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.roles {
    display: grid;
    gap: .55rem;
}

.roles li {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .9rem;
}

.role-name {
    display: flex;
    flex-direction: column;
    font-weight: 700;
}

.role-name em {
    font-style: normal;
    font-size: .78rem;
    font-weight: 500;
    color: var(--muted);
}

.roles time {
    margin-left: auto;
    padding-top: .1rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.job-card.is-current {
    background: var(--panel);
}

.job-card.is-current .job-logo,
.job-card.is-current .job-head a,
.job-card.is-current .job-status:not(.is-current) {
    background: var(--card);
}

.job-card.is-current:hover {
    background: var(--panel);
}

.job-card:not(.is-current) .job-logo img {
    opacity: .75;
}

/* Skills */
.skill-top {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    margin-bottom: 1.2rem;
}

.skill-top .card-icon {
    margin-bottom: 0;
}

.skill-card h3 {
    font-size: 1.15rem;
}

.skill-note {
    margin-top: .25rem;
    font-size: .86rem;
    color: var(--muted);
}

.skill-badge {
    margin-left: auto;
    padding: .25rem .7rem;
    border-radius: 100px;
    background: var(--panel);
    font-size: .74rem;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}

.skill-set + .skill-set {
    margin-top: 1rem;
}

.skill-set-title {
    margin-bottom: .5rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.chips li {
    padding: .4rem .85rem;
    border-radius: 100px;
    background: var(--panel);
    font-size: .85rem;
    font-weight: 600;
}

.chips li.is-key {
    background: var(--ink);
    color: var(--bg);
}

/* Contacto */
.card-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    padding: 2.2rem;
    background: var(--yellow);
    color: #111;
}

.card-contact .eyebrow,
.card-contact p {
    color: rgba(17, 17, 17, .7);
}

.card-contact h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    margin-bottom: .5rem;
}

.card-contact .btn-primary {
    background: #111;
    color: var(--yellow);
}

.card-contact .btn-primary:hover {
    background: var(--pink);
    color: #fff;
}

.socials {
    display: flex;
    gap: .5rem;
}

.socials a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(17, 17, 17, .08);
    color: #111;
    transition: background-color .18s, color .18s;
}

.socials a:hover {
    background: #111;
    color: var(--yellow);
}

.socials svg {
    width: 19px;
    height: 19px;
}

/* Pie */
.footer {
    padding: 1.5rem 0 3rem;
    color: var(--muted);
    font-size: .84rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-inline: .35rem;
}

.footer a {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer a:hover {
    color: var(--ink);
}

/* Error page */
.error-main {
    display: grid;
    min-height: calc(100vh - 88px);
    padding: 3rem 0;
    place-items: center;
}

.error-card {
    max-width: 700px;
    margin-inline: auto;
    text-align: center;
}

.error-card .hero-actions {
    justify-content: center;
}

.error-code {
    color: var(--pink);
    font-size: clamp(3.5rem, 12vw, 6rem);
    font-weight: 800;
    letter-spacing: -.06em;
    line-height: 1;
}

/* Entrada */
.reveal {
    opacity: 0;
    translate: 0 14px;
    transition: opacity .5s ease, translate .5s ease;
    transition-delay: var(--d, 0ms);
}

.reveal.in {
    opacity: 1;
    translate: 0 0;
}

:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Escritorio */
@media (min-width: 780px) {
    .card:not(.card-photo):not(.card-accent):not(.card-contact):hover {
        background: var(--card-hover);
    }

    .card-intro {
        grid-column: span 8;
        grid-row: span 2;
    }

    .card-photo {
        grid-column: span 4;
        grid-row: span 2;
    }

    .card-location,
    .card-stat {
        grid-column: span 3;
    }

    .job-card {
        grid-column: span 6;
    }

    .job-card-wide {
        grid-column: span 12;
    }

    .skill-card {
        grid-column: span 6;
    }

    .skill-card-lead {
        grid-column: span 6;
        grid-row: span 2;
    }

    .skill-card-wide {
        grid-column: span 12;
    }
}

@media (max-width: 779px) {
    .wrap {
        width: calc(100% - 2.5rem);
    }

    .nav {
        top: 1rem;
        width: calc(100% - 2.5rem);
        justify-content: space-between;
        border-radius: 18px;
    }

    .nav-links {
        display: none;
    }

    main {
        padding-top: 7rem;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: .7rem;
    }

    .card-intro,
    .card-contact {
        padding: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .reveal {
        opacity: 1;
        translate: none;
    }
}
