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

:root {
  --bg: #ffffff;
  --bg-muted: #f4f4f5;
  --bg-muted-hover: #e4e4e7;
  --fg: #09090b;
  --fg-muted: #71717a;
  --border: #e4e4e7;
  --code-bg: #f4f4f5;
  --font: 'JetBrains Mono', monospace;
  --font-mono: 'JetBrains Mono', monospace;
}
.dark {
  --bg: #09090b;
  --bg-muted: #18181b;
  --bg-muted-hover: #27272a;
  --fg: #fafafa;
  --fg-muted: #71717a;
  --border: #27272a;
  --code-bg: #18181b;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */
#nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 56px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--fg);
  font-weight: 600; font-size: 0.9rem; letter-spacing: -0.01em;
}
.nav-icon {
  width: 28px; height: 28px;
  background: var(--fg); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  font-size: 0.8rem; text-decoration: none;
  color: var(--fg-muted); transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--fg); background: var(--bg-muted); }
.theme-toggle {
  display: flex; align-items: center; gap: 2px;
  border: 1px solid var(--border);
  padding: 3px; background: var(--bg);
}
.theme-btn {
  border: none; cursor: pointer; padding: 4px 6px;
  background: transparent;
  color: var(--fg-muted); font-size: 11px; line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.theme-btn.active { background: var(--fg); color: var(--bg); }

/* ── Layout ── */
.container { max-width: 960px; margin: 0 auto; padding: 0 2rem; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 0 160px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--border); background: var(--bg-muted);
  font-size: 0.75rem; color: var(--fg-muted);
  margin-bottom: 28px;
  opacity: 0;
}
.hero-badge span { width: 6px; height: 6px; background: var(--fg); display: inline-block; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.1; margin-bottom: 20px;
  opacity: 0;
}
.hero h1 em { font-style: normal; color: var(--fg-muted); }
.hero-sub {
  font-size: 1.05rem; color: var(--fg-muted);
  max-width: 520px; margin: 0 auto 40px;
  opacity: 0;
}
.hero-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 48px;
  opacity: 0;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  font-size: 0.85rem; font-weight: 500;
  text-decoration: none; border: none; cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-outline {
  background: transparent; color: var(--fg);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg-muted); opacity: 1; }
.install-block {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg-muted); border: 1px solid var(--border);
  padding: 12px 20px;
  font-family: var(--font-mono); font-size: 0.85rem;
  opacity: 0; cursor: pointer; position: relative;
}
.install-block .prompt { color: var(--fg-muted); user-select: none; }
.install-block .cmd { color: var(--fg); }
.copy-hint {
  font-family: var(--font); font-size: 0.75rem;
  color: var(--fg-muted); margin-left: 4px;
  transition: opacity 0.2s;
}

/* ── Section ── */
section { padding: 80px 0; }
section + section { border-top: 1px solid var(--border); }
.section-label {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-muted);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.2; margin-bottom: 16px;
}
.section-sub {
  color: var(--fg-muted); font-size: 0.95rem;
  max-width: 480px; margin-bottom: 48px;
}

/* ── Why ── */
#why { padding: 80px 0; border-bottom: 1px solid var(--border); }
.why-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0; border: 1px solid var(--border);
  margin-top: 48px;
}
.why-item {
  padding: 32px 28px; border-right: 1px solid var(--border);
}
.why-item:last-child { border-right: none; }
.why-item .why-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1px solid var(--border);
  margin-bottom: 18px; color: var(--fg);
}
.why-item h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.why-item p { font-size: 0.9rem; color: var(--fg-muted); line-height: 1.6; margin: 0; }
@media (max-width: 700px) {
  .why-item { border-right: none; border-bottom: 1px solid var(--border); }
  .why-item:last-child { border-bottom: none; }
}

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--border);
}
.feature-card {
  background: var(--bg);
  padding: 28px;
  opacity: 0; transform: translateY(20px);
}
.feature-icon {
  width: 36px; height: 36px;
  background: var(--bg-muted); color: var(--fg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 16px;
}
.feature-card h3 {
  font-size: 0.9rem; font-weight: 600;
  margin-bottom: 6px; letter-spacing: -0.01em;
}
.feature-card p { font-size: 0.83rem; color: var(--fg-muted); line-height: 1.55; }

/* ── Code block ── */
.code-section { background: var(--bg-muted); }
.code-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: start;
}
@media (max-width: 700px) { .code-wrap { grid-template-columns: 1fr; } }
.code-block {
  background: var(--bg); border: 1px solid var(--border);
  overflow: hidden;
  opacity: 0; transform: translateY(24px);
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 0.75rem; color: var(--fg-muted);
}
.code-dots { display: flex; gap: 6px; }
.code-dot { width: 10px; height: 10px; background: var(--border); }
pre {
  padding: 20px; font-family: var(--font-mono);
  font-size: 0.8rem; line-height: 1.7; overflow-x: auto;
  color: var(--fg);
}
.kw { color: var(--fg-muted); }
.fn { color: var(--fg); font-weight: 500; }
.str { color: var(--fg-muted); }
.cm { color: var(--fg-muted); opacity: 0.5; }

/* ── Steps ── */
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 16px; padding: 20px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0; transform: translateX(-16px);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 28px; height: 28px;
  background: var(--fg); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 600; flex-shrink: 0;
}
.step-body h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; }
.step-body p { font-size: 0.82rem; color: var(--fg-muted); }
.step-body code {
  font-family: var(--font-mono); font-size: 0.78rem;
  background: var(--bg-muted); padding: 1px 6px;
  border: 1px solid var(--border);
}

