/* ─── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  --bg:       #ffffff;
  --paper:    #ffffff;
  --ink:      #1a1917;
  --ink-2:    #3c3a36;
  --muted:    #6b6560;
  --line:     #e0e0e0;
  --accent:   #bf5700;   /* UT Austin burnt orange */
  --accent-2: #1a5c3f;
  --good:     #1e6e28;
  --warn:     #8a5800;
  --bad:      #91202a;
  --radius:   10px;
  --font-sans: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-serif: Georgia, "Palatino Linotype", serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); }
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: #f2f2f2;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ─── Site header ────────────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-header__logos {
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo-link {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.15s;
}
.logo-link:hover { opacity: 0.65; }
.logo-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.site-header__logo { width: auto; }
.site-header__logo--mark     { height: 38px; }
.site-header__logo--wordmark { height: 22px; }
@media (max-width: 520px) {
  .site-header__logo--mark     { height: 30px; }
  .site-header__logo--wordmark { height: 18px; }
  .site-header__logos { gap: 12px; }
}

/* ─── Hero section ───────────────────────────────────────────────────────────── */
.hero-section {
  padding: 56px 0 40px;
  text-align: center;
}
.hero-section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  font-weight: 700;
  line-height: 1.28;
  color: var(--ink);
  margin-bottom: 22px;
}
.hero-section__authors {
  font-size: 1rem;
  color: var(--ink-2);
  margin-bottom: 6px;
  line-height: 1.5;
}
.hero-section__affil {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.5;
}
.hero-section__note {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 26px;
}
.hero-section__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
/* Second pill row: paper resources, kept on their own line below the section nav. */
.hero-section__links--resources { margin-top: 10px; }
.pill-link {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.pill-link:hover { background: var(--accent); color: #fff; }
.pill-link[aria-disabled="true"] {
  border-color: var(--line);
  color: var(--muted);
  pointer-events: none;
}

/* ─── Content sections ───────────────────────────────────────────────────────── */
.content-section {
  max-width: 760px;
  margin: 0 auto 64px;
}
.content-section--wide {
  max-width: 100%;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
.subsection-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink-2);
  margin: 34px 0 10px;
}
.section-lede {
  font-size: 0.93rem;
  color: var(--ink-2);
  margin-bottom: 20px;
  line-height: 1.7;
  max-width: 860px;
}

/* ─── Abstract ───────────────────────────────────────────────────────────────── */
.abstract-body {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-2);
  text-align: justify;
}

/* ─── Teaser (core concept, above the abstract) ──────────────────────────────── */
.teaser-section { margin-bottom: 56px; }

/* ─── Figure blocks ──────────────────────────────────────────────────────────── */
.fig-block {
  margin: 0 0 30px;
}
/* The concept figure is a single-column figure in the paper, so its internal
   elements are drawn much larger than the two-column figures. Cap its width so it
   reads at a comparable scale. Tune this one value to resize it. */
.fig-block--narrow {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.fig-block--narrow .fig-block__caption { max-width: 100%; }
.fig-block__img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}
.fig-block__caption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 980px;
}
.fig-block__caption strong { color: var(--ink-2); }

/* ─── Definition cards (abstractions) ────────────────────────────────────────── */
.def-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.def-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: #fafafa;
}
.def-card__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.def-card__name {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
  background: #fdf0e6;
  padding: 2px 9px;
  border-radius: 4px;
}
.def-card__sub {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.def-card__desc {
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ─── Attribute cards (A1–A4) ────────────────────────────────────────────────── */
/* Four across on one row. minmax(0, 1fr) rather than auto-fit so the tracks shrink
   below their content width instead of wrapping A4 onto a second row. */
.attr-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}
@media (max-width: 900px) {
  .attr-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .attr-list { grid-template-columns: minmax(0, 1fr); }
}
.attr-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fafafa;
}
.attr-card__tag {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  padding: 2px 7px;
  margin-top: 2px;
}
.attr-card__name {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}
.attr-card__desc {
  font-size: 0.83rem;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ─── Demonstrations ─────────────────────────────────────────────────────────── */
.demo {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 34px;
}
.demo__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.demo__scenario {
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 22px;
  padding: 14px 16px;
  background: #fafafa;
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  max-width: 900px;
}

.stage-list {
  list-style: none;
  counter-reset: stage;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 26px 0 30px;
  max-width: 900px;
}
.stage-list li {
  counter-increment: stage;
  position: relative;
  padding-left: 22px;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.65;
}
.stage-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 0.85rem;
}
.stage-list__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
}

/* ─── Video ──────────────────────────────────────────────────────────────────── */
.video-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  max-width: 900px;
}
.video-wrap video,
.video-wrap iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}
.video-caption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
  max-width: 900px;
}
.video-caption a { text-decoration: none; font-weight: 600; }
.video-caption a:hover { text-decoration: underline; }

/* ─── BibTeX ─────────────────────────────────────────────────────────────────── */
.bibtex-block {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  white-space: pre;
  overflow-x: auto;
  color: var(--ink-2);
}

/* ─── Site footer ────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 20px 24px;
  font-size: 0.78rem;
  color: var(--muted);
}
.site-footer__inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-footer__logo { height: 24px; width: auto; opacity: 0.5; }
.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}
