/* =========================================================
   José Luis Gimeno Londres · CV
   Estética: papel de estudio, tinta, rojo de bandeja de mesa
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --paper: #f2ebdd;
  --paper-2: #e8dfcc;
  --ink: #1a1714;
  --ink-soft: #5a524a;
  --red: #c8341f;
  --granate: #7a1f2b;
  --yellow: #e2b13c;
  --line: #1a17141f;

  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1180px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --space: clamp(4rem, 10vw, 8rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

mark {
  background: linear-gradient(transparent 55%, var(--yellow) 55%);
  color: inherit;
  padding: 0 .1em;
}

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

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 99;
  background: var(--ink); color: var(--paper);
  padding: .5rem 1rem; transition: top .2s;
}
.skip:focus { top: 1rem; }

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

/* Ancho común de secciones */
main > section,
.footer {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--space) var(--gutter) 0;
}

/* ---------- Tipografía de sección ---------- */
.eyebrow,
.kicker {
  font: 500 .8rem/1 var(--f-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
}
.eyebrow--light { color: var(--yellow); }

.section-title {
  font: 600 clamp(2rem, 5vw, 3.5rem)/1.05 var(--f-display);
  letter-spacing: -.02em;
  max-width: 18ch;
  margin-bottom: 3rem;
}
.section-title em { font-style: italic; color: var(--red); }

/* ---------- Botón ---------- */
.btn {
  display: inline-flex; gap: .6rem; align-items: center;
  font: 500 .9rem/1 var(--f-mono);
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  background: var(--ink); color: var(--paper);
  padding: 1rem 1.5rem;
  box-shadow: 5px 5px 0 var(--red);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--red); }
.btn--light { background: var(--paper); color: var(--ink); box-shadow: 5px 5px 0 var(--yellow); }
.btn--light:hover { box-shadow: 7px 7px 0 var(--yellow); }

/* ---------- Cabecera ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font: 900 1.5rem/1 var(--f-display);
  text-decoration: none; letter-spacing: -.03em;
}
.brand span { color: var(--red); }
.topbar nav { overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar ul { display: flex; gap: clamp(.9rem, 2.2vw, 2rem); }
.topbar a:not(.brand) {
  font: 500 .78rem/1 var(--f-mono);
  letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  padding-block: .4rem;
  background: linear-gradient(var(--red), var(--red)) left bottom / 0 2px no-repeat;
  transition: background-size .25s;
}
.topbar a:not(.brand):hover { background-size: 100% 2px; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr minmax(0, 510px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-top: clamp(3rem, 7vw, 6rem) !important;
}
.hero h1 {
  color: var(--granate);
  font: 900 clamp(2.7rem, 7.6vw, 6.3rem)/.92 var(--f-display);
  letter-spacing: -.045em;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-weight: 400; font-style: italic; color: var(--ink);
  font-size: 1.32em; line-height: .88;
  display: block;
}
.hero__role {
  font: 500 .95rem/1.5 var(--f-mono);
  color: var(--ink-soft);
  border-left: 3px solid var(--red);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}
.hero__lead {
  font: 400 clamp(1.15rem, 1.8vw, 1.35rem)/1.55 var(--f-display);
  max-width: 34ch;
  margin-bottom: 2.25rem;
}

.hero__photo {
  position: relative;
  justify-self: center;
  width: min(100%, 510px);
}
.hero__photo picture {
  display: block;
  padding: .9rem .9rem 3.2rem;
  background: #fbf8f2;
  box-shadow: 0 1px 2px #0002, 0 20px 40px -18px #0006;
  transform: rotate(2.5deg);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.hero__photo:hover picture { transform: rotate(0) scale(1.02); }
.hero__photo img { filter: saturate(.92) contrast(1.03); }

.stamp {
  position: absolute; left: -1.6rem; bottom: 1.2rem;
  display: grid; place-content: center; text-align: center;
  width: 7.5rem; aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red); color: var(--paper);
  font: 500 .7rem/1.1 var(--f-mono); letter-spacing: .15em; text-transform: uppercase;
  transform: rotate(-12deg);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--red);
}
.stamp b { display: block; font: 900 2rem/1 var(--f-display); letter-spacing: -.02em; }

.stats {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-block: 2px solid var(--ink);
  margin-top: 1rem;
}
.stats div { padding: 1.5rem 1rem; display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats div + div { border-left: 1px solid var(--line); }
.stats dd { font: 900 clamp(2.4rem, 5vw, 3.8rem)/1 var(--f-display); letter-spacing: -.03em; }
.stats dt { font: 400 .78rem/1.3 var(--f-mono); color: var(--ink-soft); margin-top: .5rem; }

/* ---------- Perfil ---------- */
.profile blockquote p {
  font: 400 clamp(1.7rem, 4vw, 3rem)/1.18 var(--f-display);
  letter-spacing: -.015em;
  max-width: 24ch;
  margin-bottom: 3rem;
}
.profile__cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem;
  color: var(--ink-soft);
}
.profile__cols p:first-child::first-letter {
  float: left;
  font: 900 4.2rem/.8 var(--f-display);
  color: var(--red);
  margin: .35rem .6rem 0 0;
}

