/* =============================================================
   Trayectoria — Archetype: Mouse-Reactive Gradient
   Monocromo casi negro + un acento neón. Tipografía masiva mono/sans.
   Lote B (8/10/2026): degradado con capas que solo mueven `transform` (no repinta),
   deriva lenta en táctil, marquesina estática salvo ratón + JS, cabecera en dos filas
   en móvil, rejillas por nº de elementos (--c, clases r / r2), 44 px táctiles.
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #0a0a0a;
  --bg-2: #161616;
  --ink: #fafafa;
  --mute: #a3a3a3;
  --faint: #8a8a8a; /* 5,73:1 sobre #0a0a0a, AA */
  --accent: #00ff88;
  --line: rgba(250, 250, 250, 0.12);

  --gradient-1: #ff006e;
  --gradient-2: #8338ec;
  --gradient-3: #3a86ff;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --container: 1180px;
  --gutter: 1.25rem;
  --nav-h: 68px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  position: relative;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  text-wrap: balance; line-height: 1.06; letter-spacing: -0.02em;
  font-family: var(--mono); font-weight: 700; color: var(--ink);
  overflow-wrap: anywhere;
}
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #0a0a0a; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); position: relative; z-index: 1; }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--accent); color: #0a0a0a;
  z-index: 9999; border-radius: 4px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.9rem;
  overflow-wrap: anywhere;
}

/* =============================================================
   4. Typography
   ============================================================= */
h2 { font-size: clamp(1.9rem, 4.6vw, 3.2rem); margin-bottom: 1.4rem; line-height: 1.08; }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); margin-bottom: 0.5rem; font-family: var(--sans); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.section-lede { color: var(--mute); max-width: 62ch; font-size: 1.05rem; margin-bottom: 2.4rem; }
.sec-head { min-width: 0; }

section { position: relative; z-index: 1; padding-block: clamp(3.5rem, 8vw, 7rem); border-top: 1px solid var(--line); }
.hero { border-top: none; }

