body {
  background: var(--color-fondo);
  color: var(--color-texto);
  font-family: var(--font-mono);
  font-size-adjust: var(--font-size-adjust);
  font-size: var(--fs-texto);
  font-weight: var(--fw-texto);
  line-height: var(--lh-texto);
}

/* vertical rhythm: paragraphs and lists are one line apart (tokens.css) */
p, ul, ol { margin: 0 0 var(--l-mitad); }

.container {
  max-width: 1920px;
  padding-inline: 140px;
}

.topbar {
  position: relative;
  height: 64px;
  margin-bottom: var(--l-1);
  display: flex;
  align-items: center;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 100vw;
  transform: translateX(-50%);
  /* flat band: the darkest colour of the palette (js/banda.js sets --color-banda) */
  background: var(--color-banda);
  z-index: -1;
}

.site-title {
  font-family: var(--font-titulo);
  font-size-adjust: var(--ajuste-titulo);
  letter-spacing: var(--ls-titulo);
  font-size: var(--fs-sitio);
  font-weight: 300;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}

/* article */
h1 {
  font-family: var(--font-titulo);
  font-size-adjust: var(--ajuste-titulo);
  font-weight: var(--fw-titulo);
  letter-spacing: var(--ls-titulo);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  text-transform: uppercase;
  margin: 0 0 var(--l-1);
}

/* titles as wide as the body text column below them (.col-lg-6, minus its gutter) */
@media (min-width: 992px) {
  h1 { max-width: calc(50% - .75rem); }
}

.films {
  font-family: var(--font-mono);
  font-size: var(--fs-chico);
  line-height: var(--lh-chico);
}

.films h2 {
  font-family: var(--font-mono);
  font-size: var(--fs-etiqueta);
  font-weight: 400;
  line-height: var(--lh-etiqueta);
  letter-spacing: var(--ls-etiqueta);
  text-transform: uppercase;
  margin: 0 0 var(--l-mitad);
}

/* film titles: italic, as works are set */
.films strong {
  font-style: italic;
  font-weight: 400;
}

.films img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.films .row {
  margin-bottom: 0;
}

p {
  margin-bottom: var(--l-mitad);
}

/* the footer sits at the foot of the window even when the page is short: the content takes the slack,
   the footer is never fixed, so it still scrolls away with the page when there is more to read */
body { min-height: 100vh; display: flex; flex-direction: column; }

body > .container,
body > .container-fluid { flex: 1 0 auto; }

/* the portraits are black and white, wherever they appear */
.persona-foto { filter: grayscale(1); }

/* pies de página de un eje: el anterior a la izquierda, el siguiente a la derecha */
.eje-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--l-1);
  margin-top: var(--l-1);
  font-family: var(--font-mono);
  font-size: var(--fs-chico);
  line-height: var(--lh-chico);
}

.eje-nav a { color: var(--color-acento); text-decoration: none; }

.eje-nav a:hover { text-decoration: underline; }

.eje-nav-siguiente { margin-left: auto; text-align: right; }

/* bibliografía */
/* inside a column (an eje's, next to its body text) the panel keeps to that column instead of bleeding
   past it, which is what the negative margin does when the panel spans the page */
.side .biblio { margin-inline: 0; }

.biblio {
  --bs-btn-padding-x: 0;
  background: var(--color-superficie);
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, .12);
  margin: var(--l-2) -1.5rem 0;
  padding: 0 1.5rem var(--l-1);
  font-family: var(--font-mono);
  font-size: var(--fs-texto);
  line-height: var(--linea);
}

.biblio-toggle {
  display: block;
  width: 100%;
  padding: var(--l-1) 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: var(--lh-h2);
  text-transform: uppercase;
  color: #000;
}

.biblio ul {
  list-style: none;
  padding: 0 0 var(--l-2);
  margin: 0;
}

.biblio li {
  margin-bottom: var(--l-1);
}