/* ---------- Foto estudio ---------- */
.studio {
  max-width: 1400px;
  margin: var(--space) auto 0;
  padding-inline: var(--gutter);
}
.studio img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  filter: sepia(.15) contrast(1.05);
}
.studio figcaption {
  font: 400 .8rem/1.4 var(--f-mono);
  color: var(--ink-soft);
  margin-top: .8rem;
  padding-left: 1rem;
  border-left: 3px solid var(--red);
}

/* ---------- Timeline ---------- */
.tl { position: relative; display: grid; gap: 0; }
.tl::before {
  content: ""; position: absolute; left: 7.5rem; top: .6rem; bottom: .6rem;
  width: 2px; background: var(--ink);
}
.tl li {
  position: relative;
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  column-gap: 3rem;
  padding: 1.1rem 0;
  border-bottom: 1px dashed var(--line);
}
.tl li::before {
  content: ""; position: absolute; left: calc(7.5rem - 6px); top: 1.55rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink);
}
.tl time {
  grid-row: span 2;
  font: 500 .9rem/1.6 var(--f-mono);
  color: var(--ink-soft);
  text-align: right;
}
.tl h3 { font: 600 1.3rem/1.3 var(--f-display); }
.tl p { color: var(--ink-soft); font-size: .95rem; max-width: 60ch; }

.tl--own::before { background: var(--yellow) !important; }
.tl--key::before { background: var(--red) !important; border-color: var(--red) !important; transform: scale(1.35); }
.tl--key h3 { color: var(--red); font-size: 1.7rem; }
.tl--muted { opacity: .6; }

.legend {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font: 400 .78rem/1 var(--f-mono); color: var(--ink-soft);
  margin-top: 1.5rem;
}
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); margin-left: 1rem; }
.dot:first-child { margin-left: 0; }
.dot--own { background: var(--yellow); }
.dot--key { background: var(--red); border-color: var(--red); }

/* ---------- Marcas ---------- */
.note { font: 400 .85rem/1 var(--f-mono); color: var(--ink-soft); margin: -2rem 0 2rem; }
.launch { color: var(--red); font-size: .75em; vertical-align: super; margin-left: .1em; }

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}
.brand-grid article {
  background: var(--paper);
  padding: 1.75rem;
  transition: background .25s;
}
.brand-grid article:hover { background: #fbf8f2; }
.brand-grid h3 {
  font: 600 1.45rem/1.2 var(--f-display);
  margin-bottom: .9rem;
  padding-bottom: .7rem;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}
.brand-grid p { font-size: .93rem; line-height: 1.75; color: var(--ink-soft); }
.brand-grid strong { color: var(--ink); }

/* ---------- Evolución (bloque oscuro a sangre) ---------- */
.evo {
  max-width: none !important;
  margin-top: var(--space);
  background: var(--ink);
  color: var(--paper);
  padding: var(--space) max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))) !important;
}
.evo .section-title em { color: var(--yellow); }
.evo__strip {
  display: flex; flex-wrap: wrap; gap: .75rem;
  counter-reset: paso;
  margin-bottom: 3rem;
}
.evo__strip li {
  counter-increment: paso;
  border: 1px solid #f2ebdd40;
  padding: .9rem 1.2rem;
  font: 500 .9rem/1.2 var(--f-mono);
  display: flex; gap: .7rem; align-items: center;
  transition: background .25s, color .25s;
}
.evo__strip li::before {
  content: counter(paso, decimal-leading-zero);
  color: var(--yellow); font-size: .75rem;
}
.evo__strip li:last-child { background: var(--red); border-color: var(--red); }
.evo__strip li:hover { background: var(--paper); color: var(--ink); }
.evo__text {
  font: 400 clamp(1.1rem, 2vw, 1.4rem)/1.6 var(--f-display);
  max-width: 62ch;
  color: #f2ebddcc;
}

