@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: Castoro;
  src: url("../fonts/castoro-latin-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #192127;
  --muted: #505d68;
  --line: #d9dfe2;
  --paper: #fff;
  --surface: #f6f7f8;
  --accent: #284ba1;
  --accent-hover: #173878;
  --accent-soft: #edf2fc;
  --column: 68rem;
  --serif: Castoro, Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 4.8rem; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1.04rem/1.65 var(--sans);
  -webkit-text-size-adjust: 100%;
}

.theme-spac {
  --ink: #172722;
  --muted: #53635c;
  --line: #d5ded8;
  --surface: #f5f7f5;
  --accent: #116959;
  --accent-hover: #094c40;
  --accent-soft: #eaf4ee;
}

a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-hover); }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, dl, dd { margin: 0; }
p { margin: 0; }
p + p { margin-top: .95em; }
h1, h2, h3 { text-wrap: balance; }
.shell { width: min(calc(100% - 3.5rem), var(--column)); margin-inline: auto; }
.reading { max-width: 46rem; margin-inline: auto; }

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 12;
  transform: translateY(-160%);
  padding: .45rem .85rem;
  color: var(--ink);
  background: white;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(255 255 255 / .97);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1.25rem;
  min-height: 3.1rem;
}

.site-name, .section-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 550;
  text-decoration: none;
}

.site-name { gap: .3em; color: var(--ink); font-weight: 700; white-space: nowrap; }
.home-short { display: none; }
.section-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-name:hover, .section-nav a:hover { color: var(--accent); text-decoration: underline; }

.hero {
  padding: clamp(2.2rem, 4.2vw, 3.6rem) 0 2rem;
  text-align: center;
}

.project-title { margin: 0 auto; font-weight: 400; }
.project-accent {
  position: relative;
  display: inline-block;
  padding-left: .72em;
  color: var(--ink);
  font: 800 clamp(3.35rem, 6.2vw, 5.25rem)/1 var(--sans);
  letter-spacing: -.077em;
}

.project-accent::before, .project-accent::after {
  position: absolute;
  display: block;
  content: "";
}

.theme-ravec .project-accent::before, .theme-ravec .project-accent::after {
  width: .37em;
  height: .37em;
  box-sizing: border-box;
  border: .049em solid;
  border-radius: .06em;
}

.theme-ravec .project-accent::before {
  left: .015em;
  top: .29em;
  transform: rotate(-8deg);
  background: #fcf0dc;
  border-color: #ca8239;
}

.theme-ravec .project-accent::after {
  left: .17em;
  top: .4em;
  background: rgb(219 232 253 / .83);
  border-color: #315aab;
}