@media (max-width: 1399.98px) {
  .container { padding-inline: 5vw; }
}

.site-footer {
  background: var(--color-banda);
  height: 120px;
  margin-top: var(--l-3);
}

/* shared pages */
.page-title { margin-bottom: var(--l-1); }

.entry {
  display: block;
  padding: var(--l-1) 0;
  border-top: 1px solid rgba(34, 34, 34, .25);
  color: inherit;
  text-decoration: none;
}

.entry h2 {
  font-family: var(--font-titulo);
  font-size-adjust: var(--ajuste-titulo);
  font-weight: var(--fw-titulo);
  letter-spacing: var(--ls-titulo);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  margin: 0;
}

.entry p, .entry small { margin: 0; }

.entry:hover h2 { color: var(--color-acento); }

.side h2 {
  font-family: var(--font-mono);
  font-size: var(--fs-etiqueta);
  font-weight: 400;
  line-height: var(--lh-etiqueta);
  letter-spacing: var(--ls-etiqueta);
  text-transform: uppercase;
  margin: 0 0 var(--l-mitad);
}

.side ul { list-style: none; padding: 0; margin: 0 0 var(--l-1); }

a { color: var(--color-acento); }

.film-placeholder {
  aspect-ratio: 1;
  background: var(--color-superficie);
}

.accordion {
  --bs-accordion-bg: transparent;
  --bs-accordion-border-color: rgba(34, 34, 34, .25);
  --bs-accordion-border-radius: 0;
  --bs-accordion-btn-bg: transparent;
  --bs-accordion-btn-color: var(--color-texto);
  --bs-accordion-active-bg: transparent;
  --bs-accordion-active-color: var(--color-acento);
  --bs-accordion-btn-focus-box-shadow: none;
  --bs-accordion-btn-padding-x: 0;
  --bs-accordion-body-padding-x: 0;
}

.accordion-button {
  font-family: var(--font-mono);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: var(--lh-h2);
  box-shadow: none !important;
}

.accordion-item { border-inline: 0; }

.tag {
  display: inline-block;
  border: 1px solid var(--color-acento);
  color: var(--color-acento);
  padding: 0 .6em;
  margin: 0 .4em .4em 0;
  font-size: 12px;
  line-height: 20px;
  text-decoration: none;
  transition: background-color .3s, color .3s;
}

a.tag:hover,
.tag:hover {
  background: var(--color-acento);
  color: #fff;
}

.modal-content {
  border: 0;
  border-radius: 0;
  box-shadow: 6px 6px 12px rgba(0, 0, 0, .3);
  font-family: var(--font-sans);
  font-size: var(--fs-texto);
  line-height: var(--linea);
}

.modal-body { padding: var(--l-2) var(--l-2) var(--l-1); }

.modal-body .row > * { padding-inline: 20px; }

/* mapa */
#graph {
  width: 100%;
  height: calc(100vh - 160px);
  min-height: 520px;
}

#graph text {
  font-family: var(--font-mono);
  font-size: 11px;
  pointer-events: none;
  fill: var(--color-texto);
}

#graph .node { cursor: pointer; }

#graph .film circle { fill: var(--color-acento); }

#graph .tag-node circle { fill: var(--color-acento-2); }

#graph line { stroke: var(--color-texto); stroke-opacity: .2; }

#graph .dim { opacity: .12; }

#graph line.on { stroke: var(--color-acento-2); stroke-opacity: 1; stroke-width: 2px; }

#graph .on circle { stroke: var(--color-texto); stroke-width: 2px; }

#graph .on text { font-weight: 700; }

#graph .tag-node.low text { display: none; }

#graph .tag-node.low.on text { display: block; }

.accordion-button.no-arrow::after { display: none; }

.accordion-button:disabled { opacity: 1; }

/* investigadores */
.people .person {
  padding: 0;
  cursor: pointer;
}

.people .person:hover h2 { color: var(--color-acento); }

