:root {
  --bg: #ffffff;
  --text: #1d2330;
  --muted: #5d6676;
  --rule: #e4e7ec;
  --soft: #f5f7fa;
  --accent: #2e7d4f;      /* EventHOI green, as in the paper's figures */
  --event: #1f7fbf;
  --amber: #c27a10;
  --code-bg: #f3f4f6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131b;
    --text: #e8ecf2;
    --muted: #9aa4b5;
    --rule: #263042;
    --soft: #151c27;
    --accent: #5fd08c;
    --event: #4fc3ff;
    --amber: #ffb840;
    --code-bg: #151c27;
  }
}
:root[data-theme="dark"] {
  --bg: #0e131b; --text: #e8ecf2; --muted: #9aa4b5; --rule: #263042; --soft: #151c27;
  --accent: #5fd08c; --event: #4fc3ff; --amber: #ffb840; --code-bg: #151c27;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

.hero { padding: 64px 0 28px; text-align: center; }
.badge {
  display: inline-block; margin: 0 0 18px; padding: 4px 12px;
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
h1 { margin: 0 auto; max-width: 860px; font-size: clamp(26px, 4.4vw, 40px); line-height: 1.2; font-weight: 700; }
h1 .name { color: var(--event); }
h1 .glasses { color: var(--amber); }
.authors { margin: 18px 0 0; font-size: 18px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  background: var(--text); color: var(--bg); text-decoration: none; font-weight: 600; font-size: 15px;
}
.btn:hover { opacity: .85; }
.btn.disabled { background: var(--soft); color: var(--muted); border: 1px solid var(--rule); cursor: default; }
.btn.disabled:hover { opacity: 1; }

section { padding: 28px 0; }
h2 { font-size: 26px; margin: 0 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 0 0 14px; }

.video { position: relative; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 6px 30px rgba(0,0,0,.18); }
.video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.caption, figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 8px; }
.stat { background: var(--soft); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 12px; text-align: center; }
.stat b { display: block; font-size: 28px; line-height: 1.2; color: var(--accent); }
.stat span { font-size: 14px; color: var(--muted); }

figure { margin: 22px 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 8px; background: #fff; padding: 10px; }
figure.narrow { max-width: 620px; margin-left: auto; margin-right: auto; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.steps article { background: var(--soft); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; }
.steps p { font-size: 15px; margin: 0; }
.steps h3 span {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px;
  border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 14px;
}

.split { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 28px; align-items: center; }
.split figure { margin: 0; }

pre { margin: 0; padding: 16px; overflow-x: auto; background: var(--code-bg); border: 1px solid var(--rule); border-radius: 10px; font-size: 14px; line-height: 1.5; }
a { color: var(--event); }

footer { padding: 24px 16px 48px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--muted); text-align: center; }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split figure { max-width: 340px; margin: 0 auto; }
  .hero { padding-top: 40px; }
}
