:root {
  --bg: #ffffff;
  --soft: #f7f7f7;
  --ink: #1b1b1b;
  --muted: #4b4b4b;
  --line: #dedede;
  --blue: #1f62b5;
  --blue-dark: #123f79;
  --accent: #f3f6ff;
  color: var(--ink);
  font-family: "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: "Times New Roman", Times, serif;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
}

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 22px 22px;
  text-align: center;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
}

h1 {
  max-width: 1040px;
  margin: 0 auto;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 500;
  line-height: 1.16;
}

h3 {
  margin: 28px 0 10px;
  font-size: 1.34rem;
  font-weight: 600;
}

p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.authors {
  max-width: 980px;
  margin: 20px auto 0;
  color: #222;
  font-size: 1.1rem;
  line-height: 1.6;
}

.affiliations,
.notes {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.project-link {
  display: inline-flex;
  min-width: 86px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 6px;
  background: #3b3b3b;
  color: white;
  font-size: 0.98rem;
  font-weight: 600;
}

.project-link:hover {
  background: #000;
  color: white;
}

.tagline {
  max-width: 820px;
  margin: 24px auto 0;
  font-size: 1.12rem;
  line-height: 1.65;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  max-width: 1040px;
  margin: 8px auto 28px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}

.hero-figure {
  overflow: hidden;
  margin-top: 30px;
  border: 1px solid var(--line);
  background: white;
}

.section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 36px 22px;
}

.section > p {
  max-width: 920px;
  margin-right: auto;
  margin-left: auto;
  text-align: left;
}

.paper-figure,
.bibtex {
  border: 1px solid var(--line);
  background: white;
}

code {
  color: #203a68;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

blockquote {
  max-width: 820px;
  margin: 24px auto;
  padding: 18px 24px;
  border-left: 4px solid #222;
  background: var(--soft);
  color: #222;
  font-size: 1.28rem;
  line-height: 1.45;
}

figure {
  margin: 0;
}

.paper-figure {
  overflow: hidden;
  margin: 24px auto 8px;
}

.figure-link {
  display: block;
  color: inherit;
}

.figure-link:hover {
  color: inherit;
}

.hero-figure video,
.paper-figure img {
  width: 100%;
  border: 0;
  background: white;
  object-fit: contain;
}

.hero-figure video,
.paper-figure img {
  padding: 12px;
}

figcaption {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
}

.formula {
  margin: 22px auto;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 32px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  text-align: center;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 8px 0;
  color: #111;
  font-size: 1.45rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 24px 0 36px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  background: white;
  font-size: 0.86rem;
}

caption {
  padding: 12px;
  color: var(--muted);
  caption-side: bottom;
  line-height: 1.45;
}

th,
td {
  padding: 8px 9px;
  border: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

thead th {
  background: #f1f1f1;
  color: #222;
}

tbody th {
  text-align: left;
  font-weight: 600;
}

tr.highlight {
  background: #f4f7ff;
}

tr.strong {
  background: #eaf1ff;
  font-weight: 700;
}

.compact {
  max-width: 820px;
}

.bibtex {
  overflow-x: auto;
  margin: 26px 0 0;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: #222;
  white-space: pre;
}

.bibtex code {
  color: inherit;
}

.footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 34px 22px 54px;
  text-align: center;
}

@media (max-width: 860px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 32px;
  }

  .section {
    padding: 30px 18px;
  }

}

@media (max-width: 560px) {
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .project-link {
    width: 100%;
  }

  .paper-figure img,
  .paper-figure.large img {
    min-height: 260px;
  }
}
