/* ============================================================
   Rene Aguirre, PhD — Executive Dossier
   Navy · Gold · Cream — editorial, elegante, ejecutivo
   ============================================================ */

:root {
  --navy:      #002648;
  --navy-deep: #00182e;
  --navy-soft: #072a49;
  --royal:     #1a3caa;
  --gold:      #c19a3d;
  --gold-soft: #edbd69;
  --bronze:    #a89968;
  --paper:     #faf6ea;
  --cream:     #fffcf5;
  --ink:       #1c2733;
  --muted:     #5d6b7a;
  --line:      rgba(0, 38, 72, .11);
  --line-gold: rgba(193, 154, 61, .4);
  --line-light:rgba(255, 252, 245, .14);

  --r-s: 3px;      /* botones, campos */
  --r-m: 14px;     /* tarjetas, imágenes */
  --shadow-s: 0 6px 20px -10px rgba(0, 24, 46, .22);
  --shadow-m: 0 18px 44px -18px rgba(0, 24, 46, .3);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Archivo", "Helvetica Neue", Arial, sans-serif;

  --head-h: 92px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--gold);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.gold { color: var(--gold); }

::selection { background: var(--gold-soft); color: var(--navy-deep); }

/* Superficies del navegador tematizadas */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--navy-deep); }
::-webkit-scrollbar-thumb { background: var(--navy-soft); border-radius: 6px; border: 2px solid var(--navy-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* ---------- Tipografía editorial ---------- */

h1, h2, h3, .display { font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.08; }

.kicker {
  display: flex; align-items: center; gap: 14px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 22px;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--gold); flex: none; }
.kicker--gold { color: var(--gold); }
.kicker--center { justify-content: center; }
.kicker--center::after { content: ""; width: 34px; height: 1px; background: var(--gold); flex: none; }

.section-title { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -.01em; text-wrap: balance; }
.section-title em { font-style: italic; font-weight: 500; color: var(--gold); }

.lead { font-size: 1.13rem; color: var(--muted); max-width: 62ch; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 32px;
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: var(--r-s); cursor: pointer;
  transition: all .35s var(--ease);
}
.btn::after { content: "→"; font-size: 14px; letter-spacing: 0; transition: transform .35s var(--ease); }
.btn:hover::after { transform: translateX(5px); }

.btn--gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--navy-deep); border-color: var(--gold);
  box-shadow: 0 10px 24px -12px rgba(193, 154, 61, .55);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(193, 154, 61, .6); }

.btn--navy { background: var(--navy); color: var(--cream); border-color: var(--navy); box-shadow: var(--shadow-s); }
.btn--navy:hover { background: var(--navy-soft); transform: translateY(-2px); box-shadow: var(--shadow-m); }

.btn--outline-gold { background: transparent; color: var(--gold); border-color: var(--line-gold); }
.btn--outline-gold:hover { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); }

.btn--outline-light { background: rgba(255, 252, 245, .02); color: var(--cream); border-color: rgba(255, 252, 245, .3); }
.btn--outline-light:hover { border-color: var(--gold-soft); color: var(--gold-soft); background: rgba(237, 189, 105, .06); }

/* ============================================================
   Header
   ============================================================ */

.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: var(--navy-deep);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.site-head--overlay { background: transparent; }
.site-head.is-scrolled {
  background: rgba(0, 24, 46, .9);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line-light), 0 12px 32px -18px rgba(0, 0, 0, .5);
}
.site-head__rule { height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-soft) 45%, transparent); }
.site-head__inner { display: flex; align-items: center; justify-content: space-between; height: var(--head-h); }

/* Marca: logotipo oficial RAB (versión clara para fondos oscuros) */
.brand { display: flex; align-items: center; position: relative; z-index: 102; }
.brand__logo { height: 58px; width: auto; }

/* Navegación */
.nav { display: flex; align-items: center; gap: 24px; }
.nav__link {
  position: relative;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 252, 245, .82); padding: 6px 0;
  transition: color .3s;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--gold-soft); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav__cta { padding: 12px 18px; white-space: nowrap; }

