:root {
  --bg: #ffffff;
  --fg: #1b1b1b;
  --muted: #666;
  --link: #0b5fbd;
  --rule: #e3e3e3;
  --code-bg: #f6f6f6;
  /* Terminal look, all from the OS — no webfont. */
  --font: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Mono", "DejaVu Sans Mono", monospace;
  --font-sans: var(--font);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --fg: #dfe2e6;
    --muted: #9aa1a9;
    --link: #78b2ff;
    --rule: #2c3036;
    --code-bg: #1d2024;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15.5px/1.65 var(--font);
  -webkit-text-size-adjust: 100%;
}

 /* Grows with the window, floored so short lines stay readable, capped so long
    ones don't: ~70 chars at the floor, ~120 at the cap in this monospace. */
.wrap { max-width: clamp(44rem, 86vw, 72rem); margin: 0 auto; padding: 0 20px; }

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

.site-header { border-bottom: 1px solid var(--rule); padding: 18px 0; margin-bottom: 36px; }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.site-title { font-size: 22px; font-weight: 700; color: var(--fg); }
.site-header nav a { margin-left: 16px; font-size: 15px; }
.site-title, .site-header nav a, .post-date, .site-footer { font-family: var(--font-sans); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-sans); font-weight: 700; line-height: 1.25; margin: 1.6em 0 0.5em; }
h1 { font-size: 26px; margin-top: 0; }
h2 { font-size: 21px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

.post-date { color: var(--muted); font-size: 15px; }

article img { max-width: 100%; height: auto; display: block; margin: 1.2em auto; border-radius: 4px; }

blockquote {
  margin: 1.2em 0;
  padding: 0.1em 1em;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 12px 14px;
  overflow-x: auto;
}
pre code { background: none; padding: 0; font-size: 0.85em; }

table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 0.95em; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--rule); padding: 7px 10px; text-align: left; }
th { background: var(--code-bg); }

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

.post-list { list-style: none; padding: 0; }
.post-list li { margin-bottom: 22px; }
.post-list .post-date { display: block; }
.post-list h3 { margin: 2px 0 4px; font-size: 17px; }
.post-list p { margin: 0; color: var(--muted); font-size: 15px; }

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 56px;
  padding: 22px 0 40px;
  color: var(--muted);
  font-size: 15px;
}
.site-footer a { color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 16px; }

/* highlight.js — minimal theme on top of the variables above */
.hljs-comment, .hljs-quote { color: #7d8799; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type { color: #b5559c; }
.hljs-string, .hljs-meta .hljs-string { color: #3f8b3f; }
.hljs-number, .hljs-symbol { color: #c06030; }
.hljs-title, .hljs-title.function_, .hljs-section { color: #3c6fd0; }
.hljs-meta, .hljs-built_in { color: #8a6d3b; }
.hljs-attr, .hljs-variable, .hljs-template-variable { color: #b35a00; }
@media (prefers-color-scheme: dark) {
  .hljs-comment, .hljs-quote { color: #7f8c99; }
  .hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type { color: #e18ccd; }
  .hljs-string, .hljs-meta .hljs-string { color: #8cd98c; }
  .hljs-number, .hljs-symbol { color: #e6a06a; }
  .hljs-title, .hljs-title.function_, .hljs-section { color: #82aaff; }
  .hljs-meta, .hljs-built_in { color: #d4b483; }
  .hljs-attr, .hljs-variable, .hljs-template-variable { color: #e6a06a; }
}
