/* =========================================================
   Real Academia de Ciencias de Zaragoza
   Sistema visual — Dirección B (Azul tinta humanista)
   ========================================================= */

:root {
  /* Paleta institucional — base azul */
  --paper:        #F6F7FA;
  --paper-alt:    #ECEFF5;
  --paper-deep:   #DDE3ED;
  --ink:          #0E1726;
  --ink-soft:     #2E3A50;
  --ink-muted:    #6B7384;
  --ink-mute-2:   #9098A6;
  --accent:       #223d71;
  --accent-deep:  #003366;
  --accent-wash:  #DDE6F5;
  --rule:         #C7CEDB;
  --hairline:     #DDE2EB;

  /* Tipografía */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --max: 1320px;
  --gutter: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* Compensa la cabecera sticky (≈91px) en todos los saltos de ancla del sitio */
  scroll-padding-top: 104px;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Tipografía base ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.h-display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5.5vw, 80px);
  line-height: 1.04;
  letter-spacing: -.02em;
}
.h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -.015em;
}
.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -.01em;
}
.h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
}
.h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
}
.lead {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.meta {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
em, i { font-style: italic; }

/* ---------- Contenedor ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wide { max-width: 1440px; }

/* ---------- Barra utilitaria ---------- */
.utility {
  background: var(--accent);
  color: var(--paper);
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: .06em;
}
.utility-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 8px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  white-space: nowrap;
}
.utility .u-left { letter-spacing: .12em; text-transform: uppercase; font-size: 11px; white-space: nowrap; }
.utility a { opacity: .75; }
.utility a:hover { opacity: 1; }
.utility .u-right { display: flex; gap: 20px; }

/* ---------- Cabecera principal ---------- */
.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 40;
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 22px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.crest {
  width: clamp(64px, 6vw, 92px);
  height: clamp(64px, 6vw, 92px);
  background: url('logoAcademia.svg') center/contain no-repeat;
  display: inline-block;
  flex-shrink: 0;
}
.foot .crest {
  filter: none;
  opacity: 1;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.005em;
  color: var(--ink);
}
.brand-name-mid { }
.brand-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 4px;
}

.mainnav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.mainnav a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
  padding: 26px 0;
  position: relative;
  letter-spacing: .005em;
  transition: color .2s ease;
  white-space: nowrap;
}
.mainnav a:hover { color: var(--accent); }
.mainnav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.mainnav .search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: var(--sans);
}
.mainnav .search-btn svg { width: 16px; height: 16px; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle svg { width: 26px; height: 26px; color: var(--ink); }
/* Submenús — escritorio: dropdown por hover / móvil: toggle por tap */
.nav-group {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.nav-sub {
  list-style: none; margin: 0; padding: 8px 0;
  position: absolute; top: 100%; left: -16px; min-width: 210px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--accent);
  box-shadow: 0 8px 24px rgba(14,23,38,.1);
  z-index: 100;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  pointer-events: none;
}
.nav-group:hover .nav-sub,
.nav-group.is-open .nav-sub {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: auto;
}
.nav-sub li a {
  display: block;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft);
  padding: 9px 20px;
  white-space: nowrap; font-weight: 400;
  transition: color .15s, background .15s;
}
.nav-sub li a:hover { color: var(--accent); background: var(--accent-wash); }
.nav-sub li a.active { color: var(--accent); font-weight: 500; }

/* ---------- Breadcrumbs ---------- */
.crumbs {
  padding: 18px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { margin: 0 10px; color: var(--ink-mute-2); }
.crumbs .current { color: var(--ink); }

/* ---------- Hero Home ---------- */
.hero {
  padding: 80px 0 72px;
  border-bottom: 1px solid var(--hairline);
}
.hero-kicker {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
  max-width: 120px;
}
.hero h1 { margin-bottom: 28px; }
.hero h1 em { color: var(--accent); }

/* ---------- Botones / enlaces ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: .02em;
  padding: 13px 24px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s ease;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--paper); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-tertiary {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 10px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.btn-tertiary:hover { color: var(--accent-deep); text-decoration-thickness: 2px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Related content grid (uso en páginas interiores) */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
@media (max-width: 860px) { .related-grid { grid-template-columns: 1fr; } }
.related {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--paper-alt);
  border-top: 2px solid var(--accent);
  text-decoration: none;
  color: var(--ink);
  transition: background .3s ease, transform .3s ease;
  min-height: 200px;
}
.related:hover { background: var(--paper-deep); transform: translateY(-2px); }
.related .r-eye {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.related .r-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 10px;
}
.related .r-desc {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  flex-grow: 1;
  margin-bottom: 18px;
}
.related .r-more {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: .01em;
}
.related:hover .r-more { text-decoration: underline; text-underline-offset: 3px; }
/* Override: tarjetas en .related-grid necesitan padding lateral (la regla genérica .related más abajo lo eliminaría) */
.related-grid .related { padding: 28px; }

