@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/plex-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/plex-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/plex-sans-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/plex-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fdfdfb;
  --fg: #161616;
  --soft: #3b3b38;
  --mute: #6e6e6a;
  --link: oklch(0.5 0.17 260);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141413;
  --fg: #e8e8e3;
  --soft: #c4c4be;
  --mute: #8d8d87;
  --link: oklch(0.78 0.11 260);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--fg); }

main {
  max-width: 688px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.site-header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.site-header .name { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.site-header .name a { color: inherit; text-decoration: none; }
.theme-toggle {
  font: inherit; font-size: 14px; cursor: pointer; background: none; border: 0; padding: 0;
  color: var(--mute); text-decoration: underline; text-underline-offset: 2px;
}

/* Sections: rendered Markdown and lists share the same rhythm */
section { display: flex; flex-direction: column; gap: 8px; }
section > p, section > h2, section > h3 { margin: 0; }
h2 { font-size: 20px; font-weight: 600; }
ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
ul ul { margin-top: 4px; display: block; color: var(--soft); }
.about ul { gap: 4px; }
.soft { color: var(--soft); }
.mute { color: var(--mute); }

.writing { gap: 12px; }
.year { display: flex; flex-direction: column; gap: 4px; }
.year h3 { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: var(--mute); }

.books ul { gap: 8px; }
.books .note { color: var(--soft); font-size: 16px; }

/* Article pages (posts, book reviews) */
article { display: flex; flex-direction: column; gap: 16px; }
article header h2 { margin: 0; font-size: 24px; letter-spacing: -0.01em; }
article header p { margin: 4px 0 0; color: var(--mute); font-size: 15px; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 1em; }
.prose ol { padding-left: 22px; }
.prose blockquote { padding-left: 16px; border-left: 2px solid var(--mute); color: var(--soft); }
.prose img { max-width: 100%; height: auto; }
.prose code { font-size: 0.9em; }
.prose pre { overflow-x: auto; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--mute) 35%, transparent); border-radius: 6px; }
.back { font-size: 15px; }
