/* Project page styles. Base look follows the Academic Project Page Template
   (Nerfies) as used by the lab's AERO-VIS page; everything below the base
   block is specific to this page. */

:root {
  --content-w: 960px;          /* = container is-max-desktop */
  --gap: 2rem;                 /* the one gutter between text and media */
  --rule: #e1e0d9;
  /* One corner radius for every panel: figures, videos, cards, code. */
  --radius: 6px;
  --muted: #52514e;
  /* The exact marker colours of the paper's figures (matplotlib output). */
  --blue: #485ca9;
  --red: #f04d4f;
}

body {
  font-family: 'Noto Sans', sans-serif;
}

.publication-title,
.publication-authors,
.title {
  font-family: 'Google Sans', sans-serif;
}

/* Links take the blue of the figures' markers; hovering shifts to their red. */
a,
.publication-authors a {
  color: var(--blue) !important;
}

a:hover,
.publication-authors a:hover {
  color: var(--red) !important;
  text-decoration: underline;
}

.button.is-dark,
.button.is-dark:hover {
  color: #ffffff !important;
  text-decoration: none;
}

.button.is-static {
  color: #7a7a7a !important;
}

.author-block {
  display: inline-block;
}

.publication-affiliations {
  margin-top: 0.35rem;
  font-size: 1rem;
  color: var(--muted);
}

.publication-affiliations .author-block + .author-block {
  margin-left: 1rem;
}

.publication-venue {
  margin: 0.6rem auto 0;
  width: fit-content;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.footer {
  background-color: #ffffff;
  border-top: 1px solid var(--rule);
}


/* ---------------------------------------------------------------------------
   Layout: one two-column grid for the whole page
   ---------------------------------------------------------------------------
   Every row is text on the left and media on the right, in two equal columns
   with one gutter, so the column edges line up from section to section. A
   block that should span both columns says so with .span-both. On narrow
   screens the columns stack, text first. */

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--gap);
  row-gap: 1.25rem;
  align-items: center;
}

.cols.is-top {
  align-items: start;
}

.cols > .span-both {
  grid-column: 1 / -1;
}

.cols + .cols,
.cols + .span-both,
.span-both + .cols {
  margin-top: 2.25rem;
}

