@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

html {
  --bg: #fff;
  --text: #111;
  --muted: #999;
  --faint: #ccc;
  --border: #eee;
  --border2: #ddd;
  --tag-bg: #f5f5f5;
  --tag-text: #aaa;
  --code-bg: #f7f7f7;
  --blockquote: #555;
  --footer-text: #bbb;
}

html.dark {
  --bg: #191919;
  --text: #d4d4d4;
  --muted: #777;
  --faint: #555;
  --border: #2c2c2c;
  --border2: #383838;
  --tag-bg: #242424;
  --tag-text: #888;
  --code-bg: #222;
  --blockquote: #999;
  --footer-text: #666;
}

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

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

nav { margin-bottom: 4rem; display: flex; align-items: baseline; justify-content: space-between; }
nav a { font-size: 0.9rem; text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--text); }
nav .home { font-size: 1rem; color: var(--text); font-weight: 500; font-family: 'IBM Plex Mono', monospace; }

.nav-right { display: flex; align-items: baseline; gap: 0; }
.lang-switch { font-family: monospace; font-size: 0.78rem; color: var(--faint); }
.lang-switch a { color: var(--muted); text-decoration: none; font-size: 0.78rem; }
.lang-switch a:hover { color: var(--text); }
.lang-switch strong { color: var(--text); font-weight: 600; font-size: 0.78rem; }

.nav-sep { font-family: monospace; font-size: 0.78rem; color: var(--faint); margin: 0 0.55rem 0 0.25rem; }

.theme-toggle {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: 0.78rem; color: var(--muted); line-height: 1;
  font-family: monospace;
}
.theme-toggle:hover { color: var(--text); }

h1 { font-size: 1.8rem; line-height: 1.25; margin: 0 0 0.5rem; font-weight: normal; }
h2 { font-size: 1.2rem; margin: 2.5rem 0 0.75rem; font-weight: bold; }
p  { margin: 0 0 1.25rem; }

/* ── Tag filter bar ── */
.tag-filter { margin-bottom: 2rem; font-size: 0.8rem; font-family: monospace; color: var(--muted); }
.tag-filter span { margin-right: 0.4rem; }
.tag-filter button {
  background: none; border: none; font-family: monospace; font-size: 0.8rem;
  color: var(--muted); cursor: pointer; padding: 0 0.1rem; margin-right: 0.6rem;
  text-decoration: underline; text-underline-offset: 2px;
}
.tag-filter button:hover { color: var(--text); }
.tag-filter button.active { color: var(--text); font-weight: bold; text-decoration: none; }

/* ── Post list ── */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: 1px solid var(--border); }
.post-list li.hidden { display: none; }
.post-list time { color: var(--muted); font-size: 0.78rem; font-family: monospace; }
.post-list a { text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
.post-list .post-tags { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.35rem; }

/* ── Tags ── */
.tag {
  font-family: monospace;
  font-size: 0.72rem;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}
.post-header .tag { font-size: 0.78rem; margin-right: 0.35rem; }

.post-header { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.post-meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; font-family: monospace; }

blockquote {
  border-left: 2px solid var(--border2);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--blockquote);
  font-style: italic;
}

pre {
  background: var(--code-bg);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  border-radius: 3px;
  margin: 1.5rem 0;
}
code { font-family: monospace; font-size: 0.9em; background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 2px; }
pre code { background: none; padding: 0; }

.back { font-size: 0.85rem; color: var(--muted); text-decoration: none; display: inline-block; margin-top: 3rem; }
.back:hover { color: var(--text); }

footer { margin-top: 5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--footer-text); }
