/* ssserve GitHub Pages theme */

:root {
  --bg: #ffffff;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e2e8f0;
  --code-bg: #f1f5f9;
  --code-text: #1e293b;
  --table-alt: #f8fafc;
  --max-width: 880px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #60a5fa;
    --accent-hover: #93bbfc;
    --border: #1e293b;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --table-alt: #1a2332;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 2rem 1.5rem 4rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

h1, h2, h3, h4 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  font-weight: 600;
}

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

h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

a {
  color: var(--accent);
  text-decoration: none;
}

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

p {
  margin: 0 0 1rem;
}

code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.5;
  font-size: 0.875rem;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--accent);
  background: var(--code-bg);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

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

th {
  font-weight: 600;
  background: var(--table-alt);
}

tr:nth-child(even) td {
  background: var(--table-alt);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

ul, ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0 1rem;
}

li {
  margin-bottom: 0.25rem;
}
