/* Project page in the Nerfies template's look (Bulma 0.9 metrics), with the paper's colors. */
:root {
  --bg: #ffffff;
  --text: #4a4a4a;
  --strong: #363636;
  --link: #2171b5;
  --muted: #6b7280;
  --button: #363636;
  --button-text: #ffffff;
  --code-bg: #f5f5f5;
  --frame: #e5e7eb;
  --footer: #fafafa;
  --figure-bg: #ffffff;
  --rule: #e9eaee;
  --title-font: "Google Sans", sans-serif;
  --body-font: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: monospace;
  color-scheme: light;   /* always white, like the reference page */
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; background: #ffffff; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--body-font);
  line-height: 1.5; font-weight: 400;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
b, strong { color: var(--strong); font-weight: 600; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 960px; margin: 0 auto; }
.narrow { max-width: 768px; margin: 0 auto; }
.section { padding-block: 3.25rem; }

/* top navigation: stays at the top while scrolling and marks the current section */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
section[id] { scroll-margin-top: 4.25rem; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.navbar {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: center; gap: .3rem 2.6rem;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  padding: .95rem max(16px, env(safe-area-inset-right, 0px)) .85rem max(16px, env(safe-area-inset-left, 0px));
  margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
  background: rgba(255, 255, 255, .78); border-bottom: 1px solid transparent; transition: border-color .2s;
  font-family: var(--body-font); font-size: 1.1rem; white-space: nowrap;
}
.navbar.scrolled { border-bottom-color: var(--rule); }
.navbar a { color: #4a4a4a; transition: color .2s; }
.navbar a:hover { color: var(--link); text-decoration: none; }
.navbar a.active { color: var(--link); }

/* hero */
.hero { padding-block: 2.25rem 1.5rem; text-align: center; }
.publication-title {
  font-family: var(--title-font); font-size: 3rem; font-weight: 600; line-height: 1.125;
  color: var(--strong); margin: 0 0 1.5rem; text-wrap: balance;
}
.publication-authors { font-family: var(--title-font); font-size: 1.25rem; color: var(--text); }
.publication-authors + .publication-authors { margin-top: .25rem; }
.author-block { display: inline-block; margin: 0 .3rem; }
.publication-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.button {
  display: inline-flex; align-items: center; gap: .45em; height: 2.5em; padding: 0 1.25em;
  border-radius: 9999px; background: var(--button); color: var(--button-text); font-size: 1rem;
  font-family: var(--body-font); border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.button:hover { text-decoration: none; filter: brightness(1.15); }
.button svg { width: 1.05em; height: 1.05em; fill: currentColor; }
.tldr { font-size: 1.25rem; margin: 1.5rem auto 0; max-width: 860px; color: var(--text); text-wrap: pretty; }
.tldr b { font-weight: 700; }

/* figures */
.figure-frame {
  width: 100%; max-width: 960px; margin: 0 auto; border: 1px solid var(--frame); border-radius: 10px;
  overflow: hidden; background: var(--figure-bg); aspect-ratio: 1000 / 545;
}
.figure-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
figure { margin: 1.75rem 0; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .6rem; text-align: center; text-wrap: pretty; }
.figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: end; }
.figure-pair > div { min-width: 0; }
.figure-pair img { border-radius: 6px; background: var(--figure-bg); }
.figure-pair .sub { color: var(--muted); font-size: .88rem; margin-top: .35rem; text-align: left; }

/* text */
h2.title { font-family: var(--body-font); font-size: 2rem; font-weight: 600; color: var(--strong); text-align: center; margin: 0 0 1.25rem; line-height: 1.125; }
h3.title { font-family: var(--body-font); font-size: 1.5rem; font-weight: 600; color: var(--strong); margin: 0 0 1rem; line-height: 1.125; text-wrap: balance; }
h4.subtitle { font-family: var(--body-font); font-size: 1.15rem; font-weight: 600; color: var(--strong); margin: 1.75rem 0 .5rem; }
.content p { margin: 0 0 1em; }
.content .justified { text-align: justify; }
.content ul, .content ol { margin: 0 0 1em; padding-left: 1.25em; }
.content li { margin: 0 0 .55em; }
.eq { overflow-x: auto; overflow-y: hidden; margin: .75rem 0 1.1rem; }
.eq-narrow { display: none; }
mjx-container[display="true"] { margin: .4em 0 !important; }

/* BibTeX */
.bib { position: relative; }
pre {
  background: var(--code-bg); color: var(--text); font-family: var(--mono); font-size: .875em;
  padding: 1.25em 1.5em; overflow-x: auto; white-space: pre; border-radius: 6px; margin: 0;
}
.copy { position: absolute; top: .55rem; right: .55rem; font-size: .8rem; padding: .25rem .65rem; border-radius: 6px;
  border: 1px solid var(--frame); background: var(--bg); color: var(--muted); cursor: pointer; font-family: var(--body-font); }

/* footer */
footer {
  background: var(--footer); padding-block: 3rem 4rem; margin-top: 2rem;
  margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  font-size: 1rem; text-align: center;
}

@media (max-width: 768px) {
  .publication-title { font-size: 2.1rem; }
  .navbar { gap: 1.25rem; font-size: 1rem; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .navbar .ext { display: none; }
  section[id] { scroll-margin-top: 3.5rem; }
  .publication-authors, .tldr { font-size: 1.1rem; }
  .figure-pair { grid-template-columns: 1fr; }
  .content .justified { text-align: left; }
}

@media (max-width: 600px) {
  .eq { font-size: .78em; }
  .eq-wide { display: none; }
  .eq-narrow { display: block; }
}
