@font-face {
  font-family: Geist;
  src: url("fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #121318;
  --panel: #1c1e25;
  --ink: #eceaf2;
  --secondary: #b9b6c4;
  --muted: #9893a3;
  --rule: #3a3c47;
  --band: #f2b84b;
  --band-ink: #121318;
  --purple: #a9b6ff;
  --signal: #ff8f73;
  --series-a: #8fa2ff;
  --series-b: #ff7a59;
  --tint: #1e2133;
  --lime: var(--signal);
  --button-bg: var(--ink);
  --button-ink: var(--ground);
  --button-hover: var(--purple);
  --control-border: var(--muted);
  --sans: Geist, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --outer: clamp(1.25rem, 4vw, 4rem);
  --width: 90rem;
  --gap: clamp(1.5rem, 3.3vw, 3.5rem);
  font-family: var(--sans);
  background: var(--ground);
  color: var(--ink);
  scroll-padding-block-start: 4.5rem;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.55; }
h1, h2, h3, h4, p, figure, ol { margin: 0; }
h1, h2, h3, h4 { line-height: 1.08; text-wrap: balance; }
p { color: var(--secondary); }
a { color: var(--purple); text-underline-offset: .23em; }
a:hover { text-decoration-thickness: .13em; }
button, select { font-family: inherit; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--ground); }

.wrap { width: min(calc(100% - 2 * var(--outer)), calc(var(--width) - 2 * var(--outer))); margin-inline: auto; }
.skip { position: fixed; z-index: 50; inset: .3rem auto auto .5rem; padding: .45rem .8rem; background: var(--ink); color: var(--ground); transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Banda de navegación y paginador del folio. */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .22rem max(var(--outer), calc((100% - var(--width)) / 2 + var(--outer)));
  background: var(--band);
  color: var(--band-ink);
}
.brand, .top nav { display: flex; align-items: center; }
.brand { gap: .65rem; flex-shrink: 0; color: inherit; text-decoration: none; line-height: 1; }
.marca-iniciales { font-size: .96rem; font-weight: 680; letter-spacing: -.06em; }
.marca-descripcion { border-left: 1px solid currentColor; padding-left: .65rem; font-size: .78rem; letter-spacing: -.012em; }
.folio-current { font: .75rem var(--mono); }
.top nav { font-size: .875rem; gap: clamp(.15rem, 1vw, 1rem); justify-content: center; }
.top nav a { display: inline-flex; align-items: center; gap: .32rem; min-height: 2rem; color: inherit; font-size: .78rem; text-decoration: none; }
.top nav a:hover .nav-name, .top nav a[aria-current="location"] .nav-name { text-decoration: underline; text-underline-offset: .25em; }
.nav-num { display: inline-grid; place-items: center; min-width: 1.55rem; height: 1.55rem; font: .72rem var(--mono); }
.top nav a[aria-current="location"] .nav-num { border-radius: 50%; background: var(--band-ink); color: var(--band); }
.top :focus-visible { outline-color: var(--band-ink); }
.reading-progress { position: absolute; inset: auto 0 0; height: 2px; background: currentColor; pointer-events: none; transform: scaleX(0); transform-origin: left; }

