/* Based on the Nerfies project page stylesheet (https://github.com/nerfies/nerfies.github.io), CC BY-SA 4.0 */
body {
  font-family: 'Noto Sans', sans-serif;
}

.footer .icon-link {
  font-size: 25px;
  color: #000;
}

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

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.teaser {
  font-family: 'Google Sans', sans-serif;
}

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

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

.publication-venue {
  color: #555;
  width: fit-content;
  font-weight: bold;
}

.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

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

.results-carousel {
  overflow: hidden;
}

.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: 1px solid #bbb;
  border-radius: 10px;
  padding: 0;
  font-size: 0;
}

.results-carousel video {
  margin: 0;
}

/* ---- additions for this page ---- */

/* Inline SVG inside a Bulma .icon (Hugging Face logo) */
.icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* TODO marker on link buttons that don't have a URL yet; remove the class once filled in */
.link-block a.todo {
  opacity: 0.55;
}

/* Fig. 1: four photos in one row with (a)-(d) captions */
.teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.5fr;
  gap: 6px;
}
.teaser-grid figure {
  margin: 0;
}
.teaser-grid img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 6px;
}
.teaser-grid figcaption {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.figure-caption {
  font-size: 0.95rem;
  color: #4a4a4a;
  margin-top: 0.75rem;
}

/* Table 1, LaTeX booktabs style */
table.booktabs {
  margin: 0 auto;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
table.booktabs th,
table.booktabs td {
  padding: 0.35rem 1.2rem;
  text-align: center;
  border: none;
}
table.booktabs th:first-child,
table.booktabs td:first-child {
  text-align: left;
}
table.booktabs thead th {
  font-weight: 600;
}
table.table.booktabs th:not([align]) {
  text-align: center;
}
table.table.booktabs thead tr:last-child th:first-child {
  text-align: left;
}
table.booktabs thead tr:first-child th {
  border-top: 2px solid #363636;
  padding-bottom: 0.1rem;
}
table.booktabs thead tr:first-child + tr th {
  padding-top: 0.1rem;
}
table.booktabs thead tr:last-child th {
  border-bottom: 1px solid #363636;
}
/* booktabs \cmidrule(lr) under a spanning header */
table.booktabs th.cmidrule {
  background-image: linear-gradient(#363636, #363636);
  background-size: calc(100% - 1rem) 1px;
  background-position: center bottom;
  background-repeat: no-repeat;
}
/* Venue line under the title, linking to the workshop */
.publication-venue-link {
  margin-top: -0.5rem;
  margin-bottom: 1rem !important;
}
.publication-venue-link a {
  color: hsl(204, 86%, 53%);
}
.publication-venue-link a:hover {
  text-decoration: underline;
}
table.booktabs tbody tr:last-child td {
  border-bottom: 1px solid #363636;
}
table.booktabs tfoot td {
  border-bottom: 2px solid #363636;
}

/* Rollout carousel items with a caption and a placeholder until the video exists */
.results-carousel .item .rollout-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.results-carousel .item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.results-carousel .item .placeholder {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.4rem;
  background: #e8e8e8;
  color: #7a7a7a;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.9rem;
}
.results-carousel .item .placeholder i {
  font-size: 1.6rem;
}
.results-carousel .item.missing .placeholder {
  display: flex;
}
.results-carousel .item.missing video {
  display: none;
}
.results-carousel .item .rollout-caption {
  font-family: 'Google Sans', sans-serif;
  font-size: 0.95rem;
  padding: 0.45rem 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.results-carousel .item .rollout-caption span:last-child {
  color: #7a7a7a;
  font-size: 0.85rem;
}

@media screen and (max-width: 768px) {
  .teaser-grid {
    grid-template-columns: 1fr 1fr;
  }
  .teaser-grid img {
    height: 180px;
  }
}

/* Put the carousel dots below the slides instead of over the captions */
.results-carousel .slider-pagination,
#rollouts .slider-pagination {
  position: static;
  margin-top: 0.5rem;
}

/* Rollout videos: 2x2 grid, one column on phones */
.rollout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.rollout-grid .item {
  margin: 0;
  background: #fff;
}
@media screen and (max-width: 768px) {
  .rollout-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Square video tiles: no border, no rounded corners */
.rollout-grid .item,
.rollout-grid .item .rollout-frame {
  border: none;
  border-radius: 0;
}
.rollout-grid .item {
  background: transparent;
}
.rollout-grid .item .rollout-caption {
  padding-left: 0;
  padding-right: 0;
}
