/* HM3D-M3 project page. Hand-written; no framework. */
:root {
  --page: #ffffff;
  --band: #f5f5f7;
  --fill: #e8e8ed;
  --hair: #d2d2d7;
  --ink: #1d1d1f;
  --ink2: #6e6e73;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --ok: #1d8a4e;
  --no: #b3261e;

  --display: "Inter Tight", "Inter", "Helvetica Neue", Arial, sans-serif;
  --text: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --wide: 1260px;
  --mid: 1050px;
  --copy: 830px;
  --gutter: 24px;
  --sec: 100px;
  --radius: 28px;
  --radius-in: 18px;
  --ease: cubic-bezier(.28, .11, .32, 1);
}
@media (min-width: 735px)  { :root { --gutter: 40px; --sec: 140px; } }
@media (min-width: 1069px) { :root { --sec: 160px; } }

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }
img { height: auto; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px;
}
.skip:focus { left: 8px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- layout ---------- */
.wrap      { width: min(var(--wide), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.wrap-mid  { width: min(var(--mid),  calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.wrap-copy { width: min(var(--copy), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.sec  { padding-block: var(--sec); }
.band { background: var(--band); }
.center { text-align: center; }
.stack > * + * { margin-top: 24px; }
@media (min-width: 735px) { .stack > * + * { margin-top: 32px; } }

/* ---------- type ---------- */
.eyebrow {
  font: 600 17px/1.24 var(--display);
  letter-spacing: -.01em;
  color: var(--ink2);
  margin: 0 0 10px;
}
.hx {
  font: 600 40px/1.05 var(--display);
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
}
.hl-head {
  font: 600 32px/1.125 var(--display);
  letter-spacing: -.009em;
  margin: 0;
  text-wrap: balance;
}
.lede {
  font: 400 17px/1.47 var(--text);
  color: var(--ink2);
  margin: 16px auto 0;
  max-width: var(--copy);
  text-wrap: pretty;
}
.lede b, .lede strong { color: var(--ink); font-weight: 600; }
.copy p { margin: 0 0 1em; color: var(--ink2); }
.copy p:last-child { margin-bottom: 0; }
.copy b, .copy strong { color: var(--ink); font-weight: 600; }
.caption {
  font-size: 14px; line-height: 1.43; color: var(--ink2);
  margin: 14px auto 0; max-width: var(--copy); text-align: center;
  letter-spacing: -.016em;
}
.caption b { color: var(--ink); font-weight: 600; }
@media (min-width: 735px) {
  .eyebrow { font-size: 21px; margin-bottom: 14px; }
  .hx { font-size: 64px; }
  .hl-head { font-size: 48px; }
  .lede { font-size: 19px; }
  .caption { font-size: 15px; }
}
@media (min-width: 1069px) {
  .eyebrow { font-size: 24px; }
  .hx { font-size: 80px; }
  .hl-head { font-size: 56px; }
  .lede { font-size: 21px; line-height: 1.38; }
}

/* ---------- pill navigation ---------- */
.nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 50;
  width: min(1026px, calc(100% - 24px));
  height: 54px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 10px 0 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 6px 24px rgba(0, 0, 0, .06);
}
.nav .brand {
  font: 600 19px/1 var(--display);
  letter-spacing: -.01em;
  color: var(--ink);
  margin-right: auto;
  white-space: nowrap;
}
.nav .brand:hover { text-decoration: none; }
.explore { position: relative; }
.explore summary {
  list-style: none; cursor: pointer;
  font-size: 13px; color: var(--ink);
  padding: 6px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px;
  user-select: none;
}
.explore summary::-webkit-details-marker { display: none; }
.explore summary::after {
  content: ""; width: 6px; height: 6px; margin-left: 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .25s var(--ease);
}
.explore[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.explore summary:hover { background: rgba(0, 0, 0, .05); }
.explore .menu {
  position: absolute; right: 0; top: calc(100% + 12px);
  min-width: 210px; padding: 8px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 12px 32px rgba(0, 0, 0, .12);
}
.explore .menu a {
  display: block; padding: 8px 12px; border-radius: 10px;
  color: var(--ink); font-size: 14px;
}
.explore .menu a:hover { background: var(--band); text-decoration: none; }
.explore .menu a.is-active { color: var(--blue); }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 14px;
  border-radius: 999px;
  font: 500 12px/1 var(--text);
  letter-spacing: 0;
  white-space: nowrap;
  border: 1px solid var(--hair);
  color: var(--ink);
  background: transparent;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.pill:hover { text-decoration: none; border-color: var(--ink2); }
.pill.solid { background: var(--blue); border-color: var(--blue); color: #fff; }
.pill.solid:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.pill.lg { height: 40px; padding: 0 20px; font-size: 15px; }
.nav { gap: 8px; }
.explore .menu-ext { display: none; }
/* Below 735px the link pills move into the Explore menu. */
@media (max-width: 734px) {
  .nav .hide-sm { display: none; }
  .explore .menu-ext {
    display: block;
    margin-top: 6px; padding-top: 6px;
    border-top: 1px solid var(--hair);
  }
}
@media (max-width: 520px) {
  .nav { padding-left: 16px; gap: 6px; }
  .nav .brand { font-size: 17px; }
}

/* ---------- hero ---------- */
.hero { padding-top: 132px; padding-bottom: var(--sec); text-align: center; }
@media (min-width: 735px) { .hero { padding-top: 156px; } }
.hero .title {
  font: 500 17px/1.4 var(--text);
  color: var(--ink2);
  margin: 20px auto 0;
  max-width: var(--copy);
  text-wrap: balance;
}
@media (min-width: 735px)  { .hero .title { font-size: 19px; } }
@media (min-width: 1069px) { .hero .title { font-size: 21px; } }
.authors {
  margin: 28px auto 0; max-width: var(--copy);
  font-size: 17px; line-height: 1.6; color: var(--ink);
}
.authors a { color: var(--ink); }
.authors a:hover { color: var(--blue); text-decoration: none; }
.authors .au { white-space: nowrap; }
.authors sup, .affils sup { font-size: .62em; line-height: 0; vertical-align: .62em; margin-left: 1px; color: var(--ink2); }
.affils {
  margin: 10px auto 0; max-width: var(--copy);
  font-size: 14px; line-height: 1.6; color: var(--ink2);
}
.affils .aff { white-space: nowrap; }
.affils .aff + .aff::before { content: "·"; margin: 0 10px; color: var(--hair); }
.affils .notes { display: block; margin-top: 4px; }
@media (max-width: 899px) {
  .affils .aff { display: block; white-space: normal; }
  .affils .aff + .aff::before { content: none; }
}
.links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 30px auto 0;
}

.media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--band);
  isolation: isolate;
}
.band .media { background: var(--fill); }
.media > img, .media > video { width: 100%; height: auto; }
.media.pad { padding: 28px; }
.media.pad > img { border-radius: var(--radius-in); }
@media (max-width: 734px) {
  .media { border-radius: 18px; }
  .media.pad { padding: 14px; }
  .media.pad > img { border-radius: 10px; }
}
.media.white { background: #fff; }

.hero-video { margin-top: 48px; aspect-ratio: 16 / 9; background: #000; }
.hero-video video { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 735px) { .hero-video { margin-top: 64px; } }
.play-toggle {
  position: absolute; right: 18px; bottom: 18px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(29, 29, 31, .58);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: background-color .2s var(--ease);
}
.play-toggle:hover { background: rgba(29, 29, 31, .78); }
.play-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.play-toggle .i-play { display: none; }
.play-toggle[aria-pressed="true"] .i-play { display: block; }
.play-toggle[aria-pressed="true"] .i-pause { display: none; }
@media (max-width: 734px) { .play-toggle { right: 10px; bottom: 10px; width: 30px; height: 30px; } }

/* ---------- key numbers ---------- */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 16px;
  margin: 48px auto 0; max-width: var(--mid);
  padding: 0; list-style: none;
}
@media (min-width: 735px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats li { text-align: center; }
.stats .n {
  display: block;
  font: 600 40px/1.05 var(--display);
  letter-spacing: -.015em;
  color: var(--ink);
}
@media (min-width: 1069px) { .stats .n { font-size: 48px; } }
.stats .l { display: block; margin-top: 6px; font-size: 14px; color: var(--ink2); }

/* ---------- section heads ---------- */
.head { text-align: center; margin-bottom: 48px; }
@media (min-width: 735px) { .head { margin-bottom: 64px; } }

/* ---------- tables ---------- */
.table-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 8px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-card.on-white { background: var(--band); }
@media (max-width: 734px) { .table-card { border-radius: 18px; } }
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
table.t th, table.t td {
  padding: 13px 14px;
  text-align: center;
  white-space: nowrap;
}
table.t thead th {
  font: 600 13px/1.3 var(--text);
  color: var(--ink2);
  border-bottom: 1px solid var(--hair);
  white-space: normal;
  min-width: 64px;
}
table.t tbody td { border-bottom: 1px solid var(--hair); }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t td:first-child, table.t th:first-child { text-align: left; }
table.t td.wrap-ok { white-space: normal; min-width: 180px; color: var(--ink2); text-align: left; }
table.t tr.ours td { background: rgba(0, 113, 227, .06); }
table.t tr.ours td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
table.t tr.ours td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }
table.t b { font-weight: 600; }
.cmark { color: var(--ok); font-weight: 600; }
.xmark { color: #b8b8be; }
.nmark { color: #b8b8be; }
.scroll-hint { display: none; font-size: 13px; color: var(--ink2); text-align: center; margin-top: 10px; }
@media (max-width: 734px) { .scroll-hint { display: block; } }

/* ---------- highlight numbers (results) ---------- */
.highlights {
  display: grid; gap: 16px; grid-template-columns: 1fr;
  margin-bottom: 40px;
}
@media (min-width: 735px) { .highlights { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.hcard {
  background: var(--band);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: left;
}
.band .hcard { background: #fff; }
.hcard .n { font: 600 48px/1 var(--display); letter-spacing: -.02em; }
@media (min-width: 1069px) { .hcard .n { font-size: 56px; } }
.hcard .n small { font-size: .5em; font-weight: 600; margin-left: 2px; }
.hcard .l { margin-top: 12px; color: var(--ink2); font-size: 15px; }
.hcard .l b { color: var(--ink); font-weight: 600; }

/* ---------- baselines cards ---------- */
.duo { display: grid; gap: 20px; }
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
}
@media (max-width: 734px) { .card { border-radius: 18px; padding: 16px; } }
.card .tag {
  display: inline-block; font: 600 12px/1 var(--text);
  color: var(--ink2); background: var(--band);
  padding: 6px 10px; border-radius: 999px; margin-bottom: 12px;
}
.card h3 { font: 600 24px/1.2 var(--display); letter-spacing: -.01em; margin: 0 0 16px; }
@media (min-width: 1069px) { .card h3 { font-size: 28px; } }
.card img { border-radius: var(--radius-in); }
.card .caption { text-align: left; max-width: none; }

/* ---------- videos list ---------- */
.vid { margin-top: 40px; }
.vid .media { aspect-ratio: 16 / 9; background: #000; }
.vid video { width: 100%; height: 100%; }
.vid h3 {
  font: 600 21px/1.2 var(--display); letter-spacing: -.01em;
  margin: 18px 0 0; text-align: center;
}
@media (min-width: 735px) { .vid h3 { font-size: 24px; } .vid { margin-top: 56px; } }

/* ---------- BibTeX ---------- */
.cite-meta { text-align: center; margin-bottom: 32px; }
.cite-meta .ptitle { font: 600 21px/1.3 var(--display); letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.cite-meta .plist { margin: 10px auto 0; font-size: 14px; color: var(--ink2); max-width: var(--copy); }
.code {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 64px 28px 24px;
}
@media (max-width: 734px) { .code { border-radius: 18px; padding: 58px 16px 16px; } }
.code pre {
  margin: 0;
  overflow-x: auto;
  font: 400 13px/1.7 var(--mono);
  letter-spacing: 0;
  color: var(--ink);
}
.code .copy-btn { position: absolute; top: 16px; right: 16px; background: #fff; }
.code .copy-btn.done { color: var(--ok); border-color: var(--ok); }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--hair);
  padding: 28px 0 40px;
  font-size: 12px; line-height: 1.5; color: var(--ink2);
}
.foot p { margin: 0 0 6px; }
.foot a { color: var(--ink2); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- reveal on scroll ----------
   The hidden start state only applies once JS has added .js to <html>;
   without JS (or if site.js never runs) everything is visible. */
.js .rv {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition:
    opacity .7s cubic-bezier(.22, 1, .36, 1) var(--d, 0ms),
    transform .8s cubic-bezier(.22, 1, .36, 1) var(--d, 0ms);
}
.js .rv:not(.in) { will-change: opacity, transform; }
.js .rv.in { opacity: 1; transform: none; }

/* Hero: no scroll wait, a short staggered load-in. */
@keyframes hero-in {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to   { opacity: 1; transform: none; }
}
.js .hero-in {
  animation: hero-in .6s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .rv.in { opacity: 1; transform: none; transition: none; will-change: auto; }
  .js .hero-in { animation: none; }
}

/* abstract body copy: a step larger than captions */
.lede-like p { font-size: 17px; line-height: 1.53; }
@media (min-width: 735px) { .lede-like p { font-size: 19px; } }
