/* ==========================================================================
   Christian Chongo · portafolio
   Editorial sobre rejilla: papel crema y tinta, bordes de 2px y bloques tipo
   Mondrian. Titulares en Fraunces (serif con calidez humana, para un ingeniero
   que también enseña), texto en Schibsted Grotesk (grotesca de periódico,
   muy legible) y monoespaciada solo para datos técnicos.
   Paleta de mar y sol: verde azulado para lo interactivo, azafrán para los
   momentos clave. El tema claro es el de la marca; el oscuro, a petición.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-italic-latin.woff2') format('woff2');
  font-weight: 500 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/fonts/schibsted-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/plexmono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/plexmono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/plexmono-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #f4eee1;
  --paper-2: #e9e1cf;
  --ink: #17140f;
  --ink-soft: #544c41;
  --sea: #0d6e63;
  --on-sea: #ffffff;
  --sun: #f2a900;
  --on-sun: #17140f;
  --live: #1d7f45;
  /* Acento sobre fondo de tinta (el bloque de contacto): azafrán en claro, mar profundo en oscuro. */
  --on-ink-accent: #f2a900;

  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --line: 2px;
  --max: 88rem;
  --gutter: clamp(1rem, 3.2vw, 2.5rem);
  --header-h: 4.5rem;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --paper: #14120f;
  --paper-2: #201d18;
  --ink: #f2ecdf;
  --ink-soft: #bfb6a6;
  --sea: #52c3b3;
  --on-sea: #0b0b0a;
  --sun: #ffc23d;
  --on-sun: #14120f;
  --live: #4cc07f;
  --on-ink-accent: #0d6e63;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
em { font-style: italic; }
::selection { background: var(--sun); color: var(--on-sun); }

:focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 1rem; }

/* Etiqueta de sección: número en cursiva y nombre. */
.kicker { display: flex; align-items: baseline; gap: 0.55rem; }
.kicker__n {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--sea);
}
.kicker__t { font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.005em; }
.kicker--inv .kicker__n { color: var(--on-ink-accent); }

.title {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5.2vw, 4.4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section { border-bottom: var(--line) solid var(--ink); }

.section__head {
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: var(--line) solid var(--ink);
}
.section__head .title { margin-top: 1rem; }

/* El trazo que "imprime" los títulos al entrar en pantalla: el mismo gesto
   de bloque que las composiciones del fondo. */
.ink-wipe {
  display: inline-block;
  position: relative;
}
.js .ink-wipe { color: transparent; }
.js .ink-wipe.is-in { animation: ink-text 0.9s var(--ease) forwards; }
.ink-wipe::after {
  content: '';
  position: absolute;
  inset: 0.02em -0.06em -0.04em;
  background: var(--sea);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.js .ink-wipe.is-in::after { animation: ink-block 0.9s var(--ease) forwards; }
@keyframes ink-block {
  0% { transform: scaleX(0); transform-origin: left; }
  48% { transform: scaleX(1); transform-origin: left; }
  52% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}
@keyframes ink-text {
  0%, 49% { color: transparent; }
  50%, 100% { color: var(--ink); }
}

/* ---------------------------------------------------------------- botones */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border: var(--line) solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}
/* Al pasar por encima el botón se llena de color: dice "esto se pulsa". */
.btn:hover { background: var(--sun); color: var(--on-sun); }
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--sea); color: var(--on-sea); border-color: var(--sea); }
.btn--paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--paper:hover { border-color: var(--sun); }

.link-ext {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--sea);
  text-underline-offset: 0.22em;
  transition: color 0.15s;
}
.link-ext:hover { color: var(--sea); }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips li {
  padding: 0.18rem 0.55rem;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
}
.chips--sm li { font-size: 0.72rem; padding: 0.12rem 0.45rem; }

.note-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: var(--paper-2);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
}
.note-tag--count { background: transparent; border: 1.5px dashed var(--ink-soft); font-family: var(--mono); font-weight: 500; font-size: 0.75rem; }

/* ---------------------------------------------------------------- cabecera */

.site-header {
  position: relative;
  z-index: 40;
  background: var(--paper);
  border-bottom: var(--line) solid var(--ink);
}
@media (min-width: 48rem) {
  .site-header { position: sticky; top: 0; }
}

