:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-tint: #f6f7f5;
  --text: #1d1f1e;
  --text-muted: #5b615e;
  --border: #e3e6e2;
  --accent: #1f7a4d;
  --btn: #222423;
  --btn-text: #ffffff;
  --code-bg: #f1f3f0;
  --radius: 12px;

  /* skill colors, matched to the paper's Figure 1 labels */
  --move-bg: #dbe6f4;   --move-fg: #3e6597;
  --trap-bg: #efdcef;   --trap-fg: #95599a;
  --dribble-bg: #dcf0d8; --dribble-fg: #3f8a3a;
  --kick-bg: #f8dadd;   --kick-fg: #c23d4b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 880px; }
.container.wide { max-width: 1200px; }

/* ---------------- hero ---------------- */
.hero { padding: 64px 0 32px; text-align: center; }

.venue {
  display: inline-block;
  margin: 0 0 18px;
  padding: 3px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.title {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.title .brand { color: var(--accent); }

.subtitle {
  margin: 12px auto 0;
  max-width: 720px;
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--text-muted);
  text-wrap: balance;
}

.authors {
  margin: 28px auto 6px;
  max-width: 760px;
  font-size: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
}
.authors sup, .affiliations sup { font-size: 0.68em; margin-left: 1px; color: var(--text-muted); }

.affiliations {
  margin: 0 auto;
  max-width: 820px;
  font-size: 15px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
}

.links { margin: 26px 0 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-text);
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }
.btn small { font-size: 11px; opacity: 0.75; margin-left: -2px; }
.btn.is-soon { opacity: 0.45; pointer-events: none; }

.teaser { margin: 0; }
.teaser + .teaser { margin-top: 32px; }
.teaser .media { border-radius: var(--radius); }
.teaser figcaption {
  max-width: 880px;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 16px;
}

/* ---------------- sections ---------------- */
.section { padding: 64px 0; scroll-margin-top: 24px; }
.section.tinted { background: var(--bg-tint); }

