/*
  2pq.net — estilos del portal académico

  Este archivo controla la apariencia completa.
  Para cambiar colores o tipografías, empieza por las variables de :root.
*/

:root {
  --ink: #24282d;
  --muted: #626a73;
  --line: #dfe3e6;
  --paper: #ffffff;
  --soft: #f4f5f3;
  --blue: #245aa5;
  --deep-blue: #102f56;
  /*
    Graphik → Inter; Matter → Manrope; Google Sans → DM Sans;
    TSTAR Mono Round → Space Mono. Space Grotesk se usa directamente.
    Si tienes licencias web, añade el nombre original al inicio de cada lista.
  */
  --graphik: "Graphik", "Inter", Arial, sans-serif;
  --matter: "Matter", "Manrope", Arial, sans-serif;
  --space-grotesk: "Space Grotesk", Arial, sans-serif;
  --google-sans: "Google Sans", "DM Sans", Arial, sans-serif;
  --tstar: "TSTAR Mono Round", "Space Mono", monospace;
}

.header2pq {
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 600;
}

.header2pq p {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0;
}

.lab-mark {
  display: block;
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
}

.instituciones {
  font-size: 1.1rem;
  line-height: 1.3;
  font-weight: 300
}

.little {
  font-size: 1rem;
  line-height: 1;
  font-weight: 400
}



body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--matter);
  font-size: 17px;
  line-height: 1.65;
}

a {
  color: var(--blue);
  text-underline-offset: .18em;
}

a:hover { color: var(--deep-blue); }

/* Navegación superior: deliberadamente sobria y compacta. */
.navbar {
  min-height: 74px;
  background: #343a40;
  border-bottom: 1px solid #282d32;
  backdrop-filter: blur(12px);
}

.navbar-brand {
  color: #f4f5f3;
  font-family: var(--space-grotesk);
  font-size: 1.35rem;
  font-weight: 600;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: #ffffff;
}

.navbar-nav .nav-link {
  color: #c9cdd1;
  font-family: var(--graphik);
  font-size: .94rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #ffffff;
}

.navbar-nav .nav-link.active {
  color: #ffffff;
  font-weight: 600;
}

.navbar-toggler {
  color: #ffffff;
  border-color: rgba(255, 255, 255, .35);
}

.navbar-toggler-icon {
  filter: invert(1) grayscale(1);
}

/* Portada */
.page-layout-full #quarto-content { padding: 0; }
.page-layout-full main.content { margin: 0; padding: 0; max-width: none; }
.page-layout-full #title-block-header { display: none; }