.people h2 {
  font-family: var(--font-mono);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: var(--lh-h2);
  padding: var(--l-mitad) var(--l-1);
  margin: 0;
}

.avatar {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 64px;
  font-weight: 300;
}

.people .person:nth-child(n+2) { border-top: 1px solid #fff; }

@media (min-width: 768px) {
  .people .person:nth-child(n+2) { border-top: 0; }
  .people .person:nth-child(n+5) { border-top: 1px solid #fff; }
  .people .person:not(:nth-child(4n+1)) { border-left: 1px solid #fff; }
}

.biblio a { text-decoration: none; }

.biblio a:hover { color: var(--color-acento) !important; }

.accordion-body .biblio { margin-inline: 0; padding-inline: 1.5rem; }

/* one blank line after movie strips */
.films .row + h2,
.side img + h2 { margin-top: var(--linea); }

@media (min-width: 992px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
  }
}

.site-footer a {
  color: #fff;
  font-size: 8.25px;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

.site-footer a:hover { text-decoration: underline; }

@media (min-width: 992px) {
  .topbar, .site-title, .navbar-toggler {
    transition: height .3s, margin-bottom .3s, font-size .3s, transform .3s;
  }

  /* shrink to 50%; margin grows by the lost height so the page doesn't jump */
  .topbar.scrolled {
    height: 32px;
    margin-bottom: calc(var(--l-2) + 32px);
  }

  .topbar.scrolled .site-title { font-size: 11.25px; }

  .topbar.scrolled .navbar-toggler {
    transform: scale(.5);
    transform-origin: right center;
  }
}

.accordion-item { scroll-margin-top: 96px; }

/* film strip images lighten on hover */
.films .film-link img,
.films .film-link .film-placeholder { transition: filter .25s; }

.films .film-link:hover img,
.films .film-link:hover .film-placeholder { filter: brightness(1.15); }

/* mapa2: films left, tags right, splines between */
.map2 {
  position: relative;
  display: grid;
  grid-template-columns: 22% 1fr 22%;
  min-height: 1500px;
  margin-top: 8px;
}

.map2-col { display: flex; flex-direction: column; justify-content: space-between; position: relative; z-index: 1; }

.map2-edges { position: absolute; inset: 0; width: 100%; height: 100%; grid-column: 1 / -1; pointer-events: none; }

.map2-film {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 15px;
  transition: opacity .25s, transform .2s cubic-bezier(.2, .7, .2, 1);
}

.map2-film img { width: 105px; height: 56px; object-fit: cover; flex: none; transition: filter .25s; }

.map2-tag {
  align-self: flex-end;
  border: 1px solid var(--color-acento);
  color: var(--color-acento);
  padding: 0 .6em;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .25s, color .25s, opacity .25s, transform .2s cubic-bezier(.2, .7, .2, 1);
}

.map2-edges path { fill: none; stroke: var(--color-texto); stroke-opacity: .18; stroke-width: 1px; transition: stroke .25s, stroke-opacity .25s; }

.map2.hover .map2-film, .map2.hover .map2-tag, .map2.hover path { opacity: .15; }

.map2.hover .on { opacity: 1; }

.map2-edges path.on { stroke: var(--color-acento-2); stroke-opacity: 1; stroke-width: 2px; }

.map2-tag.on, .map2-tag:hover { background: var(--color-acento); color: #fff; }

.map2-film.on img, .map2-film:hover img { filter: brightness(1.15); }

.map2-film.on span { font-weight: 700; }

.map2-films { grid-column: 1; }

.map2-tags { grid-column: 3; }

/* .modal-body is position: relative and comes after the close button: keep the button on top */
.modal-content > .btn-close { z-index: 2; }

/* film titles inside the Django site's film modal review are bold (the prototype converts <em> to <strong> in JS) */
#film-modal .modal-body em, #film-modal .modal-body i { font-style: normal; font-weight: 700; }
