/* ============================================================
   Portfolio — Rolando Vásquez
   Dirección «Dossier técnico»: tema oscuro, Geist + Geist Mono,
   un solo acento ámbar. Tokens, componentes, responsive, a11y.
   Especificación: specs/design.md
   ============================================================ */

:root {
    --font-sans: 'Geist', 'Inter', -apple-system, 'BlinkMacSystemFont', 'Segoe UI', sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', 'Consolas', monospace;

    /* Superficies */
    --bg: #0c0d0f;
    --bg-raised: #121417;
    --bg-card: #0f1013;
    --bg-core: #16130d;

    /* Bordes */
    --line: #23262b;
    --line-strong: #3a3e45;
    --grid: #15171b;

    /* Texto (contraste sobre --bg en specs/design.md §2) */
    --text: #ecedee;
    --text-soft: #c4c8cd;
    --text-muted: #9ba1a8;
    --text-faint: #8a9098;

    /* Acento */
    --accent: #f0b450;
    --accent-hover: #f5c77a;
    --accent-ring: rgb(240 180 80 / 0.16);

    /* Métricas */
    --content-w: 1200px;
    --gutter: clamp(16px, 4vw, 48px);
    --section-y: clamp(64px, 8vw, 112px);
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

/* ============================================================
   Reset y base
   ============================================================ */

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

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizelegibility;
}

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

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

a {
    color: var(--text);
    text-underline-offset: 0.2em;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--text-soft);
    white-space: nowrap;
}

strong {
    font-weight: 600;
    color: var(--text);
}

.icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: currentcolor;
}

/* ============================================================
   Utilidades
   ============================================================ */

.container {
    width: 100%;
    max-width: calc(var(--content-w) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.mono {
    font-family: var(--font-mono);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--gutter);
    z-index: 200;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 12px;
    color: var(--bg);
}

/* Las animaciones de entrada solo ocultan si hay JS para revelarlas. */
.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
    transition-delay: calc(var(--i, 0) * 60ms);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ============================================================
   Botones y enlaces
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-decoration: none;
    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.btn--primary {
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
}

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

.btn--ghost {
    border-color: var(--line-strong);
    color: var(--text);
}

.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--text);
}

.btn--lg {
    min-height: 52px;
    padding: 0 24px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 8px;
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
}

/* ============================================================
   Cabecera
   ============================================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgb(12 13 15 / 0.85);
    backdrop-filter: blur(10px);
    transition: background var(--transition);
}

.header[data-scroll-state='scrolled'] {
    background: rgb(12 13 15 / 0.96);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 64px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.logo__mark {
    padding: 3px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.nav {
    display: none;
    margin-left: auto;
}

.nav__list {
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.nav__link {
    color: var(--text-muted);
    text-decoration: none;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12px;
    text-decoration: none;
}

.menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.menu-toggle__label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.menu-toggle__bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}

.menu-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
}

@media (width >= 860px) {
    .nav {
        display: block;
    }

    .menu-toggle {
        display: none;
    }
}

/* ============================================================
   Menú a pantalla completa (celular)
   ============================================================ */

.menu {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    flex-direction: column;

    /* "safe" evita que, si el contenido no cabe, el centrado empuje las
       primeras entradas fuera del área scrolleable y queden inalcanzables. */
    justify-content: safe center;
    padding: 96px var(--gutter) 48px;
    background: var(--bg);
    overflow-y: auto;
}

.menu[hidden] {
    display: none;
}

.menu__close {
    position: absolute;
    top: 12px;
    right: var(--gutter);
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.menu__close:hover {
    color: var(--accent);
}

.menu__close-x {
    font-size: 22px;
    line-height: 1;
}

.menu__list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu__item {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.menu__num {
    font-size: 12px;
    color: var(--accent);
}

.menu__link {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    text-decoration: none;
}

.menu__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 32px;
    font-size: 13px;
    color: var(--text-muted);
}

.menu__footer a {
    color: var(--text-muted);
}

/* ============================================================
   Portada
   ============================================================ */

.hero {
    border-bottom: 1px solid var(--line);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 48px 48px;
}

.hero__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 56px;
    padding-block: clamp(56px, 9vw, 120px) clamp(48px, 7vw, 96px);
}