.link-btn {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--accent);
  letter-spacing: .01em;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s ease;
}
.link-btn:hover { color: var(--accent-deep); text-decoration-thickness: 2px; }
.link-btn .arr { transition: transform .25s ease; }
.link-btn:hover .arr { transform: translateX(3px); }

/* ---------- Section headers ---------- */
.sect {
  padding: 88px 0;
  border-bottom: 1px solid var(--hairline);
}
.sect-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--accent);
}
.sect-head .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.sect-head h2 { max-width: 620px; }
.sect-head .more {
  flex-shrink: 0;
}

/* ---------- Grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

/* ---------- Tarjeta editorial (noticia/actividad) ---------- */
.card-ed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card-ed .thumb {
  aspect-ratio: 3/2;
  background: var(--paper-deep);
  overflow: hidden;
  position: relative;
}
.card-ed .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transition: filter .6s ease, transform .7s ease;
}
.card-ed:hover .thumb img { filter: grayscale(0); transform: scale(1.02); }
.card-ed .c-eye {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-ed .c-eye .dot {
  width: 3px; height: 3px;
  background: var(--ink-mute-2);
  border-radius: 50%;
}
.card-ed .c-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: -.005em;
  transition: color .25s ease;
}
.card-ed .c-excerpt {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.card-ed:hover .c-title { color: var(--accent); }

/* ---------- Tarjeta de publicación ---------- */
.pub {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
}
.pub:last-child { border-bottom: 1px solid var(--hairline); }
.pub-cover {
  width: 128px; height: 176px;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  position: relative;
  flex-shrink: 0;
}
.pub-cover .pc-top {
  position: absolute; top: 18px; left: 14px; right: 14px;
  text-align: center;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.pub-cover .pc-rule {
  position: absolute; top: 42px; left: 14px; right: 14px;
  height: 1px; background: var(--ink);
}
.pub-cover .pc-title {
  position: absolute; top: 58px; left: 14px; right: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.15;
  text-align: center;
}
.pub-cover .pc-num {
  position: absolute; bottom: 14px; left: 14px; right: 14px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink-soft);
}
.pub-body { display: flex; flex-direction: column; gap: 8px; }
.pub-body .p-eye {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.pub-body .p-title {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.22;
  font-weight: 400;
  margin-top: 2px;
}
.pub-body .p-authors {
  font-size: 13.5px;
  color: var(--ink-soft);
  font-style: italic;
}
.pub-body .p-abstract {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 6px;
}
.pub-body .p-links {
  display: flex;
  gap: 24px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
}
.pub-body .p-links a { color: var(--accent); }

/* ---------- Ficha de académico (card) ---------- */
.person-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.person-card .portrait {
  aspect-ratio: 1/1;
  background: var(--paper-deep);
  position: relative;
  overflow: hidden;
}
.person-card .portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04);
  transition: filter .6s ease, transform .7s ease;
}
.person-card:hover .portrait img { filter: grayscale(0); transform: scale(1.03); }
.person-card .p-eye {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.person-card .p-name {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.22;
  font-weight: 400;
  color: var(--ink);
}
.person-card .p-role {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.person-card .p-dates {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: .08em;
  margin-top: 4px;
}

/* ---------- Separador con número ---------- */

/* ---------- Bloque de cita ---------- */
.pull {
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 22px;
  margin: 40px 0;
  max-width: 720px;
}
.pull p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 300;
}
.pull cite {
  display: block;
  margin-top: 14px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-muted);
  letter-spacing: .02em;
}