/* ── Roadmap ── */
.roadmap-group-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--bg);
  background: var(--fg);
  display: inline-block; padding: 3px 10px;
  margin-bottom: -1px;
}
.roadmap-group-label--considering {
  background: var(--bg-muted); color: var(--fg-muted);
  border: 1px solid var(--border);
  margin-top: 32px;
}
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--border);
}
.roadmap-grid--considering {
  background: var(--border);
  opacity: 0.8;
}
.roadmap-grid { counter-reset: roadmap-counter; }
.roadmap-item {
  background: var(--bg);
  padding: 28px;
  opacity: 0; transform: translateY(20px);
  counter-increment: roadmap-counter;
}
.roadmap-grid--considering { counter-reset: roadmap-counter; }
.roadmap-grid--considering .roadmap-item {
  background: var(--bg-muted);
}
.roadmap-item h3 {
  font-size: 0.9rem; font-weight: 600;
  margin-bottom: 6px; letter-spacing: -0.01em;
}
.roadmap-grid:not(.roadmap-grid--considering) .roadmap-item h3::before {
  content: counter(roadmap-counter) ". ";
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.roadmap-item p { font-size: 0.83rem; color: var(--fg-muted); line-height: 1.55; }

/* ── Author ── */
#author { padding: 80px 0; border-top: 1px solid var(--border); }
.author-card {
  display: flex; align-items: flex-start; gap: 24px;
  border: 1px solid var(--border); padding: 32px;
  background: var(--bg-muted);
}
@media (max-width: 600px) { .author-card { flex-direction: column; } }
.author-avatar {
  width: 64px; height: 64px; flex-shrink: 0;
  object-fit: cover;
}
.author-name {
  font-size: 0.95rem; font-weight: 600;
  margin-bottom: 6px; letter-spacing: -0.01em;
}
.author-alias { color: var(--fg-muted); font-weight: 400; }
.author-bio { font-size: 0.83rem; color: var(--fg-muted); margin-bottom: 14px; line-height: 1.55; }
.author-links { display: flex; flex-wrap: wrap; gap: 16px; }
.author-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--fg-muted);
  text-decoration: none; transition: color 0.15s;
}
.author-link:hover { color: var(--fg); }

/* ── Section nav ── */
.section-nav {
  position: fixed; right: 24px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end;
  z-index: 40;
}
.section-nav a {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--fg-muted);
  font-size: 0.72rem; letter-spacing: 0.04em;
  transition: color 0.15s;
  justify-content: flex-end;
  position: relative;
  padding: 7px 0;
}
/* vertical line through the dots */
.section-nav a::before {
  content: '';
  position: absolute; right: 2.5px; top: 0; bottom: 0;
  width: 1px; background: var(--border);
  z-index: -1;
}
.section-nav a:first-child::before { top: 50%; }
.section-nav a:last-child::before  { bottom: 50%; }
.section-nav a::after {
  content: '';
  display: block; width: 6px; height: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: background 0.15s, width 0.2s, border-color 0.15s;
  flex-shrink: 0;
}
.section-nav a:hover::after { border-color: var(--fg-muted); }
.section-nav a.active { color: var(--fg); }
.section-nav a.active::after { background: var(--fg); border-color: var(--fg); width: 10px; }
.section-nav .nav-label {
  opacity: 0; transition: opacity 0.15s;
  white-space: nowrap;
}
.section-nav a:hover .nav-label,
.section-nav a.active .nav-label { opacity: 1; }
@media (max-width: 1100px) { .section-nav { display: none; } }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-left { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--fg-muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 0.82rem; color: var(--fg-muted);
  text-decoration: none; transition: color 0.15s;
}
.footer-links a:hover { color: var(--fg); }

/* ── Util ── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
@media (max-width: 600px) {
  .hero { min-height: 100svh; padding: 60px 0 40px; }
  nav { padding: 0 1rem; }
  .container { padding: 0 1.25rem; }
}

/* ── Admin preview ── */

.admin-preview {
  display: flex;
  border: 1px solid var(--border);
  margin-top: 40px;
  height: 400px;
  overflow: hidden;
}

/* Sidebar */
.admin-sidebar {
  width: 172px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--bg-muted);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.admin-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.admin-sidebar-section {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.admin-sidebar-section:last-child { border-bottom: none; }
.admin-sidebar-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 0 12px 5px;
}
.admin-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: var(--fg-muted);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.admin-sidebar-item:hover { background: var(--bg-muted-hover); color: var(--fg); }
.admin-sidebar-item.active { background: var(--bg); color: var(--fg); font-weight: 500; }

/* Main content area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.admin-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-entity-title {
  font-size: 0.85rem;
  font-weight: 600;
}
.admin-create-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--fg);
  color: var(--bg);
  border: none;
  padding: 5px 10px;
  cursor: pointer;
}
.admin-toolbar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-toolbar input,
.admin-toolbar select {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  padding: 5px 8px;
}
.admin-toolbar input { flex: 1; min-width: 0; }
.admin-table-wrap {
  flex: 1;
  overflow-y: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.admin-table th {
  text-align: left;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-muted);
  font-weight: 500;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}
.admin-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--bg-muted); }
.admin-actions {
  display: flex;
  gap: 4px;
}
.admin-actions button {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  cursor: pointer;
  color: var(--fg-muted);
  padding: 2px 5px;
  border: 1px solid transparent;
}
.admin-actions button:hover { color: var(--fg); border-color: var(--border); }
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--fg-muted);
  flex-shrink: 0;
}
@media (max-width: 600px) { .admin-sidebar { display: none; } }

.admin-edit-row td { background: var(--bg-muted); }
.admin-inline-input {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  padding: 3px 6px;
  width: 100%;
  outline: none;
  min-width: 60px;
}
.admin-inline-input:focus { border-color: var(--fg); }
