/* ---------- Nerfies base ---------- */

body {
  font-family: 'Noto Sans', sans-serif;
}

.footer .icon-link {
  font-size: 25px;
  color: #000;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.dnerf {
  font-variant: small-caps;
}

.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-subtitle {
  font-family: 'Google Sans', sans-serif;
  font-weight: 400;
  margin-top: -0.75rem;
}

.user-study-figure {
  max-width: 640px;
}

.publication-authors {
  font-family: 'Google Sans', sans-serif;
}

.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

.figure {
  display: block;
  width: 100%;
  margin: 0 auto 1.5rem;
}

.teaser .figure {
  max-width: 820px;
}

.figure-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 2px dashed #ccc;
  border-radius: 10px;
  color: #888;
  font-family: monospace;
  text-align: center;
}

/* ---------- Multi-track video carousel ---------- */

:root {
  --mt-accent: hsl(204, 86%, 53%);
  --mt-dark: #363636;
  --mt-max: 880px;
}

.carousel-hint {
  color: #555;
  margin: -0.75rem auto 1.5rem;
  max-width: 44rem;
}

.carousel-hint .keys {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #888;
}

kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 0.35em;
  border: 1px solid #ccc;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 0.8em;
  line-height: 1.5;
  text-align: center;
}

.mt-carousel {
  max-width: var(--mt-max);
  margin: 0 auto;
  outline: none;
}

.mt-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.mt-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.1rem;
}

.mt-counter {
  color: #888;
  margin-right: 0.6rem;
  font-variant-numeric: tabular-nums;
}

.mt-counter:empty {
  display: none;
}

.mt-arrow {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--mt-dark);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.mt-arrow:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.mt-viewport {
  overflow: hidden;
}

.mt-strip {
  display: flex;
  align-items: flex-start;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.mt-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.mt-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mt-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.mt-dot.is-active {
  background: var(--mt-dark);
  transform: scale(1.2);
}

/* Player */

.mt-player {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
}

.mt-player:fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: none;
  border-radius: 0;
  overflow: auto;
}

.mt-player:fullscreen .mt-stage {
  flex: 1;
  min-height: 0;
}

.mt-player:fullscreen .mt-stage video {
  height: 100%;
}

.mt-stage {
  position: relative;
  background: #000;
  cursor: pointer;
  aspect-ratio: 16 / 9;
}

.mt-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mt-bigplay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4.5rem;
  height: 4.5rem;
  margin: -2.25rem 0 0 -2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--mt-dark);
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s, transform 0.2s;
}

.mt-bigplay .icon {
  margin-left: 0.2rem;
}

.mt-stage:hover .mt-bigplay {
  transform: scale(1.06);
}

.mt-player.is-playing .mt-bigplay {
  opacity: 0;
  pointer-events: none;
}

.mt-missing {
  display: none;
}

.mt-stage.is-missing .mt-missing {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #aaa;
  font-family: monospace;
  font-size: 0.85rem;
  text-align: center;
}

.mt-stage.is-missing .mt-bigplay {
  display: none;
}

/* Control bar */

.mt-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.75rem;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

.mt-btn {
  flex: none;
  padding: 0;
  border: none;
  background: none;
  color: var(--mt-dark);
  cursor: pointer;
}

.mt-btn:hover {
  color: var(--mt-accent);
}

.mt-time {
  flex: none;
  font-size: 0.8rem;
  color: #666;
  font-variant-numeric: tabular-nums;
}

.mt-range {
  --p: 0%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--mt-dark) var(--p), #ddd var(--p));
  cursor: pointer;
}

.mt-scrub {
  flex: 1;
  min-width: 60px;
}

.mt-vol {
  flex: none;
  width: 70px;
}

.mt-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mt-dark);
}

.mt-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--mt-dark);
}

/* Track switcher */

.mt-tracks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem 0.25rem;
}

.mt-track {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem 0.4rem 0.45rem;
  border: 1px solid #dbdbdb;
  border-radius: 999px;
  background: #fff;
  color: var(--mt-dark);
  font-family: 'Google Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.mt-track:hover {
  border-color: #b5b5b5;
}

.mt-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #f0f0f0;
  color: #777;
  font-size: 0.72rem;
}

.mt-track.is-ours {
  border-color: var(--mt-accent);
  color: var(--mt-accent);
}

.mt-track.is-active {
  background: var(--mt-dark);
  border-color: var(--mt-dark);
  color: #fff;
}

.mt-track.is-ours.is-active {
  background: var(--mt-accent);
  border-color: var(--mt-accent);
}

.mt-track.is-active .mt-num {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.mt-track.is-missing {
  opacity: 0.45;
  text-decoration: line-through;
}

/* Little equalizer on the audible track while playing */

.mt-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 0.8rem;
}

.mt-eq i {
  width: 3px;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
  transform-origin: bottom;
  animation: mt-eq 0.9s ease-in-out infinite;
}

.mt-eq i:nth-child(2) { animation-delay: -0.3s; }
.mt-eq i:nth-child(3) { animation-delay: -0.6s; }

.mt-player.is-playing .mt-track.is-active .mt-eq {
  display: inline-flex;
}

@keyframes mt-eq {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .mt-eq i { animation: none; transform: scaleY(0.7); }
  .mt-strip { transition: none; }
}

.mt-note {
  min-height: 1.5em;
  padding: 0.35rem 1rem 0.9rem;
  color: #777;
  font-size: 0.85rem;
  text-align: center;
}