/* ---------- Formación ---------- */
.edu__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.edu h3 { font: 600 1.6rem/1.2 var(--f-display); margin-bottom: 1.25rem; }
.list li {
  position: relative;
  padding: .85rem 0 .85rem 1.6rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.list li::before {
  content: "→"; position: absolute; left: 0; color: var(--red);
  font-family: var(--f-mono);
}
.list strong { color: var(--ink); font-weight: 600; }

/* ---------- Libros: estantería ----------
   Crece sola: cada <li> es un libro. Cuando una balda se llena, los libros
   pasan a una balda nueva debajo. Color y altura del lomo se asignan
   automáticamente (se pueden forzar con style="--c:#color;--h:90%"). */
.shelf {
  --row: 300px;            /* alto de cada balda */
  --board: 14px;           /* grosor del estante */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  grid-auto-rows: var(--row);
  column-gap: 6px;
  row-gap: var(--board);
  padding: 0 1rem var(--board);
  background: repeating-linear-gradient(to bottom,
    transparent 0 var(--row),
    var(--ink) var(--row) calc(var(--row) + var(--board)));
}
.shelf li {
  align-self: end;
  height: var(--h, 90%);
  background: var(--c, var(--ink));
  color: var(--t, var(--paper));
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex; align-items: center; justify-content: flex-start;
  padding: 1.1rem 0;
  font: 600 1.05rem/1.1 var(--f-display);
  letter-spacing: .01em;
  overflow: hidden;
  border-radius: 3px 3px 0 0;
  box-shadow: inset 4px 0 0 #ffffff26, inset -4px 0 0 #00000026;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  cursor: default;
}
.shelf li:nth-child(13n + 1) { --c: #c8341f; }
.shelf li:nth-child(13n + 2) { --c: #1f3a5f; }
.shelf li:nth-child(13n + 3) { --c: #e2b13c; --t: var(--ink); }
.shelf li:nth-child(13n + 4) { --c: #2f5d50; }
.shelf li:nth-child(13n + 5) { --c: #1a1714; }
.shelf li:nth-child(13n + 6) { --c: #8a4b2a; }
.shelf li:nth-child(13n + 7) { --c: #e9dfcb; --t: var(--ink); }
.shelf li:nth-child(13n + 8) { --c: #2d4f8a; }
.shelf li:nth-child(13n + 9) { --c: #b0567a; }
.shelf li:nth-child(13n + 10) { --c: #55606b; }
.shelf li:nth-child(13n + 11) { --c: #1f6f7a; }
.shelf li:nth-child(13n + 12) { --c: #6b3f2a; }
.shelf li:nth-child(13n + 13) { --c: #d9822b; --t: var(--ink); }
.shelf li:nth-child(7n + 1) { --h: 94%; }
.shelf li:nth-child(7n + 2) { --h: 100%; }
.shelf li:nth-child(7n + 3) { --h: 82%; }
.shelf li:nth-child(7n + 4) { --h: 96%; }
.shelf li:nth-child(7n + 5) { --h: 78%; }
.shelf li:nth-child(7n + 6) { --h: 90%; }
.shelf li:nth-child(7n + 7) { --h: 86%; }
.shelf li:hover { transform: rotate(180deg) translateY(18px); }

/* ---------- Vida ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: .6rem 1.1rem;
  font-size: .92rem;
  transition: background .2s, color .2s, transform .2s;
}
.chips li:nth-child(3n + 1) { background: var(--paper-2); }
.chips li:hover { background: var(--red); color: var(--paper); border-color: var(--red); transform: rotate(-2deg); }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--ink); }
.faq details:first-of-type { border-top: 2px solid var(--ink); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.3rem 0;
  font: 600 clamp(1.15rem, 2.2vw, 1.45rem)/1.3 var(--f-display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font: 400 1.6rem/1 var(--f-mono); color: var(--red);
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.4rem; max-width: 70ch; color: var(--ink-soft); }

/* ---------- Cierre ---------- */
.closing {
  max-width: none !important;
  margin-top: var(--space);
  background: var(--red);
  color: var(--paper);
  text-align: center;
  padding: var(--space) var(--gutter) !important;
}
.closing__quote {
  font: 400 clamp(2rem, 6vw, 4.5rem)/1.08 var(--f-display);
  letter-spacing: -.025em;
  max-width: 18ch; margin: 0 auto 1.5rem;
}
.closing__quote em { font-style: italic; color: var(--yellow); }
.closing__bye { font: 500 1rem/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 2.5rem; }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-block: 2rem !important;
  font: 400 .78rem/1.4 var(--f-mono);
  color: var(--ink-soft);
}

/* ---------- Mosaicos (etapa Carrera) ---------- */
.mosaics {
  display: grid;
  grid-template-columns: 1fr 210px 140px;
  align-items: end;
  gap: 1.5rem 1.25rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid var(--ink);
}
.mosaics__head { display: grid; gap: 1rem; align-self: center; padding-right: 1.5rem; }
.mosaics__head h3 { font: 600 clamp(1.8rem, 4vw, 2.8rem)/1.05 var(--f-display); letter-spacing: -.02em; }
.mosaics__head p { color: var(--ink-soft); }
.mosaics figure { position: relative; }
.mosaics picture { display: block; overflow: hidden; background: var(--ink); }
.mosaics img { width: 100%; height: auto; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.mosaics figure:hover img { transform: scale(1.04); }
.mosaics figcaption {
  color: var(--ink-soft);
  font: 500 .62rem/1.35 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  padding-top: .5rem;
}

/* ---------- Fotos junto a la trayectoria (orden cronológico) ----------
   Columna de dos fotos por fila, con tamaños, giros y alturas distintos
   para que no quede mecánico. Las fotos no se recortan. */
.tl-layout { display: grid; grid-template-columns: 1fr 600px; gap: 3rem; align-items: start; }
.tl-photos {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem 1.4rem; align-items: start;
  padding-top: .5rem;
}
.polaroid {
  --r: -2deg;
  background: #fbf8f2;
  padding: .5rem .5rem .75rem;
  box-shadow: 0 1px 2px #0002, 0 14px 28px -16px #0007;
  transform: rotate(var(--r));
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.polaroid:hover { transform: rotate(0) scale(1.06); position: relative; z-index: 2; }
.polaroid img { width: 100%; }
.polaroid figcaption { font: 400 .66rem/1.4 var(--f-mono); color: var(--ink-soft); margin-top: .55rem; }
.polaroid figcaption b { display: block; font: 900 1rem/1 var(--f-display); color: var(--red); margin-bottom: .2rem; }

.p--a { --r: -2.5deg; }
.p--b { --r: 2deg;    width: 88%; justify-self: end; margin-top: 0; }
.p--c { --r: 1.5deg;  width: 94%; }
.p--d { --r: -1.8deg; width: 86%; justify-self: end; margin-top: 0; }
.p--e { --r: -2.4deg; width: 142%; margin-top: 1rem; }
.p--f { --r: 2.8deg;  width: 112px; justify-self: end; margin-top: 3.5rem; }
.p--g { --r: -1.6deg; }
.p--i { --r: 1.8deg;  width: 94%; justify-self: end; margin-top: 1.2rem; }
.tl-stack { width: 100%; display: flex; flex-direction: column; align-items: flex-end; }
.p--q { --r: -1.4deg; width: 84%; margin-top: 1.4rem; }
.p--j { --r: -2deg;   width: 100%; }
.p--m { --r: 1.6deg;  width: 96%; justify-self: end; margin-top: 1rem; }
.p--k { --r: -1.4deg; width: 61%; margin-left: 22.4%; }
.p--l { --r: 2deg;    width: 98%; justify-self: end; margin-top: 1.5rem; }

/* Fotos 2005 y 2007: rellenan el hueco bajo la lista, a la izquierda de Onda Cero */
.tl-col { align-self: stretch; display: flex; flex-direction: column; }
.tl-extra {
  margin-top: auto; padding-top: 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start;
}
.p--n { --r: -2deg;  width: 84%; }
.p--o { --r: 2.2deg; width: 84%; justify-self: end; margin-top: 1.6rem; }
.p--r { --r: 1.6deg;  width: 100%; }
.p--s { --r: -1.8deg; width: 115%; margin-left: -4%; margin-top: 1.4rem; }

/* ---------- Fotos junto a los títulos (rellenan el hueco a la derecha) ---------- */
.head-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 2rem 3rem; align-items: center;
}
.head-photos { display: flex; gap: 1.5rem; align-items: flex-start; }
.head-photos .polaroid { width: 230px; }
.hp--lois     { --r: 3deg; width: 250px !important; }
.hp--cannes   { --r: -3deg; width: 165px !important; margin-bottom: 1.5rem; }
.hp--plumilla { --r: 2.2deg; width: 290px !important; margin-bottom: 2rem; }
.hp--mar      { --r: -2.4deg; width: 230px !important; }
.hp--pesca    { --r: 2.6deg; width: 230px !important; margin-top: 2.5rem; }
.hp--cactus   { --r: -2deg; width: 140px !important; margin-top: 2.2rem; }
.hp--moto     { --r: 2deg; width: 230px !important; margin-top: 0; }
.hp--aire     { --r: -1.8deg; width: 250px !important; margin-top: 0; }
.hp--ski      { --r: 2.2deg; width: 190px !important; margin-top: 1.2rem; }
.head-row--wide { grid-template-columns: 1fr; }
.head-photos--wrap { flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 2.2rem 2.4rem; padding: .5rem 0 2.5rem; }
.head-photos__break { flex-basis: 100%; height: 0; }

/* ---------- Retrato de cierre ---------- */
.closing__photo img {
  width: 180px; aspect-ratio: 1; object-fit: cover; object-position: 50% 35%;
  border-radius: 50%;
  margin: 0 auto 2.5rem;
  box-shadow: 0 0 0 6px var(--red), 0 0 0 8px var(--yellow);
}

/* ---------- Animación de entrada (respeta reduce-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__text > * { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
  .hero__text > :nth-child(2) { animation-delay: .08s; }
  .hero__text > :nth-child(3) { animation-delay: .16s; }
  .hero__text > :nth-child(4) { animation-delay: .24s; }
  .hero__text > :nth-child(5) { animation-delay: .32s; }
  .hero__photo { animation: drop 1s .2s cubic-bezier(.2, .8, .2, 1) both; }

  @supports (animation-timeline: view()) {
    .tl li, .brand-grid article, .shelf li, .chips li {
      animation: fade linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-30px) rotate(-6deg); } }
@keyframes fade { from { opacity: 0; translate: 0 30px; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hp--cactus { width: 22% !important; }
  .hero__photo { order: -1; width: min(90%, 418px); }
  .stats div { padding: 1.25rem .7rem; }
  .profile__cols, .edu__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .tl-layout { grid-template-columns: 1fr; gap: 3rem; }
  .tl-photos { max-width: 520px; margin-inline: auto; }
  .head-row { grid-template-columns: 1fr; }
  .head-photos { justify-content: center; margin-bottom: 2.5rem; }
  .mosaics { grid-template-columns: 210px 140px; justify-content: start; }
  .mosaics__head { grid-column: 1 / -1; padding-right: 0; }
}

@media (max-width: 560px) {
  .tl-photos { gap: 1.5rem 1rem; padding-inline: .5rem; }
  .head-photos { gap: 1rem; }
  .head-photos .polaroid { width: 46% !important; }
  .hp--cannes { width: 38% !important; }
}

@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: .6rem; padding-block: .7rem; }
  .topbar nav { width: 100%; }
  html { scroll-padding-top: 6.5rem; }

  .stamp { width: 5.8rem; left: -.8rem; }
  .stamp b { font-size: 1.5rem; }

  .studio img { aspect-ratio: 4 / 3; }

  .tl::before { left: 6px; }
  .tl li { grid-template-columns: 1fr; padding-left: 2rem; }
  .tl li::before { left: 0; top: 1.35rem; }
  .tl time { grid-row: auto; text-align: left; }

  .shelf { --row: 240px; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); column-gap: 4px; padding-inline: 0; }
  .shelf li { font-size: .9rem; }
}

/* ---------- Impresión ---------- */
@media print {
  .topbar, .btn, .studio, .skip { display: none; }
  .evo, .closing { background: none; color: var(--ink); }
  body { background: #fff; }
}

/* ---------- Ampliar imágenes ---------- */
img.zoomable { cursor: zoom-in; }
.lightbox {
  border: 0; padding: 1rem; background: transparent; max-width: 96vw; max-height: 96vh;
  margin: auto; overflow: visible; text-align: center;
}
.lightbox::backdrop { background: #1a1612ee; }
.lightbox img { max-width: 94vw; max-height: 86vh; width: auto; height: auto; background: #fbf8f2; box-shadow: 0 20px 60px #0009; cursor: zoom-out; }
.lightbox__cap { color: #f4efe6; font: 400 .85rem/1.4 var(--f-mono); margin-top: .8rem; }
.lightbox__close {
  position: fixed; top: .8rem; right: 1.2rem; z-index: 1; border: 0; background: none;
  color: #f4efe6; font-size: 2.6rem; line-height: 1; cursor: pointer;
}