.lang-switch { display: flex; border: 1px solid var(--line-light); border-radius: var(--r-s); overflow: hidden; }
.lang-switch a {
  padding: 7px 13px; font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: rgba(255, 252, 245, .6); transition: all .3s;
}
.lang-switch a.is-active { background: var(--gold); color: var(--navy-deep); }
.lang-switch a:not(.is-active):hover { color: var(--gold-soft); }

.burger { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; position: relative; z-index: 102; }
.burger span {
  display: block; width: 26px; height: 2px; background: var(--gold-soft); border-radius: 2px;
  margin: 7px auto; transition: transform .35s var(--ease), opacity .3s;
}
.burger.is-open span:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger.is-open span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ============================================================
   Hero — portada del dossier
   ============================================================ */

.hero {
  position: relative; min-height: 100svh;
  background: var(--navy-deep);
  color: var(--cream);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.hero__frame {
  position: absolute; inset: 22px; z-index: 3; pointer-events: none;
  border: 1px solid rgba(193, 154, 61, .22); border-radius: 4px;
}
.hero__photo {
  position: absolute; inset: 0 0 0 auto; width: min(46%, 720px); z-index: 1;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: saturate(.85); }
.hero__photo::before {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, var(--navy-deep) 4%, rgba(0, 24, 46, .55) 34%, rgba(0, 24, 46, .18) 62%, rgba(0, 24, 46, .3)),
              linear-gradient(0deg, var(--navy-deep) 6%, rgba(0, 24, 46, .25) 40%, rgba(0, 24, 46, .15) 70%, rgba(0, 24, 46, .4));
}
.hero__bg-word {
  position: absolute; top: 12vh; left: -1vw; z-index: 0;
  font-family: var(--serif); font-weight: 700; font-style: italic;
  font-size: clamp(8rem, 22vw, 20rem); line-height: 1;
  color: rgba(255, 252, 245, .028);
  user-select: none; pointer-events: none; white-space: nowrap;
}

.hero__content { position: relative; z-index: 4; padding-top: calc(var(--head-h) + 60px); }
.hero__content > * { animation: riseIn 1s var(--ease) both; }
.hero__content > *:nth-child(2) { animation-delay: .15s; }
.hero__content > *:nth-child(3) { animation-delay: .3s; }
.hero__content > *:nth-child(4) { animation-delay: .45s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 30px;
}
.hero__eyebrow::before { content: ""; width: 44px; height: 1px; background: var(--gold); }

.hero__title {
  font-family: var(--serif); font-weight: 600; color: var(--cream);
  font-size: clamp(3rem, 8vw, 6rem); line-height: 1; letter-spacing: -.015em;
  max-width: 13ch;
  text-shadow: 0 2px 40px rgba(0, 24, 46, .5);
}
.hero__title em { font-style: italic; font-weight: 500; color: var(--gold-soft); }

.hero__sub {
  margin-top: 30px; max-width: 52ch;
  font-size: 1.06rem; color: rgba(255, 252, 245, .75);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 40px; }

/* Banda de métricas al pie del hero */
.hero__stats {
  position: relative; z-index: 4;
  margin-top: 70px; border-top: 1px solid var(--line-light);
  background: linear-gradient(0deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .08));
  backdrop-filter: blur(4px);
}
.hero__stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.hero__stat {
  padding: 26px 28px 30px;
  border-right: 1px solid var(--line-light);
}
.hero__stat:last-child { border-right: 0; }
.hero__stat b {
  display: block; font-family: var(--serif); font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem); color: var(--gold-soft); line-height: 1.1;
}
.hero__stat span { font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 252, 245, .58); }