/* =============================================================
   5. Components
   ============================================================= */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; min-width: 0;
  padding: 0.7rem 1.6rem; border-radius: 2px; text-align: center;
  font-weight: 600; font-size: 0.95rem; line-height: 1.3; font-family: var(--mono);
  transition: transform .16s var(--ease-out), background-color .16s var(--ease-out), color .16s var(--ease-out), border-color .16s var(--ease-out);
}
.btn-primary { background: var(--accent); color: #0a0a0a; }
@media (hover: hover) { .btn-primary:hover { transform: translateY(-3px); } }
.btn-ghost { color: var(--ink); border: 1px solid rgba(250, 250, 250, 0.28); }
@media (hover: hover) { .btn-ghost:hover { border-color: var(--accent); color: var(--accent); } }
.btn:active { transform: scale(.97); }

/* Nav — escritorio: marca · secciones · idioma; ≤ 900 px: fila 1 marca + idioma, fila 2 tira de secciones */
.nav { position: fixed; top: 0; inset-inline: 0; z-index: 500; background: rgba(10,10,10,0.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner {
  display: flex; align-items: center; gap: 0 1rem; max-width: 1280px; margin-inline: auto;
  padding: 0.35rem var(--gutter);
}
.nav-brand {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; max-width: 100%;
  font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: var(--accent); overflow-wrap: anywhere;
}
.nav-links { display: flex; align-items: center; justify-content: flex-end; flex: 1 1 auto; min-width: 0; gap: 0 clamp(0.5rem, 1.4vw, 1.5rem); }
.nav-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding-inline: 0.2rem;
  font-size: 0.88rem; font-weight: 500; color: var(--mute); font-family: var(--mono); white-space: nowrap;
  transition: color .16s var(--ease-out), transform .16s var(--ease-out);
}
@media (hover: hover) { .nav-link:hover { color: var(--ink); } }
.nav-link--minor { display: none; }
@media (min-width: 1181px) { .nav-link--minor { display: inline-flex; } }
.nav-link--cta {
  background: var(--accent); color: #0a0a0a; padding-inline: 1rem; border-radius: 2px; font-weight: 700;
}
/* El CTA conserva su color en hover y foco (antes .nav-link:hover lo pisaba y quedaba ilegible) */
.nav-link--cta:focus-visible { color: #0a0a0a; }
@media (hover: hover) { .nav-link--cta:hover { color: #0a0a0a; transform: translateY(-1px); } }
.nav-link--cta:active { transform: scale(.97); }
.lang {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 44px; min-width: 44px; padding-inline: 0.9rem;
  border: 1px solid rgba(250, 250, 250, 0.28); border-radius: 2px;
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600; color: var(--ink);
  transition: color .16s var(--ease-out), border-color .16s var(--ease-out), transform .16s var(--ease-out);
}
@media (hover: hover) { .lang:hover { border-color: var(--accent); color: var(--accent); } }
.lang:active { transform: scale(.97); }

@media (max-width: 900px) {
  :root { --nav-h: 0px; }
  .nav { position: absolute; -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(10,10,10,0.55); }
  .nav-inner { flex-wrap: wrap; padding: 0.2rem 0 0; }
  .nav-brand { flex: 1 1 0; min-width: 0; margin-left: var(--gutter); }
  .lang { margin-right: var(--gutter); }
  .nav-links {
    order: 3; flex: 1 0 100%; flex-wrap: nowrap; justify-content: flex-start; gap: 0.3rem; overflow-x: auto; scrollbar-width: none;
    padding-inline: calc(var(--gutter) - 0.2rem); border-top: 1px solid var(--line);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { flex: 0 0 auto; padding-inline: 0.7rem; }
  .nav-link--minor { display: inline-flex; }
  .nav-link--cta { margin-left: 0.3rem; }
}

/* Hero */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--nav-h) + 3.5rem); padding-bottom: 5rem; overflow: hidden; }
@media (max-width: 900px) { .hero { padding-top: 7.5rem; padding-bottom: 3.5rem; } }

/* Degradado: tres capas que se mueven solo con transform/translate (compositor, sin repintar). */
.hero-gradient { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg); }
.blob { position: absolute; display: block; border-radius: 50%; opacity: 0.6; will-change: transform; }
.blob-1 { opacity: 0.72; }
.blob-2 { opacity: 0.5; }
.blob-1 { left: 30%; top: 30%; width: 704px; height: 704px; margin: -352px 0 0 -352px; background: radial-gradient(closest-side, var(--gradient-1), transparent); }
.blob-2 { left: 45%; top: 18%; width: 836px; height: 836px; margin: -418px 0 0 -418px; background: radial-gradient(closest-side, var(--gradient-2), transparent); }
.blob-3 { left: 70%; top: 70%; width: 770px; height: 770px; margin: -385px 0 0 -385px; background: radial-gradient(closest-side, var(--gradient-3), transparent); }
/* Sin puntero fino (táctil): deriva lenta, solo si no se pide movimiento reducido. Con ratón la mueve main.js. */
@media (prefers-reduced-motion: no-preference) and (hover: none), (prefers-reduced-motion: no-preference) and (pointer: coarse) {
  .blob-1 { animation: drift-1 38s ease-in-out infinite alternate; }
  .blob-2 { animation: drift-2 47s ease-in-out infinite alternate; }
  .blob-3 { animation: drift-3 53s ease-in-out infinite alternate; }
  .hero.is-off .blob, html.tab-oculta .blob { animation-play-state: paused; }
}
@keyframes drift-1 { from { translate: 0 0; } to { translate: 22vw 14vh; } }
@keyframes drift-2 { from { translate: 0 0; } to { translate: -16vw 20vh; } }
@keyframes drift-3 { from { translate: 0 0; } to { translate: -20vw -16vh; } }

.hero-content { position: relative; z-index: 1; }
.hero-text { min-width: 0; }
.hero-title { font-size: clamp(2.4rem, 8vw, 5.2rem); line-height: 1.04; margin-block: 0.4rem 1rem; }
.hero-title.largo { font-size: clamp(2rem, 4.6vw, 3.6rem); }
.hero-title-invert { display: inline; padding: 0 0.05em; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-color .16s var(--ease-out), color .16s var(--ease-out); }
@media (hover: hover) { .hero-title-invert:hover { background: var(--ink); color: var(--bg); } }
.hero-tagline { font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--ink); max-width: 50ch; margin-bottom: 0.6rem; font-family: var(--mono); overflow-wrap: anywhere; }
.hero-roles { color: #c4c4c4; font-size: 0.92rem; margin-bottom: 1.8rem; font-family: var(--mono); overflow-wrap: anywhere; } /* 5,2:1 sobre el degradado en móvil */
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.4rem; }
.hero-photo { width: 220px; height: 220px; border-radius: 14px; margin-top: 2rem; overflow: hidden; border: 1px solid var(--line); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; filter: grayscale(1) contrast(1.15); }

@media (min-width: 901px) {
  .hero-content.has-photo { display: grid; grid-template-columns: minmax(0, 1fr) min(360px, 34%); gap: 2.5rem; align-items: center; }
  .hero-photo { width: 100%; height: auto; aspect-ratio: 3 / 4; margin-top: 0; align-self: center; }
}

.hero-scroll-cue {
  position: absolute; bottom: 0.9rem; left: 50%; margin-left: -22px; z-index: 1;
  display: block; width: 44px; height: 56px;
}
.hero-scroll-cue::before {
  content: ""; position: absolute; left: 9px; top: 7px; width: 26px; height: 42px; border: 2px solid var(--mute); border-radius: 999px;
}
.hero-scroll-cue span {
  position: absolute; top: 15px; left: 50%; margin-left: -2px;
  width: 4px; height: 8px; background: var(--accent); border-radius: 999px;
}
@media (prefers-reduced-motion: no-preference) { .hero-scroll-cue span { animation: cueMove 1.8s ease-in-out 3; } }
@keyframes cueMove { 0%,100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(12px); opacity: 0.3; } }
@media (max-width: 900px), (max-height: 600px) { .hero-scroll-cue { display: none; } }

