/* =============================================================
   Trayectoria — Archetype: Newspaper Editorial
   Periódico clásico: densidad, columnas, drop cap, filetes finos.
   Lote A (8/10/2026): cabecera con idioma y tira en móvil, rejillas por nº de
   elementos (--c, clases r / r2), cifras que se ajustan a su casilla, 44 px táctiles.
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #faf7f0;
  --ink: #16140e;
  --mute: #4a4739;
  --faint: #68644f; /* 5,57:1 sobre --bg */
  --accent: #960018;
  --line: #16140e;
  --line-soft: rgba(22, 20, 14, 0.18);

  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 920px;
  --gutter: 1.25rem;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --nav-h: 61px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-padding-top: calc(var(--nav-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}
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; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.1; color: var(--ink); overflow-wrap: anywhere; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: #fff;
  z-index: 9999; font-weight: 600; font-family: var(--sans);
}
.skip-link:focus { top: 1rem; }

.kicker {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.7rem;
}
.hairline-top, .hairline-bottom { border-top: 1px solid var(--line); }
.hairline-bottom { margin-top: 0.9rem; }

section { padding-block: clamp(2.6rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line-soft); }
.hero { border-bottom: none; padding-top: 0; }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 1rem; hyphens: auto; }
.section-lede { font-family: var(--serif); color: var(--mute); max-width: 70ch; margin-bottom: 2rem; }

/* =============================================================
   4. Reading progress (única animación permitida por el arquetipo)
   ============================================================= */
.reading-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 900; background: transparent; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; will-change: transform; }

/* =============================================================
   5. Nav — escritorio: marca · secciones · idioma; ≤ 900 px: fila 1 marca + idioma,
      fila 2 tira horizontal desplazable con las secciones
   ============================================================= */
.nav { position: sticky; top: 0; z-index: 500; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0 1rem;
  max-width: 1200px; margin-inline: auto; padding: 0.4rem var(--gutter); font-family: var(--sans);
}
.nav-brand {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-self: start; max-width: 100%;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; overflow-wrap: anywhere;
}
.nav-links { display: flex; align-items: center; justify-content: center; gap: 0 0.5rem; min-width: 0; }
.nav-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding-inline: 0.6rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute);
  white-space: nowrap; transition: color .16s var(--ease);
}
@media (hover: hover) { .nav-link:hover { color: var(--accent); } }
.nav-link--minor { display: none; }
.nav-link--cta {
  color: var(--accent); border: 1px solid var(--accent); padding-inline: 0.9rem; margin-left: 0.5rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
  transition: color .16s var(--ease), background-color .16s var(--ease), transform .16s var(--ease);
}
@media (hover: hover) { .nav-link--cta:hover { background: var(--accent); color: #fff; } }
.nav-link--cta:active { transform: scale(.97); }
.lang {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding-inline: 0.7rem; justify-self: end;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute);
  transition: color .16s var(--ease), transform .16s var(--ease);
}
@media (hover: hover) { .lang:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; } }
.lang:active { transform: scale(.97); }

@media (max-width: 900px) {
  :root { --nav-h: 0px; }
  .nav { position: static; }
  .nav-inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand lang" "links links"; padding: 0.25rem 0 0; }
  .nav-brand { grid-area: brand; margin-left: var(--gutter); }
  .lang { grid-area: lang; margin-right: calc(var(--gutter) - 0.7rem); }
  .nav-links {
    grid-area: links; justify-content: flex-start; gap: 0.2rem; overflow-x: auto; scrollbar-width: none;
    padding-inline: calc(var(--gutter) - 0.6rem); border-top: 1px solid var(--line-soft);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { flex: 0 0 auto; }
  .nav-link--minor { display: inline-flex; }
  .nav-link--cta { margin-left: 0.4rem; }
}

/* =============================================================
   6. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; max-width: 100%;
  padding: 0.7rem 1.5rem; font-family: var(--sans); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em;
  text-align: center; overflow-wrap: anywhere;
  transition: background-color .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
@media (hover: hover) { .btn-primary:hover { background: #7a0013; } }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }
@media (hover: hover) { .btn-ghost:hover { background: var(--ink); color: var(--bg); } }

/* =============================================================
   7. Masthead + hero article
   ============================================================= */
.masthead { text-align: center; padding-block: 1.4rem 1rem; }
.masthead > h1, .masthead > .issue { padding-inline: var(--gutter); }
.brand-newspaper { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.01em; hyphens: auto; text-wrap: balance; }
.issue {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1rem 1.3rem; width: min(74ch, 100%); margin: 0.7rem auto 0;
  font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.02em; color: var(--mute); line-height: 1.5;
}
.issue li { position: relative; padding-left: 0.95rem; min-width: 0; overflow-wrap: anywhere; }
.issue li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); }

