:root {
  --canvas: #f4f7f5;
  --surface: #ffffff;
  --surface-subtle: #f0f6f3;
  --text: #202a26;
  --muted: #5f6b65;
  --accent: #087d4f;
  --accent-strong: #05653f;
  --border: #dce7e1;
  --shadow: 0 14px 40px rgba(28, 55, 43, 0.09);
  --radius: 16px;
  --page-max: 1320px;
  --reading-max: 90ch;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
video:focus-visible,
.comparison-scroll:focus-visible,
.dataset-figure-scroll:focus-visible {
  outline: 3px solid rgba(8, 125, 79, 0.38);
  outline-offset: 4px;
  border-radius: 6px;
}

img,
video {
  display: block;
  max-width: 100%;
}

.page-shell {
  width: min(100%, var(--page-max));
  margin-inline: auto;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 3vw, 28px) 32px;
}

.paper-card,
.section-card {
  background: var(--surface);
  border: 1px solid rgba(220, 231, 225, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.paper-card {
  padding: clamp(30px, 5vw, 58px);
}

.hero {
  text-align: center;
}

.hero h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(2.45rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.subtitle {
  max-width: 920px;
  margin: 20px auto 0;
  color: #27322d;
  font-size: clamp(1.16rem, 2.6vw, 1.68rem);
  font-weight: 500;
  line-height: 1.35;
}

.resource-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}

.resource-list li {
  display: flex;
  align-items: center;
}

.resource-list li + li::before {
  width: 1px;
  height: 1.15em;
  margin-inline: 18px;
  background: #9aa79f;
  content: "";
}

.resource-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-block: 8px;
  text-decoration: none;
}

.resource-pending {
  color: var(--muted);
  cursor: default;
}

.authors {
  margin: 22px auto 0;
  font-style: italic;
}

.authors a {
  white-space: nowrap;
}

.affiliations {
  max-width: 900px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.affiliations span {
  display: inline-block;
  margin: 2px 8px;
}

.affiliations sup {
  margin-right: 0.2em;
}

.contact-email {
  margin: 8px auto 0;
  font-size: 0.95rem;
}

.abstract {
  max-width: var(--reading-max);
  margin: 42px auto 0;
  text-align: left;
}

.section-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.abstract p {
  margin: 0;
}

.page-nav {
  max-width: var(--reading-max);
  margin: 36px auto 0;
  padding: 18px 20px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.page-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}

.section-card {
  margin-top: clamp(28px, 5vw, 48px);
  padding: clamp(26px, 4vw, 46px);
}

.section-heading {
  margin: 0;
  color: var(--accent);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  text-align: center;
}

.section-intro {
  max-width: var(--reading-max);
  margin: 12px auto 0;
  color: var(--muted);
  text-align: center;
}

.method-figure {
  margin: 28px auto 0;
  text-align: center;
}

.method-figure img {
  width: min(100%, 900px);
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.method-figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.anchor-alias {
  display: block;
  height: 0;
  scroll-margin-top: 20px;
}

#overview,
#method,
#dataset,
#category2 {
  scroll-margin-top: 20px;
}

.dataset-figure {
  margin: 30px 0 0;
}

.dataset-scroll-hint {
  display: none;
  margin: 16px 0 0;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 650;
  text-align: center;
}

.dataset-figure-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #8aa99a #e4ece8;
  scrollbar-width: thin;
}

.dataset-figure-link {
  display: block;
}

.dataset-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.dataset-figure figcaption {
  max-width: var(--reading-max);
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.dataset-explanation {
  max-width: var(--reading-max);
  margin: 34px auto 0;
}

.dataset-explanation h3 {
  margin: 0;
  color: #27322d;
  font-size: clamp(1.2rem, 2.6vw, 1.48rem);
  line-height: 1.3;
}

.filter-steps {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding-left: 24px;
}

.filter-steps li {
  padding-left: 5px;
}

.filter-steps strong {
  color: #27322d;
}

.dataset-equations {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 24px;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  background: var(--surface-subtle);
  color: #27322d;
  font-size: 0.97rem;
  font-weight: 650;
}

.dataset-equations span {
  white-space: nowrap;
}

.dataset-reference {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.dataset-reference a + a::before {
  content: " · ";
  color: var(--muted);
  text-decoration: none;
}

.gallery-list {
  display: grid;
  gap: 28px;
  margin-top: 30px;
  min-width: 0;
}

.sample-card {
  min-width: 0;
  padding: clamp(18px, 3vw, 26px);
  background: #fbfcfb;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.sample-card h3 {
  margin: 0;
  color: #27322d;
  font-size: clamp(1.18rem, 2.6vw, 1.45rem);
  line-height: 1.3;
}

.sample-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.scroll-hint {
  display: none;
  margin: 12px 0 0;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 650;
}

.comparison-scroll {
  width: 100%;
  margin-top: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #8aa99a #e4ece8;
  scrollbar-width: thin;
}

.comparison-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 12px 0;
  table-layout: fixed;
}

.comparison-table th,
.comparison-table td {
  width: 25%;
  padding: 0;
  text-align: center;
  vertical-align: top;
}

.comparison-table th {
  padding: 0 6px 12px;
  color: #33413a;
  font-size: 0.95rem;
  font-weight: 750;
}

.comparison-table video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 10px;
  object-fit: cover;
}

.spectrogram-row td {
  padding-top: 14px;
}

.spectrogram-link {
  display: block;
  position: relative;
  z-index: 0;
  border-radius: 10px;
}

.spectrogram-link img {
  width: 100%;
  aspect-ratio: 16 / 5;
  border: 1px solid var(--border);
  border-radius: 10px;
  object-fit: cover;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .comparison-scroll {
    padding-bottom: 34px;
  }

  .spectrogram-link:hover,
  .spectrogram-link:focus-visible {
    z-index: 5;
  }

  .spectrogram-link:hover img,
  .spectrogram-link:focus-visible img {
    transform: scale(1.5);
    box-shadow: 0 14px 36px rgba(20, 43, 32, 0.3);
  }

  .spectrogram-row td:first-child .spectrogram-link img {
    transform-origin: left center;
  }

  .spectrogram-row td:last-child .spectrogram-link img {
    transform-origin: right center;
  }
}

.back-to-top {
  position: fixed;
  right: clamp(12px, 2vw, 28px);
  bottom: clamp(12px, 2vw, 28px);
  z-index: 20;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid rgba(8, 125, 79, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(20, 43, 32, 0.18);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.back-to-top:hover {
  background: var(--accent);
  color: #ffffff;
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(8, 125, 79, 0.38);
  outline-offset: 4px;
}

.site-footer {
  width: min(100%, var(--page-max));
  margin: 0 auto;
  padding: 0 24px 38px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 760px) {
  .page-shell {
    padding-top: 16px;
  }

  .paper-card,
  .section-card {
    border-radius: 12px;
  }

  .paper-card {
    padding: 30px 20px;
  }

  .subtitle {
    margin-top: 16px;
  }

  .authors span {
    display: inline-block;
    margin: 2px 4px;
  }

  .abstract {
    margin-top: 34px;
  }

  .page-nav {
    margin-top: 28px;
    padding: 14px;
  }

  .page-nav ul {
    gap: 4px 18px;
  }

  .section-card {
    padding: 26px 16px;
  }

  .scroll-hint {
    display: block;
  }

  .dataset-scroll-hint {
    display: block;
  }

  .dataset-figure img {
    width: 920px;
    max-width: none;
  }

  .dataset-equations {
    display: grid;
    gap: 8px;
  }

  .sample-card {
    padding: 18px 12px;
  }

  .comparison-table {
    min-width: 860px;
  }
}

@media (max-width: 430px) {
  body {
    font-size: 15.5px;
  }

  .page-shell {
    padding-inline: 10px;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .resource-list li + li::before {
    margin-inline: 12px;
  }

  .affiliations span {
    display: block;
    margin: 4px 0;
  }

  .page-nav ul {
    flex-direction: column;
    align-items: center;
  }
}

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

  .spectrogram-link img {
    transition: none;
  }
}
