
:root {
  --text: #1f2328;
  --muted: #656d76;
  --bg: #ffffff;
  --accent: #0b5cad;
  --line: #e4e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e6;
    --muted: #9aa3ad;
    --bg: #15181c;
    --accent: #6cb4ff;
    --line: #2b3036;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 42rem;
  padding: 0 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.site-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.brand { display: flex; align-items: center; gap: 0.75rem; }
.icon-link { display: inline-flex; color: var(--muted); }
.icon-link:hover { color: var(--accent); }
.icon-link svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.icon-link svg title { display: none; }

nav { display: flex; flex-wrap: wrap; gap: 1rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }

main { padding: 1.5rem 0 3rem; }

a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; }
img { max-width: 100%; height: auto; }
code { font-size: 0.9em; }

footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

:is(p, ul, ol, pre, blockquote) + :is(h2, h3) {
  margin-top: 2.25em;
}
h2, h3 { margin-bottom: 0.5em; }

/* Image enlarge-on-click */
main img { cursor: zoom-in; }
#lightbox { padding: 0; border: 0; outline: none; background: none; max-width: 95vw; max-height: 95vh; }
#lightbox::backdrop { background: rgb(0 0 0 / 0.8); }
#lightbox img { display: block; max-width: 95vw; max-height: 95vh; cursor: zoom-out; }