:root {
    --paper: #f7f4ee;
    --panel: #ffffff;
    --ink: #17202a;
    --muted: #5e6875;
    --line: #d9ddd5;
    --accent: #275ca8;
    --accent-rgb: 39 92 168;
    --accent-strong: #cf3f49;
    --sun: #f4b942;
    --shadow: 0 22px 60px rgb(23 32 42 / 0.12);
    --header-height: 76px;
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(90deg, rgb(23 32 42 / 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgb(23 32 42 / 0.035) 1px, transparent 1px),
        linear-gradient(135deg, #fbfaf6 0%, var(--paper) 42%, #eef4f1 100%);
    background-size: 72px 72px, 72px 72px, auto;
    color: var(--ink);
    line-height: 1.55;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(120deg, rgb(var(--accent-rgb) / 0.14), transparent 34%),
        linear-gradient(300deg, rgb(244 185 66 / 0.16), transparent 38%);
    content: "";
    pointer-events: none;
}

body[data-locale="es"] {
    --accent: #0f7f70;
    --accent-rgb: 15 127 112;
    --accent-strong: #e0523f;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    min-height: var(--header-height);
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px 32px;
    border-bottom: 1px solid rgb(23 32 42 / 0.1);
    background: rgb(247 244 238 / 0.86);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgb(var(--accent-rgb) / 0.35);
    border-radius: 8px;
    background: var(--ink);
    color: var(--paper);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.site-nav a {
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: rgb(var(--accent-rgb) / 0.1);
    color: var(--ink);
    outline: none;
}

.language-switcher {
    display: grid;
    grid-template-columns: repeat(2, 42px);
    gap: 4px;
}

.language-button {
    display: grid;
    width: 42px;
    height: 38px;
    place-items: center;
    border: 1px solid rgb(23 32 42 / 0.14);
    border-radius: 8px;
    background: rgb(255 255 255 / 0.68);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
}

.language-button:hover,
.language-button:focus-visible,
.language-button[aria-pressed="true"] {
    border-color: rgb(var(--accent-rgb) / 0.42);
    background: var(--accent);
    color: #ffffff;
    outline: none;
}

main {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.hero {
    display: grid;
    min-height: 76svh;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
    gap: 56px;
    align-items: center;
    padding: 58px 0 46px;
}

.eyebrow,
.overline {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 820px;
    margin-bottom: 22px;
    font-size: 4.35rem;
    line-height: 0.98;
}

h1 span {
    display: block;
}

h1 span:last-child {
    max-width: 760px;
    margin-top: 12px;
    color: var(--accent-strong);
    font-size: 2.45rem;
    line-height: 1.08;
}

h2 {
    margin-bottom: 14px;
    font-size: 2.2rem;
    line-height: 1.08;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.hero-summary,
.section-heading p,
.feature-card p,
.timeline-item p,
.about-card p,
.skill-group li,
.contact-panel p,
.site-footer {
    color: var(--muted);
}

.hero-summary {
    max-width: 680px;
    margin-bottom: 28px;
    font-size: 1.12rem;
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 850;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
    outline: none;
    transform: translateY(-2px);
}

.button-primary {
    background: var(--ink);
    color: #ffffff;
}

.button-primary:hover,
.button-primary:focus-visible {
    background: var(--accent);
}

.button-secondary {
    border-color: rgb(23 32 42 / 0.14);
    background: rgb(255 255 255 / 0.7);
    color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    border-color: rgb(var(--accent-rgb) / 0.36);
    background: rgb(var(--accent-rgb) / 0.1);
}

.button-icon {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.16);
}

.signal-grid {
    display: grid;
    max-width: 700px;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 34px;
}

.signal-grid div {
    min-height: 96px;
    padding: 16px;
    border: 1px solid rgb(23 32 42 / 0.1);
    border-radius: 8px;
    background: rgb(255 255 255 / 0.62);
}

.signal-grid strong,
.signal-grid span {
    display: block;
}

.signal-grid strong {
    margin-bottom: 6px;
    font-size: 1.03rem;
}

.signal-grid span {
    color: var(--muted);
    font-size: 0.9rem;
}

.profile-stage {
    justify-self: end;
    width: fit-content;
    max-width: 100%;
}

.portrait-frame {
    position: relative;
    display: block;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid rgb(23 32 42 / 0.12);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
    line-height: 0;
}

.portrait-frame img {
    display: block;
    max-width: 100%;
    height: auto;
}

.profile-caption {
    width: 100%;
    margin-top: 16px;
    padding: 18px;
    border: 1px solid rgb(23 32 42 / 0.1);
    border-left: 5px solid var(--accent);
    border-radius: 8px;
    background: rgb(255 255 255 / 0.78);
}

.profile-caption p {
    margin-bottom: 0;
}

.profile-language {
    color: var(--ink);
    font-weight: 900;
}

.content-section {
    padding: 54px 0 74px;
    border-top: 1px solid rgb(23 32 42 / 0.1);
}

.section-heading {
    display: grid;
    grid-template-columns: 0.34fr 1fr;
    gap: 36px;
    align-items: start;
    margin-bottom: 26px;
}

.section-heading p:last-child {
    max-width: 740px;
    margin-bottom: 0;
    font-size: 1.03rem;
}

.intro-grid,
.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-card,
.timeline-item,
.about-card,
.skill-group,
.contact-panel {
    border: 1px solid rgb(23 32 42 / 0.11);
    border-radius: 8px;
    background: rgb(255 255 255 / 0.76);
    box-shadow: 0 10px 34px rgb(23 32 42 / 0.07);
}

.feature-card {
    min-height: 220px;
    padding: 22px;
}

.feature-card::before {
    display: block;
    width: 56px;
    height: 5px;
    margin-bottom: 34px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong), var(--sun));
    content: "";
}

.feature-index {
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 900;
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: start;
    padding: 22px;
}

.about-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: start;
    padding: 22px;
}

.about-card p:last-child {
    margin-bottom: 0;
}

.timeline-date {
    margin-bottom: 0;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.timeline-item p:last-child {
    margin-bottom: 0;
}

.timeline-company {
    margin-bottom: 10px;
    color: var(--ink);
    font-weight: 800;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.tag-list li {
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid rgb(var(--accent-rgb) / 0.16);
    border-radius: 8px;
    background: rgb(var(--accent-rgb) / 0.08);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.skill-group {
    padding: 22px;
}

.skill-group ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.skill-group li {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgb(var(--accent-rgb) / 0.16);
    border-radius: 8px;
    background: rgb(var(--accent-rgb) / 0.08);
    font-size: 0.9rem;
    font-weight: 750;
}

.contact-section {
    padding-bottom: 92px;
}

.contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: end;
    padding: 30px;
    background:
        linear-gradient(120deg, rgb(var(--accent-rgb) / 0.12), transparent 38%),
        rgb(255 255 255 / 0.83);
}

.contact-panel .overline,
.contact-panel h2,
.contact-panel p {
    grid-column: 1 / 2;
}

.contact-panel p {
    max-width: 700px;
    margin-bottom: 0;
}

.contact-actions {
    grid-column: 2 / 3;
    grid-row: 1 / 4;
    justify-content: flex-end;
}

.site-footer {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    padding: 26px 0 38px;
    border-top: 1px solid rgb(23 32 42 / 0.1);
    font-size: 0.92rem;
}

.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: 1fr;
        justify-items: start;
        padding: 14px 20px;
    }

    .site-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .language-switcher {
        grid-template-columns: repeat(2, 40px);
    }

    .language-button {
        width: 40px;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 34px;
        padding-top: 42px;
    }

    h1 {
        font-size: 3.25rem;
    }

    h1 span:last-child {
        font-size: 1.9rem;
    }

    .profile-stage {
        width: fit-content;
        max-width: 100%;
        justify-self: start;
    }

    .section-heading,
    .contact-panel {
        grid-template-columns: 1fr;
    }

    .contact-actions {
        grid-column: auto;
        grid-row: auto;
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    main,
    .site-footer {
        width: min(100% - 28px, 1160px);
    }

    .site-header {
        min-height: auto;
    }

    .site-nav a {
        padding-inline: 10px;
        white-space: nowrap;
    }

    .hero {
        padding: 34px 0 36px;
    }

    h1 {
        font-size: 2.62rem;
    }

    h1 span:last-child {
        font-size: 1.46rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-summary {
        font-size: 1rem;
    }

    .signal-grid,
    .intro-grid,
    .skill-grid {
        grid-template-columns: 1fr;
    }

    .signal-grid div {
        min-height: 82px;
    }

    .timeline-item,
    .about-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .button {
        width: 100%;
    }

    .contact-panel {
        padding: 22px;
    }
}

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

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

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