:root {
  --ink: #1b2430;
  --muted: #5d6673;
  --faint: #f4f6f8;
  --line: #d9dee5;
  --accent: #2f5d9b;
  --accent-dark: #1d3557;
  --page: #ffffff;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font: 17px/1.72 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .2em; }
figure { margin: 0; }
::selection { background: #dbe8f7; }

.skip-link {
  position: fixed; z-index: 100; top: 8px; left: 8px; padding: .55rem .8rem;
  color: white; background: var(--accent-dark); transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.header-inner { width: min(calc(100% - 40px), var(--max)); height: 64px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.site-name { color: var(--ink); font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
nav { display: flex; gap: 1.6rem; }
nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
nav a:hover, nav a:focus-visible { color: var(--accent); text-decoration: underline; }

.hero { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: clamp(3.5rem, 7vw, 5.5rem) 0 5rem; text-align: center; }
h1, h2, h3 { color: #152033; }
h1 { max-width: 980px; margin: 0 auto; font: 600 clamp(2rem, 4.2vw, 3.45rem)/1.16 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; letter-spacing: -.035em; }
h1 span { color: var(--accent-dark); }
.resource-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: 1.6rem; }
.resource-nav a { padding-bottom: .12rem; border-bottom: 2px solid #b8cbe3; color: var(--accent-dark); font-size: .92rem; font-weight: 650; text-decoration: none; }
.resource-nav a:hover, .resource-nav a:focus-visible { border-color: var(--accent); }
.hero-learning { margin-top: 3.2rem; text-align: left; }
.hero-learning-title { margin: 0 0 1rem; color: var(--accent-dark); font: 600 1rem/1.3 Georgia, "Times New Roman", serif; letter-spacing: .01em; }
.hero-learning-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.hero-learning-strip figure { min-width: 0; }
.hero-learning-strip img { width: 100%; aspect-ratio: .615; object-fit: cover; border: 1px solid var(--line); background: white; }
.hero-learning-strip figcaption { text-align: center; }
.teaser-figure { max-width: var(--max); margin: 4rem auto 0; text-align: left; }
.teaser-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.teaser-media img { width: 100%; aspect-ratio: 720/496; object-fit: cover; background: #eef1f4; }
.teaser-media img:last-child { object-position: left center; }
figcaption { margin-top: .7rem; color: var(--muted); font-size: .82rem; line-height: 1.5; }

.paper-section { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: clamp(4.5rem, 8vw, 7rem) 0; border-top: 1px solid var(--line); }
.soft-section { width: 100%; max-width: none; padding-inline: max(20px, calc((100% - var(--max))/2)); background: var(--faint); border-top: 0; }
h2 { margin: 0; font: 600 clamp(2rem, 4vw, 3.1rem)/1.18 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
h3 { margin: 0 0 .65rem; font-size: 1.12rem; line-height: 1.35; }
.section-intro { max-width: 780px; margin: 1rem 0 0; color: var(--muted); }

.abstract-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2.5rem, 7vw, 6rem); margin-top: 2.5rem; }
.abstract-layout p { margin-top: 0; }
.abstract-lead { color: var(--accent-dark); font: 500 clamp(1.3rem, 2.6vw, 1.85rem)/1.45 Georgia, "Times New Roman", serif; }
.contribution-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 4rem; border-block: 1px solid var(--line); }
.contribution-row article { padding: 1.7rem 1.7rem 1.7rem 0; }
.contribution-row article + article { padding-left: 1.7rem; border-left: 1px solid var(--line); }
.contribution-row span { display: block; margin-bottom: .7rem; color: var(--accent); font: 700 .76rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.contribution-row p { margin: 0; color: var(--muted); font-size: .91rem; line-height: 1.55; }

.wide-figure { margin-top: 3rem; padding: 1.5rem; border: 1px solid var(--line); background: white; }
.wide-figure img { width: 100%; }
.stage-one, .stage-two-overview { display: grid; grid-template-columns: .82fr 1.18fr; align-items: center; gap: clamp(2.5rem, 6vw, 5rem); }
.stage-one { margin-top: 4.5rem; }
.stage-one figure, .stage-two-overview figure { padding: 1rem; border: 1px solid var(--line); background: white; }
.stage-one figure img, .stage-two-overview figure img { width: 100%; max-height: 380px; object-fit: contain; }
.stage-label, .point-index { display: block; color: var(--accent); font: 700 .76rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.stage-label { margin-bottom: .7rem; }
.stage-two { margin-top: 4.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.method-points { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.method-points article { padding-top: 1.4rem; border-top: 2px solid #b8cbe3; }
.method-points .point-index { margin-bottom: .75rem; }
.method-points p { color: var(--muted); }
.spec-list { margin: 2rem 0 0; border-top: 1px solid var(--line); }
.spec-list div { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.spec-list dt { color: var(--muted); font-size: .86rem; }
.spec-list dd { margin: 0; color: var(--ink); font-size: .9rem; font-weight: 600; }

.training-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; margin-top: 2.6rem; }
.training-strip figure { min-width: 0; }
.training-strip img { width: 100%; aspect-ratio: .615; object-fit: cover; border: 1px solid var(--line); background: white; }
.training-strip figcaption { text-align: center; }

.result-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 3rem; border-block: 1px solid var(--line); }
.result-summary div { padding: 1.5rem 1.25rem 1.5rem 0; }
.result-summary div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.result-summary strong { display: block; color: var(--accent-dark); font: 600 clamp(1.65rem, 3vw, 2.4rem)/1 Georgia, "Times New Roman", serif; }
.result-summary span { display: block; margin-top: .7rem; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.figure-pair { display: grid; grid-template-columns: 1.93fr 2.62fr; align-items: start; gap: 2rem; margin-top: 3.5rem; }
.figure-pair figure { display: flex; min-width: 0; flex-direction: column; padding: 1rem; border: 1px solid var(--line); background: white; }
.figure-pair img { width: auto; height: 210px; max-width: 100%; align-self: center; object-fit: contain; }

.hardware-figure img { max-height: 420px; object-fit: contain; }
.deployment-grid {
  display: grid;
  grid-template-columns: 1.25fr 2.58fr;
  align-items: start;
  gap: 2rem;
  margin-top: 3rem;
}
.deployment-grid figure { display: flex; min-width: 0; flex-direction: column; padding: 1rem; border: 1px solid var(--line); background: white; }
.deployment-grid img { width: auto; height: 240px; max-width: 100%; align-self: center; object-fit: contain; background: #e8ebef; }
.asymmetry-layout { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(2.5rem, 6vw, 5rem); margin-top: 4rem; }
.asymmetry-layout figure { padding: 1rem; border: 1px solid var(--line); background: white; }
.asymmetry-layout p { color: var(--muted); }
.limitation { padding-top: 1rem; border-top: 1px solid var(--line); font-size: .88rem; }

.paper-link { margin: 1.25rem 0 1.5rem; }
.paper-frame { width: 100%; height: 760px; border: 1px solid var(--line); background: var(--faint); }
.citation-block { margin-top: 3rem; }
.citation-block pre { overflow-x: auto; padding: 1.2rem; border: 1px solid var(--line); background: var(--faint); font: .82rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.citation-block > p { color: var(--muted); font-size: .86rem; }

footer { border-top: 1px solid var(--line); }
.footer-inner { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 2.3rem 0 3rem; display: flex; justify-content: flex-end; }
.footer-inner p { color: var(--muted); font-size: .82rem; }

@media (max-width: 820px) {
  .abstract-layout, .stage-one, .stage-two-overview, .asymmetry-layout { grid-template-columns: 1fr; }
  .method-points { grid-template-columns: 1fr; }
  .contribution-row, .result-summary { grid-template-columns: 1fr 1fr; }
  .contribution-row article:nth-child(3), .result-summary div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .contribution-row article:nth-child(4), .result-summary div:nth-child(4) { border-top: 1px solid var(--line); }
  .training-strip { grid-template-columns: repeat(3, 1fr); }
  .hero-learning-strip { grid-template-columns: repeat(3, 1fr); }
  .figure-pair { grid-template-columns: 1fr; }
  .deployment-grid { grid-template-columns: 1fr; }
  .figure-pair img, .deployment-grid img { width: 100%; height: 260px; object-fit: contain; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-inner, .hero, .paper-section, .footer-inner { width: min(calc(100% - 28px), var(--max)); }
  .soft-section { width: 100%; padding-inline: 14px; }
  nav { gap: .8rem; }
  nav a:nth-child(2), nav a:nth-child(3) { display: none; }
  h1 { font-size: 1.85rem; }
  .teaser-figure { margin-top: 2.8rem; }
  .teaser-media { grid-template-columns: 1fr; gap: .8rem; }
  .hero-learning-strip { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .contribution-row, .result-summary { grid-template-columns: 1fr; }
  .contribution-row article, .contribution-row article + article, .contribution-row article:nth-child(3),
  .result-summary div, .result-summary div + div, .result-summary div:nth-child(3) { padding: 1.25rem 0; border-left: 0; border-top: 1px solid var(--line); }
  .contribution-row article:first-child, .result-summary div:first-child { border-top: 0; }
  .training-strip { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .wide-figure, .figure-pair figure, .stage-one figure, .stage-two-overview figure, .asymmetry-layout figure { padding: .6rem; }
  .deployment-grid figure { padding: .6rem; }
  .paper-frame { height: 560px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