/* Apertura del folio y muestra del caso. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--gap);
  grid-template-areas:
    "edicion edicion"
    "titular muestra"
    "entrada muestra"
    "acciones muestra"
    "credenciales credenciales";
  --separacion-portada: clamp(1.5rem, 2.8vw, 3rem);
  padding-block: clamp(1.3rem, 2.6vw, 2.5rem) clamp(2rem, 4vw, 4rem);
}
.titular { grid-area: titular; }
.hero .intro { grid-area: entrada; }
.hero-actions { grid-area: acciones; }
.cover-art { grid-area: muestra; }
.masthead {
  grid-area: edicion;
  margin-bottom: var(--separacion-portada);
  text-align: end;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .9rem;
}
.especialidad { margin-top: .85rem; color: var(--ink); font-size: clamp(1.12rem, 1.65vw, 1.45rem); line-height: 1.3; letter-spacing: -.025em; text-wrap: balance; }
.afiliacion { margin-top: .35rem; font-size: .96rem; line-height: 1.45; text-wrap: balance; }
.masthead, .overline, .date, .note, figcaption, .momento {
  color: var(--muted);
  font: .8125rem/1.45 var(--mono);
}
.masthead { text-transform: uppercase; font-size: .75rem; letter-spacing: .045em; }
h1 { max-width: 19ch; font-size: clamp(2.3rem, 4.4vw, 4.3rem); line-height: 1.02; font-weight: 450; letter-spacing: -.059em; }
.intro { max-width: 58ch; margin-top: 1.1rem; font-size: clamp(1rem, 1.15vw, 1.12rem); line-height: 1.5; }
.hero-actions, .links, .contacto-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.2rem; }
.hero-actions { margin-top: 1.3rem; }
.button, .hero-link { font-size: .9rem; font-weight: 550; }
.button { display: inline-block; border: 1px solid var(--ink); background: var(--ink); color: var(--ground); padding: .55rem .95rem; text-decoration: none; }
.button:hover { color: var(--ink); background: var(--panel); }
.hero-link { color: var(--ink); }
.cover-art { min-width: 0; border-inline-start: 1px solid var(--rule); padding-inline-start: var(--gap); }
.muestra { border: 1px solid var(--rule); background: var(--tint); padding: clamp(.65rem, 1.6vw, 1.45rem); }
.muestra-cabecera { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; margin-bottom: .7rem; }
.muestra-cabecera strong { font-size: 1rem; font-weight: 600; letter-spacing: -.035em; }
.muestra-cabecera span { color: var(--secondary); font: .75rem/1.4 var(--mono); }
.muestra img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.cover-art figcaption { margin-top: .7rem; line-height: 1.55; }
.cover-art figcaption a { white-space: nowrap; }
.credenciales { grid-area: credenciales; margin-top: var(--separacion-portada); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid var(--rule); border-block-start-color: var(--ink); }
.credenciales a { display: grid; align-content: start; gap: .4rem; color: var(--ink); text-decoration: none; padding: 1.05rem var(--gap) 1.15rem 0; }
.credenciales a + a { border-inline-start: 1px solid var(--rule); padding-inline: var(--gap) 0; }
.credenciales strong { font-size: clamp(1.12rem, 1.75vw, 1.65rem); letter-spacing: -.04em; font-weight: 530; line-height: 1.18; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .18em; }
.credenciales a:is(:hover, :focus-visible) strong { text-decoration-color: currentColor; }
.credenciales span { max-width: 56ch; font-size: .94rem; color: var(--secondary); }

/* Pliegos. Las dos páginas se apilan al llegar al ancho de lectura. */
.section, .career { position: relative; padding-block: clamp(2.6rem, 5vw, 5.4rem); border-top: 1px solid var(--ink); }
.section[data-folio]::before, .career[data-folio]::before { content: attr(data-folio); display: block; font: .85rem var(--mono); color: var(--purple); margin-bottom: .65rem; }
.section-title { font-weight: 430; font-size: clamp(2.15rem, 4.3vw, 4.3rem); letter-spacing: -.055em; margin-bottom: clamp(1.5rem, 3.4vw, 3.3rem); }
.project-intro, .other-projects, .congresos-interior { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.project-intro > *, .other-projects > *, .congresos-interior > * { min-width: 0; }
.project-intro > :first-child, .other-projects > :first-child, .congresos-interior > :first-child { padding-inline-end: var(--gap); }
.project-intro > :last-child, .other-projects > :last-child, .congresos-interior > :last-child { border-inline-start: 1px solid var(--rule); padding-inline-start: var(--gap); }
.project-intro h3 { font-size: clamp(2.1rem, 3.5vw, 3.6rem); letter-spacing: -.045em; font-weight: 460; margin-top: .7rem; }
.project-intro h3 span { color: var(--signal); }
.links { margin-top: 1rem; font-weight: 550; font-size: .88rem; }
.feature + .feature { margin-top: clamp(2.8rem, 5vw, 4.8rem); border-top: 1px solid var(--ink); padding-top: clamp(1.4rem, 2.8vw, 2.5rem); }
.caso-texto > p { max-width: 62ch; }
.caso-texto > p + p { margin-block-start: .85rem; }
.decision { color: var(--ink); font-size: clamp(1.18rem, 2vw, 1.75rem); letter-spacing: -.035em; line-height: 1.25; text-wrap: pretty; }
h4 { font-size: 1.18rem; font-weight: 560; letter-spacing: -.022em; }
.feature .checks { margin-top: 1.65rem; padding-block: .85rem; border-block: 1px solid var(--rule); }
.table-wrap { margin-top: .85rem; overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { vertical-align: top; padding: .65rem .55rem; border-bottom: 1px solid var(--rule); font-size: .9rem; line-height: 1.45; }
th { font-weight: 560; }
thead th { border-block: 1px solid var(--ink); background: var(--panel); font-size: .8rem; }
td { color: var(--secondary); }
.checks table { min-width: 34rem; }
.checks caption { text-align: start; padding-bottom: .65rem; font-weight: 550; color: var(--ink); }
.note { margin-top: .8rem; }
.piloto { margin-top: clamp(1.6rem, 3vw, 2.6rem); background: var(--panel); border-block: 1px solid var(--rule); padding: clamp(1.1rem, 2.2vw, 2rem); }
.piloto figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem; justify-content: space-between; }
.piloto figcaption strong { color: var(--ink); font: 550 clamp(1.2rem, 2.1vw, 1.75rem)/1.25 var(--sans); letter-spacing: -.04em; }
.piloto figcaption span { color: var(--secondary); max-width: 39ch; }
.fases { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1.75rem 0 0; padding: 0; }
.fases li { position: relative; border-top: 1px solid var(--rule); padding: 1rem clamp(.85rem, 2.2vw, 2.25rem) 0 0; }
.fases li:last-child { padding-inline-end: 0; }
.fases li::before { content: ""; position: absolute; top: -.28rem; left: 0; width: .5rem; height: .5rem; background: var(--purple); }
.fases .momento { display: block; color: var(--purple); }
.fases strong { display: block; font-size: clamp(1.08rem, 1.4vw, 1.3rem); font-weight: 580; letter-spacing: -.03em; line-height: 1.25; margin: .35rem 0 .5rem; }
.fases p { font-size: .96rem; }
.piloto .links { margin-top: 1.3rem; }
.other-projects { border-block-start: 1px solid var(--ink); padding-block-start: 1.5rem; margin-block: clamp(2.5rem, 5vw, 4.3rem) 1.75rem; }
.other-projects h3 { font-size: clamp(1.75rem, 3.3vw, 3.3rem); font-weight: 440; letter-spacing: -.055em; margin-block: .55rem 1rem; }
.other-projects article p { max-width: 52ch; }
.merits > article { border-top: 1px solid var(--rule); padding-block: 1.5rem; }
.merits article h3 { font-size: clamp(1.4rem, 2.1vw, 2rem); font-weight: 490; letter-spacing: -.035em; margin-block: .5rem .8rem; }
.merits article p { max-width: 73ch; }
.merits article p + p { margin-top: .7rem; }
.more { border-top: 1px solid var(--ink); padding-block: 1rem; }
.more summary { cursor: pointer; width: fit-content; font-size: 1rem; font-weight: 550; }
.more summary::marker { color: var(--purple); }
.more article, .more ul { max-width: 76ch; }
.more article { margin-top: 1.4rem; }
.more ul { padding-inline-start: 1.2rem; }
.more li { margin-block: .5rem; }
.abstracts { list-style: none; display: grid; gap: .6rem; }
.more .abstracts { padding: 0; }
.abstracts small { color: var(--muted); }

.congresos-figura { padding-bottom: 1.6rem; }
.congresos-figura figcaption { display: grid; gap: .4rem; margin-bottom: 1rem; padding-top: .7rem; border-top: 1px solid var(--rule); }
.congresos-figura figcaption strong { font: 520 1.2rem/1.2 var(--sans); color: var(--ink); }
.congreso-fila { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; padding-block: .6rem; }
.congreso-fila > strong { min-width: 7.25rem; font: 500 .85rem var(--mono); }
.obras { display: flex; flex-wrap: wrap; gap: .3rem; }
.obras button { width: 2.85rem; height: 2.85rem; background: var(--panel); border: 1px solid var(--ink); color: var(--ink); font: 500 1.1rem var(--mono); cursor: pointer; }
.obras button:hover { background: var(--tint); }
.obras button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.obra-detalle { min-height: 9.2rem; }
.obra-detalle h4 { font-size: clamp(1.2rem, 2vw, 1.65rem); font-weight: 470; margin: .45rem 0 .75rem; line-height: 1.2; }

.timeline { padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: minmax(9rem, 1fr) 2fr; border-top: 1px solid var(--rule); padding-block: 1rem; gap: 1rem; }
.timeline .date { color: var(--purple); }
.timeline h3 { font-size: 1.15rem; font-weight: 540; margin-bottom: .4rem; letter-spacing: -.025em; }
.timeline p + p { margin-top: .6rem; }
.contacto { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.1rem var(--gap); padding-block: 1.5rem 2.5rem; border-top: 1px solid var(--ink); }
.contacto h2 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 475; letter-spacing: -.045em; }
.contacto p { margin-top: .35rem; font-size: .94rem; }
.contacto .volver { font-size: .85rem; }

