:root {
  --bg: #0f0f0f;
  --bg-card: #181818;
  --bg-code: #1c1c1c;
  --border: #272727;
  --text: #e2e2e2;
  --text-muted: #777;
  --text-dim: #555;
  --accent: #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.12);
  --accent-border: rgba(245, 158, 11, 0.3);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Monaco", "Cascadia Code", "Fira Code", "Consolas", monospace;
  --max-width: 660px;
  --radius: 8px;
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* -- Nav -- */

nav {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.theme-toggle:hover { color: var(--text); }

.nav-brand {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-brand span {
  color: var(--accent);
}

.nav-github {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.nav-github:hover { color: var(--text); }

.nav-github svg { opacity: 0.7; }

/* -- Hero -- */

.hero {
  text-align: center;
  padding: 60px 24px 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(38px, 7vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 16px;
  text-shadow:
    1px 1px 0 #b5b0a6,
    2px 2px 0 #9e998f,
    3px 3px 0 #878278,
    4px 4px 0 #706b62;
}

.byline {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.byline a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

.tagline {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

/* -- Install CTA -- */

.install-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s;
}

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

.install-cta code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  background: none;
  padding: 0;
}

.install-cta .prompt-sign {
  color: var(--accent);
  user-select: none;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
  margin-left: 8px;
}

.copy-btn:hover { color: var(--text); }
.copy-btn.copied { color: var(--accent); }

/* -- Sections -- */

section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
}

section h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

section p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

section p:last-child { margin-bottom: 0; }

/* -- Steps (ordered list) -- */

.steps {
  list-style: none;
  counter-reset: steps-counter;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps li {
  position: relative;
  padding-left: 38px;
  color: var(--text-muted);
  font-size: 15px;
  counter-increment: steps-counter;
}

.steps li::before {
  content: counter(steps-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -- List (unordered list) -- */

.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  position: relative;
  padding-left: 38px;
  color: var(--text-muted);
  font-size: 15px;
}

.list li::before {
  content: "~";
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -- Command callout -- */

.command-callout {
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.command-callout .cmd {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.command-callout p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* -- Code blocks -- */

.code-wrap {
  position: relative;
  margin-bottom: 12px;
}

.code-wrap:last-child { margin-bottom: 0; }

.code-wrap .code-block { margin-bottom: 0; }

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.code-copy-btn:hover { color: var(--text); }
.code-copy-btn.copied { color: var(--accent); }

.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
  margin-bottom: 12px;
  line-height: 1.7;
}

.code-block:last-child { margin-bottom: 0; }

.code-block .c-slash { color: var(--accent); }

.code-label {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
  margin-top: 24px;
  display: block;
}

.code-label:first-child { margin-top: 0; }

/* -- Footer -- */

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-note {
  font-size: 13px;
  color: var(--text-dim);
}

.footer-note a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-note a:hover {
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text); }

.footer-site-link { display: inline-flex; align-items: center; gap: 5px; }
.footer-site-link svg { vertical-align: middle; flex-shrink: 0; }

/* -- Terminal -- */

.terminal-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 16px;
}

.terminal {
  background: #141414;
  border: 1px solid #272727;
  border-radius: 10px;
  overflow: hidden;
}

.terminal-bar {
  background: #1e1e1e;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #272727;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.terminal-body {
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  color: #e2e2e2;
  min-height: 180px;
  transition: opacity 0.3s;
}

.t-line   { display: block; }
.t-spacer { display: block; height: 5px; }
.t-dim    { color: #555; }
.t-muted  { color: #777; }
.t-text   { color: #e2e2e2; }
.t-accent { color: #f59e0b; font-weight: 600; }
.t-label  { color: #777; }

.typing-cursor { animation: cursor-blink 0.7s step-end infinite; }

@keyframes cursor-blink { 50% { opacity: 0; } }

.sparkle-active { color: #f59e0b; }
.sparkle-done   { color: #f59e0b; opacity: 0.5; }

.terminal-replay {
  display: none;
  margin: 10px auto 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 5px 14px;
  cursor: pointer;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: color 0.15s, border-color 0.15s;
}

.terminal-replay:hover {
  color: var(--text);
  border-color: var(--accent-border);
}

/* -- Model table -- */

.model-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.model-table th {
  text-align: left;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
}

.model-table th:not(:first-child),
.model-table td:not(:first-child) {
  padding-left: 20px;
}

.model-table td {
  padding: 12px 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

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

.table-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
}

.table-note code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  padding: 1px 6px;
}

.model-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.effort-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  line-height: inherit;
}

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

.tag.accent {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-dim);
}

.best-for-text { transition: opacity 0.15s; }

/* -- Light Mode -- */

[data-theme="light"] {
  --bg: #ffffff;
  --bg-card: #f5f5f5;
  --bg-code: #f0f0f0;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --text-muted: #555;
  --text-dim: #999;
  --accent: #d97706;
  --accent-dim: rgba(217, 119, 6, 0.1);
  --accent-border: rgba(217, 119, 6, 0.3);
}

[data-theme="light"] .hero h1 {
  text-shadow:
    1px 1px 0 #c8c3b8,
    2px 2px 0 #b5b0a5,
    3px 3px 0 #a29d93,
    4px 4px 0 #908b82;
}

[data-theme="light"] ::selection        { color: var(--text); }

[data-theme="light"] .terminal          { background: #fafafa; border-color: #e0e0e0; }
[data-theme="light"] .terminal-bar      { background: #f0f0f0; border-bottom-color: #e0e0e0; }
[data-theme="light"] .terminal-body     { color: #1a1a1a; }
[data-theme="light"] .t-text            { color: #1a1a1a; }
[data-theme="light"] .t-dim             { color: #999; }
[data-theme="light"] .t-muted           { color: #777; }
[data-theme="light"] .t-accent          { color: #d97706; }
[data-theme="light"] .t-label           { color: #666; }
[data-theme="light"] .sparkle-active    { color: #d97706; }
[data-theme="light"] .sparkle-done      { color: #d97706; }

/* -- Responsive -- */

@media (max-width: 500px) {
  .hero h1 { font-size: 36px; }
  .install-cta { font-size: 11px; padding: 10px 14px; }
  .effort-tags { flex-wrap: wrap; }
  footer { flex-direction: column; gap: 12px; text-align: center; }
}
