/* MoAct project page. Layout and palette follow the academic style of recent VLA project pages
   (sticky section navigation, muted alternating sections, highlighted result rows). */
:root {
  --ink: #172026;
  --muted: #5f6b74;
  --line: #d9e0e4;
  --bg: #ffffff;
  --bg-muted: #f5f8f7;
  --accent: #0f766e;
  --accent-soft: #d7eee9;
  --eyebrow: #a35d18;
  --venue: #b42318;
  --radius: 8px;
  --narrow: 920px;
  --wide: 1180px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body);
       font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { display: block; max-width: 100%; }

/* navigation */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92);
       backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: var(--wide); margin: 0 auto; padding: 0 24px; height: 52px;
             display: flex; align-items: center; justify-content: space-between; }
.nav .mark { font-family: var(--sans); font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.nav .links { display: flex; gap: 22px; }
.nav .links a { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.nav .links a:hover { color: var(--ink); text-decoration: none; }

/* layout */
.section { padding: 64px 24px; }
.section.muted { background: var(--bg-muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.narrow { max-width: var(--narrow); margin: 0 auto; }
.wide { max-width: var(--wide); margin: 0 auto; }
h2.section-title { font-family: var(--sans); font-size: 2rem; font-weight: 600; text-align: center;
                   margin: 0 0 10px; letter-spacing: -.01em; }
.section-lead { text-align: center; color: var(--muted); max-width: 760px; margin: 0 auto 36px; font-size: 1.02rem; }
h3.sub-title { font-family: var(--sans); font-size: 1.35rem; font-weight: 600; text-align: center; margin: 44px 0 6px; }
.sub-lead { text-align: center; color: var(--muted); margin: 0 auto 22px; max-width: 760px; font-size: .95rem; }
p { margin: 0 0 1em; }

/* hero */
.hero { padding: 56px 24px 28px; text-align: center; }
.eyebrow { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .14em;
           text-transform: uppercase; color: var(--eyebrow); margin-bottom: 14px; }
.hero h1 { font-family: var(--sans); font-size: 2.6rem; line-height: 1.18; font-weight: 600;
           margin: 0 auto 14px; max-width: 980px; letter-spacing: -.015em; }
.hero h1 .name { color: var(--accent); }
.venue { font-family: var(--sans); color: var(--venue); font-size: 1.08rem; font-weight: 500; margin-bottom: 14px; }
.authors { font-family: var(--sans); font-size: 1.05rem; margin-bottom: 4px; }
.affil { color: var(--muted); font-size: .92rem; margin-bottom: 22px; }
.buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px;
       background: var(--ink); color: #fff; font-family: var(--sans); font-size: .92rem; font-weight: 500; }
.btn:hover { background: #2b3a44; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--muted); border: 1px solid var(--line); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

/* figures */
figure { margin: 0; }
figure img { border-radius: var(--radius); }
figcaption { color: var(--muted); font-size: .9rem; margin-top: 12px; line-height: 1.55; }
figcaption b { color: var(--ink); }
.teaser { max-width: var(--wide); margin: 10px auto 0; padding: 0 24px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: var(--wide);
         margin: 34px auto 0; padding: 0 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-align: center; }
.stat .num { font-family: var(--sans); font-size: 1.85rem; font-weight: 600; color: var(--accent); line-height: 1.2; }
.stat .lbl { color: var(--muted); font-size: .86rem; margin-top: 4px; }

/* abstract */
.abstract { text-align: justify; hyphens: auto; font-size: 1.02rem; }

/* method cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 16px; }
.card .idx { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center;
             background: var(--accent-soft); color: var(--accent); font-family: var(--sans); font-weight: 700; font-size: .85rem; }
.card h4 { font-family: var(--sans); font-size: 1.04rem; margin: 12px 0 6px; }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-top: 8px; }
.table-head { background: var(--ink); color: #fff; font-family: var(--sans); font-size: .9rem; font-weight: 600;
              padding: 9px 14px; border-radius: var(--radius) var(--radius) 0 0; }
table.result { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
table.result th, table.result td { padding: 7px 10px; text-align: center; border-bottom: 1px solid #eef1f3; white-space: nowrap; }
table.result th { font-family: var(--sans); font-weight: 600; color: var(--muted); font-size: .82rem; }
table.result td:first-child, table.result th:first-child { text-align: left; padding-left: 14px; }
table.result tr.group th { color: var(--ink); border-bottom: 1px solid var(--line); }
table.result tr.ours td { background: var(--accent-soft); font-weight: 600; }
table.result td.best { font-weight: 700; }
table.result tr:last-child td { border-bottom: 0; }
.table-note { color: var(--muted); font-size: .82rem; margin-top: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }

/* videos */
.video-grid { display: grid; gap: 14px; }
.video-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.video-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.video-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.video-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.video-card video { width: 100%; height: auto; background: #000; }
.video-card .cap { padding: 9px 12px 10px; font-size: .86rem; line-height: 1.45; }
.video-card .cap .instr { font-family: var(--sans); font-weight: 600; color: var(--ink); }
.video-card .cap .meta { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.tag { display: inline-block; font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .04em;
       color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; margin-right: 6px; }
.tabs { display: flex; justify-content: center; gap: 8px; margin: 0 auto 22px; flex-wrap: wrap; }
.tab { font-family: var(--sans); font-size: .9rem; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line);
       background: #fff; color: var(--muted); cursor: pointer; }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.speed-note { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 14px; }

/* bibtex & footer */
pre.bib { background: var(--bg-muted); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
          font-size: .85rem; overflow-x: auto; line-height: 1.5; }
footer { padding: 30px 24px 44px; text-align: center; color: var(--muted); font-size: .82rem; }

@media (max-width: 900px) {
  .hero h1 { font-size: 1.9rem; }
  .stats, .cards, .two-col, .video-grid.cols-3, .video-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .nav .links { display: none; }
}
@media (max-width: 560px) {
  .stats, .cards, .two-col, .video-grid.cols-2, .video-grid.cols-3, .video-grid.cols-4 { grid-template-columns: 1fr; }
}
.prose { margin-top: 30px; }
.prose p { text-align: justify; hyphens: auto; }

/* ---- academic refinements ---- */
.venue { color: var(--muted); font-size: 1rem; font-weight: 400; margin: 2px 0 20px; }
.authors { margin-bottom: 2px; }

/* booktabs-style tables with caption above */
.table-caption { font-size: .92rem; color: var(--muted); margin: 0 0 8px; }
.table-caption b { color: var(--ink); }
.table-wrap { border: 0; border-radius: 0; background: transparent; margin-top: 0;
              border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
table.result tr.group th { border-bottom: 1px solid #c9d1d6; }
table.result tr:nth-child(2) th { border-bottom: 1px solid var(--ink); }
table.result td { border-bottom: 0; }
table.result tr.ours td { background: #f1f3f4; font-weight: 600; border-top: 1px solid var(--ink); }
table.result th { color: var(--ink); }

/* plain video figures */
.video-card { border: 0; border-radius: 0; background: transparent; }
.video-card video { border-radius: 4px; }
.video-card .cap { padding: 6px 2px 0; text-align: center; }
.video-card .cap .instr { font-weight: 500; font-size: .9rem; }
.video-card .cap .meta { font-size: .8rem; }

/* underline tabs */
.tabs { gap: 26px; border-bottom: 1px solid var(--line); max-width: 760px; }
.tab { border: 0; border-radius: 0; background: none; padding: 8px 2px; margin-bottom: -1px;
       border-bottom: 2px solid transparent; font-size: .95rem; }
.tab.active { background: none; color: var(--ink); border-color: var(--ink); }

figcaption b { font-weight: 700; }
.stacked figure + figure { margin-top: 30px; }