.hero__scroll {
  position: absolute; right: 44px; bottom: 130px; z-index: 5;
  writing-mode: vertical-rl;
  font-size: 10.5px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase;
  color: rgba(255, 252, 245, .5);
  display: flex; align-items: center; gap: 12px;
}
.hero__scroll::after { content: ""; width: 1px; height: 54px; background: linear-gradient(var(--gold), transparent); animation: scrollPulse 2.2s infinite var(--ease); }
@keyframes scrollPulse { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ============================================================
   Secciones / capítulos numerados
   ============================================================ */

.chapter { padding: 110px 0; position: relative; }
.chapter--paper { background: var(--paper); }
.chapter--navy { background: linear-gradient(180deg, var(--navy-deep), #001c36 60%, var(--navy-deep)); color: var(--cream); }
.chapter--navy h2, .chapter--navy h3 { color: var(--cream); }
.chapter--navy .lead { color: rgba(255, 252, 245, .68); }

.chapter__head { display: flex; align-items: baseline; gap: 26px; margin-bottom: 60px; }
.chapter__no {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1;
  color: var(--gold); opacity: .45; flex: none;
}
.chapter--navy .chapter__no { color: var(--gold-soft); opacity: .5; }

/* ---------- 01 · Perfil ---------- */

.profile { display: grid; grid-template-columns: minmax(300px, 460px) 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.portrait { position: relative; }
.portrait img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow-m); }
.portrait::before {
  content: ""; position: absolute; inset: -18px 18px 18px -18px;
  border: 1px solid var(--line-gold); border-radius: 8px; z-index: -1;
}
.portrait__badge {
  position: absolute; left: -22px; bottom: 34px;
  background: var(--navy-deep); color: var(--cream);
  padding: 16px 24px; border-radius: var(--r-s);
  box-shadow: var(--shadow-m);
}
.portrait__badge::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--gold); border-radius: 2px; }
.portrait__badge b { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--gold-soft); }
.portrait__badge span { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 252, 245, .62); }

.profile__body .section-title { margin-bottom: 26px; }
.profile__body .lede-drop::first-letter {
  font-family: var(--serif); font-size: 3.4em; font-weight: 600; color: var(--gold);
  float: left; line-height: .82; padding: 6px 12px 0 0;
}
.profile__body p + p { margin-top: 18px; }
.profile__marks { display: flex; flex-wrap: wrap; gap: 14px 26px; margin: 34px 0; }
.profile__mark { display: flex; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.profile__mark::before { content: "—"; color: var(--gold); }

/* ---------- 02 · Áreas de práctica ---------- */

.practice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.practice__item {
  position: relative; padding: 46px 38px 52px;
  background: var(--cream);
  border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-s);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.practice__item:hover { transform: translateY(-5px); box-shadow: var(--shadow-m); border-color: var(--line-gold); }
.practice__roman { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--gold); letter-spacing: .1em; }
.practice__item h3 { font-size: 1.7rem; margin: 14px 0 14px; }
.practice__item p { color: var(--muted); font-size: .98rem; }
.practice__item ul { margin-top: 20px; display: grid; gap: 10px; }
.practice__item li { position: relative; padding-left: 22px; font-size: .93rem; color: var(--ink); }
.practice__item li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 1px; background: var(--gold); }

/* ---------- Valores ---------- */

.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 70px; }
.values > div { border-top: 1px solid var(--line-gold); padding-top: 22px; }
.values b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--navy); margin-bottom: 8px; }
.values p { font-size: .9rem; color: var(--muted); }

/* ---------- 03 · Trayectoria (línea de tiempo) ---------- */

.timeline { position: relative; margin-left: 6px; }
.timeline::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--line-gold), var(--line)); }
.timeline__item { position: relative; padding: 0 0 44px 42px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -4.5px; top: 9px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px var(--line-gold);
}
.timeline__year { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--gold); }
.timeline__item h3 { font-size: 1.35rem; margin: 4px 0 4px; }
.timeline__item p { color: var(--muted); font-size: .95rem; max-width: 60ch; }
.chapter--navy .timeline::before { background: linear-gradient(rgba(237, 189, 105, .5), var(--line-light)); }
.chapter--navy .timeline__item::before { border-color: var(--navy-deep); }
.chapter--navy .timeline__item p { color: rgba(255, 252, 245, .62); }

/* ---------- Ledger de reconocimientos ---------- */

.ledger { border-top: 1px solid var(--line); }
.ledger__row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 28px; align-items: baseline;
}
.ledger__row--thumb { grid-template-columns: 90px 46px 1fr auto; align-items: center; }
.ledger__icon {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-gold); color: var(--gold);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.ledger__row:hover .ledger__icon { background: var(--gold); color: var(--navy-deep); transform: rotate(-8deg); }
.ledger__row {
  padding: 26px 18px; border-bottom: 1px solid var(--line);
  border-radius: var(--r-s);
  transition: background .35s var(--ease);
}
.ledger__row:hover { background: var(--paper); }
.ledger__row:hover .ledger__year { color: var(--gold-soft); }
.ledger__year { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.5rem; color: var(--gold); font-variant-numeric: lining-nums; }
.ledger__title { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--navy); line-height: 1.25; }
.ledger__org { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: right; }
.chapter--navy .ledger { border-color: var(--line-light); }
.chapter--navy .ledger__row { border-color: var(--line-light); }
.chapter--navy .ledger__row:hover { background: rgba(255, 252, 245, .04); }
.chapter--navy .ledger__title { color: var(--cream); }
.chapter--navy .ledger__org { color: rgba(255, 252, 245, .5); }
.ledger__more { margin-top: 40px; text-align: center; }

