/* Tokens: fuente de verdad en DESIGN.md */
:root {
    --primary: #3DAEFF;
    --on-primary: #041320;
    --primary-hover: #6CC1FF;
    --space: #07090D;
    --surface: #0C1016;
    --surface-raised: #121822;
    --line: #1E2733;
    --line-strong: #2C3846;
    --ink: #EDF1F7;
    --ink-muted: #A3AEBD;
    --ink-faint: #7D8898;
    --status: #3DDC97;

    --font-display: 'Chakra Petch', 'IBM Plex Sans', sans-serif;
    --font-body: 'IBM Plex Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

    --radius-sm: 6px;
    --radius-md: 12px;

    --gutter: clamp(16px, 4vw, 40px);
    --section: clamp(88px, 11vw, 128px);
    --header-h: 72px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@property --corner {
    syntax: '<color>';
    inherits: true;
    initial-value: #2C3846;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    background: var(--space);
    color-scheme: dark;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    scrollbar-color: var(--line-strong) var(--space);
    -webkit-text-size-adjust: 100%;
}

body {
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    caret-color: var(--primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

::selection {
    background: rgba(61, 174, 255, 0.32);
    color: var(--ink);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

ul,
ol {
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transform: translateY(-160%);
}

.skip-link:focus-visible {
    transform: none;
}

#particle-field {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.container {
    width: min(1200px, 100% - 2 * var(--gutter));
    margin-inline: auto;
}

.icon {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Tipografía */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.25rem, 1.2rem + 4.4vw, 4.25rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2rem, 1.4rem + 2.2vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

p {
    text-wrap: pretty;
}

/* Botones y enlaces */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn-sm {
    min-height: 44px;
    padding: 10px 18px;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--space);
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-secondary:hover {
    background: var(--surface-raised);
    border-color: #3A4757;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(61, 174, 255, 0.35);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: text-decoration-color 180ms ease, color 180ms ease;
}

.text-link:hover {
    color: var(--primary-hover);
    text-decoration-color: currentColor;
}

.text-link .icon {
    width: 16px;
    height: 16px;
    transition: transform 220ms var(--ease-out);
}

.text-link:hover .icon {
    transform: translate(2px, -2px);
}

/* Header */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: var(--header-h);
    border-bottom: 1px solid transparent;
    transition: background-color 240ms ease, border-color 240ms ease;
}

.site-header.is-open {
    background: var(--space);
    border-bottom-color: var(--line);
}

.site-header.is-scrolled {
    background: rgba(7, 9, 13, 0.86);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--line);
}

.nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--ink);
}

.wordmark-mark {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linecap: round;
}

.wordmark-mark circle {
    fill: var(--ink);
    stroke: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--ink-muted);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 180ms ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    height: 1px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 280ms var(--ease-out);
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
    color: var(--ink);
}

.nav-links a[aria-current="true"]::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--ink);
    cursor: pointer;
}

.nav-toggle .icon {
    width: 20px;
    height: 20px;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
    display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

/* Marco HUD */
.frame {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    --corner: var(--line-strong);
    transition: --corner 260ms ease;
}

.frame > img {
    border-radius: var(--radius-md);
}

.frame-corners {
    position: absolute;
    inset: -8px;
    pointer-events: none;
    --c: var(--corner);
    background:
        linear-gradient(var(--c), var(--c)) top left / 14px 1px no-repeat,
        linear-gradient(var(--c), var(--c)) top left / 1px 14px no-repeat,
        linear-gradient(var(--c), var(--c)) top right / 14px 1px no-repeat,
        linear-gradient(var(--c), var(--c)) top right / 1px 14px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom left / 14px 1px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom left / 1px 14px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom right / 14px 1px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom right / 1px 14px no-repeat;
}

.frame-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--ink-faint);
}

.frame-bar span:last-child {
    text-align: right;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 28px;
    grid-template-rows: auto auto auto 1fr;
    align-items: start;
    align-content: end;
    min-height: min(100svh, 980px);
    padding-top: calc(var(--header-h) + clamp(48px, 8vw, 104px));
    padding-bottom: clamp(56px, 8vw, 96px);
}

.hero-copy {
    display: contents;
}

.hero h1 {
    grid-column: 1 / span 11;
    max-width: 17ch;
    margin-bottom: 28px;
}

.hero-lead,
.hero-actions,
.status {
    grid-column: 1 / span 5;
}