/* Rejillas por nº de elementos: columnas en --c (calculado en la plantilla), filetes por clase r / r2 */
.cells { display: grid; grid-template-columns: repeat(var(--c, 3), minmax(0, 1fr)); gap: 0; }
.cells > * { min-width: 0; }
.cells--frame { border: 1px solid var(--line); }
@media (min-width: 901px) {
  .cells > .r { border-right: 1px solid var(--line); }
  .cells > .r2 { border-top: 1px solid var(--line); }
  .cells > :last-child { grid-column: span var(--sp, 1); }
}
@media (max-width: 900px) {
  .cells { grid-template-columns: minmax(0, 1fr); }
  .cells > * + * { border-top: 1px solid var(--line); }
}

/* Stats */
.stat { container-type: inline-size; padding: 2rem 1.8rem; }
@media (min-width: 901px) { .stat:first-child { padding-left: 0; } .stat:last-child { padding-right: 0; } }
.stat-num { font-family: var(--mono); font-size: min(3.6rem, calc(100cqi / (var(--n, 4) * 0.62))); color: var(--accent); line-height: 1; margin-bottom: 0.5rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat-label { font-weight: 600; margin-bottom: 0.2rem; overflow-wrap: anywhere; }
.stat-note { color: var(--faint); font-size: 0.875rem; font-family: var(--mono); overflow-wrap: anywhere; }
@media (max-width: 900px) { .stat { padding-inline: 0; } }

/* Story / manifesto */
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.story-grid.has-photo { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.story-text p { margin-bottom: 1.2rem; color: var(--mute); max-width: 62ch; font-size: 1.05rem; overflow-wrap: anywhere; }
.story-text .sec-head p { margin-bottom: 0.9rem; max-width: none; }
.story-text .sec-head .eyebrow { color: var(--accent); font-size: 0.8rem; }
.story-text .story-lede { padding: 1.4rem 0; border-top: 1px solid var(--line); font-weight: 500; color: var(--ink); font-family: var(--mono); font-size: 1.05rem; }
.story-text .story-personal { font-style: italic; color: var(--faint); }
.story-figure { width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); justify-self: stretch; }
.story-figure img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; filter: grayscale(1) contrast(1.15); }
@media (min-width: 901px) { .story-figure { position: sticky; top: calc(var(--nav-h) + 2rem); } }
@media (max-width: 900px) { .story-grid.has-photo { grid-template-columns: minmax(0, 1fr); } .story-figure { max-width: 420px; } }

/* Row list / accordion (trayectoria) */
.timeline-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; margin-top: 2rem; align-items: start; }
.timeline-layout.has-photo { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: clamp(2rem, 5vw, 4rem); }
.row-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); min-width: 0; }
.row-item { border-bottom: 1px solid var(--line); }
.row-item--current .row-year { color: var(--accent); }
.row-summary {
  display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) auto; gap: 1.6rem; align-items: baseline;
  padding-block: 1.5rem; min-height: 44px; cursor: pointer; list-style: none;
  transition: transform .16s var(--ease-out);
}
.row-summary::-webkit-details-marker { display: none; }
.row-summary:active { transform: scale(.99); }
.row-year { font-family: var(--mono); color: var(--mute); font-size: 0.9rem; overflow-wrap: anywhere; }
.row-title { font-family: var(--mono); font-weight: 700; font-size: clamp(1rem, 1.8vw, 1.3rem); overflow-wrap: anywhere; line-height: 1.25; }
.row-toggle { font-family: var(--mono); font-size: 1.4rem; color: var(--accent); transition: transform .25s var(--ease-out); }
.row-item[open] .row-toggle { transform: rotate(45deg); }
.row-body { padding-bottom: 1.8rem; }
.row-body p { color: var(--mute); max-width: 68ch; overflow-wrap: anywhere; }
.row-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.row-tags li { font-size: 0.82rem; font-family: var(--mono); padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: 2px; color: var(--mute); overflow-wrap: anywhere; }

