:root {
  --ink: #172033;
  --muted: #596579;
  --line: #dfe4eb;
  --soft: #f6f8fb;
  --accent: #245aa6;
  --accent-dark: #17437e;
  --paper: #ffffff;
  --page: 1080px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, figure { margin-top: 0; }
h1, h2 { line-height: 1.15; letter-spacing: -.025em; }
code { font-family: var(--mono); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / .96);
  backdrop-filter: blur(10px);
}
.site-nav {
  display: flex;
  width: min(100% - 40px, var(--page));
  min-height: 64px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-decoration: none;
}
.wordmark-signal { display: none; }
.nav-links {
  display: flex;
  gap: 25px;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-links a:hover { color: var(--ink); }
.nav-toggle { display: none; }

.construction-notice {
  width: min(100% - 40px, var(--page));
  margin: 22px auto 0;
}
.construction-rig,
.construction-mark { display: none; }
.construction-placard {
  padding: 10px 14px;
  border: 1px solid #ecd9a5;
  border-radius: 6px;
  background: #fffaf0;
}
.construction-notice p {
  margin: 0;
  color: #6c5b2f;
  font-size: .82rem;
  line-height: 1.45;
}
.construction-notice strong {
  margin-right: .35em;
  color: #51411c;
}

.hero,
.thesis,
.method,
.rollout,
.paper {
  width: min(100% - 40px, var(--page));
  margin: 0 auto;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 42px 64px;
  padding: 72px 0 68px;
  align-items: start;
}
.hero-title-block,
.hero-meta { min-width: 0; }
h1 {
  margin: 0;
  font-size: clamp(3.3rem, 7vw, 5.8rem);
  font-weight: 800;
  letter-spacing: -.065em;
  line-height: .95;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-deck {
  max-width: 700px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  line-height: 1.3;
}
.hero-intro {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 1.02rem;
}
.authors {
  margin-bottom: 24px;
  font-weight: 600;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.text-link {
  display: inline-flex;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  align-items: center;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
}
.text-link-primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}
.text-link:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.text-link-primary:hover {
  color: #fff;
  background: var(--accent-dark);
}
.repository-action { display: contents; }
.repository-status {
  padding: 8px 13px;
  color: var(--muted);
  font-size: .86rem;
}
.demo-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: .78rem;
}
.teaser-stage {
  grid-column: 1 / -1;
  margin: 6px auto 0;
}

.manuscript-figure { margin-bottom: 0; }
.figure-stage {
  padding: 8px;
  background: #fff;
}
.figure-stage img {
  width: 100%;
  margin: 0 auto;
}
figcaption {
  padding: 8px 10px 0;
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
}

.thesis,
.method,
.rollout,
.paper {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.chapter-label {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.thesis-display {
  display: grid;
  grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
  gap: 48px;
  align-items: start;
}
.thesis-display h2,
.method-header h2,
.rollout-heading h2,
.paper h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}
.thesis-display > p {
  margin-bottom: 0;
  font-size: 1.15rem;
}
.thesis-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  margin-top: 38px;
  color: var(--muted);
}
.thesis-detail p { margin-bottom: 0; }

.method-header {
  max-width: 780px;
  margin-bottom: 36px;
}
.method-header > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.method-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 48px;
  padding: 0;
  list-style: none;
}
.method-steps li {
  padding-top: 16px;
  border-top: 2px solid var(--line);
}
.step-number {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: .75rem;
}
.method-steps strong { font-size: 1.05rem; }
.method-steps p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.rollout {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: 20px 60px;
}
.rollout-heading h2 { margin-bottom: 0; }
.rollout-copy { color: var(--muted); }
.rollout-copy p:last-child { margin-bottom: 0; }
.rollout-stage {
  grid-column: 1 / -1;
  margin-top: 30px;
}

.paper {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 24px 60px;
}
.paper > .chapter-label { grid-column: 1 / -1; }
.paper-main h2 cite { font-style: normal; }
.paper-authors {
  margin-bottom: 0;
  color: var(--muted);
}
.paper-links {
  display: grid;
  gap: 10px;
}
.paper-links a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font-size: .77rem;
  text-decoration: none;
}
.paper-links a:hover { border-color: var(--accent); }
.paper-links strong {
  grid-column: 1;
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.paper-links a > span:last-child {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  width: min(100% - 40px, var(--page));
  gap: 28px;
  margin: 0 auto;
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .76rem;
}
.footer-mark {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
}
.site-footer p { margin-bottom: 0; }
.back-to-top { white-space: nowrap; }

@media (max-width: 760px) {
  .site-nav { width: min(100% - 30px, var(--page)); }
  .nav-toggle {
    display: inline-flex;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-size: .82rem;
  }
  .nav-links {
    position: absolute;
    top: 64px;
    right: 15px;
    left: 15px;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 10px 30px rgb(23 32 51 / .1);
  }
  .nav-links.is-open { display: grid; }
  .nav-links a { padding: 8px; }

  .construction-notice,
  .hero,
  .thesis,
  .method,
  .rollout,
  .paper,
  .site-footer {
    width: min(100% - 30px, var(--page));
  }
  .hero {
    display: block;
    padding: 50px 0 54px;
  }
  h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
  .hero-deck { margin-top: 14px; font-size: 1.2rem; }
  .hero-meta { margin-top: 32px; }
  .teaser-stage { margin-top: 40px; }
  .figure-stage { padding: 0; }

  .thesis,
  .method,
  .rollout,
  .paper { padding: 52px 0; }
  .thesis-display,
  .thesis-detail,
  .method-steps,
  .rollout,
  .paper {
    grid-template-columns: 1fr;
  }
  .thesis-display,
  .thesis-detail,
  .method-steps,
  .paper { gap: 26px; }
  .thesis-display h2,
  .method-header h2,
  .rollout-heading h2,
  .paper h2 { font-size: 2rem; }
  .thesis-detail { margin-top: 30px; }
  .method-steps { margin-bottom: 38px; }
  .rollout { gap: 24px; }
  .rollout-stage { grid-column: 1; margin-top: 12px; }
  .paper > .chapter-label { grid-column: 1; }
  .site-footer {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .back-to-top { margin-top: 8px; }
}
