/* 世界模型项目页 — 相对路径静态样式，可直接打开或部署到 Pages／Netlify／Vercel */

:root {
  --bg: #f7f6f2;
  --bg-alt: #efece6;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #5c5954;
  --border: #d8d4cb;
  --accent: #2f5d50;
  --accent-soft: #e4efe9;
  --placeholder: #8a4b2a;
  --placeholder-bg: #f6ebe3;
  --shadow: 0 1px 2px rgba(28, 27, 25, 0.06), 0 8px 24px rgba(28, 27, 25, 0.06);
  --radius: 12px;
  --max: 960px;
  --header-h: 64px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #23463c;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

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

.placeholder {
  display: inline;
  color: var(--placeholder);
  background: var(--placeholder-bg);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-weight: 600;
  font-size: 0.95em;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(247, 246, 242, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(47, 93, 80, 0.08), transparent 55%),
    var(--bg);
}

.hero-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.hero-tagline {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  max-width: 40rem;
}

.hero-role {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag-list li {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #c5d9cf;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

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

.section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}

.section-lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 40rem;
}

.prose p {
  margin: 0 0 1rem;
  max-width: 42rem;
}

.prose .note {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1rem;
}

.card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

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

/* Pipeline */
.pipeline {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.pipeline li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.pipeline h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

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

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.flow-placeholder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.flow-placeholder > span:not(.arrow) {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.flow-placeholder .arrow {
  color: var(--muted);
  font-weight: 600;
}

.flow-caption {
  flex-basis: 100%;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Media / table */
.media-placeholder {
  margin: 0;
}

.media-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  background: repeating-linear-gradient(
    -45deg,
    var(--bg-alt),
    var(--bg-alt) 10px,
    #e7e3db 10px,
    #e7e3db 20px
  );
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 500;
}

.media-placeholder figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.table-wrap {
  margin: 1.5rem 0;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 0.85rem 1rem 0.35rem;
  font-weight: 600;
}

th,
td {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg-alt);
  font-weight: 600;
}

/* Repro / align */
.repro-list,
.align-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.repro-list li,
.align-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
}

.repro-list strong,
.align-list strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
  background: #1c1b19;
  color: #e8e4dc;
}

.site-footer a {
  color: #9dceb8;
}

.footer-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
}

.footer-inner .muted {
  color: #a8a39a;
}

.footer-note {
  margin: 0;
  font-size: 0.9rem;
  color: #a8a39a;
  max-width: 36rem;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive */
@media (max-width: 800px) {
  .card-grid.two,
  .card-grid.three {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.15rem;
  }

  .site-nav a {
    display: block;
    padding: 0.55rem 0.25rem;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }
}