/* ---------- Footer ---------- */
.foot {
  background: var(--accent-deep);
  color: var(--paper);
  padding: 72px 0 28px;
  margin-top: 0;
}
.foot-top {
  display: grid;
  grid-template-columns: 1.2fr 3fr;
  gap: 64px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.foot .brand-text .brand-name { color: var(--paper); font-size: 18px; line-height: 1.25; }
.foot .brand-text .brand-sub { color: rgba(244,241,232,.6); }
.foot .foot-desc {
  margin-top: 20px;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(244,241,232,.72);
  max-width: 30ch;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
}
.foot-col h5 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(244,241,232,.55);
  margin-bottom: 18px;
  font-weight: 500;
}
.foot-col h5 a { color: inherit; text-decoration: none; }
.foot-col h5 a:hover { color: rgba(244,241,232,.9); }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--paper);
  font-weight: 300;
  transition: color .2s ease;
}
.foot-col a:hover { color: #B8C4DE; }

.foot-mid {
  padding: 32px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: 13.5px;
  color: rgba(244,241,232,.75);
}
.foot-mid h6 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(244,241,232,.55);
  margin-bottom: 10px;
  font-weight: 500;
}
.foot-mid p { font-family: var(--serif); font-size: 15px; line-height: 1.5; }

.foot-bot {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(244,241,232,.55);
}
.foot-bot .legal { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-bot a { color: rgba(244,241,232,.75); }
.foot-bot a:hover { color: var(--paper); }

/* Crédito de desarrollo */
.foot-dev {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.foot-dev-prefix {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(244,241,232,.50);
  white-space: nowrap;
  transition: color .2s;
}
.foot-dev-logo {
  height: 18px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .55;
  transition: opacity .2s;
}
.foot-dev:hover .foot-dev-prefix { color: rgba(244,241,232,.80); }
.foot-dev:hover .foot-dev-logo { opacity: .88; }

/* ---------- Side nav (sección / interior) ---------- */
.with-sidenav {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 72px;
  padding: 56px 0 96px;
}
.sidenav {
  position: sticky;
  top: 104px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.sidenav h5 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.sidenav ul { list-style: none; display: flex; flex-direction: column; }
.sidenav li { border-top: 1px solid var(--hairline); }
.sidenav li:last-child { border-bottom: 1px solid var(--hairline); }
.sidenav a {
  display: block;
  padding: 11px 0 11px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  transition: all .2s ease;
}
.sidenav a:hover { color: var(--ink); border-left-color: var(--rule); }
.sidenav a.active {
  color: var(--ink);
  border-left-color: var(--accent);
  font-weight: 500;
}
.sidenav .sub {
  padding: 6px 0 10px 14px;
  font-size: 13px;
  color: var(--ink-muted);
  border-left: 2px solid var(--hairline);
}
.sidenav .sub a {
  padding: 6px 0 6px 14px;
  font-size: 13px;
  border-left: none;
  color: var(--ink-muted);
}
.sidenav .sub a:hover { color: var(--ink-soft); }

/* ---------- Página de sección: apertura ---------- */
.page-head {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--hairline);
}
.page-head .eyebrow { margin-bottom: 18px; display: block; }
.page-head h1 { margin-bottom: 20px; }
.page-head .lead { max-width: 66ch; }
.page-head-meta {
  display: flex;
  gap: 48px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.page-head-meta .m-item { display: flex; flex-direction: column; gap: 4px; }
.page-head-meta .m-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.page-head-meta .m-value {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
}

/* ---------- Barra de filtros ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13.5px;
  color: var(--ink-soft);
}
.toolbar .t-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-right: 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  background: var(--paper);
  transition: all .15s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.toolbar-right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.select {
  padding: 7px 28px 7px 12px;
  font-family: var(--sans);
  font-size: 13px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23747889' stroke-width='1.2'/></svg>") right 10px center no-repeat;
  -webkit-appearance: none;
  appearance: none;
  color: var(--ink);
  cursor: pointer;
}
.search-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  min-width: 220px;
}
.search-inline input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
}
.search-inline svg { width: 14px; height: 14px; color: var(--ink-muted); flex-shrink: 0; }

/* ---------- Listado compacto alfabético ---------- */

/* ---------- Paginación ---------- */
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: .08em;
}

/* ---------- Página interior larga ---------- */
.article {
  max-width: 780px;
}
.article .art-eye {
  display: inline-block;
  margin-bottom: 16px;
}
.article h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin-bottom: 20px;
}
.article .art-lead {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 300;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hairline);
  max-width: 62ch;
}
.article .art-meta {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.article .art-meta strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 4px;
}
.article p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 22px;
  max-width: 62ch;
  text-wrap: pretty;
  hyphens: auto;
}
.article p:first-of-type::first-letter {
  font-family: var(--serif);
  font-weight: 400;
  float: left;
  font-size: 62px;
  line-height: .9;
  padding: 6px 10px 0 0;
  color: var(--accent);
}
.article h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  margin: 48px 0 16px;
  letter-spacing: -.01em;
}
.article h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  margin: 32px 0 12px;
}
.article ul, .article ol {
  margin: 0 0 24px 24px;
  max-width: 62ch;
}
.article li {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 8px;
  padding-left: 6px;
}
.article ul { list-style: none; padding-left: 0; }
.article ul li {
  position: relative;
  padding-left: 22px;
}
.article ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 500;
}
.article figure {
  margin: 40px 0;
  max-width: 100%;
}
.article figure .fig {
  aspect-ratio: 3/2;
  background: var(--paper-deep);
  position: relative;
  overflow: hidden;
}
.article figure .fig img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) sepia(.06);
}
.article figcaption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  line-height: 1.5;
  max-width: 62ch;
}
.article figcaption .credit {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-left: 8px;
}