.hero-lead {
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
    line-height: 1.6;
    color: var(--ink-muted);
    max-width: 44ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: end;
    padding-bottom: 14px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--ink-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--status);
}

.hero-media {
    grid-column: 6 / span 7;
    grid-row: 2 / span 3;
    align-self: end;
}

/* Momento de entrada: el encuadre se abre y la captura se revela */
@media (prefers-reduced-motion: no-preference) {
    .hero-media[data-reveal] .frame-corners {
        animation: corners-in 1100ms var(--ease-out) 200ms both;
    }

    .hero-media[data-reveal] .slides {
        animation: scan-in 1200ms var(--ease-out) 350ms both;
    }

    .hero-media[data-reveal] .frame-bar {
        animation: fade-in 600ms ease 900ms both;
    }
}

@keyframes corners-in {
    from {
        inset: 34% 30%;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    to {
        inset: -8px;
        opacity: 1;
    }
}

@keyframes scan-in {
    from {
        clip-path: inset(0 0 100% 0);
        filter: brightness(1.8) saturate(0.4);
    }
    to {
        clip-path: inset(0 0 0 0);
        filter: none;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Secciones */
.section {
    padding-block: var(--section);
    border-top: 1px solid var(--line);
}

.section-head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 16px;
    align-items: end;
    margin-bottom: clamp(48px, 6vw, 72px);
}

.section-head h2 {
    grid-column: 1 / span 6;
}

.section-head p {
    grid-column: 8 / span 5;
    color: var(--ink-muted);
    max-width: 46ch;
}

/* Proyectos */
.project {
    display: grid;
    gap: 28px;
    align-content: start;
}

.project:hover .frame {
    --corner: var(--primary);
}

.project-media > img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top center;
}

.project-featured {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: start;
    margin-bottom: clamp(72px, 9vw, 112px);
}

.project-featured .project-media {
    grid-column: 1 / span 7;
    position: sticky;
    top: calc(var(--header-h) + 32px);
}

.project-featured .project-body {
    grid-column: 9 / span 4;
}

.project-reverse .project-media {
    grid-column: 6 / span 7;
    grid-row: 1;
}

.project-reverse .project-body {
    grid-column: 1 / span 4;
    grid-row: 1;
}

.project-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-body > p {
    color: var(--ink-muted);
    max-width: 60ch;
}

.project-body .project-meta {
    margin: 6px 0 16px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--ink-faint);
}

.feature-list {
    display: grid;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    width: 100%;
}

.feature-list li {
    position: relative;
    padding-left: 22px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ink);
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 10px;
    height: 1px;
    background: var(--primary);
}

.stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
}

.stack li {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--ink-muted);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    column-gap: 28px;
    margin-top: 16px;
}

.project-note {
    font-size: 0.875rem;
    color: var(--ink-faint);
}

.project-pair .project-media > img:not(.duo-phone) {
    object-position: left top;
}

.project-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 24px;
}

.frame-duo {
    margin-bottom: 28px;
}

.frame-duo > img.duo-phone {
    position: absolute;
    right: 5%;
    bottom: -28px;
    width: 20%;
    aspect-ratio: 390 / 844;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
}

/* Carrusel del hero: los proyectos se apilan y se turnan */
.slides {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.showcase {
    min-width: 0;
}

.slide {
    grid-area: 1 / 1;
    position: relative;
    visibility: hidden;
    opacity: 0;
    transition: opacity 500ms ease, visibility 0s linear 500ms;
}

.slide.is-active {
    visibility: visible;
    opacity: 1;
    transition: opacity 500ms ease, visibility 0s;
}

.slide > img:first-child {
    width: 100%;
    aspect-ratio: 1600 / 1000;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.slide > img.duo-phone {
    position: absolute;
    top: 16%;
    right: 6%;
    width: 21%;
    aspect-ratio: 390 / 844;
    object-fit: cover;
    object-position: top center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
}

@media (prefers-reduced-motion: no-preference) {
    .slide.is-active > img:first-child {
        animation: scan-in 900ms var(--ease-out) both;
    }

    .slide.is-active > img.duo-phone {
        animation: phone-in 700ms var(--ease-out) 150ms both;
    }
}

@keyframes phone-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.showcase-bar {
    align-items: center;
    padding-block: 4px;
}

.showcase-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    text-decoration: none;
    color: var(--ink-faint);
}

.showcase-title {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.3;
}

.showcase-url {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.showcase-name:hover .showcase-title {
    color: var(--primary);
}

.showcase-controls {
    display: flex;
    align-items: center;
    flex: none;
}

.showcase-dots {
    display: flex;
}

.showcase-dot {
    display: grid;
    place-items: center;
    width: 36px;
    height: 44px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}

.showcase-dot span {
    position: relative;
    display: block;
    width: 8px;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--line-strong);
    transition: width 300ms var(--ease-out), background-color 200ms ease;
}

.showcase-dot:hover span {
    background: #3A4757;
}

.showcase-dot[aria-current="true"] span {
    width: 24px;
}

/* La barrita activa se llena mientras corre el tiempo de cada proyecto */
.showcase-dot[aria-current="true"] span::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    transform-origin: left;
    transform: scaleX(1);
}