.site-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  max-width: var(--max);
  margin: 0 auto;
  border-inline: var(--line) solid var(--ink);
}
@media (min-width: 64rem) {
  .site-header__inner { grid-template-columns: auto minmax(0, 1fr) auto; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: 0 var(--gutter);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.brand em { color: var(--sea); font-weight: 500; }
/* Un Mondrian mínimo como marca, el mismo dibujo que el favicon. */
.brand__mark {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  padding: 2px;
  background: var(--ink);
}
.brand__mark span:nth-child(1) { grid-row: 1 / 3; background: var(--sea); }
.brand__mark span:nth-child(2) { background: var(--sun); }
.brand__mark span:nth-child(3) { background: var(--paper); }

.nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 0.25rem 1.25rem;
  padding: 0 var(--gutter);
  min-width: 0;
  border-top: var(--line) solid var(--ink);
  overflow-x: auto;
  scrollbar-width: none;
}
@media (max-width: 29.99rem) {
  .nav { justify-content: space-between; gap: 0.5rem; }
  .nav__num { display: none; }
}
.nav::-webkit-scrollbar { display: none; }
@media (min-width: 64rem) {
  .nav { grid-column: auto; grid-row: auto; gap: 2rem; border-top: 0; align-items: stretch; padding: 0 1.5rem; }
}
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.875rem;
  padding: 0.5rem 0.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
@media (min-width: 64rem) {
  .nav__link { min-height: var(--header-h); }
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease), background-color 0.2s;
}
@media (min-width: 64rem) {
  .nav__link::after { bottom: 1.1rem; }
}
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active::after { transform: scaleX(1); background: var(--sea); }
.nav__num { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 0.85rem; color: var(--ink-soft); }
.nav__link.is-active .nav__num { color: var(--sea); }

.tools { display: flex; }
.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 2.875rem;
  min-height: 2.875rem;
  padding: 0 0.9rem;
  border: 0;
  border-left: var(--line) solid var(--ink);
  background: var(--paper);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
@media (min-width: 64rem) {
  .tool { min-height: var(--header-h); min-width: 3.5rem; }
}
.tool:hover { background: var(--sun); color: var(--on-sun); }
.tool--icon { padding: 0; }
.tool--ink { background: var(--ink); color: var(--paper); }

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--line) * -1);
  height: 3px;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--sea);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

/* ------------------------------------------------------------------ página */

.page {
  max-width: var(--max);
  margin: 0 auto;
  border-inline: var(--line) solid var(--ink);
}

/* ------------------------------------------------------------------- hero */

.hero { border-bottom: var(--line) solid var(--ink); }

.hero__head {
  padding: clamp(2.25rem, 6vw, 5.5rem) var(--gutter) clamp(2.5rem, 6vw, 5rem);
  border-bottom: var(--line) solid var(--ink);
}
.hero__label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.hero__label::before {
  content: '';
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--sun);
  outline: var(--line) solid var(--ink);
}
.hero__title {
  max-width: 12.5ch;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  font-family: var(--serif);
  font-size: clamp(3.1rem, 9.2vw, 8.75rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
}
.hero__end { white-space: nowrap; }
.hero__dot { color: var(--sea); }

/* Palabras del titular que se encienden: código, voz y ventas. En reposo
   llevan un subrayado que avisa de que reaccionan. */
.word {
  position: relative;
  display: inline-block;
  margin-inline: 0.06em;
  font-style: italic;
  font-weight: 500;
  isolation: isolate;
  text-decoration: underline;
  text-decoration-thickness: 0.045em;
  text-decoration-color: var(--sea);
  text-underline-offset: 0.12em;
  transition: transform 0.25s var(--spring);
}
.word__fx {
  position: absolute;
  inset: 0.12em -0.07em 0.02em;
  z-index: -1;
  overflow: hidden;
  opacity: 0;
  transform: skewX(-9deg) scaleX(0.6);
  transform-origin: left;
  transition: opacity 0.16s, transform 0.3s var(--ease);
  pointer-events: none;
}
.word__label { position: relative; transition: color 0.16s; }
.word.is-on { text-decoration-color: transparent; transform: translateY(-0.02em); }
.word.is-on .word__fx { opacity: 1; transform: skewX(-9deg) scaleX(1); }

.word--code .word__fx { background: var(--ink); }
.word--code.is-on .word__label { color: var(--paper); }
.word--voice .word__fx { background: var(--sea); }
.word--voice.is-on .word__label { color: var(--on-sea); }
.word__canvas { width: 100%; height: 100%; }

.word--sell .word__fx { background: var(--sun); }
.word--sell.is-on .word__label { color: var(--on-sun); }
.hero__grid { display: grid; }
@media (min-width: 64rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.55fr) minmax(19rem, 0.75fr); }
}

