:root {
  --ink: #1e2933;
  --muted: #63717c;
  --blue: #166aa9;
  --blue-light: #eaf3f8;
  --line: #dbe2e7;
  --surface: #f7f9fa;
  --body-font: "Avenir Next", "Segoe UI", sans-serif;
  --title-font: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono-font: "SFMono-Regular", Consolas, monospace;
  --content-width: 1200px;
  --readable-copy: clamp(17px, 1.35vw, 19px);
  --caption-copy: clamp(15px, 1.2vw, 17px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font-family: var(--body-font); font-size: 16px; line-height: 1.65; }
a { color: var(--blue); }
img { display: block; max-width: 100%; }
strong { font-weight: 700; }

.container { width: calc(100% - 44px); max-width: var(--content-width); margin-inline: auto; }
.narrow { width: calc(100% - 44px); max-width: var(--content-width); }
.hero { padding: 72px 0 56px; text-align: center; }
h1, h2, h3 { color: var(--ink); font-family: var(--title-font); font-weight: 600; line-height: 1.15; }
h1 { max-width: 1200px; margin: 0 auto 30px; font-size: clamp(32px, 3.35vw, 44px); line-height: 1.32; letter-spacing: -.025em; }
h1 span { display: block; white-space: nowrap; }
h2 { margin: 0 0 20px; font-size: 31px; text-align: center; }
h3 { margin: 0 0 9px; font-size: 22px; }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.link-button { display: inline-block; min-width: 91px; padding: 7px 15px; color: #fff; background: var(--blue); border: 1px solid var(--blue); border-radius: 5px; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s ease, transform .15s ease; }
.link-button:hover { background: #0d578d; transform: translateY(-1px); }

.demo-video { padding-bottom: 48px; scroll-margin-top: 24px; }
.demo-video figure { max-width: 1040px; margin: 0 auto; }
.demo-video video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; background: #0f1720; border: 1px solid var(--line); border-radius: 6px; }

.project-overview { padding: 58px 0; border-top: 1px solid var(--line); }
.project-overview h2 { margin-bottom: 24px; }
.teaser, .wide-figure, .result-grid figure { margin: 0; }
.teaser { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; align-items: center; width: 100%; }
.teaser > a, figure > a { display: block; }
.teaser img, .wide-figure img, .result-grid img { width: 100%; height: auto; border: 1px solid var(--line); }
.caption, figcaption { margin: 12px 0 0; color: var(--muted); font-size: var(--caption-copy); line-height: 1.78; }
.caption strong, figcaption strong { color: var(--ink); }
.teaser .overview-copy { margin: 0; color: #45535e; font-size: var(--readable-copy); line-height: 1.72; }
.overview-copy-title { display: block; margin-bottom: 16px; font-family: var(--title-font); font-size: 27px; font-weight: 600; line-height: 1.22; }
.overview-copy p { margin: 0 0 14px; }
.overview-copy ul { margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.overview-copy li { position: relative; padding: 9px 0 9px 20px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 16px; font-weight: 600; }
.overview-copy li::before { content: ""; position: absolute; top: 18px; left: 2px; width: 6px; height: 6px; background: var(--blue); border-radius: 50%; }

.abstract { padding: 40px 0 66px; border-top: 1px solid var(--line); text-align: center; }
.abstract p { margin: 0; color: #394752; font-size: var(--readable-copy); line-height: 1.78; text-align: left; }
.section { padding: 58px 0; border-top: 1px solid var(--line); }
.section-intro { max-width: var(--content-width); margin: -4px auto 29px; color: #45535e; font-size: var(--readable-copy); line-height: 1.78; text-align: left; }
.wide-figure { max-width: var(--content-width); margin-inline: auto; }

.method-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: var(--content-width); margin: 34px auto 0; }
.method-card { padding: 22px 21px; background: var(--surface); border: 1px solid var(--line); }
.method-card-index { display: block; margin-bottom: 13px; color: var(--blue); font-family: var(--mono-font); font-size: 12px; font-weight: 700; }
.method-card h3 { margin-bottom: 12px; font-size: 23px; }
.method-card p { margin: 0; color: #4d5b65; font-size: var(--readable-copy); line-height: 1.65; }

.task-overview { margin-bottom: 38px; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.result-grid img { aspect-ratio: 4 / 3; object-fit: cover; }

.appendix-callout { padding: 58px 0 66px; border-top: 1px solid var(--line); text-align: center; }
.appendix-callout p { max-width: 760px; margin: -4px auto 22px; color: var(--muted); font-size: var(--readable-copy); line-height: 1.78; }
.footer { display: flex; justify-content: space-between; gap: 24px; padding: 21px 0 34px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.footer p { margin: 0; }
.footer a { font-weight: 600; text-decoration: none; }

.appendix-page { min-height: calc(100vh - 68px); }
.appendix-page .hero { padding-bottom: 42px; }
.appendix-content { max-width: 1400px; padding: 42px 0 68px; border-top: 1px solid var(--line); text-align: center; }
.appendix-content p { margin: 0 0 24px; color: var(--muted); font-size: var(--readable-copy); }
.appendix-content > p { max-width: 900px; margin-inline: auto; }
.appendix-pdf { display: block; width: 100%; height: min(1000px, 80vh); min-height: 480px; margin-top: 32px; border: 1px solid var(--line); background: var(--surface); }
.appendix-pdf p { padding: 24px; }

@media (max-width: 760px) {
  .container, .narrow { width: calc(100% - 28px); }
  .hero { padding: 48px 0 44px; }
  .hero h1 { font-size: 32px; line-height: 1.25; }
  .hero h1 span { display: inline; white-space: normal; }
  .hero h1 span + span::before { content: " "; }
  .demo-video { padding-bottom: 36px; }
  .project-overview { padding: 47px 0; }
  .abstract { padding: 34px 0 49px; }
  .section, .appendix-callout { padding: 47px 0; }
  h2 { font-size: 27px; }
  .abstract p, .section-intro, .method-card p, .appendix-callout p { font-size: 17px; }
  .method-cards, .result-grid { grid-template-columns: 1fr; gap: 27px; }
  .teaser { grid-template-columns: 1fr; gap: 0; width: 100%; }
  .method-cards { margin-top: 27px; }
  .method-card { padding: 19px; }
  .footer { flex-direction: column; gap: 4px; }
  .footer a { align-self: flex-start; }
}