.hero-article { padding-block: 2rem clamp(2.6rem, 6vw, 4.5rem); }
.lead { display: grid; gap: 1.4rem 2.6rem; align-items: start; margin-bottom: 2.4rem; }
.lead-text { min-width: 0; }
.huge-serif { font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.12; font-style: italic; margin-bottom: 1.6rem; hyphens: auto; text-wrap: balance; }
.huge-serif.long { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.2; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.cutout { margin: 0; min-width: 0; }
.cutout img { width: 100%; filter: grayscale(1) contrast(1.08); }
.cutout--hero { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 0.6rem; }
.cutout--hero img { aspect-ratio: 3 / 2; max-height: min(42svh, 320px); object-fit: cover; object-position: 78% 25%; }

.story-cols p { margin-bottom: 1.1rem; orphans: 3; widows: 3; hyphens: auto; }
.story-cols.dos { column-count: 2; column-gap: 2.4rem; column-rule: 1px solid var(--line); }
.story-cols.uno { max-width: 68ch; }
.story-cols p.has-dropcap::first-letter {
  font-family: var(--display); font-weight: 700; font-size: 4.6rem; line-height: 0.8;
  float: left; padding: 0.05em 0.08em 0 0; color: var(--accent);
}
.story-personal { font-style: italic; color: var(--faint); max-width: 68ch; }

.pull-quote { margin-block: 1.8rem; padding-block: 1.4rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.pull-quote p { font-family: var(--display); font-style: italic; font-size: clamp(1.3rem, 2.6vw, 1.7rem); max-width: 60ch; position: relative; padding-left: 1.6rem; overflow-wrap: anywhere; }
.pull-quote p::before { content: "“"; position: absolute; left: -0.3rem; top: -0.3rem; font-size: 2.4rem; color: var(--accent); font-family: var(--display); }

.byline { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); margin-top: 1.6rem; overflow-wrap: anywhere; }

@media (min-width: 761px) {
  .lead.has-fig { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
  .cutout--hero img { aspect-ratio: 4 / 5; max-height: none; object-position: 78% 20%; }
}
@media (max-width: 760px) {
  .story-cols.dos { column-count: 1; column-rule: 0; }
}

/* =============================================================
   8. Stats band — columnas --c calculadas en la plantilla; filetes r / r2
   ============================================================= */
.stats-grid { display: grid; grid-template-columns: repeat(var(--c, 3), minmax(0, 1fr)); }
.stat { container-type: inline-size; padding: 1.6rem 1.2rem; text-align: center; min-width: 0; }
.stat-num {
  font-family: var(--display); font-size: min(3.2rem, calc(100cqi / (var(--n, 4) * 0.62))); color: var(--accent); line-height: 1.05; margin-bottom: 0.4rem;
  overflow-wrap: anywhere; white-space: nowrap;
}
.stat-label { font-family: var(--sans); font-weight: 700; font-size: 0.9rem; line-height: 1.35; margin-bottom: 0.2rem; overflow-wrap: anywhere; }
.stat-note { font-family: var(--sans); color: var(--faint); font-size: 0.8rem; line-height: 1.4; overflow-wrap: anywhere; }

@media (min-width: 761px) {
  .stat.r { border-right: 1px solid var(--line-soft); }
  .stat.r2 { border-top: 1px solid var(--line-soft); }
  .stat:last-child { grid-column: span var(--sp, 1); }
}
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .stat + .stat { border-top: 1px solid var(--line-soft); }
}

/* =============================================================
   9. Timeline
   ============================================================= */
.timeline-wrap { display: flow-root; margin-top: 1.6rem; }
.cutout--side { float: right; width: clamp(170px, 26%, 250px); margin: 0 0 1.2rem 2rem; }
.timeline { display: block; }
.tl-item { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 1.6rem; padding-block: 1.4rem; border-top: 1px solid var(--line-soft); }
.tl-item:first-child { border-top: none; padding-top: 0; }
.tl-item--current .tl-year { color: var(--accent); }
.tl-year { font-family: var(--sans); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--mute); overflow-wrap: anywhere; }
.tl-body { min-width: 0; }
.tl-body h3 { hyphens: auto; }
.tl-body p { color: var(--mute); margin-top: 0.4rem; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 0.15rem 1.1rem; margin-top: 0.7rem; font-family: var(--sans); font-size: 0.84rem; line-height: 1.45; color: var(--faint); }
.tl-tags li { position: relative; padding-left: 0.85rem; min-width: 0; overflow-wrap: anywhere; }
.tl-tags li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); }

@media (max-width: 760px) {
  .cutout--side { float: none; width: 100%; margin: 0 0 1.4rem; }
  .cutout--side img { aspect-ratio: 4 / 3; max-height: min(42svh, 320px); object-fit: cover; object-position: 50% 18%; }
}
@media (max-width: 640px) { .tl-item { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; } }

/* =============================================================
   10. Talks / ponencias — --c columnas, filetes r / r2
   ============================================================= */