@media (min-width: 64rem) {
  #docencia, .career { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; align-items: start; }
  #docencia::before, .career::before { grid-column: 1 / -1; }
  #docencia .section-title, .career .section-title { grid-column: 1 / 6; grid-row: span 2; }
  #docencia > article, #docencia > details, .timeline { grid-column: 6 / -1; }
  #docencia > article { padding-top: 0; border-top: 0; }
  .timeline li:first-child { border-top-color: var(--ink); }
}
@media (max-width: 65rem) {
  .top nav { gap: .35rem; }
  .marca-descripcion, .folio-current { display: none; }
}
@media (max-width: 50rem) {
  .project-intro, .other-projects, .congresos-interior { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .project-intro > :first-child, .other-projects > :first-child, .congresos-interior > :first-child { padding-inline-end: 0; }
  .project-intro > :last-child, .other-projects > :last-child, .congresos-interior > :last-child { border-inline-start: 0; padding-inline-start: 0; }
  .other-projects > :last-child, .congresos-interior > :last-child { border-top: 1px solid var(--rule); padding-block-start: 1.25rem; }
  .obra-detalle { min-height: 0; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "edicion" "titular" "entrada" "acciones" "muestra" "credenciales";
  }
  h1 { max-width: 22ch; }
  .cover-art { margin-top: var(--separacion-portada); }
  .cover-art { max-width: 36rem; border-inline-start: 0; padding-inline-start: 0; }
  .fases { grid-template-columns: minmax(0, 1fr); margin: 1.4rem 0 0 .22rem; }
  .fases li { border: 0; border-inline-start: 1px solid var(--rule); padding: 0 0 1.1rem 1.1rem; }
  .fases li:last-child { border-color: transparent; padding-block-end: 0; }
  .fases li::before { top: .35rem; left: -.29rem; }
  .top nav a { gap: .15rem; font-size: .72rem; }
}
@media (max-width: 42rem) {
  :root { scroll-padding-block-start: 4rem; }
  .top { gap: .45rem; padding-inline: max(.65rem, 2.2vw); }
  .top nav { gap: .15rem; flex: 1; }
  .top nav a { gap: .15rem; min-width: 1.6rem; min-height: 2.4rem; justify-content: center; }
  .top nav a:not([aria-current="location"]) .nav-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .top nav a[aria-current="location"] .nav-name { font-size: .7rem; }
  .hero { --separacion-portada: 1.25rem; }
  .masthead { display: none; }
  .afiliacion { font-size: .875rem; line-height: 1.4; }
  .hero-actions { gap: .55rem .85rem; margin-top: 1rem; }
  .credenciales { grid-template-columns: minmax(0, 1fr); }
  .credenciales a, .credenciales a + a { border-inline-start: 0; padding: .85rem 0; }
  .credenciales a + a { border-top: 1px solid var(--rule); }
  .contacto { align-items: flex-start; flex-direction: column; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .checks tbody th { position: sticky; inset-inline-start: 0; width: 9rem; background: var(--ground); }
}
@media (max-width: 30rem) {
  .hero { grid-template-areas: "edicion" "titular" "acciones" "muestra" "entrada" "credenciales"; }
  .hero .intro { margin-top: var(--separacion-portada); }
}
@media (max-width: 30rem) and (max-height: 40rem) {
  .cover-art { display: flex; flex-direction: column; }
  .cover-art figcaption { order: -1; margin: 0 0 .65rem; }
}
@media (max-width: 22rem) {
  :root { --outer: 1rem; }
  .hero { --separacion-portada: 1rem; }
  .hero-actions { gap: .5rem; }
  .hero-actions a { display: inline-flex; align-items: center; min-height: 2.6rem; font-size: .8125rem; }
  .hero-actions .button { padding-inline: .65rem; }
  .muestra { padding: .45rem; }
  .top { padding-inline: .4rem; gap: .25rem; }
  .top nav { font-size: .78rem; gap: .05rem; justify-content: space-between; }
  .top nav a { min-width: 1.5rem; }
  .nav-num { min-width: 1.5rem; }
}
@media (forced-colors: active) {
  .nav-num, .obras button[aria-pressed="true"] { forced-color-adjust: auto; }
  .top nav a[aria-current="location"] .nav-num, .obras button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
}