/* ---------- Marquee de instituciones ---------- */

.marquee-band { padding: 70px 0; background: var(--paper); border-block: 1px solid var(--line); overflow: hidden; }
.marquee-band .kicker { justify-content: center; margin-bottom: 44px; }
.marquee-band .kicker::after { content: ""; width: 34px; height: 1px; background: var(--gold); }
.marquee { display: flex; overflow: hidden; user-select: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; align-items: center; gap: 84px; padding-right: 84px; flex: none; animation: marquee 46s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track img { width: auto; max-width: 230px; object-fit: contain; filter: grayscale(1) opacity(.55); transition: filter .35s, transform .35s var(--ease); }
.marquee__track img:hover { filter: none; transform: scale(1.06); }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Testimonios ---------- */

.quotes { position: relative; max-width: 880px; margin-inline: auto; text-align: center; }
.quotes__mark { font-family: var(--serif); font-size: 7rem; line-height: .4; color: var(--gold); opacity: .5; display: block; margin-bottom: 40px; }
.quote { display: none; animation: quoteIn .7s var(--ease); }
.quote.is-active { display: block; }
@keyframes quoteIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.quote blockquote { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 500; font-style: italic; color: var(--cream); line-height: 1.4; text-wrap: balance; }
.quote figcaption { margin-top: 30px; }
.quote figcaption b { display: block; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.quote figcaption span { font-size: 12.5px; color: rgba(255, 252, 245, .55); }
.quotes__nav { display: flex; justify-content: center; gap: 12px; margin-top: 44px; }
.quotes__dot { width: 26px; height: 3px; border-radius: 2px; background: rgba(255, 252, 245, .25); border: 0; cursor: pointer; transition: background .3s; }
.quotes__dot.is-active { background: var(--gold); }

/* ---------- Journal (blog) ---------- */

.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.jcard {
  display: flex; flex-direction: column; background: var(--cream);
  border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden;
  box-shadow: var(--shadow-s);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.jcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); }
.jcard__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-soft); }
.jcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.jcard:hover .jcard__media img { transform: scale(1.05); }
.jcard__body { padding: 30px 30px 34px; display: flex; flex-direction: column; flex: 1; }
.jcard__date { font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--gold); margin-bottom: 10px; }
.jcard__body h3 { font-size: 1.45rem; margin-bottom: 12px; }
.jcard__body h3 a:hover { color: var(--royal); }
.jcard__body p { font-size: .94rem; color: var(--muted); flex: 1; }
.jcard__link { margin-top: 22px; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--navy); border-bottom: 1px solid var(--gold); align-self: flex-start; padding-bottom: 3px; }

/* Página de artículo */
.post-hero { background: var(--navy-deep); color: var(--cream); padding: calc(var(--head-h) + 80px) 0 70px; }
.post-hero h1 { color: var(--cream); font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 20ch; text-wrap: balance; }
.post-hero__meta { display: flex; gap: 24px; margin-top: 26px; font-size: 13px; color: rgba(255, 252, 245, .6); }
.post-hero__meta b { color: var(--gold-soft); font-weight: 600; }
.post-cover { margin-top: -50px; position: relative; z-index: 2; }
.post-cover img { width: 100%; max-height: 540px; object-fit: cover; border-radius: var(--r-m); box-shadow: var(--shadow-m); }
.post-body { max-width: 720px; margin: 70px auto 0; font-size: 1.08rem; }
.post-body > p:first-of-type::first-letter { font-family: var(--serif); font-size: 3.3em; font-weight: 600; color: var(--gold); float: left; line-height: .82; padding: 5px 12px 0 0; }
.post-body h2, .post-body h3 { margin: 44px 0 16px; }
.post-body p { margin-bottom: 20px; }
.post-body img { margin: 30px auto; border-radius: 8px; }
.post-body blockquote { border-left: 1px solid var(--gold); padding: 6px 0 6px 26px; margin: 30px 0; font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--navy); }
.post-body ul, .post-body ol { margin: 0 0 20px 24px; }
.post-body ul { list-style: disc; }
.post-body a { color: var(--royal); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-gold); }
.post-author { display: flex; gap: 18px; align-items: center; max-width: 720px; margin: 60px auto 0; padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); }
.post-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.post-author b { font-family: var(--serif); font-size: 1.15rem; color: var(--navy); display: block; }
.post-author span { font-size: 13px; color: var(--muted); }

