:root {
  --ink: #293636;
  --muted: #637271;
  --teal: #278c8d;
  --line: #dce6e4;
  --wash: #f5f8f7;
  --content-width: 900px;
  --page-gutter: 1.5rem;
  --section-space: 2.5rem;
  --card-gap: 1rem;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  color: var(--ink);
  font-family: 'Noto Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* One shared content edge for the project page and hardware guide. */
.site-container,
.hardware-container {
  width: min(var(--content-width), calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
}

.project-page a {
  color: #187879;
}

.project-page a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

.publication-header {
  padding-block: 3rem 2rem;
  text-align: center;
}

.publication-title {
  margin: 0 0 1.25rem !important;
  color: var(--ink);
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.35rem) !important;
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.section-kicker {
  margin: 0;
  color: var(--teal);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.publication-authors {
  color: #4d5b5a;
  font-size: .98rem;
  line-height: 1.75;
}

.publication-authors small {
  color: var(--muted);
}

.publication-authors a {
  color: inherit;
  text-decoration-color: #b8d4d1;
  text-underline-offset: .16em;
}

.publication-authors a:hover {
  color: var(--teal);
}

.author-block {
  display: inline-block;
  margin-right: .16rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.25rem;
}

.publication-links a {
  color: #fff;
  background: var(--ink) !important;
  border: 1px solid var(--ink);
  box-shadow: none;
  transition: background .16s ease;
}

.publication-links a:hover {
  background: var(--teal) !important;
  border-color: var(--teal);
}

.teaser {
  margin-bottom: var(--section-space);
}

.teaser video,
.exploded-figure img {
  display: block;
  width: 100%;
  height: auto;
}

/* White behind the video so nothing dark shows at its edges while it loads or scales. */
.teaser video {
  background: #fff;
}

.page-section {
  padding-block: var(--section-space);
  border-top: 1px solid var(--line);
}

.section-title {
  margin: 0 0 1.25rem;
  color: var(--ink);
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.section-header,
.dataset-explorer-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-bottom: 1.25rem;
}

.section-header .section-title {
  margin: 0;
}

.section-header a,
.dataset-explorer-heading a {
  flex-shrink: 0;
  font-size: .85rem;
}

#abstract {
  background: var(--wash);
}

#abstract .content {
  color: #43504f;
  font-size: .99rem;
  line-height: 1.8;
}

#abstract .content p:last-child {
  margin-bottom: 0;
}

.exploded-figure {
  margin: 0;
}

.demo-group + .demo-group {
  margin-top: var(--section-space);
}

.demo-group-heading {
  margin-bottom: 1rem;
}

.demo-group-heading h3,
.dataset-explorer-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -.02em;
}

/* Shared spacing, with full-width recordings and three-across demo groups. */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--card-gap);
}

.media-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-grid--episodes {
  grid-template-columns: 1fr;
}

.video-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.video-card video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--wash);
  object-fit: contain;
}

.video-caption {
  padding: .8rem 1rem;
}

.video-caption h4 {
  margin: 0;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 600;
}

.dataset-explorer {
  width: calc(100% - 2 * var(--page-gutter));
  margin: var(--section-space) auto 0;
}

.dataset-embed {
  position: relative;
  overflow: hidden;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dataset-embed iframe {
  display: block;
  width: 100%;
  height: min(80vh, 800px);
  border: 0;
}

.citation-details pre {
  margin: 0;
  background: var(--wash);
  font-size: .78rem;
}

.footer {
  padding: 1.25rem 0;
  background: #fff;
  border-top: 1px solid var(--line);
  color: #778381;
  font-size: .78rem;
}

.footer p {
  margin: 0;
}

.footer a {
  color: #476866;
}

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

@media screen and (max-width: 600px) {
  :root {
    --page-gutter: 1rem;
    --section-space: 2rem;
  }

  .publication-header {
    padding-top: 2rem;
  }

  .publication-links a {
    font-size: .8rem;
  }

  .dataset-embed iframe {
    height: min(75vh, 600px);
  }


}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