.hero__text {
    display: flex;
    flex: 999 1 520px;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.hero__status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.status-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

.hero__name {
    font-size: clamp(3rem, 7.5vw, 6.5rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 0.95;
}

.hero__role {
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.hero__pitch {
    max-width: 34ch;
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--text-muted);
    text-wrap: balance;
}

.hero__desc {
    max-width: 60ch;
    color: var(--text-muted);
    text-wrap: pretty;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

/* Panel «estado de los repositorios» */
.repo-status {
    flex: 1 1 360px;
    max-width: 460px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
    font-family: var(--font-mono);
    font-size: 13px;
}

.repo-status__bar,
.repo-status__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
}

.repo-status__bar {
    border-bottom: 1px solid var(--line);
}

.repo-status__foot {
    border-top: 1px solid var(--line);
}

.repo-status__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.repo-status__dots {
    display: flex;
    gap: 6px;
}

.repo-status__dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line-strong);
}

.repo-status__table {
    width: 100%;
    border-collapse: collapse;
}

.repo-status__table th,
.repo-status__table td {
    padding: 7px 0 7px 16px;
    text-align: left;
    white-space: nowrap;
}

.repo-status__table thead th {
    padding-block: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.repo-status__table tbody th {
    width: 100%;
    max-width: 0;
    overflow: hidden;
    font-weight: 400;
    text-overflow: ellipsis;
    color: var(--text-soft);
}

.repo-status__table tbody tr:first-child > * {
    padding-top: 12px;
}

.repo-status__table tbody tr:last-child > * {
    padding-bottom: 12px;
}

.repo-status__table tr > :last-child {
    padding-right: 16px;
}

.repo-status__table .num {
    text-align: right;
}

.ci-pass {
    color: var(--accent);
}

.ci-pass::before {
    content: '●' / '';
    margin-right: 6px;
}

/* ============================================================
   Cifras
   ============================================================ */

.figures {
    border-bottom: 1px solid var(--line);
}

.figures__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
    column-gap: 24px;
    margin-block: 0;
    list-style: none;
}

.figure {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-block: 28px;
}

.figure__num {
    font-size: 2.75rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
}

.figure__num--accent {
    color: var(--accent);
}

.figure__label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================================
   Secciones
   ============================================================ */

.section {
    padding-block: var(--section-y);
    border-bottom: 1px solid var(--line);
}

.section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 48px;
    margin-bottom: 40px;
}

.section__heading {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 640px;
}

.section__kicker {
    font-size: 13px;
    color: var(--accent);
}

.section__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.05;
    text-wrap: balance;
}

.section__lead {
    max-width: 440px;
    color: var(--text-muted);
    text-wrap: pretty;
}

/* Bloque con título a la izquierda y contenido a la derecha */
.split {
    display: flex;
    flex-wrap: wrap;
    gap: 40px 64px;
}

.split__aside {
    display: flex;
    flex: 1 1 260px;
    flex-direction: column;
    gap: 12px;
}

.split__main {
    flex: 999 1 560px;
    min-width: 0;
}

/* ============================================================
   Ecosistema de inventario
   ============================================================ */

.eco {
    padding: clamp(24px, 4vw, 48px);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg-raised);
}

.eco__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.eco__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

.eco__node {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 18px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--bg);
}

.eco__node--core {
    padding: 22px;
    border-color: var(--accent);
    background: var(--bg-core);
}

.eco__kicker {
    font-size: 12px;
    color: var(--text-muted);
}

.eco__node--core .eco__kicker {
    color: var(--accent);
}

.eco__name {
    font-weight: 600;
}

.eco__node--core .eco__name {
    font-size: 1.25rem;
}

.eco__meta {
    font-size: 14px;
    color: var(--text-muted);
}

/* Conector: línea decorativa (pseudo-elementos) con su etiqueta en texto. */
.eco__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-block: 8px;
    font-size: 11px;
    text-align: center;
    color: var(--text-faint);
}

.eco__link::before,
.eco__link::after {
    content: '';
    width: 1px;
    height: 16px;
    background: var(--line-strong);
}

@media (width >= 760px) {
    .eco__list {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 300px) minmax(0, 1fr);
        align-items: center;
    }

    .eco__item {
        max-width: none;
    }

    .eco__item--left,
    .eco__item--right {
        flex-direction: row;
    }

    .eco__item--below {
        grid-column: 2;
    }

    .eco__item--left .eco__node,
    .eco__item--right .eco__node {
        flex: 0 1 240px;
    }

    .eco__item--left .eco__link,
    .eco__item--right .eco__link {
        flex: 1 0 auto;
        flex-direction: row;
        padding: 0 8px;
        white-space: nowrap;
    }

    .eco__item--left .eco__link::before,
    .eco__item--left .eco__link::after,
    .eco__item--right .eco__link::before,
    .eco__item--right .eco__link::after {
        flex: 1;
        width: auto;
        min-width: 8px;
        height: 1px;
    }
}

