@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/Manrope.ttf") format("truetype");
}

:root {
  --fg: #18181b;
  --fg-soft: #52525b;
  --fg-muted: #71717a;
  --bg: #ffffff;
  --bg-soft: #f6f6f8;
  --border: #e7e7eb;
  --accent: #4f5bd5;
  --accent-soft: #eef0fc;
  --nav-bg: rgb(255 255 255 / 0.82);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 18px 40px -18px rgb(24 24 40 / 0.28);
  --radius: 14px;
  --w-text: 800px;
  --w-wide: 1000px;
  --w-hero: 1200px;
}

/* Dark: follows the system unless the nav button picked a theme (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fg: #f4f4f5;
    --fg-soft: #b4b4bb;
    --fg-muted: #8b8b94;
    --bg: #111113;
    --bg-soft: #18181b;
    --border: #26262b;
    --accent: #9aa3ff;
    --accent-soft: #23253b;
    --nav-bg: rgb(17 17 19 / 0.82);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 18px 40px -18px rgb(0 0 0 / 0.7);
  }
}

:root[data-theme="dark"] {
  --fg: #f4f4f5;
  --fg-soft: #b4b4bb;
  --fg-muted: #8b8b94;
  --bg: #111113;
  --bg-soft: #18181b;
  --border: #26262b;
  --accent: #9aa3ff;
  --accent-soft: #23253b;
  --nav-bg: rgb(17 17 19 / 0.82);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 18px 40px -18px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: currentColor;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

/* Layout */
.wrap,
.wrap-wide {
  margin: 0 auto;
  padding: 0 24px;
}

.wrap {
  max-width: calc(var(--w-text) + 48px);
}

.wrap-wide {
  max-width: calc(var(--w-wide) + 48px);
}

/* Navigation */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: calc(var(--w-hero) + 48px);
  height: 56px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-brand {
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav-links a {
  color: var(--fg-soft);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--fg);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -10px;
  padding: 0;
  color: var(--fg-soft);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--fg);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* the icon shows the theme a click switches to */
.theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
}

/* Hero */
.hero {
  padding: 128px 0 72px;
  text-align: center;
}

.venue {
  display: inline-block;
  margin: 0 0 22px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.title {
  margin: 0 0 26px;
}

.title-name {
  display: block;
  font-size: 4.4rem;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.title-sub {
  display: block;
  max-width: 680px;
  margin: 14px auto 0;
  color: var(--fg-soft);
  text-wrap: balance;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.authors {
  display: grid;
  gap: 4px;
  max-width: 1000px;
  margin: 0 auto 18px;
  font-size: 1.08rem;
  font-weight: 600;
}

.author-row,
.affiliation-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 22px;
}

.authors a {
  text-decoration-color: transparent;
}

.authors a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.affil {
  margin: 0 0 28px;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 17px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.btn:hover {
  border-color: var(--fg-muted);
  transform: translateY(-1px);
}

.btn-primary {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

.btn-primary:hover {
  border-color: var(--fg);
}

.tldr {
  max-width: 760px;
  margin: 30px auto 0;
  padding: 0 24px;
  color: var(--fg-soft);
  font-size: 1.12rem;
  line-height: 1.6;
}

.tldr-label {
  margin-right: 6px;
  color: var(--fg);
  font-weight: 800;
}

/* Sections */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  margin: 0 0 22px;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.section h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section p {
  margin: 0 0 16px;
}

.lead {
  color: var(--fg-soft);
}

/* Figures */
.figure {
  margin: 28px 0 40px;
}

.figure a {
  display: block;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.figure img {
  width: 100%;
}

.figure figcaption {
  margin-top: 12px;
  color: var(--fg-muted);
  font-size: 0.86rem;
  text-align: center;
}

/* BibTeX */
.bibtex-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.bibtex-head .section-title {
  margin: 0;
}

.bibtex pre {
  margin: 0;
  padding: 22px 24px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font:
    0.8rem/1.7 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg-soft);
  font:
    600 0.8rem "Manrope",
    sans-serif;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--fg);
}

/* Footer */
.footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.85rem;
}

.footer .wrap-wide {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--fg);
}

/* Solid-color hero */
.hero-dark .hero {
  background: #111113;
  color: #f4f4f5;
  --fg: #f4f4f5;
  --fg-soft: #b9b9c2;
  --fg-muted: #8e8e99;
  --bg: #111113;
  --border: #2a2a33;
  --accent: #a5adff;
  --accent-soft: rgb(129 140 248 / 0.16);
  border-bottom: 0;
}

.hero-dark .hero + .section {
  border-top: 0;
}

.hero-dark .nav:not(.is-scrolled) {
  background: transparent;
  color: #f4f4f5;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.hero-dark .nav:not(.is-scrolled) .nav-links a {
  color: #b9b9c2;
}

.hero-dark .nav:not(.is-scrolled) .nav-links a:hover {
  color: #fff;
}

.hero-dark .nav:not(.is-scrolled) .theme-toggle {
  color: #b9b9c2;
  border-color: rgb(255 255 255 / 0.18);
}

.hero-dark .nav:not(.is-scrolled) .theme-toggle:hover {
  color: #fff;
}

.hero {
  display: grid;
  place-items: center;
  min-height: min(100svh, 1000px);
}
.hero-content {
  width: 100%;
  max-width: calc(var(--w-hero) + 48px);
  padding: 0 24px;
}
.authors sup {
  margin-left: 2px;
  font-size: 0.65em;
}
.affiliations {
  display: grid;
  gap: 4px;
  max-width: 1000px;
  margin: 0 auto 12px;
}
.affiliations sup {
  margin-right: 3px;
}
.author-notes {
  margin: 0 0 28px;
  color: var(--fg-muted);
  font-size: 0.78rem;
}
.hero .links {
  margin-bottom: 0;
}
.section-overview {
  border-top: 0;
}
.section-overview .tldr {
  margin: 0 auto;
  text-align: center;
  text-wrap: balance;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.nav-brand,
.title-sub,
.affiliations,
.section p {
  overflow-wrap: anywhere;
}
@media (max-width: 1000px) {
  .nav-links {
    gap: 14px;
  }
  .nav-links a {
    font-size: 0.78rem;
  }
}
@media (max-width: 720px) {
  html {
    font-size: 16px;
  }
  .nav-links {
    display: none;
  }
  .hero {
    min-height: auto;
    padding: 112px 0 64px;
  }
  .hero-content {
    padding: 0 16px;
  }
  .title-name {
    font-size: 3rem;
  }
  .title-sub {
    font-size: 1.15rem;
  }
  .authors {
    font-size: 1rem;
  }
  .author-row {
    gap: 4px 16px;
  }
  .affiliations {
    gap: 8px;
  }
  .affiliation-row {
    gap: 8px 16px;
  }
  .section {
    padding: 56px 0;
  }
  .wrap,
  .wrap-wide,
  .tldr {
    padding: 0 16px;
  }
  .figure a {
    padding: 10px;
  }
  .bibtex pre {
    padding: 18px;
  }
}
@media (min-width: 1760px) {
  html {
    font-size: 20px;
  }
  :root {
    --w-text: 880px;
    --w-wide: 1400px;
    --w-hero: 1560px;
  }
}
@media (min-width: 2240px) {
  html {
    font-size: 22px;
  }
  :root {
    --w-text: 960px;
    --w-wide: 1680px;
    --w-hero: 1840px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