/* Paginación */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 60px; }
.pagination a, .pagination span {
  min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-s);
  font-family: var(--serif); font-size: 1.05rem; font-weight: 600;
  font-variant-numeric: lining-nums;
  transition: border-color .3s, color .3s;
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .is-current { background: var(--navy); color: var(--cream); border-color: var(--navy); }

/* ---------- Páginas interiores: cabecera ---------- */

.page-hero {
  position: relative; background: linear-gradient(160deg, var(--navy-deep) 55%, #012a4d); color: var(--cream);
  padding: calc(var(--head-h) + 90px) 0 90px; overflow: hidden;
}
.page-hero__word {
  position: absolute; right: -2vw; bottom: -4vh;
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: clamp(6rem, 16vw, 13rem); line-height: 1; white-space: nowrap;
  color: rgba(255, 252, 245, .03);
  pointer-events: none;
}
.page-hero .kicker { color: var(--gold-soft); }
.page-hero h1 { color: var(--cream); font-size: clamp(2.6rem, 6vw, 4.6rem); max-width: 16ch; text-wrap: balance; }
.page-hero h1 em { font-style: italic; font-weight: 500; color: var(--gold-soft); }
.page-hero .lead { color: rgba(255, 252, 245, .7); margin-top: 22px; }

/* ---------- Grid de credenciales / membresías ---------- */

.cred-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cred {
  padding: 34px 32px;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-s);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.cred:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.chapter--paper .cred { background: var(--cream); }
.cred__since { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1rem; }
.cred h3 { font-size: 1.3rem; margin: 8px 0 6px; }
.cred p { font-size: .92rem; color: var(--muted); }

.partner-logos { display: flex; flex-wrap: wrap; gap: 60px; align-items: center; justify-content: center; margin-top: 60px; }
.partner-logos img { height: 100px; width: auto; max-width: 260px; object-fit: contain; filter: grayscale(1) opacity(.6); transition: filter .35s, transform .35s var(--ease); }
.partner-logos img:hover { filter: none; transform: scale(1.05); }

/* ---------- Métricas de investigación ---------- */

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-gold); border-radius: var(--r-m); overflow: hidden; background: rgba(255, 252, 245, .02); }
.metrics div { padding: 40px 30px; text-align: center; border-right: 1px solid var(--line-gold); }
.metrics div:last-child { border-right: 0; }
.metrics b { display: block; font-family: var(--serif); font-size: 3rem; font-weight: 600; color: var(--gold-soft); line-height: 1.05; font-variant-numeric: lining-nums; }
.metrics span { font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 252, 245, .58); }

/* ---------- CTA compartido ---------- */

.cta { background: linear-gradient(120deg, var(--navy) 60%, var(--navy-soft)); color: var(--cream); padding: 90px 0; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 18px; border: 1px solid rgba(193, 154, 61, .18); border-radius: 8px; pointer-events: none;
}
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 50px; flex-wrap: wrap; }
.cta__title { color: var(--cream); font-size: clamp(2rem, 4vw, 3rem); }
.cta__text { color: rgba(255, 252, 245, .68); max-width: 52ch; margin-top: 12px; }

/* ---------- Contacto ---------- */

.contact-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 90px); }
.contact-info h2 { font-size: 1.9rem; margin-bottom: 24px; }
.contact-info ul { display: grid; gap: 20px; }
.contact-info li { display: grid; gap: 2px; padding-left: 24px; position: relative; }
.contact-info li::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: var(--line-gold); border-radius: 2px; }
.contact-info li b { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.contact-info li a:hover { color: var(--royal); }

.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid rgba(0, 38, 72, .25);
  padding: 10px 2px; outline: none; transition: border-color .3s, box-shadow .3s;
  resize: vertical;
}
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-radius: 0; border-color: var(--gold); box-shadow: 0 1px 0 var(--gold); }
.form .hp { position: absolute; left: -9999px; }

