:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f5;
  --color-text: #212121;
  --color-text-muted: #6b6b6b;
  --color-border: #e2e2e2;
  --color-btn-bg: #212121;
  --color-btn-bg-hover: #050505;
  --color-btn-text: #ffffff;
  --radius: 10px;
  --container-width: 1200px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0a0a0a;
    --color-bg-alt: #151515;
    --color-text: #f2f2f2;
    --color-text-muted: #9c9c9c;
    --color-border: #2a2a2a;
    --color-btn-bg: #f2f2f2;
    --color-btn-bg-hover: #d6d6d6;
    --color-btn-text: #111111;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(10, 10, 10, 0.85); }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; }
.logo-img { height: 32px; width: auto; }
@media (prefers-color-scheme: dark) {
  .logo-img { filter: invert(1) brightness(2); }
}
.primary-nav { display: flex; align-items: center; gap: 1.75rem; }
.primary-nav a { color: var(--color-text-muted); font-weight: 500; font-size: 0.95rem; }
.primary-nav a:hover { color: var(--color-text); }

.site-footer { border-top: 1px solid var(--color-border); padding: 2rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--color-text-muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a:hover { color: var(--color-text); }

.post-list { padding: 3rem 0 5rem; }
.post-list h1 { font-size: 2rem; margin-bottom: 2.5rem; }
.post-list-item { padding: 1.5rem 0; border-bottom: 1px solid var(--color-border); }
.post-list-item:last-child { border-bottom: none; }
.post-list-item h2 { font-size: 1.25rem; margin: 0 0 0.35rem; font-weight: 600; }
.post-list-item h2 a:hover { color: var(--color-text-muted); }
.post-list-item time { color: var(--color-text-muted); font-size: 0.85rem; }
.post-list-item p { color: var(--color-text-muted); margin-top: 0.5rem; }

.post-page { padding: 3rem 0 5rem; }
.post-content { max-width: 680px; margin: 0 auto; }
.post-back { display: inline-block; margin-bottom: 2rem; color: var(--color-text-muted); font-size: 0.9rem; }
.post-back:hover { color: var(--color-text); }
.post-content > header { margin-bottom: 2.5rem; }
.post-content > header h1 { font-size: 2.25rem; line-height: 1.2; margin-bottom: 0.75rem; }
.post-content > header time { color: var(--color-text-muted); font-size: 0.9rem; }

.post-body h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.post-body h3 { font-size: 1.25rem; margin: 2rem 0 0.85rem; }
.post-body h4 { font-size: 1.05rem; margin: 1.75rem 0 0.75rem; }
.post-body p { margin: 0 0 1.25rem; }
.post-body ul, .post-body ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.post-body a { color: var(--color-text); text-decoration: underline; text-underline-offset: 2px; }
.post-body blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 3px solid var(--color-border); color: var(--color-text-muted); }
.post-body pre { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; margin: 0 0 1.25rem; }
.post-body code { font-family: var(--font-mono); font-size: 0.9em; }
.post-body p code { background: var(--color-bg-alt); padding: 0.15em 0.4em; border-radius: 4px; }
.post-body figure { margin: 1.75rem 0; }
.post-body figcaption { color: var(--color-text-muted); font-size: 0.85rem; margin-top: 0.5rem; text-align: center; }
.post-body img { border-radius: var(--radius); }
.post-body iframe { max-width: 100%; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }
