:root {
  --bg: #ffffff;
  --fg: #18181b;
  --muted: #52525b;
  --border: #e4e4e7;
  --accent: #0f62fe;
  --code-bg: #f4f4f5;
  --sidebar-bg: #fafafa;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.68;
  font-size: 16px;
}
header {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  position: sticky;
  top: 0;
}
header .brand { font-weight: 700; font-size: 1.05rem; text-decoration: none; color: var(--fg); letter-spacing: -0.01em; }
header nav a { margin-left: 1.5rem; color: var(--muted); text-decoration: none; font-size: 0.92rem; }
header nav a:hover { color: var(--accent); }
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 1180px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
}
aside {
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  background: var(--sidebar-bg);
}
aside h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
aside ul { list-style: none; padding: 0; margin: 0 0 1.75rem 0; }
aside li { margin-bottom: 0.45rem; }
aside a { color: var(--fg); text-decoration: none; font-size: 0.92rem; display: block; padding: 0.2rem 0; }
aside a:hover { color: var(--accent); }
main { padding: 2.5rem 3.5rem; max-width: 820px; }
h1 { font-size: 2rem; letter-spacing: -0.02em; margin-top: 0; line-height: 1.25; }
h2 { font-size: 1.35rem; margin-top: 2.2rem; border-bottom: 1px solid var(--border); padding-bottom: 0.35rem; }
h3 { font-size: 1.1rem; margin-top: 1.6rem; }
p, li { color: #27272a; }
pre {
  background: var(--code-bg);
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.55;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--code-bg);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88em;
}
pre code { background: none; padding: 0; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 0.4rem 0; font-size: 1rem; color: var(--accent); }
.card p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  aside { border-right: none; border-bottom: 1px solid var(--border); }
  main { padding: 1.5rem; }
}
