/* ==========================================================================
   AuRA project page
   Layout follows demomimic.github.io. Edit --accent to rebrand.
   ========================================================================== */
:root {
  --accent: #2a9d8f;          /* "Atoms" teal from the paper's Fig. 1 */
  --accent-ink: #1f7a6f;      /* deeper teal for text/links (contrast) */
  --accent-soft: #e3f2ef;
  --atoms: #289d8f;           /* "Atoms" in the title, as in the paper's Fig. 1 */
  --bits: #b87528;            /* "Bits" in the title, as in the paper's Fig. 1 */
  --bar-aura: #acd8d7;        /* chart colors from the paper's collection-efficiency figure */
  --bar-human: #9bc1e1;
  --ink: #1f1f1f;
  --muted: #6b6b6b;
  --line: #e3e3e3;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;            /* alternate section band, as Bulma's is-light hero */
  --highlight: #f5f9f8;         /* highlight boxes, as on aura-robot.github.io */
  --max: 1080px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10,10,10,.05), 0 10px 30px rgba(10,10,10,.05);
  /* same fonts as aura-robot.github.io: Noto Sans for text, Google Sans for headings and numbers */
  --font: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Google Sans', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }

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

/* ---------- sticky nav ---------- */
nav.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
nav.top .wrap { display: flex; align-items: center; gap: 20px; height: 56px; }
nav.top .brand { font-family: var(--font-head); font-weight: 600; font-size: 19px; letter-spacing: .2px; margin-right: auto; color: var(--ink); }
nav.top .brand:hover { text-decoration: none; }
nav.top a.link { color: var(--muted); font-size: 14px; font-weight: 500; }
nav.top a.link:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 760px) { nav.top a.link { display: none; } }

