/* Dark post theme closely matching the reference layout */
:root {
  --bg: #0f1113;
  --fg: #e8eaed;
  --muted: #9aa0a6;
  --accent: #4dabf7;
  --border: #202327;
  --code-bg: #0b0c0e;
  --shadow: rgba(0,0,0,.2);
  --max-width: 760px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.shell { display: flex; justify-content: center; }
.container { width: 100%; max-width: var(--max-width); padding: 2.5rem 1.2rem; }

header.site { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
header.site .brand { font-weight: 700; letter-spacing: .3px; color: var(--fg); text-decoration: none; }
header.site nav a { color: var(--muted); text-decoration: none; margin-left: 1rem; font-size: .9rem; }
header.site a:hover { color: var(--accent); }

.meta { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .9rem; margin-bottom: 1.2rem; }
.meta .sep { opacity: .5; }
.meta .views { margin-left: auto; color: var(--muted); font-size: .9rem; }

main.article { line-height: 1.8; font-size: 1.05rem; }
main.article h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 .4rem; letter-spacing: .2px; }
main.article h2 { font-size: 1.35rem; margin: 2rem 0 .75rem; letter-spacing: .2px; }
main.article h3 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
main.article p { margin: 1rem 0; color: var(--fg); }
main.article ul, main.article ol { padding-left: 1.25rem; }
main.article li { margin: .4rem 0; }
main.article a { color: var(--fg); text-underline-offset: 2px; text-decoration-thickness: .06em; text-decoration-color: rgba(77,171,247,.45); }
main.article a:hover { color: var(--accent); }
main.article blockquote { border-left: 4px solid var(--border); margin: 1.2rem 0; padding: .6rem .9rem; color: var(--muted); background: rgba(255,255,255,0.02); border-radius: 6px; }
main.article hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
main.article img, main.article video { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 1rem 0; box-shadow: 0 1px 0 var(--border), 0 12px 24px var(--shadow); }
main.article table { width: 100%; border-collapse: collapse; font-size: .98rem; margin: 1.2rem 0; }
main.article th, main.article td { border: 1px solid var(--border); padding: .6rem .7rem; }
main.article th { text-align: left; color: var(--muted); font-weight: 500; }

pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
pre { background: var(--code-bg); padding: 1rem; border-radius: 10px; overflow: auto; border: 1px solid var(--border); box-shadow: 0 12px 24px var(--shadow); }
code { background: var(--code-bg); padding: .12rem .35rem; border-radius: 6px; border: 1px solid var(--border); }

.footer { margin-top: 3rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); padding-top: 1rem; }

@media (max-width: 560px) {
  .container { padding: 1.2rem 1rem; }
  main.article { font-size: 1.02rem; line-height: 1.75; }
  main.article h1 { font-size: 1.7rem; }
}
