:root {
  --bg: #fbfaf7;
  --ink: #16151a;
  --muted: #6b6873;
  --line: #e7e4dd;
  --card: #ffffff;
  --accent: #3b5bfd;
  --accent-ink: #ffffff;
  --radius: 16px;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e11;
    --ink: #f2f0ea;
    --muted: #9a97a3;
    --line: #26252c;
    --card: #16161b;
    --accent: #7d93ff;
    --accent-ink: #0e0e11;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-family: var(--serif); font-size: 26px; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 15px; color: var(--muted); }
.nav a:hover, .nav a.active { color: var(--ink); background: var(--line); }
.nav a.nav-ext { color: var(--accent); font-weight: 500; }

/* hero */
.hero { padding: 96px 0 48px; max-width: 860px; }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 7vw, 84px); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 24px;
}
.hero-text { font-size: 19px; color: var(--muted); max-width: 640px; }
.hero-text p { margin: 0 0 12px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; font-weight: 500; font-size: 15px; background: var(--card); cursor: pointer;
  font-family: inherit; color: var(--ink); transition: transform .15s, border-color .15s;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { transform: translateY(-1px); }

/* sections */
.section { padding: 32px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: 36px; margin: 0; }
.section-head a { color: var(--muted); text-decoration: none; }
.section-head a:hover { color: var(--ink); }

.feature-links { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.feature-link {
  display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card); text-decoration: none; transition: transform .2s, border-color .2s;
}
.feature-link:hover { transform: translateY(-2px); border-color: var(--ink); }
.feature-link strong { font-size: 20px; }
.feature-link.lead { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.feature-link.lead strong { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.05; }
.fl-host { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; opacity: .65; }
.fl-desc { opacity: .75; font-size: 15px; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.grid-item[hidden] { display: none; }
.card {
  display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  overflow: hidden; text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); box-shadow: 0 12px 30px -18px rgba(0,0,0,.35); }
.card-body { padding: 18px 20px 22px; }
.card h3 { margin: 8px 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumb.gen {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 20% 20%, hsl(var(--h1) 85% 70% / .9), transparent 55%),
    radial-gradient(circle at 80% 80%, hsl(var(--h2) 80% 55% / .9), transparent 60%),
    hsl(var(--h1) 40% 18%);
}
.thumb.gen span { font-family: var(--serif); font-size: 64px; color: rgba(255,255,255,.92); letter-spacing: -0.02em; }
.thumb.big { border-radius: var(--radius); margin: 32px 0; aspect-ratio: 4 / 1; }
.thumb.big.gen span { font-size: 96px; }
.thumb.big:has(img) { aspect-ratio: 16 / 7; }

.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.status { padding: 2px 9px; border-radius: 999px; background: var(--line); color: var(--ink); font-weight: 500; }
.status.s-live { background: #dcfce7; color: #166534; }
.status.s-beta { background: #e0e7ff; color: #3730a3; }
.status.s-in-progress { background: #fef3c7; color: #92400e; }
.dl-badge { padding: 2px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 500; font-size: 13px; white-space: nowrap; }

/* pages */
.page-head { padding: 72px 0 32px; }
.page-head h1, .project-head h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6vw, 72px); line-height: 1.05; margin: 0 0 12px; letter-spacing: -0.02em;
}
.lede { font-size: 19px; color: var(--muted); max-width: 680px; margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.project { padding-top: 40px; }
.back { color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--ink); }
.project-head { margin-top: 24px; }
.project-head .meta { margin-bottom: 12px; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 20px; position: sticky; top: 88px; }
.panel h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; color: var(--muted); font-weight: 600; }
.dl { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.dl:first-of-type { border-top: 0; padding-top: 0; }
.dl-info { display: flex; flex-direction: column; }
.dl-info .muted { font-size: 13px; }
.dl .btn { justify-content: center; }
.cmd { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 12px; }
.cmd code { font: 13px var(--mono); flex: 1; overflow-x: auto; white-space: nowrap; }
.copy { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: 4px 10px; font: 500 13px var(--sans); cursor: pointer; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.tag { font: 12px var(--mono); padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }

.prose { font-size: 17px; line-height: 1.75; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 40px 0 8px; line-height: 1.15; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; margin: 28px 0 6px; }
.prose a { color: var(--accent); }
.prose code { font: .88em var(--mono); background: var(--line); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: var(--card); border: 1px solid var(--line); padding: 16px; border-radius: 12px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose ul { padding-left: 22px; }
.prose img { border-radius: 12px; }
.about { max-width: 720px; padding: 72px 0 32px; }
.about h2:first-child { font-size: clamp(44px, 6vw, 64px); }

.link-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.link-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.link-row:hover { border-color: var(--ink); transform: translateX(3px); }
.link-row div { display: flex; flex-direction: column; }
.link-row .muted { font-size: 14px; }

.site-footer { padding: 64px 24px 48px; margin-top: 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.footer-links a { text-decoration: none; color: var(--ink); }
.footer-links a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .feature-links { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; gap: 24px; }
  .panel { position: static; }
  .hero { padding-top: 56px; }
  .thumb.big { aspect-ratio: 16 / 9; }
  .thumb.big.gen span { font-size: 72px; }
}
@media (max-width: 560px) {
  .brand { font-size: 21px; }
  .nav a { padding: 6px 8px; font-size: 14px; }
}