.theme-spac .project-accent::before, .theme-spac .project-accent::after {
  background: conic-gradient(from 60deg, #14715d 0 120deg, #46957c 0 240deg, #9ed4b9 0);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.theme-spac .project-accent::before { width: .47em; height: .51em; left: .04em; top: .32em; }
.theme-spac .project-accent::after { width: .21em; height: .23em; left: .36em; top: .17em; }

.title-subject {
  display: block;
  max-width: 25em;
  margin: .27em auto 0;
  color: var(--ink);
  font: 400 clamp(1.75rem, 3.45vw, 2.83rem)/1.12 var(--serif);
  letter-spacing: -.034em;
}

.theme-spac .title-subject { max-width: 22em; }
.authors, .affiliations {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: baseline;
  margin-inline: auto;
}

.authors {
  max-width: 53rem;
  margin-top: 1.3rem;
  gap: .15rem .53rem;
  font-size: 1rem;
  line-height: 1.55;
}

.authors span { white-space: nowrap; }
.authors sup, .affiliations sup { color: var(--accent); font-size: .65em; font-weight: 700; }

.affiliation-details { width: fit-content; max-width: 55rem; margin: .42rem auto 0; }
.affiliation-details summary {
  width: fit-content;
  margin: auto;
  padding: .22rem .5rem;
  list-style: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: .25rem;
  font-size: .84rem;
  font-weight: 550;
}

.affiliation-details summary::-webkit-details-marker { display: none; }
.affiliation-details summary::after {
  content: "";
  display: inline-block;
  width: .45em;
  height: .45em;
  margin: 0 0 .18em .6em;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.affiliation-details[open] summary::after { transform: rotate(225deg); margin-bottom: -.02em; }
.affiliation-details summary:hover { color: var(--accent); }

.affiliations {
  gap: .25em 1.15em;
  margin-top: .35rem;
  padding: .35rem .4rem;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}

.institution-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .8rem clamp(1.2rem, 3vw, 2.25rem);
  margin: 1.2rem auto 0;
}

.institution-logos img {
  width: auto;
  height: clamp(2rem, 4.6vw, 2.65rem);
  max-width: min(100%, 17rem);
  object-fit: contain;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .48rem;
  margin-top: 1.05rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.5rem;
  padding: .43rem 1.08rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 99rem;
  font: 600 .89rem/1.35 var(--sans);
  cursor: pointer;
  text-decoration: none;
}

.hero-actions .button { color: white; background: var(--ink); border-color: var(--ink); }
.hero-actions a[href^="https"]::after { content: "↗"; font: 1.05em/1 var(--sans); }
.button:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.hero-actions .button:hover { color: white; background: var(--accent); border-color: var(--accent); }
.button[hidden] { display: none; }

.section { padding-block: clamp(2.75rem, 5vw, 4.7rem); border-top: 1px solid var(--line); }
.section h2 {
  margin-bottom: .7em;
  color: var(--ink);
  font: 400 clamp(2rem, 3.5vw, 2.9rem)/1.1 var(--serif);
  letter-spacing: -.038em;
  text-align: center;
}

.section h3 { font: 650 1.25rem/1.3 var(--sans); letter-spacing: -.025em; }
.section .reading p { text-wrap: pretty; }
.section > .reading + figure, .section > .reading + .figure-grid { margin-top: 2rem; }
.hero-figure img, .figure-frame img { width: 100%; }
.hero-figure { margin-bottom: 2.65rem; }
.hero-figure > a, .figure-frame > a { display: block; color: var(--accent); cursor: zoom-in; }
figure a img { border-radius: .2rem; }
figcaption {
  max-width: 53rem;
  margin: .75rem auto 0;
  font: 400 .93rem/1.55 var(--sans);
  color: var(--muted);
  text-align: center;
}
figcaption strong { color: var(--ink); font-weight: 650; }
.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem; align-items: start; }
.figure-frame + .figure-frame { margin-top: 2.5rem; }
.figure-grid > .figure-frame + .figure-frame { margin-top: 0; }

.citation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .7rem;
  margin-bottom: .9rem;
}
#citation { max-width: 54rem; }
#citation .reading { max-width: none; }
.citation-head h2 { margin: 0; text-align: left; }
#bibtex {
  margin: 0;
  padding: clamp(.95rem, 2vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--surface);
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: .84rem/1.6 Consolas, "Liberation Mono", monospace;
}
.copy-status { min-height: 1.6em; margin-top: .35rem; color: var(--muted); font-size: .85rem; }
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  padding: 1.1rem 0 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}
.site-footer a { color: inherit; }

.figure-dialog {
  width: min(80rem, 94vw);
  max-height: 94dvh;
  padding: .85rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: white;
  color: var(--ink);
}
.figure-dialog::backdrop { background: rgb(19 26 30 / .75); }
.figure-dialog img { width: auto; max-width: 100%; max-height: 73dvh; margin: .4rem auto; object-fit: contain; }
.figure-dialog figcaption { margin: .65rem auto .25rem; }
.figure-tools { display: flex; justify-content: flex-end; align-items: center; gap: .55rem; }
body:has(.figure-dialog[open]) { overflow: hidden; }

@media (max-width: 45rem) {
  .shell { width: calc(100% - 2.25rem); }
  .header-inner { min-height: 2.9rem; gap: .4rem; }
  .section-nav { gap: .74rem; }
  .site-name, .section-nav a { font-size: .77rem; }
  .hero { padding: 2rem 0 1.7rem; }
  .authors { gap: .12rem .42rem; font-size: .91rem; }
  .figure-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 24rem) {
  .shell { width: calc(100% - 1.5rem); }
  .site-name, .section-nav a { font-size: .73rem; }
  .section-nav { gap: .55rem; }
  .button { padding-inline: .85rem; }
}

@media (max-width: 29rem) {
  .home-name { display: none; }
  .home-short { display: inline; }
  .hero-actions .button { font-size: .83rem; padding-inline: .84rem; }
}

@media (max-width: 22rem) {
  .home-short { display: none; }
  .site-name { min-width: 1.75rem; justify-content: center; font-size: 1rem; }
  .section-nav { flex-wrap: wrap; justify-content: flex-end; gap: 0 .4rem; }
}