.talk-categories { display: grid; grid-template-columns: repeat(var(--c, 3), minmax(0, 1fr)); margin-top: 1.6rem; }
.talk-category { padding: 1.4rem 0; border-top: 1px solid var(--line-soft); min-width: 0; }
.talk-cat-head { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.6rem; }
.talk-cat-icon { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; align-self: center; }
.talk-cat-head h3 { font-size: 1.05rem; flex: 1; min-width: 0; line-height: 1.2; }
.talk-cat-count { font-family: var(--sans); font-weight: 700; color: var(--faint); font-size: 0.85rem; }
.talk-cat-examples li { font-family: var(--serif); font-size: 0.95rem; color: var(--mute); padding-block: 0.4rem; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.talk-cat-examples li:first-child { border-top: none; }

@media (min-width: 761px) {
  .talk-category { padding-inline: 1.2rem; }
  .talk-category.c1 { padding-left: 0; }
  .talk-category:not(.r) { padding-right: 0; }
  .talk-category.r { border-right: 1px solid var(--line-soft); }
  .talk-category:last-child { grid-column: span var(--sp, 1); }
}
@media (max-width: 760px) {
  .talk-categories { grid-template-columns: minmax(0, 1fr); }
}

/* =============================================================
   11. Education
   ============================================================= */
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 0 2.2rem; margin-top: 1.6rem; }
.education-group { min-width: 0; }
.education-list li { display: grid; grid-template-columns: minmax(76px, 100px) minmax(0, 1fr); gap: 1rem; padding-block: 0.7rem; border-top: 1px solid var(--line-soft); }
.education-list li:first-child { border-top: none; }
.edu-period { font-family: var(--sans); color: var(--faint); font-size: 0.8rem; font-weight: 700; overflow-wrap: anywhere; }
.edu-body { color: var(--mute); font-size: 0.92rem; overflow-wrap: anywhere; }
.edu-body strong { color: var(--ink); font-family: var(--serif); }
.edu-centro { display: block; }

/* =============================================================
   12. Articles (further reading)
   ============================================================= */
.articles-list { margin-top: 1.6rem; margin-bottom: 1rem; }
.article-row { padding-block: 1.2rem; border-top: 1px solid var(--line-soft); }
.article-row:first-child { border-top: none; }
.article-row h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.article-row p { color: var(--mute); font-size: 0.96rem; 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; max-width: 100%; font-family: var(--sans); font-weight: 700; font-size: 0.88rem; color: var(--accent);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: transparent; overflow-wrap: anywhere;
  transition: text-decoration-color .16s var(--ease), transform .16s var(--ease);
}
@media (hover: hover) { .link-arrow:hover { text-decoration-color: currentColor; } }
.link-arrow:active { transform: scale(.97); }

/* =============================================================
   13. Press / pull-quote
   ============================================================= */
.press-grid { display: block; }
.press-text { max-width: 74ch; }
.pull-quote--press + .pull-quote--press { border-top: 0; margin-top: 0; }
.press-source { font-family: var(--sans); font-style: normal; color: var(--faint); font-size: 0.82rem; margin-top: 0.6rem; text-transform: uppercase; letter-spacing: 0.03em; overflow-wrap: anywhere; line-height: 1.5; }

/* =============================================================
   14. Colaboraciones — lista estática
   ============================================================= */
.collab-list { display: flex; flex-wrap: wrap; gap: 0.35rem 1.6rem; font-family: var(--sans); font-size: 0.95rem; color: var(--mute); line-height: 1.5; }
.collab-list li { position: relative; padding-left: 0.95rem; min-width: 0; overflow-wrap: anywhere; }
.collab-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); }

/* =============================================================
   15. Contact — anuncios clasificados
   ============================================================= */
.contact-grid { display: grid; grid-template-columns: repeat(var(--c, 3), minmax(0, 1fr)); margin-block: 1.8rem; border: 1px solid var(--line); }
.contact-card { display: block; min-width: 0; padding: 1.6rem; transition: background-color .16s var(--ease), transform .16s var(--ease); }
.contact-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; hyphens: auto; }
.contact-card p { color: var(--mute); font-size: 0.94rem; margin-bottom: 0.7rem; overflow-wrap: anywhere; }
.contact-card-cta { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--sans); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--accent); }
.contact-card:active { transform: scale(.985); }
@media (hover: hover) { .contact-card:hover { background: rgba(22, 20, 14, 0.04); } .contact-card:hover .contact-card-cta { text-decoration: underline; text-underline-offset: 4px; } }
.contact-direct { display: flex; flex-wrap: wrap; gap: 1rem; }
.contact-direct .email { min-width: 0; }

@media (min-width: 761px) {
  .contact-card.r { border-right: 1px solid var(--line); }
  .contact-card.r2 { border-top: 1px solid var(--line); }
  .contact-card:last-child { grid-column: span var(--sp, 1); }
}
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-card + .contact-card { border-top: 1px solid var(--line); }
}

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

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

/* =============================================================
   17. Movimiento reducido: sin transiciones ni escalado; la barra de lectura queda estática (sin JS no se ve)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .btn:active, .nav-link--cta:active, .lang:active, .link-arrow:active, .contact-card:active { transform: none; }
}