@media screen and (max-width: 768px) {
  .cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

.col-text > :last-child,
.col-media > :last-child {
  margin-bottom: 0;
}

.section-lead {
  margin: 0 0 1.1rem;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #363636;
}

.figure-caption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

.figure-caption sub,
.section-lead sub {
  line-height: 0;
}

figure {
  margin: 0;
}

/* Every image and video in the media column fills it. */
.col-media img,
.col-media video {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

/* A plot set under the text takes the same treatment as one in the media
   column, so the two columns read as one grid. */
figure.col-text img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

/* Fig. 1 as the teaser under the title, 1.5 times as wide as a figure in the
   right column. Where the columns stack, it fills the width like every figure. */
.teaser {
  width: calc(0.6 * (100% - var(--gap)));
  margin: 2rem auto 0;
}

@media screen and (max-width: 768px) {
  .teaser {
    width: 100%;
  }
}

.teaser img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.col-media .video-frame video {
  height: 100%;
  border: 0;
  border-radius: 0;
}

/* Two paper panels side by side in the media column, at their paper ratio. */
.fig-pair {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.fig-pair > img:first-child { flex: 165 1 0; min-width: 0; }
.fig-pair > img:last-child  { flex: 84.73 1 0; min-width: 0; }

.content.has-text-justified p {
  hyphens: auto;
}

h3.title.is-4 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}

h2 + h3.title.is-4,
h2 + .hardware-note + h3.title.is-4 {
  margin-top: 1.5rem;
}


/* ---------------------------------------------------------------------------
   Headline: the equation, the Pareto plot, the numbers
   --------------------------------------------------------------------------- */

.equation {
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: center;
  align-items: start;
  column-gap: 0.6rem;
  margin: 0 0 1.4rem;
  padding: 1rem 1rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
}

.eq-term {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: #0b0b0b;
  text-align: center;
}

.eq-term small {
  display: block;
  margin-top: 0.3rem;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
}

.eq-term.is-total {
  color: var(--blue);
}

.eq-op {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat-grid.is-stacked {
  grid-template-columns: minmax(0, 1fr);
}

.stat-grid.is-2x2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media screen and (max-width: 768px) {
  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.stat {
  padding: 0.8rem 0.9rem 0.75rem;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.stat-value {
  display: block;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.hardware-note {
  font-size: 0.92rem;
  color: var(--muted);
}

.device-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0b0b0b;
}

.device-title svg,
.device-title i,
.hardware-note .fa-microchip {
  margin-right: 0.35em;
  color: var(--blue);
}


/* ---------------------------------------------------------------------------
   Videos and placeholders
   --------------------------------------------------------------------------- */

.video-frame {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #0b0b0b;
  aspect-ratio: 16 / 9;
}

.video-frame video,
.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Stand-in for media that does not exist yet. */
.placeholder-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  font-size: 0.9rem;
  color: var(--muted);
  background: repeating-linear-gradient(-45deg, #ffffff, #ffffff 10px, #f2f1ec 10px, #f2f1ec 20px);
  border: 1px dashed #b5b5b5;
  border-radius: var(--radius);
}

.placeholder-frame.is-4x3 {
  aspect-ratio: 4 / 3;
}

.col-media > * + * {
  margin-top: 1rem;
}

.col-media > .figure-caption {
  margin-top: 0.75rem;
}


/* ---------------------------------------------------------------------------
   Method: what a planner gets, and the algorithm steps from the video
   --------------------------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media screen and (max-width: 768px) {
  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.feature {
  padding: 1rem 1.1rem;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
}

.feature-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: #0b0b0b;
}

.feature-head svg,
.feature-head i {
  color: var(--blue);
}

.feature p {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #363636;
}

.step-group {
  margin: 2rem 0 0.75rem;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #363636;
}

.step-group-note {
  font-weight: 400;
  color: var(--muted);
}

.step-group:first-of-type {
  margin-top: 0.5rem;
}

.cols.step-row {
  padding: 0.75rem 0;
}

.cols.step-row + .cols.step-row {
  margin-top: 0;
  border-top: 1px solid var(--rule);
}

.step-row p {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #363636;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-right: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--blue);
  border-radius: 50%;
  vertical-align: middle;
}

.step-title {
  display: inline;
  font-family: 'Google Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #0b0b0b;
  vertical-align: middle;
}


/* ---------------------------------------------------------------------------
   Collapsible blocks (native <details>, no JS needed to toggle)
   --------------------------------------------------------------------------- */

/* A fold-out's title reads as a subsection heading: the size of h3.is-4. */
.more > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding: 0.5rem 0;
  font-family: 'Google Sans', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: #363636;
  cursor: pointer;
  list-style: none;
  border-top: 1px dashed var(--rule);
}

.more > summary::-webkit-details-marker {
  display: none;
}

.more > summary::marker {
  content: "";
}

.more > summary:hover {
  color: var(--red);
}

/* Marks a block whose content was not part of the peer-reviewed paper. */
.tag-beyond {
  margin-left: 0.4rem;
  padding: 0.1em 0.55em;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.more-chevron {
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.more[open] > summary .more-chevron {
  transform: rotate(45deg);
}

.more[open] > summary {
  margin-bottom: 1rem;
}


/* ---------------------------------------------------------------------------
   BibTeX
   --------------------------------------------------------------------------- */

#BibTeX {
  background-color: #ffffff;
}

#BibTeX pre {
  background-color: #ffffff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bibtex-header .title {
  margin-bottom: 0;
}

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em 0.9em;
  font-size: 0.85rem;
  font-family: inherit;
  color: #363636;
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  cursor: pointer;
}

.copy-bibtex-btn:hover {
  background: #f5f5f5;
  border-color: #b5b5b5;
}

.copy-bibtex-btn.is-copied {
  color: #257942;
  border-color: #48c774;
}
