/* =========================================================
   Portfolio Antonio Navarro López
   Tema oscuro por defecto del sistema + tema claro.
   Un solo acento: rojo neón. Radios: 16px tarjetas, píldora en botones/chips.
   ========================================================= */

/* ---------- Fuentes (guardadas en vendor/fonts, sin Google Fonts) ---------- */
@font-face { font-family: "Geist"; src: url("../vendor/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../vendor/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #0c0c0e;
  --surface: #141417;
  --surface-2: #1b1b1f;
  --line: #2a2a30;
  --text: #f1f1f3;
  --muted: #a3a3ad;
  --accent: #ff2a45;
  --accent-ink: #120306;          /* texto sobre el rojo */
  --accent-soft: rgb(255 42 69 / .14);
  --glow: 0 0 24px rgb(255 42 69 / .45), 0 0 2px rgb(255 42 69 / .9);
  --shadow: 0 24px 60px rgb(0 0 0 / .45);
  --scrim: rgb(8 8 10 / .92);

  --radius: 16px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --header-h: 68px;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

/* Tema claro: por preferencia del sistema o elegido a mano */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f6f7;
    --surface: #ffffff;
    --surface-2: #eeeef1;
    --line: #dcdce2;
    --text: #121215;
    --muted: #55555f;
    --accent: #d9042b;
    --accent-ink: #ffffff;
    --accent-soft: rgb(217 4 43 / .09);
    --glow: 0 6px 20px rgb(217 4 43 / .28);
    --shadow: 0 24px 50px rgb(40 10 16 / .12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #eeeef1;
  --line: #dcdce2;
  --text: #121215;
  --muted: #55555f;
  --accent: #d9042b;
  --accent-ink: #ffffff;
  --accent-soft: rgb(217 4 43 / .09);
  --glow: 0 6px 20px rgb(217 4 43 / .28);
  --shadow: 0 24px 50px rgb(40 10 16 / .12);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.03em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 767px) { .container { padding-inline: 16px; } }

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

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform 200ms var(--ease-out);
}
.skip:focus { transform: translateY(0); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1 var(--font); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .9375rem; }
.btn--block { width: 100%; }
.btn i { font-size: 1.15em; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { box-shadow: var(--glow); }
  .btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
}

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  font-size: 1.2rem; cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 200ms ease, color 200ms ease;
}
.icon-btn:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { border-color: var(--accent); color: var(--accent); } }

.eyebrow {
  font-family: var(--mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--accent);
}

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 250ms ease, border-color 250ms ease, backdrop-filter 250ms ease;
}
.header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.header__inner { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand__logo {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 160ms var(--ease-out);
}
.brand:active .brand__logo { transform: scale(0.96); }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 6px; }
.nav__link {
  position: relative; display: inline-block; padding: 10px 14px;
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: .9375rem;
  transition: color 200ms ease;
}
.nav__link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 250ms var(--ease-out);
}
.nav__link:hover, .nav__link.is-current { color: var(--text); }
.nav__link:hover::after, .nav__link.is-current::after { transform: scaleX(1); }
.nav__cta-mobile { display: none; }