.flash { padding: 18px 24px; margin-bottom: 34px; font-size: .95rem; border: 1px solid; border-radius: var(--r-s); }
.flash--ok { background: #f2f8ef; border-color: #b5d3a8; color: #2c5423; }
.flash--error { background: #fdf1f0; border-color: #e5b5af; color: #7c2921; }

/* ---------- Prosa legal ---------- */

.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin: 40px 0 14px; }
.prose p, .prose li { color: var(--muted); margin-bottom: 14px; }
.prose ul { list-style: disc; margin-left: 22px; }
.prose a { color: var(--royal); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-gold); }

/* ---------- 404 ---------- */

.notfound { min-height: 80svh; display: flex; align-items: center; text-align: center; background: var(--navy-deep); color: var(--cream); padding: calc(var(--head-h) + 40px) 0 60px; }
.notfound b { display: block; font-family: var(--serif); font-style: italic; font-size: clamp(6rem, 18vw, 12rem); line-height: 1; color: var(--gold); opacity: .35; }
.notfound h1 { color: var(--cream); margin: 20px 0 12px; }
.notfound p { color: rgba(255, 252, 245, .6); margin-bottom: 34px; }

/* ============================================================
   Footer
   ============================================================ */

.footer { background: var(--navy-deep); color: rgba(255, 252, 245, .72); padding: 100px 0 0; border-top: 2px solid var(--gold); }
.footer__masthead { text-align: center; padding-bottom: 70px; border-bottom: 1px solid var(--line-light); }
.footer__logo { height: clamp(76px, 9vw, 110px); width: auto; margin: 0 auto 26px; }
.footer__tagline { max-width: 56ch; margin: 0 auto; font-size: .95rem; color: rgba(255, 252, 245, .58); }

.footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 70px 0; }
.footer__col h3 {
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .24em;
  text-transform: uppercase; color: var(--gold-soft); margin-bottom: 20px;
}
.footer__col ul { display: grid; gap: 10px; }
.footer__col li { font-size: .95rem; }
.footer__col a { transition: color .3s; }
.footer__col a:hover { color: var(--gold-soft); }

.footer__legal {
  display: flex; flex-wrap: wrap; gap: 14px 34px; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line-light); padding: 26px 0 32px;
  font-size: 12.5px; color: rgba(255, 252, 245, .48);
}
.footer__legal nav { display: flex; gap: 24px; }
.footer__legal a:hover { color: var(--gold-soft); }
.footer__madeby { font-size: 12px; }

/* ---------- WhatsApp flotante ---------- */

.whatsapp-float {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .4);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.whatsapp-float:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 16px 34px -8px rgba(0, 0, 0, .45); }

/* ---------- Animación de aparición ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-stagger.in-view > * { opacity: 1; transform: none; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: .12s; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: .24s; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: .36s; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: .48s; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: .6s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1500px) {
  .brand__logo { height: 52px; }
}

@media (max-width: 1360px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: 101;
    flex-direction: column; justify-content: center; gap: 26px;
    background: var(--navy-deep);
    opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
  }
  .nav.is-open { opacity: 1; pointer-events: auto; }
  .nav__link { font-size: 17px; }
}

@media (max-width: 1080px) {
  .practice { grid-template-columns: 1fr; }
  .journal-grid, .cred-grid { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(2, 1fr); }
  .hero__photo { width: 56%; opacity: .45; }
}

@media (max-width: 900px) {
  :root { --head-h: 76px; }
  .brand__logo { height: 46px; }
  .profile { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .contact-wrap { grid-template-columns: 1fr; }
  .hero__stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__stat:nth-child(2) { border-right: 0; }
  .hero__stat { border-top: 1px solid var(--line-light); }
  .hero__scroll { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 44px; }
  .chapter { padding: 80px 0; }
  .chapter__head { flex-direction: column; gap: 8px; margin-bottom: 44px; }
  .ledger__row { grid-template-columns: 84px 1fr; }
  .ledger__org { grid-column: 2; text-align: left; }
}

@media (max-width: 640px) {
  .container { width: min(1200px, 100% - 36px); }
  .journal-grid, .cred-grid, .values { grid-template-columns: 1fr; }
  .values { gap: 28px; }
  .form__row { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .metrics div { border-right: 0; border-bottom: 1px solid var(--line-gold); }
  .metrics div:last-child { border-bottom: 0; }
  .hero__frame { inset: 12px; }
  .hero__photo { display: none; }
  .portrait__badge { left: 12px; }
  .brand__logo { height: 42px; }
}

/* ============================================================
   Dinámica y galería de diplomas
   ============================================================ */

