:root,
[data-theme="dark"] {
  --bg: #0d1117;
  --bg-alt: #161b22;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #e06c38;
  --accent-hover: #f08452;
  --code-bg: #21262d;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --surface: #ffffff;
  --border: #d0d7de;
  --text: #1f2328;
  --muted: #59636e;
  --accent: #b7410e;
  --accent-hover: #993409;
  --code-bg: #eff1f3;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #ffffff;
    --bg-alt: #f6f8fa;
    --surface: #ffffff;
    --border: #d0d7de;
    --text: #1f2328;
    --muted: #59636e;
    --accent: #b7410e;
    --accent-hover: #993409;
    --code-bg: #eff1f3;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

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

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

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

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: inline; }
}

.hero {
  padding: 64px 0 56px;
  text-align: center;
}

.hero-logo {
  border-radius: 18px;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.subtitle {
  max-width: 720px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 5px;
}

.install-box {
  display: inline-block;
  margin-bottom: 24px;
  padding: 10px 20px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.install-box code {
  background: transparent;
  padding: 0;
  font-size: 1rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover { border-color: var(--muted); }

.section {
  padding: 52px 0;
  border-top: 1px solid var(--border);
}

.section-alt { background: var(--bg-alt); }

.section h2 {
  margin: 0 0 24px;
  font-size: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card, .link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.card h3, .link-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.card p, .link-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.link-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.link-card:hover { border-color: var(--accent); }
.link-card:hover h3 { color: var(--accent); }

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

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

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