.hero__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: clamp(1.75rem, 4vw, 3.25rem) var(--gutter);
}
@media (min-width: 64rem) {
  .hero__intro { border-right: var(--line) solid var(--ink); }
}
.hero__lead {
  max-width: 44ch;
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.hero__card {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.75rem);
  padding: clamp(1.5rem, 3.5vw, 2.25rem) var(--gutter);
  border-top: var(--line) solid var(--ink);
  background: var(--sea);
  color: var(--on-sea);
}
@media (min-width: 64rem) {
  .hero__card { flex-direction: column; align-items: flex-start; justify-content: center; border-top: 0; }
}
.hero__photo {
  flex: none;
  width: clamp(7rem, 24vw, 9rem);
  aspect-ratio: 1;
  border: var(--line) solid var(--ink);
  overflow: hidden;
  background: var(--paper-2);
}
@media (min-width: 64rem) {
  .hero__photo { width: 12rem; }
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__meta { display: grid; gap: 0.75rem; min-width: 0; }
.hero__roles {
  justify-self: start;
  padding: 0.25rem 0.55rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
}
.status { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; line-height: 1.3; }
.status__dot {
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--live);
  animation: live 2.4s ease-out infinite;
}
.hero__card .status__dot { background: var(--sun); --live: var(--sun); }
@keyframes live {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 0.55rem transparent; }
}
.clock { display: grid; gap: 0.1rem; font-size: 0.875rem; }
.clock__label { color: color-mix(in srgb, var(--on-sea) 82%, var(--sea)); }
.clock__time { font-family: var(--mono); font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- cinta */

.marquee {
  overflow: hidden;
  border-bottom: var(--line) solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.marquee__track { display: flex; width: max-content; animation: marquee 52s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; flex: none; align-items: center; }
.marquee__group span {
  padding: 0.6rem 1.1rem 0.75rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  font-weight: 500;
  white-space: nowrap;
}
.marquee__group i { flex: none; width: 0.55rem; height: 0.55rem; background: var(--sea); }
.marquee__group i:nth-of-type(2n) { background: var(--sun); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- cifras */

.stats { border-bottom: var(--line) solid var(--ink); }
.stats__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 64rem) {
  .stats__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stat {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: clamp(1.25rem, 3vw, 2rem) var(--gutter) clamp(1.5rem, 3vw, 2.25rem);
  border-right: var(--line) solid var(--ink);
  border-bottom: var(--line) solid var(--ink);
}
.stat:nth-child(2n) { border-right: 0; }
@media (min-width: 64rem) {
  .stat { border-bottom: 0; }
  .stat:nth-child(2n) { border-right: var(--line) solid var(--ink); }
  .stat:last-child { border-right: 0; }
}
.stat:first-child { background: var(--sun); color: var(--on-sun); }
.stat__num {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 7vw, 5.75rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums tabular-nums;
  transition: opacity 0.3s;
}
.stat__num.is-pending { opacity: 0; }
.stat__text { max-width: 26ch; font-size: 0.95rem; line-height: 1.45; }
.stats__note {
  padding: 0.65rem var(--gutter);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
@media (min-width: 64rem) {
  .stats__note { border-top: var(--line) solid var(--ink); }
}

/* -------------------------------------------------------------- sobre mí */

.about { display: grid; }
@media (min-width: 64rem) {
  .about { grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.6fr); }
}
.about__side {
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter);
  background: var(--paper-2);
  border-bottom: var(--line) solid var(--ink);
}
.about__side .title { margin-top: 1.25rem; }
@media (min-width: 64rem) {
  .about__side { border-bottom: 0; border-right: var(--line) solid var(--ink); }
  .about__side > * { position: sticky; top: calc(var(--header-h) + 2rem); }
  .about__side .title { top: calc(var(--header-h) + 4.75rem); }
}
.about__body { display: grid; gap: 2.5rem; padding: clamp(2rem, 5vw, 3.5rem) var(--gutter); }
.lead {
  max-width: 54ch;
  font-size: clamp(1.15rem, 1.7vw, 1.375rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.facts { display: grid; }
.fact {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem 0;
  border-top: var(--line) solid var(--ink);
}
@media (min-width: 40rem) {
  .fact { grid-template-columns: 9.5rem 1fr; gap: 1.5rem; }
}
.fact dt { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.125rem; line-height: 1.4; }
.fact dd { max-width: 60ch; }

/* ------------------------------------------------------------ experiencia */

.jobs { display: grid; }
.job {
  display: grid;
  gap: 1rem;
  padding: clamp(1.75rem, 4vw, 3rem) var(--gutter);
  border-bottom: var(--line) solid var(--ink);
}
@media (min-width: 52rem) {
  .job { grid-template-columns: 12rem minmax(0, 1fr); gap: 2.5rem; }
}
.job__when { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; font-family: var(--mono); font-size: 0.875rem; font-weight: 600; }
@media (min-width: 52rem) {
  .job__when { flex-direction: column; align-items: flex-start; }
}
.job__now { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--sans); }
.job__body { display: grid; gap: 0.9rem; max-width: 62rem; }
.job__org { font-family: var(--serif); font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }
.job__role { font-weight: 600; color: var(--ink-soft); }
.job__summary { font-size: 1.125rem; font-weight: 600; max-width: 60ch; }
.job__bullets { display: grid; gap: 0.7rem; max-width: 70ch; }
.job__bullets li { position: relative; padding-left: 1.4rem; }
.job__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--ink);
}
.job--current .job__bullets li:first-child::before { background: var(--sun); outline: 1.5px solid var(--ink); }
.job .chips { margin-top: 0.4rem; }
.job__link { justify-self: start; font-size: 0.95rem; }

.earlier { display: grid; }
.earlier__title {
  padding: 1rem var(--gutter);
  border-bottom: var(--line) solid var(--ink);
  background: var(--paper-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  font-weight: 600;
}
.earlier__list { display: grid; }
@media (min-width: 52rem) {
  .earlier__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.earlier__list li {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: 1.5rem var(--gutter) 1.75rem;
  border-bottom: var(--line) solid var(--ink);
}
.earlier__list li:last-child { border-bottom: 0; }
@media (min-width: 52rem) {
  .earlier__list li { border-bottom: 0; border-right: var(--line) solid var(--ink); }
  .earlier__list li:last-child { border-right: 0; }
}
.earlier__org { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.earlier__role { font-size: 0.875rem; font-weight: 700; }
.earlier__text { color: var(--ink-soft); font-size: 0.975rem; }

/* --------------------------------------------------------------- trabajo */

.work__head {
  display: grid;
  gap: 1.5rem;
  align-items: end;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: var(--line) solid var(--ink);
}
@media (min-width: 52rem) {
  .work__head { grid-template-columns: 1fr auto; }
}
.work__head .title { margin-top: 1rem; }
.work__lead { max-width: 58ch; margin-top: 1.25rem; }
.work__gh { justify-self: start; font-family: var(--mono); font-size: 0.9375rem; }

.work__bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem var(--gutter);
  border-bottom: var(--line) solid var(--ink);
  background: var(--paper);
}
@media (min-width: 48rem) {
  .work__bar { top: calc(var(--header-h) + var(--line)); }
}
@media (max-width: 63.99rem) and (min-width: 48rem) {
  .work__bar { top: calc(var(--header-h) + 2.875rem + var(--line) * 2); }
}
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.85rem;
  border: var(--line) solid var(--ink);
  background: var(--paper);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.filter:hover { background: var(--paper-2); }
.filter[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.filter__n { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 0.9rem; opacity: 0.85; }
.work__count { font-size: 0.875rem; color: var(--ink-soft); }

.feature {
  display: grid;
  border-bottom: var(--line) solid var(--ink);
}
@media (min-width: 64rem) {
  .feature { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .feature--flip .feature__art { order: 2; border-right: 0; border-left: var(--line) solid var(--ink); }
}
.feature__art {
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  background: var(--paper-2);
  border-bottom: var(--line) solid var(--ink);
}
@media (min-width: 64rem) {
  .feature__art { border-bottom: 0; border-right: var(--line) solid var(--ink); }
}
.feature__art .poster {
  width: 100%;
  height: auto;
  border: var(--line) solid var(--ink);
  outline: 3px solid transparent;
  outline-offset: 5px;
  transition: outline-color 0.25s;
}
.feature:hover .poster { outline-color: var(--sea); }
.feature__body {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1.75rem, 4vw, 3.25rem) var(--gutter);
}
.feature__top { display: flex; align-items: baseline; gap: 0.85rem; }
.feature__num { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 2rem; line-height: 1; color: var(--sea); }
.feature__kicker { font-size: 0.9rem; font-weight: 700; color: var(--ink-soft); }
.feature__name { font-family: var(--serif); font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 600; line-height: 1.02; letter-spacing: -0.035em; }
.feature__line { font-size: clamp(1.15rem, 1.7vw, 1.35rem); font-weight: 600; line-height: 1.35; max-width: 36ch; }
.feature__desc { max-width: 60ch; }
.feature__role { max-width: 60ch; color: var(--ink-soft); font-size: 0.975rem; }
.feature__role strong { color: var(--ink); }
.feature__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 0.35rem; }

.more__title {
  padding: 1rem var(--gutter);
  border-bottom: var(--line) solid var(--ink);
  background: var(--paper-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  font-weight: 600;
}
.rows { display: grid; }
.row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 1rem 1.25rem;
  padding: 1.6rem var(--gutter);
  border-bottom: var(--line) solid var(--ink);
  transition: background-color 0.2s;
}
.row:hover { background: color-mix(in srgb, var(--paper-2) 55%, var(--paper)); }
@media (min-width: 52rem) {
  .row { grid-template-columns: 3rem minmax(0, 1fr) 15rem; gap: 2rem; padding-block: 2rem; }
}
.row__num { font-family: var(--serif); font-style: italic; font-size: 1.25rem; font-weight: 500; color: var(--sea); line-height: 1.5; }
.row__main { display: grid; align-content: start; gap: 0.7rem; }
.row__name { font-family: var(--serif); font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; }
.row__line { max-width: 60ch; }
.row__side { grid-column: 2; display: grid; gap: 0.85rem; align-content: start; }
@media (min-width: 52rem) {
  .row__side { grid-column: auto; }
}
.row__links { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; }
/* En móvil la composición solo alargaría la página. */
@media (max-width: 51.99rem) {
  .row .thumb { display: none; }
}
.thumb {
  width: 100%;
  max-width: 15rem;
  aspect-ratio: 4 / 3;
  border: var(--line) solid var(--ink);
  background: var(--paper-2);
}
.work__empty { padding: 3rem var(--gutter); font-weight: 600; border-bottom: var(--line) solid var(--ink); }
/* La última fila ya cierra la sección con su propio borde. */
.section.work { border-bottom: 0; }

/* En pantallas anchas los proyectos secundarios van de dos en dos: la lista
   se acorta a la mitad y cambia el ritmo respecto a los destacados. */
@media (min-width: 72rem) {
  .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: 2.25rem minmax(0, 1fr) 9.5rem; gap: 1.25rem; padding-block: 1.75rem; }
  .row:nth-child(odd of :not([hidden])) { border-right: var(--line) solid var(--ink); }
  .row:nth-child(odd of :not([hidden])):nth-last-child(1 of :not([hidden])) { grid-column: 1 / -1; border-right: 0; }
  .row__name { font-size: 1.6rem; }
  .row__side .note-tag { font-size: 0.72rem; }
}

[data-project][hidden] { display: none; }
.more[hidden] { display: none; }

/* ------------------------------------------------------------- servicios */

.services__grid { display: grid; }
@media (min-width: 48rem) {
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.service {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: clamp(1.75rem, 3.5vw, 2.75rem) var(--gutter);
  border-bottom: var(--line) solid var(--ink);
  transition: background-color 0.2s;
}
.service:hover { background: var(--paper-2); }
@media (min-width: 48rem) {
  .service { border-right: var(--line) solid var(--ink); }
}
.service__num { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.4rem; line-height: 1; color: var(--sea); }
.service__title { font-family: var(--serif); font-size: clamp(1.5rem, 2.5vw, 2.05rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; }
.service__text { max-width: 44ch; }
.service__proof { font-size: 0.875rem; line-height: 1.6; color: var(--ink-soft); }
.service__proof a { color: var(--ink); font-weight: 700; text-decoration-thickness: 1.5px; text-decoration-color: var(--sea); text-underline-offset: 0.18em; }
.service__proof a:hover { color: var(--sea); }
/* El servicio de voz es la diferencia principal: dos columnas y el color del mar. */
.service--wide { background: var(--sea); color: var(--on-sea); }
.service--wide:hover { background: var(--sea); }
.service--wide .service__num { color: var(--on-sea); }
.service--wide .service__title { font-size: clamp(2rem, 3.8vw, 3.1rem); max-width: 16ch; }
.service--wide .service__text { font-size: 1.1875rem; max-width: 50ch; }
.service--wide .service__proof,
.service--wide .service__proof a { color: var(--on-sea); text-decoration-color: var(--sun); }
@media (min-width: 48rem) {
  .service--wide { grid-column: span 2; }
}
@media (min-width: 64rem) {
  .services__grid .service:nth-child(2) { border-right: 0; }
  .services__grid .service:nth-child(5) { border-right: 0; }
  .services__grid .service:nth-child(n + 3) { border-bottom: 0; }
}
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .services__grid .service:nth-child(2n + 1):not(:first-child) { border-right: 0; }
  .services__grid .service--wide { border-right: 0; }
}

/* ----------------------------------------------------------- herramientas */

.stack__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 64rem) {
  .stack__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.stack__group {
  padding: 1.5rem var(--gutter) 1.75rem;
  border-bottom: var(--line) solid var(--ink);
  border-right: var(--line) solid var(--ink);
}
.stack__group:nth-child(2n) { border-right: 0; }
@media (min-width: 64rem) {
  .stack__group:nth-child(2n) { border-right: var(--line) solid var(--ink); }
  .stack__group:nth-child(3n) { border-right: 0; }
  .stack__group:nth-child(n + 4) { border-bottom: 0; }
}
@media (max-width: 63.99rem) {
  .stack__group:nth-child(n + 5) { border-bottom: 0; }
}
.stack__name { font-family: var(--serif); font-style: italic; font-size: 1.2rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--sea); }
.stack__group li { font-size: clamp(1.05rem, 1.5vw, 1.2rem); font-weight: 500; line-height: 1.5; }

/* --------------------------------------------------------------- contacto */

.contact { display: grid; }
@media (min-width: 64rem) {
  .contact { grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 1fr); }
}
.contact__main {
  display: grid;
  gap: 1.25rem;
  padding: clamp(2.25rem, 6vw, 5rem) var(--gutter);
  background: var(--ink);
  color: var(--paper);
}
@media (min-width: 64rem) {
  .contact__main { grid-row: span 3; border-right: var(--line) solid var(--ink); }
}
.contact__title { font-family: var(--serif); font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 600; line-height: 1; letter-spacing: -0.035em; max-width: 14ch; text-wrap: balance; }
.contact__title em { font-weight: 500; color: var(--on-ink-accent); }
.contact__lead { max-width: 48ch; font-size: 1.125rem; color: color-mix(in srgb, var(--paper) 84%, var(--ink)); }
.contact__email { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: 1rem; }
.email {
  font-size: clamp(1.25rem, 3.3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}
.email:hover { background: var(--sun); color: var(--on-sun); text-decoration-color: var(--on-sun); }

.contact__links { display: grid; border-bottom: var(--line) solid var(--ink); }
.contact__links a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 1rem;
  padding: 1.05rem var(--gutter);
  border-bottom: var(--line) solid var(--ink);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.contact__links li:last-child a { border-bottom: 0; }
.contact__links a:hover { background: var(--sun); color: var(--on-sun); }
.contact__k { font-size: 0.875rem; font-weight: 700; }
.contact__v { grid-column: 1; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.contact__arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 1.25rem; }
.contact__cv { display: grid; gap: 0.85rem; padding: 1.5rem var(--gutter); border-bottom: var(--line) solid var(--ink); }
.contact__cv-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.contact__loc { padding: 1.25rem var(--gutter); font-size: 0.875rem; align-self: end; }

/* ------------------------------------------------------------------ pie */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2rem;
  font-size: 0.875rem;
}
.site-footer a { text-underline-offset: 0.2em; text-decoration-color: var(--sea); }
.site-footer__top { font-weight: 700; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 120;
  max-width: calc(100vw - 2rem);
  padding: 0.85rem 1.2rem;
  background: var(--ink);
  color: var(--paper);
  border-left: 0.5rem solid var(--sun);
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, 1rem);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s var(--spring);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------- pantalla de carga */

.boot { display: none; }
.booting { overflow: hidden; }
.booting .boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 1.5rem;
  background: var(--paper);
  color: var(--ink);
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.75s var(--ease);
  cursor: pointer;
}
.booting .boot.is-leaving { clip-path: inset(0 0 100% 0); }
.boot__mark { font-family: var(--serif); font-style: italic; font-size: 1.15rem; font-weight: 600; }
.boot__stage { width: min(62vmin, 400px); aspect-ratio: 1; border: var(--line) solid var(--ink); }
.boot__canvas { width: 100%; height: 100%; }
.boot__readout { display: grid; justify-items: center; gap: 0.2rem; }
.boot__percent { font-family: var(--serif); font-size: clamp(2.6rem, 11vmin, 4.5rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: lining-nums tabular-nums; }
.boot__label { font-size: 0.8125rem; color: var(--ink-soft); }
.boot__bar { width: min(62vmin, 400px); height: 14px; padding: 2px; border: var(--line) solid var(--ink); }
.boot__bar span { display: block; height: 100%; width: 100%; background: var(--sea); transform: scaleX(var(--b, 0)); transform-origin: left; transition: transform 0.15s linear; }
.boot__skip { font-size: 0.75rem; color: var(--ink-soft); }

/* ------------------------------------------------- telón entre páginas */

.curtain {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
  opacity: 0;
  background: var(--paper);
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}
/* Mientras se desvanece ya no bloquea clics; solo los bloquea mientras cubre. */
.curtain.is-in,
.curtain-arrive .curtain {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.22s ease;
}
.curtain__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.curtain__plate {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  max-width: calc(100% - 2rem);
  padding: 1.1rem 1.75rem;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  transform: translate(-50%, -50%);
  text-align: center;
}
.curtain__caption { font-size: 0.75rem; font-weight: 700; }
.curtain__target { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 4vmin, 2rem); font-weight: 600; overflow-wrap: anywhere; }