.header__actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }
.menu-btn__bars { display: grid; gap: 6px; width: 18px; }
.menu-btn__bars span { display: block; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform 250ms var(--ease-out); }
.menu-btn[aria-expanded="true"] .menu-btn__bars span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .header__cta { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 16px 24px;
    opacity: 0; transform: translateY(-8px); visibility: hidden;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
  .nav__list { flex-direction: column; gap: 2px; }
  .nav__link { display: block; padding: 14px 4px; font-size: 1.125rem; color: var(--text); }
  .nav__link::after { left: 4px; right: auto; width: 32px; }
  .nav__cta-mobile { display: block; margin-top: 12px; }
  .nav__cta-mobile .btn { width: 100%; }
  .header.menu-open { background: var(--bg); border-bottom-color: var(--line); }
}

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; align-items: center; padding: calc(var(--header-h) + clamp(64px, 10vw, 140px)) 0 clamp(24px, 4vw, 48px); overflow: hidden; }
.hero::before {
  /* brillo rojo muy suave de fondo */
  content: ""; position: absolute; width: 60vmax; height: 60vmax; right: -22vmax; top: -10%;
  background: radial-gradient(circle, var(--accent-soft), transparent 62%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; }
.hero__copy { display: grid; gap: 24px; max-width: 920px; }
.hero__title { font-size: clamp(2.8rem, 7.4vw, 6.4rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.02; }
.hero__title em { font-style: normal; color: var(--accent); text-shadow: 0 0 28px rgb(255 42 69 / .35); }
.hero__lead { max-width: 46ch; color: var(--muted); font-size: clamp(1.0625rem, 1.4vw, 1.25rem); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

@media (max-width: 860px) {
  .hero { padding-top: calc(var(--header-h) + 48px); }
}

/* Entrada del hero */
@media (prefers-reduced-motion: no-preference) {
  .hero__in { opacity: 0; transform: translateY(16px); animation: rise 800ms var(--ease-out) forwards; animation-delay: calc(var(--d) * 90ms + 100ms); }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Herramientas (panel con pestañas) ---------- */
.toolbox {
  max-width: 780px; margin: 48px auto 0; padding: 32px;
  border: 1px solid var(--line); border-radius: 24px;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--muted) 22%, transparent) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--surface);
}
.toolbox__tabs {
  display: flex; width: fit-content; margin: 0 auto 28px; padding: 4px; gap: 4px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
}
.toolbox__tab {
  padding: 9px 20px; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font: 500 .9375rem/1 var(--font); cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}
.toolbox__tab:hover { color: var(--text); }
.toolbox__tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.toolbox__tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toolbox__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.tool {
  display: grid; justify-items: center; gap: 8px; padding: 24px 12px; text-align: center;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tool__icon { font-size: 28px; color: var(--text); transition: color .2s ease, transform .2s var(--ease-out); }
.tool__name { font-weight: 600; }
.tool__code {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 .75rem/1.2 var(--mono); color: var(--accent); background: none; padding: 0;
}
@media (hover: hover) {
  .tool:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 22px var(--accent-soft); }
  .tool:hover .tool__icon { color: var(--accent); }
}
.toolbox__note { margin-top: 20px; text-align: center; color: var(--muted); font-size: .9375rem; }
@media (prefers-reduced-motion: no-preference) {
  @media (hover: hover) { .tool:hover .tool__icon { transform: translateY(-2px); } }
  .toolbox__panel:not([hidden]) { animation: panel-in .25s var(--ease-out); }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } }
@media (max-width: 600px) {
  .toolbox { padding: 20px 14px; border-radius: 20px; }
  .toolbox__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tool { padding: 20px 8px; }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section__title { font-size: clamp(2.25rem, 4.6vw, 3.75rem); font-weight: 700; }
.section__lead { margin-top: 16px; max-width: 58ch; color: var(--muted); font-size: 1.125rem; }

/* ---------- Bento de habilidades ---------- */
.bento {
  margin-top: 56px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, minmax(200px, auto));
}
.tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color 250ms ease, transform 250ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .tile:hover { border-color: rgb(255 42 69 / .5); } }
.tile__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: auto; padding-bottom: 20px; }
.tile__icon { font-size: 1.75rem; color: var(--accent); }
.tile__title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.tile__text { color: var(--muted); font-size: 1rem; }
.level { font: 500 .8125rem/1 var(--mono); padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.level--high { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tags li { font: .8125rem/1 var(--mono); padding: 7px 10px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }

.tile--feature { grid-column: span 2; grid-row: span 3; gap: 20px; }
.tile--feature .tile__body { display: grid; gap: 12px; }
.tile--feature .tile__head { margin: 0; padding: 0; }
.codewin { flex: 1; display: flex; flex-direction: column; min-height: 220px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.codewin__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.codewin__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.codewin__bar span:first-child { background: var(--accent); }
.codewin__bar em { margin-left: 8px; font: .75rem/1 var(--mono); font-style: normal; color: var(--muted); }
.codewin__code { flex: 1; margin: 0; padding: 20px; overflow-x: auto; font: .875rem/1.7 var(--mono); color: var(--text); }
.codewin__code b { font-weight: 400; color: var(--accent); }
.codewin__code i { font-style: normal; color: var(--muted); }
.codewin__code u { text-decoration: none; color: #f5a3ae; }
:root[data-theme="light"] .codewin__code u { color: #b8122a; }
@media (max-width: 600px) { .codewin__code { padding: 16px; font-size: .75rem; } }
.tile--tall { grid-column: span 2; }

.tile--term { background: linear-gradient(160deg, var(--surface), var(--surface-2)); }
.prompt { font: .875rem/1.4 var(--mono); color: var(--muted); padding: 10px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.prompt span:first-child { color: var(--accent); }
.caret { display: inline-block; width: 8px; height: 1em; vertical-align: -2px; margin-left: 4px; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .caret { animation: blink 1.1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }

.tile__overlay {
  position: relative; margin-top: auto; padding: 24px; display: grid; gap: 8px;
  background: linear-gradient(to top, rgb(8 8 10 / .92) 30%, rgb(8 8 10 / 0));
  color: #f1f1f3; pointer-events: none;
}
.tile__overlay .tile__head { padding: 0 0 8px; }
.tile__overlay .tile__text { color: #c9c9d1; }
.tile__overlay .level { border-color: rgb(255 255 255 / .25); color: #e2e2e8; }
.tile__overlay .tile__icon { color: #ff2a45; }

@media (max-width: 1023px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; }
  .tile--feature { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 767px) {
  .bento { grid-template-columns: 1fr; }
  .tile--feature, .tile--tall { grid-column: auto; }
}

/* ---------- Proyectos ---------- */
.works { margin-top: 40px; display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work {
  display: flex; flex-direction: column; gap: 12px; padding: 28px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: border-color 250ms ease;
}
@media (hover: hover) and (pointer: fine) { .work:hover { border-color: rgb(255 42 69 / .5); } }
.work__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 20px; }
.work__icon { font-size: 1.75rem; color: var(--accent); }
.work__tag { font: 500 .8125rem/1 var(--mono); padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.work__title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.work__text { color: var(--muted); }
.work .tags { margin-top: auto; padding-top: 8px; }
.work--wide { grid-column: 1 / -1; }
.work__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; margin: 4px 0 0; padding: 0; list-style: none; }
.work__list li { position: relative; padding-left: 20px; color: var(--muted); }
.work__list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px rgb(255 42 69 / .6); }
@media (max-width: 767px) { .works { grid-template-columns: 1fr; } .work__list { grid-template-columns: 1fr; } }

/* ---------- Sobre mí ---------- */
.about__copy { display: grid; gap: 20px; max-width: 820px; }
.about__copy p { color: var(--muted); max-width: 60ch; }
.about__copy strong { color: var(--text); font-weight: 600; }
.about__big { font-size: clamp(1.375rem, 2.3vw, 1.75rem); line-height: 1.35; color: var(--text) !important; letter-spacing: -0.02em; font-weight: 500; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.facts dt { font: .8125rem/1.4 var(--mono); color: var(--muted); }
.facts dd { margin: 6px 0 0; font-weight: 600; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr 1fr; } }

/* ---------- Contacto ---------- */
.contact { position: relative; }
.contact__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px);
  padding: clamp(32px, 5vw, 64px); border-radius: 28px;
  background: radial-gradient(120% 120% at 0% 0%, var(--accent-soft), transparent 55%), var(--surface);
  border: 1px solid var(--line);
}
.contact__title { font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 700; letter-spacing: -0.05em; }
.contact__mail { display: flex; align-items: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.contact__email {
  font-size: clamp(1.125rem, 2.2vw, 1.5rem); font-weight: 600; text-decoration: none; word-break: break-all;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0% 2px;
  transition: background-size 300ms var(--ease-out), color 200ms ease;
}
.contact__email:hover { background-size: 100% 2px; color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.socials a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: .9375rem;
  transition: border-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.socials a:active { transform: scale(0.97); }
.socials a:hover { border-color: var(--accent); color: var(--accent); }
.socials i { font-size: 1.15rem; }

.form { display: grid; gap: 18px; align-content: start; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; font-size: .9375rem; }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
  font: inherit; font-size: 1rem; resize: vertical;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.has-error input, .field.has-error textarea { border-color: var(--accent); }
.field__help { font-size: .875rem; color: var(--muted); }
.field__error { font-size: .875rem; color: var(--accent); min-height: 0; }
.field__error:empty { display: none; }
.form__status { font-size: .9375rem; color: var(--muted); }
.form__status:empty { display: none; }
.form__status.is-ok { color: var(--text); }

@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: start; }
.footer__desc { margin-top: 12px; color: var(--muted); font-size: .9375rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer__links a { color: var(--muted); text-decoration: none; font-size: .9375rem; padding: 6px 0; display: inline-block; transition: color 200ms ease; }
.footer__links a:hover { color: var(--accent); }
.footer__bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer__top { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.footer__top:hover { color: var(--accent); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer__legal a { color: var(--muted); text-decoration: none; padding: 4px 0; display: inline-block; }
.footer__legal a:hover, .footer__legal a[aria-current="page"] { color: var(--accent); }

/* ---------- Páginas legales ---------- */
.legal { padding: calc(var(--header-h, 72px) + 56px) 0 96px; }
.legal__inner { max-width: 72ch; }
.legal__back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: .9375rem; padding: 6px 0; }
.legal__back:hover { color: var(--accent); }
.legal h1 { margin-top: 24px; font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.legal__date { margin-top: 12px; color: var(--muted); font: .875rem/1.4 var(--mono); }
.legal__lead { margin-top: 28px; font-size: 1.125rem; }
.legal h2 { margin-top: 48px; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--muted); line-height: 1.7; }
.legal p { margin-top: 14px; }
.legal ul.legal__list { margin-top: 14px; padding-left: 1.2em; list-style: disc; display: grid; gap: 8px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a:not(.legal__back) { color: var(--accent); text-underline-offset: 3px; }
.legal__table { margin-top: 18px; width: 100%; border-collapse: collapse; font-size: .9375rem; }
.legal__table th, .legal__table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal__table th { color: var(--text); font-weight: 600; background: var(--surface); }
.legal__table td { color: var(--muted); }
.legal__table-wrap { overflow-x: auto; }

/* ---------- Página Sobre mí ---------- */
.aboutpage__intro { margin-top: 32px; }
.aboutpage__intro h1 { margin-top: 12px; }
.aboutpage .facts { grid-template-columns: repeat(4, 1fr); margin-top: 28px; }
.aboutpage .legal__inner { margin-top: 24px; }
.aboutpage__cta { margin-top: 56px; padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.aboutpage__cta h2 { margin-top: 0; }
.aboutpage__cta a.btn { margin-top: 8px; color: var(--accent-ink); text-decoration: none; }
@media (max-width: 860px) {
  .aboutpage .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) { .footer__inner { grid-template-columns: 1fr; } }

/* ---------- Reveal al hacer scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--stagger, 0ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg);
  font-weight: 500; font-size: .9375rem;
  transform: translate(-50%, 140%); opacity: 0; pointer-events: none;
  transition: transform 300ms var(--ease-out), opacity 300ms ease;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- 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: 120ms !important; }
}

/* ---------- Cursor estilo macOS (solo con ratón) ---------- */
@media (pointer: fine) {
  html { cursor: url("../assets/cursores/flecha.svg") 6 4, auto; }
  :is(a, button, label, summary, select, [role="tab"]),
  :is(a, button) * { cursor: url("../assets/cursores/mano.svg") 14 3, pointer; }
  input:not([type="checkbox"]):not([type="radio"]), textarea { cursor: url("../assets/cursores/texto.svg") 16 16, text; }
  button:disabled { cursor: url("../assets/cursores/flecha.svg") 6 4, not-allowed; }
}