/* ---------- hero ---------- */
header.hero { padding: 60px 0 30px; text-align: center; }
h1.title { font-family: var(--font-head); font-size: clamp(28px, 4.2vw, 46px); line-height: 1.15; margin: 0 auto 24px; max-width: 920px; font-weight: 700; }
h1.title .atoms { color: var(--atoms); }
h1.title .bits { color: var(--bits); }
.authors { font-family: var(--font-head); font-size: 19px; margin: 0 auto 8px; max-width: 820px; }
.authors a { color: var(--ink); font-weight: 600; }
.authors .plain { font-weight: 600; }
.authors sup { color: var(--accent); font-weight: 700; }
.affil { color: var(--muted); font-size: 15px; margin: 0 auto 6px; max-width: 760px; }
.affil sup { color: var(--accent); font-weight: 700; }
.note { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- link buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 30px 0 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 999px; transition: transform .12s ease, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); background: #000; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: #fff; }
.btn.soon { opacity: .5; cursor: default; }
.btn.soon:hover { transform: none; border-color: var(--line); background: #fff; }
.btn svg { width: 17px; height: 17px; }
.btn .ai { font-size: 17px; line-height: 1; }

/* ---------- hero teaser video ---------- */
.teaser { margin: 36px auto 0; max-width: 960px; }
.teaser video { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; background: #fff; }
.teaser figcaption { margin-top: 10px; color: var(--muted); font-size: 13.5px; }

/* ---------- sections ---------- */
section { padding: 62px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2.sec { font-family: var(--font-head); font-size: 31px; font-weight: 600; text-align: center; margin: 0 0 10px; letter-spacing: -.005em; }
h3.sub { font-family: var(--font-head); font-size: 21px; font-weight: 600; text-align: center; margin: 46px 0 6px; }
.sec-sub { text-align: center; color: var(--muted); max-width: 720px; margin: 0 auto 34px; }
.prose { max-width: 820px; margin: 0 auto; font-size: 17px; color: #2b2b2b; }
.prose p { margin: 0 0 18px; }
.text { text-align: left; max-width: 860px; margin: 22px auto 0; color: #2b2b2b; font-size: 16px; line-height: 1.7; }
.text p { margin: 0 0 14px; }
.text p:last-child { margin-bottom: 0; }
.text b { color: var(--ink); }

/* ---------- TL;DR ---------- */
.tldr {
  max-width: 820px; margin: 0 auto 44px; padding: 14px 20px;
  background: var(--highlight); border-left: 4px solid var(--atoms);
  border-radius: 10px; font-size: 16px;
}

/* ---------- white figure panels (teaser + pipeline) ---------- */
.panel-fig { margin: 30px auto 0; max-width: 1000px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 28px 20px; }
.panel-fig img { width: 100%; height: auto; display: block; }
.panel-fig figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.panel-fig figcaption b { color: var(--ink); }
.reveal { opacity: 0; transform: translateY(18px) scale(.99); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- three design choices ---------- */
.ideas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.idea {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
}
.idea .num { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.idea h4 { font-family: var(--font-head); font-size: 18px; font-weight: 600; margin: 4px 0 10px; line-height: 1.3; }
.idea .problem { font-size: 13.5px; color: var(--muted); margin: 0 0 10px; padding-left: 10px; border-left: 2px solid var(--line); }
.idea p { font-size: 14.5px; margin: 0; line-height: 1.6; }
@media (max-width: 820px) { .ideas { grid-template-columns: 1fr; } }

/* ---------- results subsections ---------- */
.subsec { padding-top: 10px; }
.subsec + .subsec { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
h3.sub { font-family: var(--font-head); font-size: 23px; font-weight: 700; text-align: left; margin: 0 0 2px; }
.sub-desc { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.subsec .text { max-width: none; }
.subsec .sub-desc + .text { margin-top: 0; }
.panel-note { text-align: center; color: var(--muted); font-size: 13.5px; margin: 18px auto 0; max-width: 820px; }
.panel-note b { color: var(--ink); }
.table-scroll + .panel-note { max-width: 980px; }

/* ---------- headline numbers ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 24px; }
.stat { background: var(--highlight); border-radius: 10px; padding: 16px 12px; text-align: center; }
.stat .v { font-family: var(--font-head); font-size: 34px; font-weight: 700; color: #c0504d; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13.5px; color: #333; }
@media (max-width: 560px) { .stat .v { font-size: 26px; } .stat .l { font-size: 12px; } }

/* ---------- animated horizontal bar charts ---------- */
.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .charts { grid-template-columns: 1fr; } }
.hc { background: var(--highlight); border-radius: var(--radius); padding: 16px 16px 14px; min-width: 0; }
.hc-title { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink); text-align: center; margin: 0 0 2px; }
.hc-note { text-align: center; font-size: 11px; color: #444; margin: 0 0 14px; }
.hc-legend { display: flex; justify-content: center; gap: 14px; font-size: 11.5px; font-weight: 600; margin: -6px 0 12px; }
.hc-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hc-row { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 8px; margin: 0 0 9px; }
.hc-row.sep { padding-top: 9px; border-top: 1px dashed #c9d3d1; }
.hc-name { font-size: 12px; white-space: nowrap; font-weight: 600; line-height: 1.2; }
.hc-name.ours { color: var(--accent-ink); font-weight: 800; }
.hc-track { position: relative; display: flex; flex-direction: column; gap: 3px; }
.hc-line { display: flex; align-items: center; gap: 6px; min-height: 16px; }
.hc-bar {
  height: 14px; width: 0; border-radius: 3px 6px 6px 3px; flex: none;
  transition: width .85s cubic-bezier(.22,1,.36,1); transition-delay: var(--d);
}
.hc-line.thin .hc-bar { height: 8px; }
.in .hc-bar { width: var(--w); }
.hc-val { font-size: 11.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .4s ease; transition-delay: calc(var(--d) + .4s); }
.in .hc-val { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hc-bar, .hc-val { transition: none; } }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; margin: 22px auto 0; max-width: 980px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.res { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.res th, table.res td { padding: 8px 12px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.res thead th { font-weight: 700; color: var(--ink); background: var(--bg-alt); }
table.res thead tr:first-child th { border-bottom: none; }
table.res td:first-child, table.res th:first-child { text-align: left; }
table.res th.grp { border-left: 1px solid var(--line); }
table.res td.gl { border-left: 1px solid var(--line); }
table.res td b { color: var(--ink); font-weight: 700; }
table.res tbody tr:hover { background: #fafafa; }

/* ---------- unseen-interaction grid ---------- */
.unseen { display: grid; grid-template-columns: 110px repeat(3, 1fr); gap: 10px; max-width: 900px; margin: 24px auto 0; align-items: center; }
.unseen .hd { font-size: 12.5px; font-weight: 700; text-align: center; line-height: 1.3; color: var(--muted); }
.unseen .rl { font-family: var(--font-head); font-size: 15px; font-weight: 600; line-height: 1.25; }
.unseen .rl small { display: block; font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 500; }
.unseen figure { margin: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.unseen figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) {
  .unseen { grid-template-columns: 70px repeat(3, 1fr); gap: 6px; }
  .unseen .hd { font-size: 10.5px; }
  .unseen .rl { font-size: 12.5px; }
}

/* ---------- ablation cards ---------- */
.ablations { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: stretch; }
.ablations .hc { display: flex; flex-direction: column; justify-content: center; }
.ablations .hc-row { grid-template-columns: 150px 1fr; }
.ablations ul { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.65; }
.ablations li { margin-bottom: 12px; }
.ablations li:last-child { margin-bottom: 0; }
@media (max-width: 820px) { .ablations { grid-template-columns: 1fr; } }

/* ---------- BibTeX ---------- */
.bib { position: relative; max-width: 860px; margin: 0 auto; }
.bib pre { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; margin: 0; }
.bib button { position: absolute; top: 12px; right: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-family: var(--font); font-weight: 600; font-size: 12.5px; padding: 5px 13px; border-radius: 999px; cursor: pointer; }
.bib button:hover { border-color: var(--ink); }

/* ---------- acknowledgments + footer ---------- */
.ack { max-width: 860px; margin: 0 auto; color: var(--muted); font-size: 14px; }
footer { text-align: center; color: var(--muted); font-size: 14px; padding: 40px 0; border-top: 1px solid var(--line); }
footer a { color: var(--muted); }
footer p { margin: 6px 0 0; font-size: 12.5px; }

/* ============ left table of contents (wide screens) ============ */
.toc { display: none; }
@media (min-width: 1480px) {
  .toc { display: block; position: fixed; top: 120px; left: calc((100vw - 1080px) / 2 - 188px); width: 168px; z-index: 40; }
  nav.top a.link { display: none; }   /* ToC replaces the top links on wide screens */
}
.toc-hd { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px 15px; }
.toc-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc-list a {
  display: block; padding: 7px 0 7px 15px; margin-left: -2px;
  border-left: 2px solid transparent; color: var(--muted);
  font-size: 13px; font-weight: 500; line-height: 1.3; text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
.toc-list a:hover { color: var(--ink); text-decoration: none; }
.toc-list a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 700; }
.toc-sub { list-style: none; margin: 0 0 4px; padding: 0; }
.toc-sub a { padding: 4px 0 4px 27px; font-size: 12px; }
.toc-list a.parent { color: var(--ink); font-weight: 600; }

/* ============ mobile ============ */
@media (max-width: 700px) {
  .panel-fig { padding: 14px 12px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  h2.sec { font-size: 24px; }
  h3.sub { font-size: 19px; }
}