@media (max-width: 700px) { .row-summary { grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 1rem; } .row-year { grid-column: 1 / -1; } }

.timeline-side-photo { width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.timeline-side-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 8%; filter: grayscale(1) contrast(1.15); }
@media (min-width: 901px) { .timeline-side-photo { position: sticky; top: calc(var(--nav-h) + 2rem); } }
@media (max-width: 900px) {
  .timeline-layout.has-photo { grid-template-columns: minmax(0, 1fr); }
  .timeline-side-photo { aspect-ratio: 4 / 5; max-height: min(60svh, 460px); width: auto; max-width: 100%; }
  .timeline-side-photo img { object-position: center 10%; }
}

/* Talks / ponencias */
.talk-categories { margin-top: 0.4rem; }
.talk-category { padding: 1.8rem; }
.talk-cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.talk-cat-icon { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 2px; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.talk-cat-icon svg { width: 20px; height: 20px; }
.talk-cat-count { font-family: var(--mono); font-size: 1.6rem; color: var(--accent); }
.talk-cat-examples li { font-size: 0.92rem; color: var(--mute); padding-block: 0.45rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.talk-cat-examples li:first-child { border-top: none; }
.talk-cat-examples strong { color: var(--ink); font-weight: 600; }

/* Education */
.education-grid { border-top: 1px solid var(--line); }
.education-group { padding: 1.8rem 1.8rem; }
@media (min-width: 901px) {
  .education-group.c1 { padding-left: 0; }
  .education-group:not(.r) { padding-right: 0; }
}
@media (max-width: 900px) { .education-group { padding-inline: 0; } }
.education-list li { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 1rem; padding-block: 0.8rem; border-top: 1px solid var(--line); }
.education-list li:first-child { border-top: none; }
.edu-period { color: var(--faint); font-size: 0.85rem; font-weight: 600; font-family: var(--mono); overflow-wrap: anywhere; }
.edu-body { color: var(--mute); font-size: 0.92rem; overflow-wrap: anywhere; }
.edu-body strong { color: var(--ink); font-family: var(--sans); }

/* Articles */
.articles-grid { margin-bottom: 1.6rem; }
.article-card { padding: 1.8rem; }
.article-card p { color: var(--mute); font-size: 0.92rem; margin-top: 0.5rem; overflow-wrap: anywhere; }
.links-row { display: flex; flex-wrap: wrap; gap: 0 1.6rem; }
.link-arrow {
  display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--accent); font-family: var(--mono);
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; text-decoration-color: transparent;
  transition: text-decoration-color .16s var(--ease-out), transform .16s var(--ease-out);
}
@media (hover: hover) { .link-arrow:hover { text-decoration-color: currentColor; } }
.link-arrow:active { transform: scale(.97); }

/* Press */
.press-grid { display: grid; place-items: center; }
.press-text { max-width: 780px; padding: 0; text-align: left; min-width: 0; }
.press-quote { margin-block: 1.4rem; border-left: 2px solid var(--accent); padding-left: 1.4rem; }
.press-quote p { font-family: var(--mono); font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--ink); overflow-wrap: anywhere; }
.press-source { color: var(--faint); font-size: 0.875rem; margin-top: 1rem; font-family: var(--mono); overflow-wrap: anywhere; }

/* Collab: lista de instituciones. Sin ratón fino, con movimiento reducido o sin JS es una lista envuelta, estática y legible entera.
   Con ratón, JS y 4 o más elementos (main.js añade .is-anim) pasa a cinta; se para con el puntero encima, con el foco dentro o fuera de pantalla (main.js). */