.showcase.is-playing .showcase-dot[aria-current="true"] span::after {
    animation: dot-progress var(--slide-ms, 6000ms) linear both;
}

.showcase.is-held .showcase-dot[aria-current="true"] span::after {
    animation-play-state: paused;
}

@keyframes dot-progress {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.showcase-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: 4px;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink-muted);
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease;
}

.showcase-toggle:hover {
    color: var(--ink);
    border-color: var(--line-strong);
}

.showcase-toggle .icon-play,
.showcase.is-stopped .showcase-toggle .icon-pause {
    display: none;
}

.showcase.is-stopped .showcase-toggle .icon-play {
    display: block;
}

/* Galería de pantallas de celular */
.phones {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 24px);
    padding: clamp(16px, 3vw, 32px);
}

.phones li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.phones img {
    width: 100%;
    aspect-ratio: 585 / 1266;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
}

.phones span {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--ink-faint);
}

/* Servicios */
.services {
    border-top: 1px solid var(--line);
}

.service {
    display: grid;
    grid-template-columns: 48px minmax(0, 4fr) minmax(0, 7fr);
    column-gap: 24px;
    row-gap: 4px;
    align-items: start;
    padding-block: 32px;
    border-bottom: 1px solid var(--line);
}

.service-icon {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--primary);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-top: 2px;
}

.service h3 {
    grid-column: 2;
}

.service p {
    grid-column: 3;
    color: var(--ink-muted);
    max-width: 58ch;
}

.service .text-link {
    grid-column: 3;
    justify-self: start;
}

/* Sobre mí */
.about {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 56px;
    align-items: start;
}

.about-photo {
    grid-column: 1 / span 4;
    grid-row: 1 / span 2;
    position: sticky;
    top: calc(var(--header-h) + 32px);
}

.about-photo img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    filter: saturate(0.9);
}

.about-copy,
.skills {
    grid-column: 6 / span 7;
}

.about-copy h2 {
    margin-bottom: 28px;
}

.about-copy p {
    color: var(--ink-muted);
    max-width: 62ch;
}

.about-copy p + p {
    margin-top: 16px;
}

.record {
    margin-top: 40px;
    border-top: 1px solid var(--line);
}

.record > div,
.skill-groups > div {
    display: grid;
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 4px 24px;
    padding-block: 18px;
    border-bottom: 1px solid var(--line);
}

.record dt,
.skill-groups dt {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--ink-faint);
    padding-top: 2px;
}

.record dd {
    color: var(--ink-muted);
}

.record dd strong {
    display: block;
    color: var(--ink);
    font-weight: 500;
}

.skills h3 {
    margin-bottom: 20px;
}

.skill-groups {
    border-top: 1px solid var(--line);
}

.skill-groups dd {
    color: var(--ink);
}

/* Contacto */
.contact h2 {
    font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
    max-width: 16ch;
}

.contact-lead {
    margin-top: 20px;
    color: var(--ink-muted);
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
    max-width: 48ch;
}

.contact-mail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 48px;
    padding-block: 24px;
    border-block: 1px solid var(--line);
}

.mail-link {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 0.9rem + 2.4vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 8px;
    overflow-wrap: anywhere;
    transition: color 180ms ease, text-decoration-color 180ms ease;
}

