@import url(fonts.css);

:root {
  --ink: #222;
  --ink-2: #444;
  --muted: #6f6f6f;
  --faint: #999;
  --rule: #e6e6e6;
  --rule-2: #cfcfcf;
  --bg: #fff;
  --soft: #f5f5f5;
  --spear: #4a4b9c;
  --spear-2: #e9e9f5;
  --link: #3d4aa6;
  --font: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16.5px/1.65 var(--font); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }

/* ---------- header ---------- */
nav.site { text-align: center; padding-top: 18px; }
nav.site a { display: inline-block; color: var(--muted); padding: 4px; }
nav.site a:hover { color: var(--ink); }
nav.site svg { display: block; width: 20px; height: 20px; }
header { text-align: center; padding: 30px 0 8px; }
h1 { font-size: 40px; line-height: 1.15; font-weight: 600; margin: 0 0 16px; letter-spacing: -0.005em; }
h1 .name { color: var(--spear); }
.authors { font-size: 18px; margin: 0; }
.authors a { color: var(--ink); }
.authors a:hover { color: var(--link); }
.authors .me { font-weight: 600; }
.affil { font-size: 15.5px; color: var(--muted); margin: 4px 0 0; }
.venue { font-size: 16px; color: var(--muted); margin: 2px 0 20px; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.button {
  display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 500;
  padding: 7px 16px; border-radius: 6px; background: #ececec; color: var(--ink);
}
.button:hover { background: #e0e0e0; text-decoration: none; }
.button svg { width: 16px; height: 16px; flex: none; }
.press { font-size: 14.5px; color: var(--muted); margin: 14px 0 0; }
@media (max-width: 640px) { header { padding-top: 22px; } h1 { font-size: 31px; } }

/* ---------- contents sidebar (only where the margin is wide enough) ---------- */
.toc { display: none; }
@media (min-width: 1360px) {
  .toc {
    display: block; position: fixed; top: 50%; transform: translateY(-50%);
    left: calc(50% - 668px); width: 176px; max-height: calc(100vh - 48px); overflow-y: auto;
    font-size: 13.5px; line-height: 1.4;
  }
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 3px 0 3px 12px; border-left: 2px solid var(--rule); color: var(--muted); }
.toc ol ol a { padding-left: 24px; font-size: 12.5px; color: var(--faint); }
.toc a:hover { color: var(--ink); text-decoration: none; border-left-color: var(--ink); }
section, h2[id], h3[id] { scroll-margin-top: 24px; }

/* ---------- sections ---------- */
h2 { font-size: 26px; line-height: 1.3; font-weight: 600; margin: 72px 0 14px; }
h2.center { text-align: center; }
h3 { font-size: 18.5px; font-weight: 600; margin: 34px 0 8px; }
.abstract { max-width: 760px; margin: 0 auto; text-align: justify; hyphens: auto; }
.tldr { max-width: 760px; margin: 26px auto 0; font-size: 17.5px; }

/* ---------- figures ---------- */
figure { margin: 22px 0 30px; }
figure img, figure video { display: block; width: 100%; height: auto; }
figcaption { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin-top: 10px; max-width: 760px; }
figcaption b { color: var(--ink-2); font-weight: 600; }
.hero { margin-top: 32px; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
video { background: var(--soft); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } .grid3 { grid-template-columns: 1fr 1fr; gap: 12px; } }
.tile { font-size: 14.5px; color: var(--ink-2); }
.tile video, .tile img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.tile .head { color: var(--ink); font-weight: 600; font-size: 14.5px; margin-top: 6px; line-height: 1.4; }
.tile .head span { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; }
.tile.vlm video, .tile.vlm img { aspect-ratio: 16 / 9; }
.tile.vlm video, .tile.dark video { object-fit: contain; background: #3a3a3c; }

/* query / answer bubble under the SPEAR-VLM example */
.qa { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; }
.qa p { margin: 0 0 6px; padding: 8px 12px; border-radius: 6px; }
.qa .q { background: var(--soft); }
.qa .a { background: var(--spear-2); font-family: var(--mono); font-size: 13.5px; }
.qa b { font-family: var(--font); font-weight: 600; margin-right: 6px; }

/* ---------- training stages ---------- */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 22px 0 8px; counter-reset: stage; }
.stage { padding: 14px 16px 12px; border: 1px solid var(--rule-2); border-left-width: 0; position: relative; }
.stage:first-child { border-left-width: 1px; border-radius: 6px 0 0 6px; }
.stage:last-child { border-radius: 0 6px 6px 0; background: var(--spear-2); }
.stage .k { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stage .t { font-weight: 600; font-size: 16.5px; margin: 2px 0 6px; }
.stage .d { font-size: 14.5px; color: var(--ink-2); margin: 0 0 8px; line-height: 1.5; }
.stage .c { font-size: 13.5px; color: var(--muted); }
.stage .c b { color: var(--ink-2); font-weight: 600; }
@media (max-width: 720px) {
  .stages { grid-template-columns: 1fr; }
  .stage, .stage:first-child { border-left-width: 1px; border-top-width: 0; border-radius: 0; }
  .stage:first-child { border-top-width: 1px; border-radius: 6px 6px 0 0; }
  .stage:last-child { border-radius: 0 0 6px 6px; }
}

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; margin: 14px 0 6px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
th, td { padding: 6px 10px; text-align: right; vertical-align: baseline; white-space: nowrap; }
th { font-weight: 600; border-bottom: 1px solid var(--ink-2); }
th.l, td.l { text-align: left; white-space: normal; }
tbody tr + tr td { border-top: 1px solid var(--rule); }
td .note { display: block; font-size: 13.5px; color: var(--muted); font-weight: 400; }
td.ours, th.ours { font-weight: 600; color: var(--spear); }
td.na { color: var(--faint); }
.tcap { font-size: 14.5px; color: var(--muted); margin: 6px 0 24px; line-height: 1.55; max-width: 760px; }
@media (max-width: 640px) { td.l, th.l { min-width: 11em; } }

pre { background: var(--soft); padding: 14px 16px; overflow-x: auto; font: 13.5px/1.55 var(--mono); color: var(--ink-2); margin: 10px 0 20px; }

footer { margin: 80px 0 0; padding: 20px 0 40px; border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--faint); text-align: center; }

/* one centered reading column; figures, galleries and wide tables use the full width */
.text, .tcap, figcaption, .tldr, .abstract { margin-left: auto; margin-right: auto; }
.text { max-width: 720px; }
.tcap, figcaption { max-width: 720px; }
.text .tcap { max-width: none; }
@media (max-width: 640px) { .abstract { text-align: left; hyphens: manual; } }