.collab-section { padding-block: clamp(2.5rem, 5vw, 4rem); }
.marquee { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.marquee-row { display: block; }
.marquee-track { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; font-family: var(--mono); font-size: 1.05rem; color: var(--mute); line-height: 1.45; }
.marquee-track li { position: relative; display: block; min-width: 0; padding-left: 1rem; overflow-wrap: anywhere; }
.marquee-track li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); }
.marquee-track[aria-hidden="true"] { display: none; }

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .marquee.is-anim { max-width: none; padding-inline: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
  .marquee.is-anim::-webkit-scrollbar { display: none; }
  .marquee.is-anim:focus-visible { outline-offset: -3px; }
  .marquee.is-anim .marquee-row { display: flex; width: max-content; animation: marquee 60s linear infinite; }
  .marquee.is-anim .marquee-track { flex-wrap: nowrap; flex-shrink: 0; min-width: 100vw; justify-content: space-around; gap: 0 1rem; padding-inline-end: 1rem; white-space: nowrap; font-size: 1.2rem; line-height: 1.6; }
  .marquee.is-anim .marquee-track li { display: flex; align-items: center; flex: 0 0 auto; padding-left: 0; }
  .marquee.is-anim .marquee-track li::before { content: none; }
  .marquee.is-anim .marquee-track li::after { content: "·"; margin-inline-start: 1rem; color: var(--faint); }
  .marquee.is-anim .marquee-track[aria-hidden="true"] { display: flex; }
  .marquee.is-anim:hover .marquee-row, .marquee.is-anim:focus .marquee-row, .marquee.is-anim:focus-within .marquee-row, .marquee.is-anim.is-off .marquee-row, html.tab-oculta .marquee-row { animation-play-state: paused; }
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Contact */
.contact-section { text-align: left; }
.contact-content { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.contact-photo { width: 100%; max-width: 360px; height: auto; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.contact-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; filter: grayscale(1) contrast(1.15); }
.contact-body { min-width: 0; }
.contact-content h2 { max-width: 26ch; margin-bottom: 2rem; }
@media (min-width: 901px) {
  .contact-content.has-photo { grid-template-columns: 300px minmax(0, 1fr); gap: 3rem; align-items: start; }
  .contact-photo { max-width: none; }
}
.contact-grid { margin-block: 2.2rem; }
.contact-card { padding: 1.8rem; display: block; transition: background-color .16s var(--ease-out), transform .16s var(--ease-out); }
@media (hover: hover) { .contact-card:hover { background: var(--bg-2); } }
.contact-card:active { transform: scale(.985); }
.contact-card h3 { overflow-wrap: anywhere; }
.contact-card p { color: var(--mute); font-size: 0.92rem; margin-block: 0.5rem 0.8rem; overflow-wrap: anywhere; }
.contact-card-cta { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; font-size: 0.9rem; font-family: var(--mono); }
.contact-direct { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin-top: 2.4rem; }
.contact-email-huge {
  display: inline-block; min-width: 0; max-width: 100%;
  font-family: var(--mono); font-weight: 700; font-size: clamp(1.1rem, 3.6vw, 2.4rem); line-height: 1.25;
  color: var(--ink); position: relative; padding-block: 0.45rem 0.55rem; min-height: 44px;
  overflow-wrap: anywhere;
  transition: color .16s var(--ease-out), transform .16s var(--ease-out);
}
.contact-email-huge::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0.18); transform-origin: left;
  transition: transform .2s var(--ease-out);
}
.contact-email-huge:active { transform: scale(.98); }
@media (hover: hover) { .contact-email-huge:hover::after { transform: scaleX(1); } }
@media (hover: hover) { .contact-email-huge:hover { color: var(--accent); } }

/* Footer */
.footer { padding-block: 2.4rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.2rem 1rem; color: var(--faint); font-size: 0.85rem; font-family: var(--mono); }
.footer-inner > * { min-width: 0; overflow-wrap: anywhere; }
.footer-top { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; }
.trayectoria-credit { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; opacity: 0.95; transition: opacity .16s var(--ease-out); }
@media (hover: hover) { .trayectoria-credit:hover { opacity: 1; } .footer-top:hover { text-decoration: underline; text-underline-offset: 4px; } }
.trayectoria-credit img { display: block; border-radius: 2px; }

/* Reveal on scroll: solo si main.js lo activa (html.rv); sin JS o con movimiento reducido todo está visible.
   Se aplica a las cabeceras de sección, no al cuerpo del texto. */
html.rv [data-reveal] { transition: opacity .3s var(--ease-out), transform .3s var(--ease-out); }
html.rv [data-reveal]:not(.is-revealed) { opacity: 0; transform: translateY(14px); }
@media print { html.rv [data-reveal]:not(.is-revealed) { opacity: 1 !important; transform: none !important; } .nav { position: static; } }

/* Robustez: un email o una palabra muy larga no debe desbordar la página en móvil. */
a[href^="mailto:"], .email { overflow-wrap: anywhere; }

/* Movimiento reducido: nada se mueve ni se escala */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .btn:active, .nav-link--cta:active, .lang:active, .link-arrow:active, .contact-card:active, .contact-email-huge:active, .row-summary:active { transform: none; }
}