h2 {
  margin: 0 0 14px;
  text-align: center;
  font-size: clamp(26px, 3.2vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }

.subsection-title { margin: 0 0 20px; text-align: center; font-size: 22px; }
.real-skills { margin-bottom: 40px; scroll-margin-top: 24px; }
.demo-section { margin: 44px 0; scroll-margin-top: 24px; }
.combined-skill-grid { align-items: start; }
#trap-kick { scroll-margin-top: 24px; }
.project-nav, .demo-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.project-nav { margin: -12px 0 32px; }
.demo-nav { margin: -8px 0 32px; }
.project-nav a, .demo-nav a { padding: 6px 14px; background: #fff; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; }
.project-nav a { font-weight: 500; }
.project-nav a:hover, .demo-nav a:hover { border-color: var(--accent); }
.project-nav a:focus-visible, .demo-nav a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.clip-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demo-clip figcaption p { margin: 8px 0 6px; }
.video-link { display: inline-block; font-size: 13px; font-weight: 500; }
.video-note { display: block; margin: 6px 0 2px; font-size: 13px; }
.btn-play { background: var(--accent); }
.demo-intro { margin: 20px 0 0; scroll-margin-top: 24px; }
.play-invitation { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 14px 20px 14px 14px; border: 1px solid #d9e4d9; border-radius: var(--radius); background: #f5f8f2; text-align: left; }
.play-preview { height: 80px; overflow: hidden; border-radius: 7px; background: #3c8055; }
.play-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.play-copy { min-width: 0; }
.play-copy h2 { margin: 0 0 4px; text-align: left; font-size: 20px; line-height: 1.3; }
.play-copy p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.play-invitation > .btn { white-space: nowrap; }
@media (max-width: 600px) {
  .play-invitation { grid-template-columns: 72px minmax(0, 1fr); gap: 10px 14px; padding: 14px; }
  .play-preview { grid-row: 1 / 3; height: 72px; }
  .play-copy h2 { font-size: 18px; }
  .play-copy p { font-size: 13px; }
  .play-invitation > .btn { grid-column: 2; justify-self: start; padding: 6px 14px; font-size: 13px; }
}

.lede {
  max-width: 820px;
  margin: 0 auto 32px;
  text-align: center;
  color: var(--text-muted);
}

.abstract { margin: 0; text-align: justify; hyphens: auto; }

/* ---------------- media ---------------- */
.media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
  border-radius: 10px;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.clip { margin: 0; position: relative; }
.clip.featured { margin-bottom: 24px; }
.clip > .tag { position: absolute; top: 10px; left: 10px; z-index: 1; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); }
.clip figcaption { margin-top: 10px; font-size: 15px; color: var(--text-muted); }

.figure { margin: 40px 0 0; }
.figure img { display: block; width: 100%; height: auto; border-radius: 10px; }
.figure.framed { margin-top: 0; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.figure figcaption { margin: 12px auto 0; max-width: 880px; text-align: center; font-size: 15px; color: var(--text-muted); }

/* ---------------- skill tags ---------------- */
.tag {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.tag.move { background: var(--move-bg); color: var(--move-fg); }
.tag.trap { background: var(--trap-bg); color: var(--trap-fg); }
.tag.dribble { background: var(--dribble-bg); color: var(--dribble-fg); }
.tag.kick { background: var(--kick-bg); color: var(--kick-fg); }

.seq { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--text-muted); }

/* ---------------- simulation showcase tabs ---------------- */
.showcase-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 20px;
}
.showcase-tabs [role="tab"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.showcase-tabs [role="tab"]:hover { border-color: var(--text-muted); }
.showcase-tabs [role="tab"][aria-selected="true"] { background: var(--btn); border-color: var(--btn); color: var(--btn-text); }
.showcase-tabs [role="tab"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.move { background: var(--move-fg); }
.dot.trap { background: var(--trap-fg); }
.dot.dribble { background: var(--dribble-fg); }
.dot.kick { background: var(--kick-fg); }
.dot.combo { background: conic-gradient(var(--trap-fg) 0 33%, var(--dribble-fg) 0 66%, var(--kick-fg) 0); }
.showcase figcaption { max-width: 820px; margin: 12px auto 0; text-align: center; }

/* ---------------- method stages ---------------- */
.stages {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.stages li {
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stages p { margin: 0; font-size: 15px; color: var(--text-muted); }
.stage-n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* ---------------- bibtex ---------------- */
.bibtex { position: relative; }
.bibtex pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.6;
}
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.copy:hover { border-color: var(--text-muted); }

/* ---------------- footer ---------------- */
.footer { padding: 32px 0 48px; text-align: center; font-size: 14px; color: var(--text-muted); }
.footer p { margin: 0; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stages { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .hero { padding-top: 40px; }
  .section { padding: 44px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .abstract { text-align: left; }
  .figure.framed { padding: 8px; }
}

.fineprint { display: block; margin-top: 4px; font-size: 13px; color: var(--text-muted); opacity: 0.85; }

/* Each skill keeps its own player and clip selection. */
.gallery-hint { text-align: center; color: var(--text-muted); font-size: 14px; margin: -8px 0 24px; }
.skill-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; min-width: 0; }
.skill-card .clip-heading { margin-bottom: 12px; }
.skill-card h4.tag { margin: 0; font-size: 15px; padding: 3px 12px; }
.skill-card .media { object-fit: contain; }
.skill-card .clip-description { min-height: 4.95em; }
.skill-card.featured { max-width: 960px; margin: 0 auto; }
.skill-card.featured .clip-description { min-height: 0; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 14px 0 10px; }
.carousel-arrow { width: 40px; height: 40px; border: 1px solid var(--border); background: #fff; border-radius: 50%; color: var(--text); font: inherit; font-size: 27px; line-height: 1; cursor: pointer; }
.carousel-arrow:hover { color: var(--accent); border-color: var(--accent); background: var(--bg-tint); }
.carousel-count { font-size: 14px; font-variant-numeric: tabular-nums; min-width: 42px; text-align: center; }
.carousel-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.clip-choice { display: block; min-width: 0; padding: 4px; border: 2px solid transparent; background: var(--bg-tint); border-radius: 8px; color: var(--text-muted); font: inherit; cursor: pointer; text-align: left; }
.clip-choice img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 4px; }
.clip-choice span { display: block; padding: 5px 3px 1px; font-size: 12px; line-height: 1.4; }
.clip-choice[aria-pressed="true"] { border-color: var(--accent); background: #eef5ef; color: var(--accent); }
.clip-choice:hover { background: #e9eee8; }
.clip-choice:focus-visible, .carousel-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skill-card.featured .carousel-thumbs { max-width: 540px; margin: 0 auto; }
.sim-clip h3 { margin-bottom: 12px; text-align: center; }
#long-horizon .sim-clip, #writing .sim-clip { max-width: 960px; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 640px) {
  .skill-card { padding: 12px; }
  .skill-card .clip-description { min-height: 0; }
  .carousel-thumbs { gap: 6px; }
  .clip-choice span { font-size: 11px; }
}
