:root {
  --bg: #ffffff;
  --fg: #2d2d2d;
  --muted: #6b6b6b;
  --accent: #2e6bd1;
  --border: #e5e5e5;
  --code-bg: #f5f5f5;
  --content-width: 720px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1e20;
    --fg: #dadada;
    --muted: #8b8b8b;
    --accent: #6fa8ff;
    --border: #2c2d30;
    --code-bg: #2a2b2e;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
.heading { scroll-margin-top: 1rem; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin-bottom: 2rem;
}
.site-header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.site-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1rem;
}
.site-nav a:hover { color: var(--accent); }
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.5rem 0;
  color: var(--muted);
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 0 0 0.3em; }
h2 { font-size: 1.4rem; margin-top: 2em; }
.post-header { margin-bottom: 1.5rem; }
.post-header time { color: var(--muted); font-size: 0.9rem; }
.post-list { list-style: none; padding: 0; }
.post-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.post-list time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  min-width: 7em;
}
.post-list a { text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
.prose img { max-width: 100%; height: auto; }
.prose .post-figure {
  margin: 1.5rem auto;
  text-align: center;
}
.prose .post-figure img {
  display: inline-block;
}
.prose .post-figure figcaption {
  margin-top: 0;
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  color: var(--fg);
  opacity: 1;
}
.prose pre {
  background: var(--code-bg);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.9em;
}
.prose code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.92em;
}
.prose pre code { background: none; padding: 0; }
.prose blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--muted);
  margin-left: 0;
}
.comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.heading {
  position: relative;
  cursor: pointer;
}
.heading-anchor {
  position: absolute;
  left: -1.4em;
  top: 50%;
  transform: translateY(-50%);
  width: 1.4em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.35;
  transition: opacity 80ms ease, color 80ms ease;
}
.heading:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}
.heading-anchor:hover {
  color: var(--accent);
  opacity: 1;
}
.heading-anchor.copied {
  opacity: 1;
  color: var(--accent);
}
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.75rem);
  background: var(--fg);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 1000;
}
.toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 720px) {
  .heading-anchor {
    position: static;
    transform: none;
    margin-left: 0.4em;
  }
}