.home-hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #101b27;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(8, 21, 34, .94) 0%, rgba(8, 21, 34, .74) 44%, rgba(8, 21, 34, .14) 100%),
    url("assets/karyotype-normal.jpg");
  background-position: center;
  background-size: cover;
  filter: contrast(1.1);
  transform: scale(1.015);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 3rem));
  min-height: 660px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.hero-overlay h1 {
  max-width: 820px;
  margin: .8rem 0 1.35rem;
  color: #fff;
  font-family: var(--space-grotesk);
  font-size: clamp(3.4rem, 7vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .98;
}

.hero-overlay p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-family: var(--google-sans);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

.hero-label {
  font-family: var(--tstar);
  font-size: .78rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.hero-label p {
  color: #fff;
  font-family: inherit;
  font-size: inherit;
}

.hero-button {
  display: inline-block;
  margin-top: 2rem;
  padding: .75rem 1.15rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .75);
  font-family: var(--tstar);
  font-size: .82rem;
  text-decoration: none;
}

.hero-button:hover {
  color: var(--ink);
  background: #fff;
}

.home-intro {
  width: min(1080px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 6rem 0;
  display: grid;
  grid-template-columns: .8fr 1.55fr;
  gap: clamp(3rem, 8vw, 8rem);
  border-bottom: 1px solid var(--line);
}

.intro-name h2 {
  margin: 0 0 .75rem;
  font-family: var(--space-grotesk);
  font-size: 2.25rem;
}

.intro-name p { color: var(--muted); }
.intro-statement {
  font-family: var(--matter);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.35;
}

.research-navigation {
  width: min(1080px, calc(100% - 3rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.research-link {
  min-height: 285px;
  padding: 3rem 2rem 3rem 0;
  border-right: 1px solid var(--line);
}

.research-link + .research-link { padding-left: 2rem; }
.research-link:last-child { border-right: 0; }
.research-link > p:first-child {
  color: var(--muted);
  font-family: var(--tstar);
  font-size: .78rem;
}

.research-link h3 {
  margin: 2.5rem 0 .65rem;
  font-family: var(--space-grotesk);
  font-size: 1.55rem;
}

.research-link p { color: var(--muted); }

.home-lower {
  width: min(1080px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 5rem 0 7rem;
}

.home-lower h2 {
  font-family: var(--space-grotesk);
  font-size: clamp(2rem, 4vw, 3.25rem);
}

/* Páginas interiores: lectura académica con índice lateral de Quarto. */
main.content {
  padding-top: 4.25rem;
  padding-bottom: 6rem;
}

main.content > header h1,
.quarto-title h1 {
  font-family: var(--space-grotesk);
  font-size: clamp(1.9rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
}

main.content h2 {
  margin-top: 3.5rem;
  font-family: var(--space-grotesk);
  font-size: 2rem;
}

main.content h3 {
  font-family: var(--space-grotesk);
  font-size: 1.35rem;
}

#TOC {
  font-size: .88rem;
}

.sidebar nav[role="doc-toc"] ul > li > a.active {
  color: var(--blue) !important;
  border-left-color: var(--blue) !important;
}

.publication,
.project-row {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.publication p { color: var(--muted); }

.publication-summary {
  margin: 2rem 0 1rem;
  padding: 1rem 1.2rem;
  background: var(--soft);
  font-family: var(--graphik);
}

.publication-summary p { margin: 0; }

.publication-year {
  font-size: calc(1.65rem - 1pt);
}

.publication-year-group {
  margin: 0 0 .7rem;
  border-top: 1px solid var(--line);
}

.publication-year-group > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem .15rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-family: var(--space-grotesk);
}

.publication-year-group > summary::-webkit-details-marker { display: none; }

.publication-year-group > summary::before {
  content: "+";
  flex: 0 0 1.2rem;
  color: #a87000;
  font-family: var(--tstar);
  font-size: 1rem;
}

.publication-year-group[open] > summary::before { content: "−"; }

.publication-year-label {
  margin-right: auto;
  font-size: 1.3rem;
  font-weight: 500;
}

.publication-year-count {
  color: var(--muted);
  font-family: var(--tstar);
  font-size: .72rem;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.publication-year-group .publication:first-of-type {
  border-top: 0;
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1.5rem 0 2.5rem;
}

.publication-actions p { display: contents; }

.publication-actions a {
  padding: .38rem .72rem;
  color: var(--ink);
  border: 1px solid #949ba2;
  border-radius: 3px;
  font-family: var(--graphik);
  font-size: .78rem;
  text-decoration: none;
}

.publication-actions a:hover {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.publication-bib {
  padding: 1.35rem 0;
}

.publication-bib h3 {
  margin: 0 0 .55rem;
  font-size: 1.2rem;
  line-height: 1.35;
}

.publication-number {
  display: inline-block;
  min-width: 2.2rem;
  color: #a87000;
  font-family: var(--tstar);
  font-size: .82em;
  font-weight: 500;
}

.publication-bib h3 a {
  color: var(--ink);
  text-decoration: none;
}

.publication-bib h3 a:hover { color: var(--blue); }

.publication-bib p {
  margin: 0 0 .4rem;
  font-size: .9rem;
  line-height: 1.5;
}

.publication-secondary {
  margin-top: 1.25rem;
  padding-top: .5rem;
  border-top: 1px solid var(--line);
}

.publication-secondary h3 {
  margin-top: 2rem;
}

.book-feature {
  margin: 1rem 0 2rem;
  padding: 1.25rem 1.4rem;
  background: var(--soft);
  border-left: 3px solid #d39300;
}

.book-feature > p:first-child {
  margin-top: 0;
}

.book-feature details {
  margin-top: 1rem;
  color: var(--muted);
}

.book-feature summary {
  cursor: pointer;
  color: var(--ink);
  font-family: var(--graphik);
  font-size: .88rem;
  font-weight: 600;
}

.book-feature details p {
  margin: .85rem 0 0;
  font-size: .9rem;
  line-height: 1.6;
}

.publication-secondary li {
  margin-bottom: 1rem;
  padding-left: .35rem;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}

.conceptual-questions {
  grid-column: 1 / -1;
  width: 100%;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.conceptual-questions ul {
  margin-bottom: 0;
}

.conceptual-questions li {
  padding-right: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  padding: 1.7rem;
  background: var(--soft);
}

.project-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1.5rem;
}

.project-index {
  color: var(--muted);
  font-family: var(--tstar);
}

.project-body h3 { margin-top: 0; }

.callout {
  border-radius: 0;
  background: var(--soft);
}

.page-footer {
  border-top: 1px solid var(--line);
  font-size: .8rem;
}

@media (max-width: 850px) {
  .home-hero,
  .hero-overlay { min-height: 570px; }

  .hero-image {
    background-image:
      linear-gradient(90deg, rgba(8, 21, 34, .92), rgba(8, 21, 34, .48)),
      url("assets/karyotype-normal.jpg");
    background-position: 58% center;
  }

  .home-intro,
  .research-navigation,
  .card-grid { grid-template-columns: 1fr; }

  .home-intro { gap: 2rem; padding: 4rem 0; }

  .research-link,
  .research-link + .research-link {
    min-height: auto;
    padding: 2.25rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero-overlay h1 { font-size: 3.1rem; }
  .project-row { grid-template-columns: 1fr; gap: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/*
  Portada personal
  Inspirada en el patrón `about: trestles` de Quarto, pero construida
  con bloques Markdown normales para que puedas editar todo en index.qmd.
*/

.home-building-banner {
  width: min(1120px, calc(100% - 3rem));
  height: auto;
  aspect-ratio: 160 / 27;
  margin: 5rem auto 0;
  background-image: url("assets/fcen.jpg");
  background-position: center 79.3%;
  background-size: cover;
  background-repeat: no-repeat;
}

.profile-home {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 3.5rem 0 2.5rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.profile-column {
  align-self: start;
  text-align: center;
  min-width: 0;
}

.profile-column p:has(> .building) {
  margin: 0;
}

.building {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 390px;
  object-fit: contain;
}

.personal {
  display: block;
  width: 78%;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  margin: 0 auto 1.5rem;
  object-fit: cover;
  object-position: center 18%;
}

.profile-photo-placeholder,
.profile-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.profile-photo-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(36, 90, 165, .35), transparent 55%),
    #202c38;
  font-family: var(--space-grotesk);
  font-size: 5rem;
  font-weight: 500;
  letter-spacing: -.08em;
}

.profile-column p:has(> .profile-photo) {
  margin: 0;
}

.profile-photo {
  display: block;
  object-fit: cover;
  object-position: center 23%;
  background: var(--soft);
}

.profile-column h2,
.profile-column h3 {
  width: 100%;
  margin: 1.6rem 0 .45rem;
  padding-right: 0;
  text-align: center;
  font-family: var(--space-grotesk);
  font-size: 2.15rem;
}

.profile-column .level3 {
  width: 100%;
  text-align: center;
}

.profile-column h3 .anchorjs-link {
  display: none;
}

.profile-column > p {
  width: 100%;
  margin-bottom: 1.4rem;
  text-align: center;
  color: var(--muted);
  font-size: .96rem;
}

.personal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  margin-top: 1.25rem;
}

.personal-links p {
  display: contents;
}

.personal-links a {
  padding: .36rem .7rem;
  color: var(--ink);
  border: 1px solid #949ba2;
  border-radius: 3px;
  font-family: var(--graphik);
  font-size: .8rem;
  text-decoration: none;
}

.personal-links a:hover {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.profile-links {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(max-content, 1fr));
  gap: .45rem;
  width: 100%;
  margin-top: .5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.profile-links p { display: contents; }

.profile-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: .18rem .5rem;
  color: var(--ink);
  border: 1px solid #949ba2;
  border-radius: 3px;
  font-family: var(--graphik);
  font-size: .7rem;
  text-decoration: none;
}

.profile-links a:hover {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.photo-note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-family: var(--tstar);
  font-size: .68rem;
  line-height: 1.5;
}

.profile-content {
  min-width: 0;
  padding-left: clamp(0rem, 2vw, 2rem);
  border-left: 1px solid var(--line);
}

.profile-content > h2:first-child { margin-top: .25rem; }

.profile-content h2 {
  margin: 3.25rem 0 1.25rem;
  font-family: var(--space-grotesk);
  font-size: 2rem;
}

.profile-content > p {
  max-width: 710px;
  font-size: 1.08rem;
}

.lab-epigraph {
  max-width: 710px;
  margin: 1.35rem 0 1.5rem;
  padding: .9rem 1.15rem;
  border-left: 3px solid #b77e00;
  background: var(--soft);
}

.lab-epigraph blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: .96rem;
  font-style: italic;
  line-height: 1.55;
}

.lab-epigraph blockquote p { margin: 0; }

.concept-epigraph,
.darwin-closing {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid #b77e00;
  background: var(--soft);
}

.concept-epigraph blockquote,
.darwin-closing blockquote {
  margin: 0 0 .75rem;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.65;
}

.concept-epigraph > p,
.darwin-closing > p {
  margin: 0;
  color: var(--muted);
  font-family: var(--tstar);
  font-size: .73rem;
}

.darwin-closing {
  width: min(100% - 3rem, 1180px);
  margin: 1.5rem auto 4rem;
}

.research-period-start {
  margin-top: 5rem !important;
}

.quote-kicker {
  grid-column: 1 / -1;
  margin-top: 1.25rem;
  color: var(--muted);
  font-family: var(--tstar);
  font-size: .72rem;
  letter-spacing: .045em;
}

.quote-kicker p {
  margin: 0;
}

.quote-feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.7fr);
  align-items: stretch;
  width: 100%;
  margin-top: .5rem;
  border: 1px solid var(--line);
  background: #fafafa;
}

.quote-feature-image,
.quote-feature-image p {
  height: 100%;
  margin: 0;
}

.quote-feature-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.academic-quote {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: none;
  margin: 0;
  padding: 1.6rem 1.8rem;
  border-left: 3px solid #d79a0b;
  color: var(--muted);
}

.academic-quote blockquote {
  margin: 0 0 .9rem;
  padding: 0;
  border: 0;
  font-family: var(--matter);
  font-size: .88rem;
  font-style: italic;
  line-height: 1.55;
}

.academic-quote > p {
  margin: 0;
  font-family: var(--graphik);
  font-size: .72rem;
  line-height: 1.5;
}

.selected-work {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.work-type {
  color: var(--muted);
  font-family: var(--tstar);
  font-size: .72rem;
  text-transform: uppercase;
}

.work-description h3 {
  margin: 0 0 .45rem;
  font-family: var(--space-grotesk);
  font-size: 1.25rem;
}

.work-description p {
  margin-bottom: .55rem;
  color: var(--muted);
}

.profile-content table {
  width: 100%;
  font-family: var(--graphik);
  font-size: .94rem;
}

/* Página de equipo: añade un bloque .team-member por cada integrante. */
.team-member {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.5rem;
  margin: 1.5rem 0 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.team-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 23%;
}

.team-profile h3 {
  margin-top: 0;
  font-size: 1.7rem;
}

.team-profile p {
  max-width: 650px;
}

.team-profile-full {
  grid-column: 1 / -1;
}

.team-profile-full > p {
  max-width: none;
}

.team-roster {
  width: 100%;
  margin: 1.5rem 0 1rem;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.team-roster table {
  width: 100%;
  min-width: 980px;
  margin: 0;
  font-family: var(--graphik);
  font-size: .82rem;
}

.team-roster th {
  padding: .85rem .7rem;
  color: var(--ink);
  background: var(--soft);
  font-family: var(--tstar);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.team-roster td {
  padding: .85rem .7rem;
  color: var(--muted);
  line-height: 1.45;
  vertical-align: top;
}

.team-roster td:first-child {
  min-width: 170px;
  color: var(--ink);
}

.team-roster td:nth-child(2) { min-width: 145px; }
.team-roster td:nth-child(3) { min-width: 360px; }
.team-roster td:nth-child(4),
.team-roster td:nth-child(5) { min-width: 165px; }
.team-roster td:nth-child(6),
.team-roster td:nth-child(7) {
  min-width: 115px;
  white-space: nowrap;
}

/* Archivo histórico de docencia */
.teaching-summary {
  margin: 1.5rem 0 2.5rem;
  padding: 1rem 1.2rem;
  background: var(--soft);
  font-family: var(--graphik);
}

.teaching-summary p { margin: 0; }

.teaching-timeline {
  position: relative;
  margin: 1.5rem 0 3rem;
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}

.teaching-period {
  position: relative;
  padding: 0 0 2rem 1rem;
}

teaching-activity-list .project-card  content: "";
  position: absolute;
  top: .42rem;
  left: -2.38rem;
  width: .72rem;
  height: .72rem;
  background: #d39300;
  border: 3px solid var(--paper);
  border-radius: 50%;
}


/* Información institucional de los cursos */

.course-details {
  font-size: 0.68rem;
  line-height: 1.25;
  color: var(--muted);
}

.course-details p {
  margin-bottom: 0;
}

.course-details,
.course-details strong {
  color: var(--ink);
  font-weight: 700;
}

a.course-download {
  display: inline-block;
  margin: 0 0 .45rem;
  padding: .42rem .68rem;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

a.course-download::before {
  content: "PDF ↓";
  margin-right: .55rem;
  color: #9a6900;
  font-family: var(--tstar);
  font-size: .65rem;
  letter-spacing: .04em;
}

a.course-download:hover {
  border-color: #b77e00;
  color: #7f5700;
}

.course-poster-page {
  float: right;
  clear: right;
  width: min(28%, 310px);
  height: auto;
  margin: 0 0 .85rem 1.25rem;
  border: 1px solid var(--line);
  background: var(--paper);
}

.course-cover-image {
  float: right;
  clear: right;
  width: min(34%, 390px);
  height: auto;
  margin: 0 0 .85rem 1.25rem;
  border: 1px solid var(--line);
  background: var(--paper);
}

.course-schema-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: .85rem;
  margin: 1rem 0;
}

.course-schema-gallery p { margin: 0; }

.course-schema-gallery img {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--paper);
  filter: grayscale(1);
}

.project-card::after {
  content: "";
  display: block;
  clear: both;
}

.project-card > hr { clear: both; }

.pdf-viewer-toolbar {
  width: min(100% - 2rem, 1500px);
  margin: 0 auto 1rem;
}

.pdf-viewer-toolbar p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0;
}

.pdf-viewer-toolbar a {
  padding: .5rem .75rem;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
}

.pdf-viewer-toolbar a:hover {
  border-color: #b77e00;
  color: #7f5700;
}

.pdf-viewer {
  display: block;
  width: min(100% - 2rem, 1500px);
  height: calc(100vh - 220px);
  min-height: 680px;
  margin: 0 auto 2rem;
  border: 1px solid var(--line);
  background: #f2f2f2;
}

.course-library-controls {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(300px, 2fr) auto;
  align-items: center;
  gap: .75rem;
  width: min(100% - 2rem, 1500px);
  margin: 0 auto 1rem;
}

.course-library-controls a,
.course-library-controls select {
  min-height: 2.5rem;
  padding: .48rem .7rem;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  font-size: .78rem;
}

.course-library-controls a {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
}

.course-library-controls label {
  margin: 0;
  font-family: var(--tstar);
  font-size: .72rem;
  color: var(--muted);
}

.course-material-current {
  width: min(100% - 2rem, 1500px);
  margin: 0 auto .7rem;
  color: var(--muted);
  font-family: var(--tstar);
  font-size: .78rem;
}

@media (max-width: 600px) {
  .pdf-viewer-toolbar p { flex-direction: column; }
  .pdf-viewer { min-height: 560px; }
  .course-library-controls { grid-template-columns: 1fr; }

  .course-poster-page {
    float: none;
    clear: none;
    width: calc(50% - .4rem);
    margin: .2rem;
    vertical-align: top;
  }

  .course-cover-image {
    float: none;
    width: 100%;
    margin: .5rem 0 1rem;
  }

  .course-schema-gallery {
    grid-template-columns: 1fr;
  }

  .course-schema-gallery img {
    height: auto;
  }
}

.teaching-period h3 {
  margin: 0 0 .5rem;
  color: #8f6200;
  font-family: var(--tstar);
  font-size: 1rem;
  font-weight: 500;
}

.teaching-period p {
  margin: 0 0 .45rem;
  color: var(--muted);
  line-height: 1.55;
}

.career-disclosure {
  margin: 1rem 0 3rem;
  border: 1px solid var(--line);
  background: var(--paper);
}

.career-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--ink);
  background: var(--soft);
  cursor: pointer;
  list-style: none;
  font-family: var(--tstar);
  font-size: .92rem;
  letter-spacing: .02em;
}

.career-disclosure summary::-webkit-details-marker { display: none; }

.career-disclosure summary::before {
  content: "+";
  flex: 0 0 auto;
  color: #b77e00;
  font-family: var(--space);
  font-size: 1.35rem;
  line-height: 1;
}

.career-disclosure[open] summary::before { content: "−"; }

.career-disclosure summary span { margin-right: auto; }

.career-disclosure summary small {
  color: var(--muted);
  font-family: var(--space);
  font-size: .78rem;
  letter-spacing: 0;
}

.career-disclosure-body { padding: 1.25rem 1.5rem .25rem; }

.career-disclosure-body .teaching-timeline { margin-bottom: 1.5rem; }

/* Landing de una sola página: secciones principales desplegables. */
.landing-sections {
  width: min(100% - 3rem, 1180px);
  margin-inline: auto;
}

.landing-sections {
  margin-top: 1rem;
  margin-bottom: 4rem;
}

.landing-disclosure {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.landing-disclosure:last-child { border-bottom: 1px solid var(--line); }

.landing-disclosure summary {
  display: grid;
  grid-template-columns: minmax(240px, .75fr) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  cursor: pointer;
  list-style: none;
}

.landing-disclosure summary::-webkit-details-marker { display: none; }

.landing-disclosure summary::after {
  content: "+";
  color: #b77e00;
  font-family: var(--space);
  font-size: 1.6rem;
  line-height: 1;
}

.landing-disclosure[open] summary::after { content: "−"; }

.landing-disclosure summary span {
  color: var(--ink);
  font-family: var(--space-grotesk);
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  font-weight: 600;
}

.landing-disclosure summary small {
  margin-right: .75rem;
  color: #b77e00;
  font-family: var(--space);
  font-size: .72rem;
  font-weight: 400;
}

.landing-disclosure summary strong {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 400;
}

.landing-disclosure-body {
  padding: .25rem 3.25rem 2.25rem calc(25% + 1.5rem);
}

.landing-disclosure-body > p:first-child { margin-top: 0; }

.landing-disclosure-body .quote-feature { margin-top: 2.25rem; }

.teaching-activity-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.teaching-activity-list .project-card {
  width: 100%;
  min-height: 0;
}

@media (max-width: 800px) {
  .home-building-banner {
    width: min(100% - 2rem, 1120px);
    height: clamp(165px, 34vw, 220px);
    aspect-ratio: auto;
    margin-top: 2.5rem;
    background-position: center 79.3%;
  }

  .profile-home {
    padding-top: 3rem;
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .profile-column {
    width: min(390px, 100%);
    margin: 0 auto;
  }

  .personal {
    width: 62.5%;
  }

  .profile-content {
    padding-left: 0;
    border-left: 0;
  }

  .quote-feature {
    grid-template-columns: 1fr;
  }

  .quote-feature-image img {
    min-height: 0;
    aspect-ratio: 2.16 / 1;
  }

  .team-member {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 1.5rem;
  }

  .landing-disclosure summary {
    grid-template-columns: 1fr auto;
    gap: .35rem 1rem;
  }

  .landing-disclosure summary strong {
    grid-column: 1;
  }

  .landing-disclosure summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .landing-disclosure-body { padding: .25rem 0 2rem; }
}

@media (max-width: 520px) {
  .home-building-banner { height: 165px; }
  .profile-home { width: min(100% - 2rem, 1120px); }
  .selected-work { grid-template-columns: 1fr; gap: .35rem; }
  .team-member { grid-template-columns: 1fr; }
  .team-photo { width: min(260px, 100%); }
}