/* Ficha biográfica interior */
.bio-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
}
.bio-portrait {
  aspect-ratio: 1/1;
  background: var(--paper-deep);
  position: relative;
  overflow: hidden;
}
.bio-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) sepia(.08);
}
.bio-text .b-eye { display: block; margin-bottom: 18px; }
.bio-text h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 3.5vw, 48px);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin-bottom: 20px;
}
.bio-text .b-role {
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 32px;
  font-weight: 400;
  max-width: 52ch;
}
.bio-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.bio-facts .f-item { display: flex; flex-direction: column; gap: 6px; }
.bio-facts .f-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.bio-facts .f-value {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  line-height: 1.3;
}

/* Bloque relacionado */
.related {
  padding: 64px 0;
  border-top: 1px solid var(--hairline);
  margin-top: 48px;
}
.related h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 24px;
  font-weight: 500;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--accent);
}

/* ---------- Acceso rápido (home) ---------- */

/* ---------- About block (home) ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.about-aside { display: flex; flex-direction: column; gap: 28px; }
.about-aside .a-label { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); }
.about-aside .a-num { font-family: var(--serif); font-size: 56px; font-weight: 300; line-height: 1; color: var(--accent); letter-spacing: -.02em; }
.about-aside .a-sub { font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; max-width: 28ch; }
.about-body h2 { margin-bottom: 20px; }
.about-body p { font-size: 16px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 20px; max-width: 62ch; }
.about-body p strong { color: var(--ink); font-weight: 500; }

/* ---------- Timeline histórica ---------- */
.timeline {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 40px;
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}
.timeline:last-of-type { border-bottom: 1px solid var(--hairline); }
.timeline .y {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -.01em;
}
.timeline .t-body {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 58ch;
}

/* YouTube en barra utilitaria */
.u-yt { display: flex; align-items: center; line-height: 1; transition: opacity .15s; }
.utility .u-yt { opacity: 1; }
.utility .u-yt:hover { opacity: .7; }
.u-lang { display: none; }
.u-yt svg { display: block; width: 30px; height: 21px; }

