:root {
  --bg: #0b0b0a;
  --bg-raised: #111110;
  --fg: #e9e8e3;
  --muted: #6b6b66;
  --dim: #42423e;
  --border: #1e1e1b;
  --border-strong: #2a2a26;
  --accent: #d4a24a;
  --accent-dim: #6a4a16;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --display: var(--mono);
}
[data-accent="mustard"]{ --accent: #d4a24a; --accent-dim: #6a4a16; }
[data-accent="teal"]   { --accent: #5c9494; --accent-dim: #234848; }
[data-accent="coral"]  { --accent: #ff8a68; --accent-dim: #7a3b2b; }
[data-accent="lime"]   { --accent: #b4ff39; --accent-dim: #3f5a0e; }
[data-accent="cyan"]   { --accent: #5ce1e6; --accent-dim: #1b5458; }
[data-accent="orange"] { --accent: #ff6a1a; --accent-dim: #7a3310; }
[data-display="sans"]  { --display: var(--sans); }

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Geist:wght@400;500;700&display=swap');

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--fg); }
body {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #0b0b0a; }
a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--dim); transition: border-color .15s, color .15s; }
a:hover { border-bottom-color: var(--accent); color: var(--accent); }

.page { max-width: 880px; margin: 0 auto; padding: 0 32px; }

/* nav */
nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
nav .inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; font-size: 13px;
}
nav .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; border: none; }
nav .brand .brand-avatar {
  width: 22px; height: 22px; border-radius: 4px; object-fit: cover; display: block;
  box-shadow: 0 0 0 1px var(--border-strong);
}
nav .links { display: flex; gap: 22px; }
nav .links a { border: none; color: var(--muted); }
nav .links a:hover { color: var(--fg); }
nav .links a[aria-current] { color: var(--fg); }

/* post list (writing index) */
section.block { padding: 40px 0; }
.post-list { display: flex; flex-direction: column; }
.post-row {
  display: grid;
  grid-template-columns: 92px 1fr 90px;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}
.post-row:last-child { border-bottom: 1px solid var(--border); }
.post-row .date { color: var(--muted); font-size: 12px; }
.post-row .title { font-family: var(--display); font-size: 15px; border: none; }
.post-row .title:hover { color: var(--accent); }
.post-row .rt { color: var(--muted); font-size: 11px; text-align: right; }

/* article (individual post) */
.post { max-width: 680px; margin: 0 auto; padding: 56px 32px 72px; }
.post-header { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.post-meta {
  display: flex; gap: 10px; align-items: center;
  color: var(--muted); font-size: 12px; margin-bottom: 20px;
}
.post-meta a { color: var(--muted); border: none; }
.post-meta a:hover { color: var(--accent); }
.post-meta .sep { color: var(--dim); }
.post h1 {
  font-family: var(--display);
  font-size: 36px; line-height: 1.18; font-weight: 500;
  letter-spacing: -.015em; margin: 0 0 16px; text-wrap: pretty;
}
.post-lede { color: var(--muted); font-size: 15px; margin: 0; max-width: 60ch; }
.post-body { font-size: 14px; color: var(--fg); line-height: 1.75; }
.post-body > * + * { margin-top: 16px; }
.post-body h2 {
  font-family: var(--display); font-size: 20px; font-weight: 500;
  margin-top: 40px; letter-spacing: -.005em;
}
.post-body h2::before { content: "§ "; color: var(--accent); }
.post-body p, .post-body li { max-width: 68ch; }
.post-body code {
  background: var(--bg-raised); padding: 1px 6px;
  border: 1px solid var(--border); font-size: 13px;
}
.post-body pre {
  background: var(--bg-raised); border: 1px solid var(--border);
  padding: 14px 16px; overflow-x: auto; font-size: 12px; line-height: 1.6;
}
.post-body pre code { background: none; border: none; padding: 0; }
.post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 16px;
  color: var(--muted); font-style: italic;
  margin: 0;
}
.post-body ul { padding-left: 20px; }
.post-body a { border-bottom: 1px solid var(--accent-dim); }
.post-foot {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}

/* footer */
footer.foot { padding: 48px 0 64px; color: var(--muted); font-size: 12px; }
footer.foot .row { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 24px; }
footer.foot a { color: var(--muted); border: none; }
footer.foot a:hover { color: var(--accent); }
footer.foot .col { display: flex; flex-direction: column; gap: 6px; }
footer.foot .col .h { color: var(--fg); margin-bottom: 6px; }

@media (max-width: 760px) {
  footer.foot .row { grid-template-columns: 1fr 1fr; }
  .post-row { grid-template-columns: 80px 1fr; }
  .post-row .rt { grid-column: 2; text-align: left; }
  .post h1 { font-size: 28px; }
}