.mail-link:hover {
    color: var(--primary);
    text-decoration-color: currentColor;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--ink-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.copy-btn:hover {
    color: var(--ink);
    background: var(--surface-raised);
}

.copy-btn .icon-check,
.copy-btn.is-copied .icon-copy {
    display: none;
}

.copy-btn.is-copied .icon-check {
    display: block;
}

.copy-btn.is-copied {
    color: var(--status);
    border-color: rgba(61, 220, 151, 0.4);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.contact-links a:hover {
    background: var(--surface-raised);
    border-color: #3A4757;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--space);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 20px;
    font-size: 0.875rem;
    color: var(--ink-faint);
}

.footer-inner .text-link {
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-lead,
    .hero-actions,
    .status {
        grid-column: 1 / span 6;
    }

    .hero-media {
        grid-column: 7 / span 6;
    }

    .project-featured .project-media {
        grid-column: 1 / span 7;
    }

    .project-featured .project-body {
        grid-column: 8 / span 5;
    }

    .project-reverse .project-media {
        grid-column: 6 / span 7;
    }

    .project-reverse .project-body {
        grid-column: 1 / span 5;
    }
}

@media (max-width: 860px) {
    :root {
        --header-h: 64px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-menu {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 8px var(--gutter) 24px;
        background: var(--space);
        max-height: calc(100svh - var(--header-h));
        overflow-y: auto;
        border-bottom: 1px solid var(--line);
    }

    .site-header.is-open .nav-menu {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
    }

    .nav-links a {
        display: flex;
        min-height: 52px;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--line);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-menu .btn {
        width: 100%;
    }

    .hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 28px;
        min-height: 0;
    }

    .hero-copy {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .status {
        padding-bottom: 0;
    }

    .hero h1 {
        margin-bottom: 0;
    }

    .hero-media {
        align-self: stretch;
        margin-top: 16px;
    }

    .section-head {
        display: block;
    }

    .section-head p {
        margin-top: 16px;
    }

    .project-featured,
    .project-pair {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .project-pair {
        gap: 72px;
    }

    .project-featured .project-media,
    .project-featured .project-body {
        grid-row: auto;
        grid-column: auto;
        position: relative;
        top: auto;
    }

    .service {
        grid-template-columns: 40px minmax(0, 1fr);
        padding-block: 28px;
    }

    .service h3,
    .service p,
    .service .text-link {
        grid-column: 2;
    }

    .service p {
        margin-top: 6px;
    }

    .about {
        display: flex;
        flex-direction: column;
        gap: 48px;
    }

    .about-photo {
        position: relative;
        top: auto;
        width: min(280px, 72%);
    }
}

@media (max-width: 520px) {
    .frame-bar.showcase-bar {
        flex-direction: row;
        gap: 8px;
    }

    .showcase-dot {
        width: 30px;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
    }

    .phones {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 58%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
    }

    .phones li {
        scroll-snap-align: start;
    }

    .frame-bar {
        flex-direction: column;
        gap: 2px;
    }

    .frame-bar span:last-child {
        text-align: left;
    }

    .record > div,
    .skill-groups > div {
        grid-template-columns: minmax(0, 1fr);
    }

    .frame-duo > img.duo-phone {
        width: 24%;
        bottom: -20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* Banda de tecnologías: los logos cruzan de un lado al otro sin cortes */
.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.tech-band {
    position: relative;
    overflow: hidden;
    padding-block: 28px;
    border-top: 1px solid var(--line);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.tech-track {
    display: flex;
    width: max-content;
}

.tech-list {
    display: flex;
    align-items: center;
    gap: 48px;
    padding-right: 48px;
}

.tech-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    color: var(--ink-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 180ms ease;
}

.tech-list li:hover {
    color: var(--ink);
}

.tech-logo {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

@media (prefers-reduced-motion: no-preference) {
    .tech-track {
        animation: tech-scroll 45s linear infinite;
    }

    .tech-band:hover .tech-track {
        animation-play-state: paused;
    }
}

@keyframes tech-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Sin animación: la lista se acomoda en varias líneas y se ve entera */
@media (prefers-reduced-motion: reduce) {
    .tech-band {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .tech-track {
        width: min(1200px, 100% - 2 * var(--gutter));
        margin-inline: auto;
    }

    .tech-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 32px;
        padding-right: 0;
    }

    .tech-list[aria-hidden="true"] {
        display: none;
    }
}

@media (max-width: 520px) {
    .tech-band {
        padding-block: 20px;
    }

    .tech-list {
        gap: 32px;
        padding-right: 32px;
    }
}