/* Barra de progreso de lectura */
.progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transform-origin: left; transform: scaleX(0);
  pointer-events: none;
}

/* Galería de reconocimientos (diplomas reales) */
.awards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.award {
  display: flex; flex-direction: column; text-align: left;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-s); overflow: hidden; cursor: zoom-in;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.award:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); border-color: var(--line-gold); }
.award__frame {
  background: linear-gradient(160deg, #fdfbf4, #f3edda);
  border-bottom: 1px solid var(--line);
  padding: 22px; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3; overflow: hidden;
}
.award__frame img {
  max-height: 100%; width: auto; max-width: 100%; object-fit: contain;
  box-shadow: 0 10px 26px -12px rgba(0, 24, 46, .35);
  transition: transform .6s var(--ease);
}
.award:hover .award__frame img { transform: scale(1.04); }
.award__body { padding: 22px 26px 26px; }
.award__year { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1.05rem; }
.award__body h3 { font-size: 1.25rem; margin: 4px 0 6px; line-height: 1.25; }
.award__org { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Lightbox para diplomas */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 18, 34, .92); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px 32px; opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: min(1100px, 92vw); max-height: 78vh; object-fit: contain;
  border-radius: 6px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7);
  transform: scale(.94); transition: transform .35s var(--ease);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox figcaption { margin-top: 20px; text-align: center; color: var(--cream); font-family: var(--serif); font-size: 1.2rem; }
.lightbox figcaption span { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); margin-top: 4px; }
.lightbox__close {
  position: absolute; top: 22px; right: 26px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 252, 245, .08); border: 1px solid var(--line-light);
  color: var(--cream); font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .3s, transform .3s;
}
.lightbox__close:hover { background: var(--gold); color: var(--navy-deep); transform: rotate(90deg); }

/* Tarjetas de membresía con insignia */
.cred__logo {
  height: 72px; margin-bottom: 18px; display: flex; align-items: center;
}
.cred__logo img { max-height: 72px; max-width: 190px; width: auto; object-fit: contain; }
.chapter--navy .cred { background: var(--cream); border-color: transparent; }
.chapter--navy .cred h3 { color: var(--navy); }

/* Insignia CHEA destacada */
.chea-banner {
  display: flex; align-items: center; gap: clamp(24px, 4vw, 60px); flex-wrap: wrap;
  margin-top: 70px; padding: clamp(28px, 4vw, 48px);
  background: linear-gradient(120deg, #0b3350, #072a49);
  border: 1px solid var(--line-gold); border-radius: var(--r-m);
  box-shadow: var(--shadow-m); color: var(--cream);
}
.chea-banner img { width: min(360px, 100%); border-radius: 10px; box-shadow: var(--shadow-m); }
.chea-banner h3 { color: var(--cream); font-size: 1.7rem; margin-bottom: 8px; }
.chea-banner p { color: rgba(255, 252, 245, .7); max-width: 46ch; }
.chea-banner > div { flex: 1; min-width: 260px; }

/* Video embeds en artículos */
.post-body iframe {
  width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0;
  border-radius: var(--r-m); box-shadow: var(--shadow-m); margin: 30px 0;
}

@media (max-width: 1080px) { .awards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  {
  .awards { grid-template-columns: 1fr; }
  .ledger__row--thumb { grid-template-columns: 46px 1fr; }
  .ledger__row--thumb .ledger__year { grid-column: 2; }
  .marquee__track img { max-width: 160px; }
  .partner-logos img { height: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__photo img, .hero__content > * { animation: none; }
  .progress-bar { display: none; }
}