.mt-note.is-error {
  color: #c0392b;
  font-family: monospace;
}

.mt-caption {
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid #eee;
  color: #444;
  font-style: italic;
  text-align: center;
}

@media (max-width: 600px) {
  .mt-vol { display: none; }
  .mt-track { font-size: 0.8rem; }
}

/* Per-clip details: description, transcript, metrics, F0 plot */

.mt-blurb {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #eee;
  color: #555;
  text-align: center;
}

.mt-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #eee;
}

.mt-subhead {
  margin-bottom: 0.5rem;
  color: #777;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mt-transcript {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 8px;
}

.mt-transcript li + li {
  border-top: 1px solid #eee;
}

.mt-transcript button {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  padding: 0.4rem 0.75rem;
  border: 0;
  background: none;
  color: #363636;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.mt-transcript button:hover {
  background: #f5f5f5;
}

.mt-transcript li.is-current button {
  background: hsl(204, 86%, 94%);
}

.mt-line-num {
  min-width: 1.4em;
  color: #999;
  font-variant-numeric: tabular-nums;
}

.mt-metrics {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.mt-metrics th,
.mt-metrics td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid #eee;
  text-align: right;
  white-space: nowrap;
}

.mt-metrics th {
  color: #777;
  font-size: 0.75rem;
  font-weight: 600;
}

.mt-metrics th:first-child,
.mt-metrics td:first-child {
  text-align: left;
}

.mt-metrics tr.is-ours td {
  color: var(--mt-accent);
  font-weight: 600;
}

.mt-metrics td.is-best {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mt-metrics-note {
  margin-top: 0.5rem;
  color: #888;
  font-size: 0.8rem;
}

.mt-plot {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
}

.mt-plot img {
  display: block;
  width: 100%;
  border: 1px solid #eee;
  border-radius: 8px;
}

.mt-plot figcaption {
  margin-top: 0.4rem;
  color: #888;
  font-size: 0.8rem;
  text-align: center;
}

.mt-player:fullscreen .mt-blurb,
.mt-player:fullscreen .mt-details,
.mt-player:fullscreen .mt-plot {
  display: none;
}

@media (max-width: 700px) {
  .mt-details { grid-template-columns: 1fr; }
  .mt-metrics-col { overflow-x: auto; }
}

/* ---------- Polish ---------- */

:root {
  --accent-2: hsl(228, 72%, 56%);
  --band: #f4f7fb;
  --line: #e6e9ef;
}

html {
  scroll-behavior: smooth;
}

body {
  color: #3a3f47;
  background: #fff;
}

/* Hero */

.hero-top {
  background:
    radial-gradient(900px 360px at 50% -80px, hsl(204, 86%, 94%), transparent 70%),
    #fff;
}

.hero-top .hero-body {
  padding-top: 4.5rem;
  padding-bottom: 2.5rem;
}

.publication-title {
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.title-accent {
  background: linear-gradient(90deg, var(--mt-accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.publication-venue {
  margin-top: 0.75rem;
}

.venue-pill {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #6b7280;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem 1rem 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--mt-dark);
  font-family: 'Google Sans', sans-serif;
  font-size: 0.92rem;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
}

.page-nav a .icon {
  font-size: 0.8rem;
}

.page-nav a:hover {
  border-color: var(--mt-accent);
  color: var(--mt-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 60, 120, 0.1);
}

.page-nav a.is-primary {
  border-color: var(--mt-dark);
  background: var(--mt-dark);
  color: #fff;
}

.page-nav a.is-primary:hover {
  border-color: var(--mt-accent);
  background: var(--mt-accent);
  color: #fff;
}

/* Section headings get a short accent bar */

.title.is-3 {
  letter-spacing: -0.01em;
}

.title.is-3::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.6rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--mt-accent), var(--accent-2));
}

.title.is-3.has-text-centered::after,
.has-text-centered .title.is-3::after {
  margin-left: auto;
  margin-right: auto;
}

.title.is-4 {
  margin-top: 2rem;
}

/* Demo bands */

.hero.is-light.listen-band {
  background: var(--band);
}

.listen-band .hero-body {
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}

.listen-band-next .hero-body {
  padding-top: 1rem;
  padding-bottom: 3.5rem;
}

.listen-band-next .container {
  max-width: var(--mt-max);
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

/* Players as soft cards. Slides get padding so the shadow isn't clipped by the viewport. */

.mt-viewport {
  margin: 0 -14px;
}

.mt-slide {
  padding: 4px 14px 22px;
}

.mt-dots {
  margin-top: 0;
}

.mt-player {
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 28px rgba(16, 24, 40, 0.07);
}

.mt-controls {
  background: #fbfcfd;
  border-bottom-color: var(--line);
}

.mt-track.is-active {
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.15);
}

.mt-track.is-ours.is-active {
  background: linear-gradient(90deg, var(--mt-accent), var(--accent-2));
  border-color: transparent;
}

.mt-dot {
  transition: background 0.2s, width 0.25s;
}

.mt-dot.is-active {
  width: 22px;
  border-radius: 5px;
  transform: none;
}

/* Figures */

.section .figure {
  border-radius: 10px;
}

.teaser .figure {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.1);
}

/* Footer */

.footer {
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  background: var(--band);
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page-nav a, .mt-dot { transition: none; }
}

@media (max-width: 600px) {
  .hero-top .hero-body { padding-top: 3rem; }
  .publication-title.is-1 { font-size: 2.1rem; }
  .page-nav a { font-size: 0.85rem; }
}
