/* Project page for "A World Model for Assembly Sequence Planning".
   Self-contained: no external fonts, scripts or CDNs. */

:root {
  --text: #1f2328;
  --muted: #59636e;
  --bg: #ffffff;
  --panel: #1b1b20;      /* matches the background of the rendered clips */
  --line: #d9dee3;
  --accent: #1f6fd0;
  --maxw: 1080px;
  --narrow: 820px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: var(--narrow); }

/* ---------- header ---------- */
.hero { text-align: center; padding: 56px 0 28px; }

h1 {
  margin: 0 0 22px;
  font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.authors, .affils { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.authors { gap: 6px 34px; font-size: 20px; }
.affils  { gap: 4px 30px; margin-top: 8px; color: var(--muted); font-size: 16px; }
sup { font-size: 0.68em; }

.links { margin: 26px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  background: #24292f;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.btn:hover { background: #000; }
.btn.soon { background: #eef1f4; color: var(--muted); cursor: default; pointer-events: none; }

/* ---------- sections ---------- */
/* `.wrap` sets `margin: 0 auto` and outranks a bare `section` selector,
   so the spacing between sections has to be at least as specific. */
main > section.wrap { margin-bottom: 52px; }

h2 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
}

p { margin: 0 0 16px; }

#abstract p { text-align: justify; hyphens: auto; }

/* ---------- media ---------- */
video, img { display: block; width: 100%; height: auto; }

.main-video {
  background: var(--panel);
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.16);
}

figure { margin: 22px 0 26px; }

figure video, figure img {
  background: var(--panel);
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

/* Paper figures drawn on white: keep their own proportions, no dark panel behind them. */
figure.light img {
  background: #fff;
  aspect-ratio: auto;
  border: 1px solid var(--line);
  padding: 10px;
}

figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- tables ---------- */
.table-block { margin: 24px 0 28px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  font-variant-numeric: tabular-nums;
}

caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  font-size: 17px;
  padding-bottom: 8px;
}

th, td { padding: 9px 12px; text-align: left; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 4px; }

thead th {
  font-weight: 600;
  color: var(--muted);
  border-top: 2px solid var(--text);
  border-bottom: 1px solid var(--text);
}

tbody tr + tr td { border-top: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 2px solid var(--text); }

tr.ours td { font-weight: 700; background: #eef5ff; }

.table-note { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Narrow screens: let the table scroll sideways instead of squeezing the columns. */
@media (max-width: 600px) {
  .table-block { overflow-x: auto; }
  table { font-size: 14px; }
  th, td { padding: 8px 9px; }
}

/* ---------- bibtex ---------- */
pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: #f6f8fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

/* ---------- footer ---------- */
footer { padding: 8px 20px 44px; color: var(--muted); font-size: 14px; text-align: center; }
footer p { margin: 0; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-top: 38px; }
  .authors { font-size: 18px; }
  h2 { font-size: 22px; }
  #abstract p { text-align: left; }
}

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