:root {
  --text: #1b2430;
  --muted: #5e6875;
  --line: #d7dde5;
  --line-strong: #aeb7c2;
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --accent: #111111;
  --accent-soft: #eceef1;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.75;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.page-section {
  padding: 4rem 1.5rem;
  background: var(--bg);
}

.section-alt {
  background: var(--bg-alt);
}

.hero-section {
  padding-top: 4.5rem;
  padding-bottom: 3.75rem;
}

.hero-block {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 800;
  line-height: 1.08;
}

.page-subtitle {
  max-width: 900px;
  margin: 1rem auto 1.35rem;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  color: var(--muted);
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #39414d;
  font-size: 0.96rem;
  font-weight: 600;
}

.keyword-row span {
  padding: 0.28rem 0.6rem;
  border-bottom: 1px solid var(--line-strong);
}

.author-note {
  margin: 0 0 0.35rem;
  color: var(--muted);
}

.code-release-note {
  max-width: 760px;
  margin: 0 auto 1.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.project-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.rounded-button {
  border-radius: 999px;
}

.project-button:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.project-button-dark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.project-button-dark:hover {
  background: #2a2a2a;
  border-color: #2a2a2a;
}

.project-button-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.project-button-disabled:hover {
  background: #fff;
  transform: none;
}

.section-title {
  margin: 0 0 0.45rem;
  font-family: "Sora", sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.section-intro {
  margin: 0 0 1.4rem;
  color: var(--muted);
}

.overview-grid,
.study-summary-grid {
  display: grid;
  gap: 1.1rem;
  margin: 0 0 1.4rem;
}

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

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

.overview-card,
.study-summary-card {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.overview-card h3,
.study-summary-card h3 {
  margin: 0 0 0.45rem;
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.overview-card p,
.study-summary-card p {
  margin: 0 0 0.55rem;
}

.paper-body {
  max-width: 920px;
}

.paper-body p {
  margin: 0 0 1rem;
}

.paper-body h4 {
  margin: 1.1rem 0 0.25rem;
  font-size: 1rem;
  font-weight: 800;
}

.paper-subsection {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.first-subsection {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.paper-subsection h3 {
  margin: 0 0 0.8rem;
  font-family: "Sora", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.paper-figure {
  margin: 1.5rem 0 0;
}

.paper-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
}

.white-figure {
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
}

.white-figure img {
  border: 1px solid var(--line);
}

.paper-figure figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.two-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.video-frame {
  border: 1px solid var(--line);
  background: #000;
}

.video-frame video {
  display: block;
  width: 100%;
  height: auto;
}

.paper-details {
  margin-top: 1.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.paper-details summary {
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  color: #253244;
  background: #fafbfd;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.paper-details summary:hover {
  background: #f1f4f7;
  color: #111111;
  box-shadow: inset 0 0 0 1px rgba(37, 50, 68, 0.04);
}

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

.paper-details summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  transition: color 160ms ease, transform 160ms ease;
}

.paper-details[open] summary::after {
  content: "-";
  color: var(--text);
}

.paper-details[open] summary {
  background: #eef2f6;
  color: #111111;
}

.detail-block {
  padding: 0.25rem 1.1rem 0.9rem;
}

.nested-details {
  margin-top: 1rem;
  margin-left: 0;
}

.paper-table {
  margin-top: 1.2rem;
  overflow-x: auto;
}

.paper-table table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  background: #fff;
}

.paper-table th,
.paper-table td {
  padding: 0.85rem 0.7rem;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 0.94rem;
}

.paper-table thead th {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.paper-table .best-row {
  background: #f3f5f8;
  font-weight: 700;
}

.footer-section {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
}

.scroll-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media screen and (max-width: 900px) {
  .two-figures {
    grid-template-columns: 1fr;
  }

  .overview-grid,
  .study-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  .page-section {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .project-button {
    justify-content: center;
  }

  .page-title {
    font-size: 2.5rem;
  }
}