/* ------------------------------------------------------------- cursor */

.cursor { display: none; }
.cursor-on .cursor {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 95;
  width: 100vw;
  height: 100vh;
  max-width: none;
  pointer-events: none;
  mix-blend-mode: difference;
}
.cursor-on,
.cursor-on * { cursor: none !important; }
.booting .cursor { display: none; }

/* --------------------------------------------------------- ilustraciones */

.poster { font-family: var(--mono); }
.p-ink { fill: var(--ink); }
.p-paper { fill: var(--paper); }
.p-paper2 { fill: var(--paper-2); }
.p-sea { fill: var(--sea); }
.p-sun { fill: var(--sun); }
.p-stroke { stroke: var(--ink); stroke-width: 2.5; }
.p-stroke--thick { stroke-width: 4; }
.p-stroke--frame { stroke-width: 7; }
.p-line { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.p-line--thin { stroke-width: 2; }
.p-line--wall { stroke-width: 5; stroke-linecap: square; }
.p-line--sun { stroke: var(--sun); stroke-width: 4; }
.p-hair { stroke: var(--ink); stroke-width: 1; opacity: 0.35; }
.p-text { fill: var(--ink); font-size: 13px; font-weight: 500; }
.p-text--sm { font-size: 12px; }
.p-text--xs { font-size: 11px; }
.p-text--big { font-size: 24px; font-weight: 600; }
.p-text--bold { font-weight: 600; }
.p-text--inv { fill: var(--paper); }
.p-text--on-sea { fill: var(--on-sea); }
.p-text--muted { fill: var(--ink-soft); }

.poster .bar { transform-box: fill-box; transform-origin: center; animation: bar var(--d, 0.8s) ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes bar { from { transform: scaleY(0.12); } to { transform: scaleY(1); } }
.poster .pulse { animation: pulse 1.4s steps(2, jump-none) infinite; }
@keyframes pulse { 50% { opacity: 0.15; } }
.poster .blink { animation: pulse 1.1s steps(2, jump-none) infinite; }

/* Secuencias: aparecen en momentos distintos y se van juntas. */
.poster .s1 { animation: seq-1 9s var(--ease) infinite; }
.poster .s2 { animation: seq-2 9s var(--ease) infinite; }
.poster .s3 { animation: seq-3 9s var(--ease) infinite; }
.poster .s4 { animation: seq-4 9s var(--ease) infinite; }
@keyframes seq-1 { 0%, 6% { opacity: 0; transform: translateY(10px); } 12%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes seq-2 { 0%, 26% { opacity: 0; transform: translateY(10px); } 32%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes seq-3 { 0%, 46% { opacity: 0; transform: translateY(10px); } 52%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes seq-4 { 0%, 64% { opacity: 0; transform: translateY(10px); } 70%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }

.poster .node__box { fill: var(--paper); animation: node-box 7.2s infinite; animation-delay: calc(var(--i) * 1.2s); }
.poster .node__label { animation: node-label 7.2s infinite; animation-delay: calc(var(--i) * 1.2s); }
.poster .node--done .node__box { animation-name: node-box-done; }
@keyframes node-box { 0%, 16% { fill: var(--sea); } 17%, 100% { fill: var(--paper); } }
@keyframes node-box-done { 0%, 16% { fill: var(--sun); } 17%, 100% { fill: var(--paper); } }
@keyframes node-label { 0%, 16% { fill: var(--on-sea); } 17%, 100% { fill: var(--ink); } }
.poster .node--done .node__label { animation-name: none; }
.poster .link { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 6 5; animation: link-flow 0.9s linear infinite; }
.poster .link--bus { stroke: var(--sea); stroke-width: 2; opacity: 0.85; }
@keyframes link-flow { to { stroke-dashoffset: -22; } }
.poster .cell { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.5; animation: cell var(--d) steps(1, end) var(--dl) infinite; }
@keyframes cell { 0%, 45% { fill: var(--paper-2); } 46%, 100% { fill: var(--sea); } }

.poster .eq { animation: pulse 1.8s ease-in-out infinite; }
.poster .tile { transform-box: fill-box; transform-origin: center bottom; animation: tile 9s var(--spring) infinite; animation-delay: calc(var(--i) * 0.12s); }
@keyframes tile { 0% { transform: scale(0.8); opacity: 0; } 6%, 92% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.poster .pin { transform-box: fill-box; transform-origin: center bottom; animation: pin 1.6s var(--spring) infinite; }
@keyframes pin { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } }

.poster .scan { animation: scan 3.2s var(--ease) infinite alternate; }
.poster .scan__glow { opacity: 0.2; }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(217px); } }
.poster .bracket { animation: pulse 1.6s steps(2, jump-none) infinite; }

.poster .sensor { transform-box: fill-box; transform-origin: center; animation: sensor 2s ease-out var(--dl, 0s) infinite; }
@keyframes sensor { 0% { transform: scale(0.6); } 30% { transform: scale(1.25); } 60%, 100% { transform: scale(1); } }
.poster .cam { animation: pulse 2.6s steps(2, jump-none) infinite; }

.poster .pay__box { fill: var(--paper); animation: pay 6s infinite; animation-delay: calc(var(--i) * 2s); }
@keyframes pay { 0%, 32% { fill: var(--sun); } 33%, 100% { fill: var(--paper); } }
.poster .grow { transform-box: fill-box; transform-origin: center bottom; animation: grow 9s var(--ease) var(--dl) infinite; }
@keyframes grow { 0%, 8% { transform: scaleY(0); } 22%, 90% { transform: scaleY(1); } 100% { transform: scaleY(0); } }

/* Sin JavaScript corren siempre; con JavaScript solo cuando se ven. */
.js .poster:not(.is-playing) *,
.js .poster:not(.is-playing) { animation-play-state: paused !important; }

/* -------------------------------------------------------------- currículum */

.cv-body { background: var(--paper-2); }
.cv-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-bottom: var(--line) solid var(--ink);
  background: var(--paper);
}
.cv-toolbar > .tool { border-left: 0; border-right: var(--line) solid var(--ink); }
.cv-toolbar__right { display: flex; flex-wrap: wrap; }
@media (max-width: 39.99rem) {
  .cv-toolbar { display: grid; }
  .cv-toolbar > .tool { border-right: 0; border-bottom: var(--line) solid var(--ink); justify-content: flex-start; }
  .cv-toolbar__right { display: grid; grid-template-columns: repeat(4, auto); }
  .cv-toolbar__right .tool:first-child { border-left: 0; }
}

.cv {
  max-width: 52rem;
  margin: clamp(1rem, 4vw, 2.5rem) auto;
  padding: clamp(1.25rem, 5vw, 3.5rem);
  background: var(--paper);
  border: var(--line) solid var(--ink);
  font-size: 0.9375rem;
  line-height: 1.5;
}
@media (max-width: 39.99rem) {
  .cv { margin-inline: 0.75rem; }
}
.cv a { text-underline-offset: 0.15em; text-decoration-color: var(--sea); }
.cv-head { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem 1.5rem; align-items: center; padding-bottom: 1.5rem; border-bottom: var(--line) solid var(--ink); }
@media (max-width: 34rem) {
  .cv-head { grid-template-columns: 1fr; }
}
.cv-head__photo { width: 7.5rem; height: 7.5rem; object-fit: cover; border: var(--line) solid var(--ink); }
.cv-head h1 { font-family: var(--serif); font-size: clamp(1.75rem, 4.5vw, 2.5rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
.cv-head__role { margin-top: 0.35rem; font-weight: 700; color: var(--sea); }
.cv-head__contact { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; margin-top: 0.75rem; font-size: 0.8125rem; }
.cv-head__contact a { overflow-wrap: anywhere; }
.cv-sec { padding-top: 1.35rem; }
.cv-sec h2 { margin-bottom: 0.6rem; padding-bottom: 0.3rem; border-bottom: 1.5px solid var(--ink); font-family: var(--serif); font-style: italic; font-size: 1.15rem; font-weight: 600; }
.cv-item + .cv-item { margin-top: 1rem; }
.cv-item__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; }
.cv-item__head h3 { font-size: 1.05rem; font-weight: 800; }
.cv-item__role { font-weight: 500; }
.cv-item__when { font-family: var(--mono); font-size: 0.8125rem; font-weight: 600; }
.cv-item__summary { margin: 0.2rem 0 0.4rem; font-weight: 600; }
.cv ul:not(.cv-head__contact) { display: grid; gap: 0.3rem; }
.cv-item ul li,
.cv-prev li,
.cv-projects li { position: relative; padding-left: 1rem; }
.cv-item ul li::before,
.cv-prev li::before,
.cv-projects li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 0.4rem; height: 0.4rem; background: var(--sea); }
.cv-prev { margin-top: 1rem; }
.cv-muted { color: var(--ink-soft); }
.cv-dl { display: grid; gap: 0.3rem; }
.cv-dl > div { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; }
@media (max-width: 34rem) {
  .cv-dl > div { grid-template-columns: 1fr; gap: 0; }
}
.cv-dl dt { font-weight: 700; }
.cv-cols { display: grid; gap: 0 2rem; }
@media (min-width: 40rem) {
  .cv-cols { grid-template-columns: 1.4fr 1fr; }
  .cv-cols .cv-dl > div { grid-template-columns: 5.5rem 1fr; }
}
.cv-updated { margin-top: 1.5rem; font-size: 0.8125rem; color: var(--ink-soft); }

@page { size: A4; margin: 11mm 13mm; }
@media print {
  :root,
  :root[data-theme='dark'] {
    --paper: #ffffff;
    --paper-2: #ffffff;
    --ink: #17140f;
    --ink-soft: #4a4339;
    --sea: #0d6e63;
    color-scheme: light;
  }
  html { scroll-behavior: auto; }
  body, .cv-body { background: #fff; font-size: 10pt; }
  .cv-toolbar, .curtain, .cursor, .boot, .skip, .toast { display: none !important; }
  .cv { max-width: none; margin: 0; padding: 0; border: 0; font-size: 9.4pt; line-height: 1.4; }
  .cv a { color: inherit; text-decoration: none; }
  .cv-head { grid-template-columns: auto 1fr; }
  .cv-head__photo { width: 26mm; height: 26mm; }
  .cv-head h1 { font-size: 21pt; letter-spacing: 0; }
  .cv-sec { padding-top: 4mm; }
  .cv-item,
  .cv-projects li,
  .cv-dl > div { break-inside: avoid; }
  .cv-sec h2 { break-after: avoid; font-size: 12pt; }
  .cv-cols { grid-template-columns: 1.4fr 1fr; }
  .cv-dl > div { grid-template-columns: 34mm 1fr; }
  .cv-cols .cv-dl > div { grid-template-columns: 18mm 1fr; }
}

/* ------------------------------------------------------------------ 404 */

.nf-body { min-height: 100vh; display: grid; place-items: center; padding: var(--gutter); }
.nf { display: grid; gap: 2rem; align-items: center; width: min(100%, 60rem); border: var(--line) solid var(--ink); background: var(--paper); }
@media (min-width: 48rem) {
  .nf { grid-template-columns: 1fr 1.2fr; gap: 0; }
}
.nf__art { width: 100%; aspect-ratio: 1; border-bottom: var(--line) solid var(--ink); }
@media (min-width: 48rem) {
  .nf__art { border-bottom: 0; border-right: var(--line) solid var(--ink); }
}
.nf__text { display: grid; gap: 1rem; justify-items: start; padding: 0 var(--gutter) var(--gutter); }
@media (min-width: 48rem) {
  .nf__text { padding: var(--gutter); }
}
.nf__text h1 { font-family: var(--serif); font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 600; line-height: 1; letter-spacing: -0.035em; }
.nf__alt { font-size: 0.9rem; color: var(--ink-soft); }
.nf__alt a { color: var(--ink); font-weight: 700; }

/* ------------------------------------------------------ movimiento reducido */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee__track { animation: none; }
  .poster .s1, .poster .s2, .poster .s3, .poster .s4, .poster .tile, .poster .grow { animation: none !important; opacity: 1; transform: none; }
  .js .ink-wipe { color: inherit; }
  .js .ink-wipe::after { display: none; }
  .status__dot { animation: none; }
}
