:root {
  color-scheme: light;
  --ink: #292929;
  --muted: #626262;
  --accent: #8b0801;
  --line: #e5e5e5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 1rem/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.project-nav {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.project-nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.project-nav a:hover { color: var(--accent); }
main { max-width: 68rem; padding: 0 1.5rem 3rem; margin: auto; }
.paper-header { text-align: center; padding: 3.3rem 0 2.4rem; }
h1 { margin: 0 auto 1.3rem; max-width: 56rem; line-height: 1.23; letter-spacing: -0.035em; }
.paper-name { display: block; color: var(--accent); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 650; margin-bottom: 0.55rem; }
.paper-subtitle { display: block; font-size: clamp(1.5rem, 3.1vw, 2.2rem); font-weight: 550; text-wrap: balance; }
.authors { margin: 0 0 0.65rem; }
.authors > span { white-space: nowrap; }
.authors a { color: inherit; text-decoration: none; }
.authors a:hover { text-decoration: underline; }
.authors strong { font-weight: 600; }
.venue { margin: 0; color: var(--muted); font-size: 0.95rem; }
.status { display: block; margin-top: 0.15rem; color: var(--accent); }
.paper-links { display: flex; gap: 0.7rem; justify-content: center; margin-top: 1.5rem; }
.button, button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid #d8d8d8;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, button:hover { border-color: var(--accent); color: var(--accent); }
.button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: #700600; }
.overview { margin: 0 0 2.8rem; }
.overview a { display: block; }
.overview img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 5px; }
figcaption { margin: 0.75rem auto 0; max-width: 56rem; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.text-section { max-width: 54rem; margin: 0 auto 2.5rem; }
h2 { margin: 0 0 1rem; font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em; }
.text-section > p { margin: 0; }
.citation { padding-top: 1.8rem; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; }
.section-heading button { font-size: 0.9rem; padding: 0.4rem 0.8rem; }
pre { margin: 0; padding: 1.25rem; background: #f7f8fa; border: 1px solid var(--line); border-radius: 5px; overflow-x: auto; }
code { font: 0.875rem/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.text-section > .copy-status { margin-top: 0.5rem; min-height: 1.5em; font-size: 0.9rem; color: var(--muted); }

@media (max-width: 600px) {
  .project-nav { padding: 0.85rem 1.1rem; }
  main { padding: 0 1.1rem 2rem; }
  .paper-header { padding: 2.2rem 0 1.8rem; }
  .authors { max-width: 25rem; margin-inline: auto; line-height: 1.85; }
  .venue { font-size: 0.9rem; }
  .overview { margin-bottom: 2rem; }
  .text-section { margin-bottom: 2rem; }
  pre { padding: 1rem; }
}

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