/* Font stack inspired by SSI: clean sans with technical mono accents */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #444444;
  --link: #1a5fff; /* blue in light */
  --border: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --fg: #f2f2f2;
    --muted: #c2c2c2;
    --link: #22c55e; /* green in dark */
    --border: #1f2937;
  }
}

/* Theme override when user toggles */
html[data-theme="light"] {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #444444;
  --link: #1a5fff;
  --border: #e5e7eb;
}
html[data-theme="dark"] {
  --bg: #0b0b0b;
  --fg: #f2f2f2;
  --muted: #c2c2c2;
  --link: #22c55e;
  --border: #1f2937;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

.brand {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 28px;
  margin: 0;
}

.theme-toggle {
  margin-left: auto;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  width: 40px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 24px 0 12px 0;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
  color: var(--muted);
  font-weight: 500;
}

p {
  margin: 12px 0;
  font-size: 16px;
}

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

ul {
  padding-left: 18px;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* Narrow screens */
@media (max-width: 640px) {
  .container {
    padding: 24px 16px;
  }
  .brand {
    font-size: 24px;
  }
}