/* ============================================================
   Proyectos
   ============================================================ */

.featured {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--line);
}

.featured__body {
    display: flex;
    flex: 1 1 420px;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    padding: clamp(24px, 4vw, 44px);
    background: var(--bg-raised);
}

.featured__title {
    font-size: clamp(1.625rem, 2.6vw, 1.875rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.featured__media {
    display: flex;
    flex: 1 1 380px;
    align-items: center;
    justify-content: center;
    min-width: 0;
    margin: 0;
    padding: clamp(16px, 3vw, 32px);
    background: var(--bg);
}

.featured__media img {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 16px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.card__area {
    font-size: 12px;
    color: var(--text-muted);
}

.card__title {
    font-size: 1.3125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.card__desc {
    font-size: 15px;
    color: var(--text-muted);
    text-wrap: pretty;
}

.featured .card__desc {
    max-width: 52ch;
    font-size: 1rem;
}

.card__demo {
    font-size: 14px;
    color: var(--text-muted);
}

.card__stack {
    font-size: 12px;
    color: var(--text-soft);
}

.card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
    margin: auto 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.card__links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
}

.metric {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.metric__num {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
    white-space: nowrap;
    color: var(--accent);
}

.metric--lg .metric__num {
    font-size: 3.5rem;
    letter-spacing: -0.05em;
}

.metric__label {
    max-width: 30ch;
    font-size: 13px;
    color: var(--text-muted);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    color: var(--text-soft);
}

.chips li {
    padding: 4px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
}

/* ============================================================
   Apps publicadas
   ============================================================ */

.apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--line);
}

.app {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    background: var(--bg);
}

.app__type {
    font-size: 12px;
    color: var(--text-muted);
}

.app__name {
    font-size: 1.1875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.app__desc {
    font-size: 14px;
    color: var(--text-muted);
    text-wrap: pretty;
}

.app__stores {
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
    margin: auto 0 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
}

.app__stores a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    color: var(--text-soft);
}

/* ============================================================
   Stack
   ============================================================ */

.skill-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 32px;
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-group__title {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.skill-group__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.skill-group__list--stacked {
    flex-direction: column;
}

.skill-group__list--soft {
    color: var(--text-soft);
}

.skill-group__list--stacked li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
}

.skill-group__hint {
    color: var(--text-muted);
}

.skill-group__level {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================
   Trayectoria
   ============================================================ */

.rows__title {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.rows {
    margin: 0 0 48px;
    padding: 0;
    list-style: none;
}

.rows:last-child {
    margin-bottom: 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 32px;
    padding-block: 20px;
    border-top: 1px solid var(--line);
}

.row__label {
    flex: 0 0 140px;
    font-size: 13px;
    color: var(--text-muted);
}

.row__label--accent {
    color: var(--accent);
}

.row__body {
    display: flex;
    flex: 1 1 320px;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.row__title {
    font-weight: 600;
}

.row__meta {
    color: var(--text-soft);
}

.row__desc {
    font-size: 15px;
    color: var(--text-muted);
    text-wrap: pretty;
}

.row__stack {
    font-size: 12px;
    color: var(--text-soft);
}

/* ============================================================
   Contacto y pie
   ============================================================ */

.contact {
    padding-block: clamp(72px, 10vw, 140px);
}

.contact .section__kicker {
    margin-bottom: 24px;
}

.contact__title {
    max-width: 16ch;
    font-size: clamp(2.25rem, 6vw, 5rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1;
    text-wrap: balance;
}

.contact__lead {
    max-width: 52ch;
    margin-top: 24px;
    color: var(--text-muted);
}

.contact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.contact__actions .btn {
    overflow-wrap: anywhere;
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding-block: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

.footer__name {
    color: var(--text-muted);
}

/* ============================================================
   Volver arriba
   ============================================================ */

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-raised);
    color: var(--text);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition:
        opacity var(--transition),
        transform var(--transition),
        border-color var(--transition),
        visibility var(--transition);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.back-to-top:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   Movimiento reducido
   ============================================================ */

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

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

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