/* ---------- Subnavegación de sección (Académicos, Publicaciones) ---------- */
.acad-type-nav {
  background: var(--accent-deep);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.atn-inner {
  display: flex; align-items: stretch; gap: 0; overflow-x: auto;
  scrollbar-width: none;
}
.atn-inner::-webkit-scrollbar { display: none; }
.atn-tab {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(255,255,255,.55);
  padding: 14px 20px; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.atn-tab:hover { color: rgba(255,255,255,.9); }
.atn-tab.active {
  color: var(--paper);
  border-bottom-color: var(--paper);
}
.atn-tab .ct { font-size: 10px; opacity: .65; margin-left: 6px; }

/* ---------- Responsive ---------- */

/* Hamburger: desde 1200px hacia abajo */
@media (max-width: 1200px) {
  .mainnav { display: none; }
  .menu-toggle { display: block; }
  .masthead { overflow: visible; }

  /* Menú abierto */
  .mainnav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--accent-deep);
    z-index: 200;
    padding: 4px 0 24px;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 12px 32px rgba(14,23,38,.2);
  }
  .mainnav.is-open > a,
  .mainnav.is-open .nav-group > a {
    display: block; width: 100%; box-sizing: border-box;
    padding: 14px var(--gutter); font-size: 17px;
    color: rgba(255,255,255,.88); position: static;
    white-space: normal;
  }
  .mainnav.is-open > a.active::after { display: none; }
  .mainnav.is-open > a:hover,
  .mainnav.is-open .nav-group > a:hover { color: var(--paper); }
  .mainnav.is-open .nav-group {
    display: flex; flex-direction: column; width: 100%;
  }
  .mainnav.is-open .nav-group.is-open .nav-sub {
    display: block;
    opacity: 1; visibility: visible; transform: none;
    transition: none;
    pointer-events: auto;
    position: static;
    border: none; box-shadow: none;
    padding: 0 0 6px 0;
    background: transparent;
  }
  .mainnav.is-open .nav-sub li a {
    display: block;
    font-family: var(--mono); font-size: 12.5px;
    letter-spacing: .10em; text-transform: uppercase;
    color: rgba(255,255,255,.68);
    padding: 9px var(--gutter) 9px calc(var(--gutter) + 18px);
    transition: color .15s;
  }
  .mainnav.is-open .nav-sub li a:hover { color: rgba(255,255,255,.92); background: rgba(255,255,255,.06); }
  .mainnav.is-open .nav-sub li a.active { color: rgba(255,255,255,.80); background: transparent; }

  /* Deshabilitar el dropdown hover de escritorio dentro del menú móvil */
  .nav-group:hover .nav-sub {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
  }

  /* Layout */
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .with-sidenav { grid-template-columns: 200px 1fr; gap: 48px; }
  .foot-cols { grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
  .foot-top { grid-template-columns: 1fr; gap: 40px; }
  .foot-mid { grid-template-columns: 1fr; gap: 28px; }
  .bio-head { grid-template-columns: 200px 1fr; gap: 32px; }
  .bio-facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 84px; }
  :root { --gutter: 20px; }
  .hero { padding: 48px 0 40px; }
  
  
  
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; gap: 40px; }
  .sect { padding: 56px 0; }
  .sect-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .with-sidenav { grid-template-columns: 1fr; gap: 32px; padding: 32px 0 64px; }
  .sidenav { position: static; max-height: none; border-bottom: 1px solid var(--hairline); padding-bottom: 24px; }
  
  
  
  .about { grid-template-columns: 1fr; gap: 40px; }
  .bio-head { grid-template-columns: 1fr; gap: 32px; }
  .bio-portrait { max-width: 240px; }
  .bio-facts { grid-template-columns: 1fr 1fr; gap: 20px; }
  
  
  .pub { grid-template-columns: 96px 1fr; gap: 18px; }
  .pub-cover { width: 96px; height: 132px; }
  .article p:first-of-type::first-letter { font-size: 48px; }
  .page-head { padding: 48px 0 32px; }
  .page-head-meta { flex-wrap: wrap; gap: 20px; }
  .toolbar { gap: 8px; }
  .toolbar-right { margin-left: 0; width: 100%; }
  .search-inline { min-width: 0; flex: 1; }
  .utility-inner { flex-direction: column; gap: 6px; text-align: center; padding: 10px var(--gutter); }
  .crumbs { padding: 14px var(--gutter); }
  .foot { padding: 56px 0 24px; }
  .foot-cols { grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }
  .foot-col ul { display: none; }
  .foot-col h5 { margin-bottom: 0; color: rgba(244,241,232,.75); }
  .foot-bot { flex-direction: column; align-items: flex-start; gap: 14px; }
  .foot-dev-logo { height: 16px; opacity: .65; }
  .masthead-inner { padding: 16px var(--gutter); gap: 12px; }
  .brand { flex-shrink: 1; min-width: 0; }
  .brand-name { font-size: 13px; line-height: 1.3; }
  .brand-sub { display: none; }
  .crest { width: 44px; height: 44px; }

  /* Subnav de publicaciones: wrap en vez de scroll */
  .atn-inner { flex-wrap: wrap; overflow-x: visible; gap: 2px 0; }
  .atn-tab { padding: 11px 14px; font-size: 10px; letter-spacing: .14em; }
}

/* Pantallas ≥390px (iPhone 14, Pixel, Galaxy…): nombre cabe a 14px */
@media (min-width: 390px) and (max-width: 820px) {
  .brand-name { font-size: 14px; }
}
