/* sukr docs — clean documentation theme */

:root {
  --bg: #0d1117;
  --bg-sidebar: #161b22;
  --fg: #c9d1d9;
  --fg-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --border: #30363d;
  --code-bg: #1f2428;
  --success: #3fb950;
}

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

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar header {
  margin-bottom: 2rem;
}

.sidebar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: block;
}

.sidebar .tagline {
  display: block;
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-top: 0.25rem;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar nav a {
  color: var(--fg);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.sidebar nav a:hover {
  background: var(--border);
}

.sidebar nav a.active {
  background: var(--accent);
  color: var(--bg);
}

/* Main content */
main {
  padding: 3rem 4rem;
  max-width: 900px;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--fg);
}

h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

p {
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

a {
  color: var(--accent);
}

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

/* Code */
code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
}

/* Syntax highlighting (tree-sitter classes) */
.hl-keyword {
  color: #ff79c6;
}

.hl-string {
  color: #f1fa8c;
}

.hl-function {
  color: #50fa7b;
}

.hl-comment {
  color: #6272a4;
  font-style: italic;
}

.hl-number {
  color: #bd93f9;
}

.hl-operator {
  color: #ff79c6;
}

.hl-punctuation {
  color: var(--fg-muted);
}

.hl-punctuation-bracket {
  color: var(--fg-muted);
}

.hl-variable {
  color: var(--fg);
}

.hl-type {
  color: #8be9fd;
}

.hl-constant {
  color: #bd93f9;
}

.hl-attribute {
  color: #50fa7b;
}

.hl-property {
  color: #66d9ef;
}

.hl-tag {
  color: #ff79c6;
}

/* Section navigation */
.section-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.section-link {
  display: block;
  padding: 1rem;
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s;
}

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

.section-link strong {
  display: block;
  color: var(--fg);
  margin-bottom: 0.25rem;
}

.section-link span {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* Lists */
ul,
ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th,
td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid var(--border);
}

th {
  background: var(--bg-sidebar);
}

/* Responsive */
@media (max-width: 768px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  main {
    padding: 2rem 1.5rem;
  }
}