/* WM-LOCO project page — light minimal theme (very light blue).
   Same class contract as the dark theme; only colour, depth, and
   ornament differ: flat background, hairline borders, no glows,
   no gradient fills, smaller radii. */

:root {
  --bg: #f5f9fd;
  --bg-elev: #ffffff;
  --bg-soft: #edf3fa;
  --ink: #16202c;
  --muted: #5d6d80;
  --line: #dce6f1;
  --line-strong: #c6d5e6;
  --accent: #2f6dbd;
  --accent-soft: #e8f0fa;
  --accent-2: #7386a0;
  --ppo: #c9705d;
  --ours: #2f6dbd;
  --good: #237a52;
  --shadow: 0 1px 2px rgba(22, 45, 78, 0.05);
  --radius: 10px;
  --font-sans: "Instrument Sans", "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --max: 1120px;
  --narrow: 760px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

.container.narrow {
  width: min(var(--narrow), calc(100% - 2.5rem));
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(245, 249, 253, 0.85);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.nav {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-icon {
  width: 40px;
  height: 25px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  transform: translateY(3px);
  opacity: 0.85;
}

.org-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
}

.org-logo {
  display: block;
  height: 34px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1.1rem;
  margin-left: 1.5rem;
  flex: 1;
}

.nav-links a,
.nav-cta {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-cta:hover,
.nav-links a.is-active {
  color: var(--accent);
}

.nav-cta {
  border: 1px solid var(--line);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--ink);
  place-items: center;
  gap: 6px;
  flex-direction: column;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  padding: 4rem 0 3rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-glow {
  display: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2.25rem;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-visual {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(12, 26, 44, 0.55));
  pointer-events: none;
}

.hero-visual img,
.hero-visual video {
  width: 100%;
  height: min(52vh, 420px);
  object-fit: cover;
  object-position: center 60%;
  display: block;
}

.hero-visual figcaption {
  position: absolute;
  left: 1rem;
  bottom: 0.9rem;
  z-index: 1;
  margin: 0;
  color: #ffffff;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 20ch;
}

.brand-mark {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6.4vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
  color: var(--accent);
}

.hero-title {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  max-width: 24ch;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0.4rem;
  color: var(--ink);
}

.authors sup {
  color: var(--muted);
}

.authors a:hover {
  color: var(--accent);
}

.affiliations,
.author-note {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.author-note {
  margin-bottom: 1.4rem;
}

.author-note a {
  color: var(--accent);
}

.tldr {
  margin: 0 0 1.6rem;
  max-width: 62ch;
  padding: 0.95rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
}

.tldr strong {
  color: var(--accent);
  margin-right: 0.35rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn[aria-disabled="true"] {
  color: var(--muted);
  background: var(--bg-soft);
  border-color: var(--line);
  cursor: default;
}

.btn[aria-disabled="true"]:hover {
  border-color: var(--line);
  color: var(--muted);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  font-weight: 600;
}

.btn-primary:hover {
  background: #275ea6;
  border-color: #275ea6;
  color: #ffffff;
}

/* --------------------------------------------------------------- sections */

.section {
  padding: 4rem 0;
}

.section.alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 60ch;
}

.section-head h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 2.8vw, 2.15rem);
  letter-spacing: -0.02em;
}

.section-head p,
.lead {
  margin: 0;
  color: var(--muted);
}

.lead {
  font-size: 1.05rem;
}

.prose p {
  margin: 0 0 1rem;
  color: #24313f;
  font-size: 1.02rem;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.keywords li {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 0.88rem;
}

/* ------------------------------------------------------------- live demo */

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.demo-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.demo-clip {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0d1520;
}

.demo-card figcaption {
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--line);
}

.demo-card figcaption h3 {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.demo-card figcaption p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.sim2real-block {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.sim2real-block .section-head {
  margin-bottom: 1.25rem;
}

.sim2real-block .section-head h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  letter-spacing: -0.02em;
}

.sim2real-block .section-head p {
  max-width: 62ch;
  color: #24313f;
  font-size: 1.02rem;
}

.sim2real-block .media-caption {
  margin-top: 1.25rem;
}

.media-caption {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ----------------------------------------------------------------- method */

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.method-item,
.chart-card,
.hw-item,
.framework-card,
.cite-box,
.gait-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.method-item,
.hw-item,
.gait-block {
  padding: 1.3rem 1.35rem;
}

.method-index {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.method-item h3,
.chart-card h3,
.hw-item h3,
.gait-block h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.method-item p,
.hw-item p,
.gait-block p {
  margin: 0;
  color: var(--muted);
}

.framework-card {
  padding: 1.15rem;
}

.framework-figure {
  margin: 0;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
}

.framework-figure img {
  width: 100%;
  height: auto;
}

/* Legacy schematic (unused after the real Figure 3 was embedded). */
.framework-visual {
  min-height: 110px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--bg-soft);
  margin-bottom: 0.75rem;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
}

.flow-node {
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  font-size: 0.9rem;
}

.flow-node.accent {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.flow-arrow {
  color: var(--muted);
}

/* ---------------------------------------------------------------- results */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.stat {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.88rem;
}

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

.chart-card {
  padding: 1.05rem 1.1rem 1.2rem;
}

.chart-kicker {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.bar-chart {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.bar-group {
  display: grid;
  gap: 0.35rem;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

.bars {
  display: grid;
  gap: 0.28rem;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar.ppo > span {
  background: var(--ppo);
}

.bar.ours > span {
  background: var(--ours);
}

.chart-legend {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.35rem;
}

.swatch.ppo {
  background: var(--ppo);
}

.swatch.ours {
  background: var(--ours);
  margin-left: 0.75rem;
}

.table-wrap {
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.results-table th,
.results-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}

.results-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--bg-soft);
}

.results-table td.best,
.results-table th.best-col {
  color: var(--accent);
  font-weight: 700;
}

/* ------------------------------------------------------------------ gait */

.gait-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.gait-metric {
  padding: 0.9rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  text-align: center;
}

.gait-delta {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.gait-delta.up {
  color: var(--good);
}

.gait-delta.down {
  color: var(--accent);
}

.gait-delta.flat {
  color: var(--muted);
}

.gait-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (max-width: 920px) {
  .gait-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gait-metrics {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------- hardware */

.hardware-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

/* -------------------------------------------------------------- citation */

.cite-box {
  position: relative;
  padding: 1.15rem 1.15rem 0.4rem;
  background: var(--bg-elev);
}

.copy-btn {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.2;
  cursor: pointer;
}

.copy-btn:hover,
.copy-btn.is-copied {
  border-color: var(--accent);
  color: var(--accent);
}

pre {
  margin: 0;
  overflow-x: auto;
  color: #24313f;
  font-size: 0.88rem;
  line-height: 1.55;
}

.correspondence {
  margin-top: 1.6rem;
}

.correspondence h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
}

.correspondence p {
  margin: 0;
  color: var(--muted);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  background: var(--bg-elev);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner a:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------- animation */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .bar > span {
    transition: none;
  }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 920px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: grid;
    margin-left: 0.5rem;
  }

  .org-logo {
    height: 29px;
  }

  .nav.is-open .nav-links {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open .nav-links a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-inner,
  .method-grid,
  .chart-grid,
  .hardware-grid,
  .demo-grid,
  .stat-strip {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .hero-visual img,
  .hero-visual video {
    height: min(38vh, 280px);
  }

  .hero h1 {
    max-width: none;
  }

  .hero-title {
    max-width: 30ch;
  }
}

@media (max-width: 640px) {
  .container,
  .nav,
  .container.narrow {
    width: calc(100% - 1.5rem);
  }

  .hero {
    padding-top: 2.5rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}
