:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --line: #e7e7e3;
  --accent: #b8860b;
  --accent-fg: #8a6508;
  --maxw: 720px;
  --header-h: 60px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-fg); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: #111; color: #fff; padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
  display: flex; align-items: center;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 17px; color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand-mark { display: block; }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--muted); font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--fg); }

.site-main { padding: 40px 20px 64px; min-height: 60vh; }

/* Feed */
.feed-header { margin-bottom: 32px; }
.feed-title { font-size: 30px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
.feed-description { color: var(--muted); margin: 0; font-size: 17px; }

.post-card {
  display: grid; grid-template-columns: 1fr; gap: 0;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.post-card-media { display: block; margin-bottom: 14px; border-radius: 8px; overflow: hidden; }
.post-card-media img { display: block; width: 100%; height: 180px; object-fit: cover; }
.post-card-title { font-size: 21px; line-height: 1.3; margin: 0 0 6px; letter-spacing: -0.01em; }
.post-card-title a { color: var(--fg); }
.post-card-title a:hover { color: var(--accent-fg); }
.post-card-excerpt { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.post-card-meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }

/* Single post */
.post-header { margin-bottom: 28px; }
.post-title { font-size: 34px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.post-tag {
  font-size: 12px; border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 10px; color: var(--muted);
}
.post-tag:hover { border-color: var(--accent); color: var(--accent-fg); text-decoration: none; }
.post-feature-image { width: 100%; border-radius: 10px; margin: 20px 0 0; }

.gh-content { font-size: 17px; }
.gh-content h2 { font-size: 24px; margin: 36px 0 12px; letter-spacing: -0.01em; }
.gh-content h3 { font-size: 19px; margin: 28px 0 10px; }
.gh-content p, .gh-content ul, .gh-content ol, .gh-content blockquote { margin: 0 0 18px; }
.gh-content img { max-width: 100%; height: auto; border-radius: 8px; }
.gh-content pre {
  background: #0f1115; color: #e6e6e6; padding: 16px; border-radius: 8px;
  overflow-x: auto; font-size: 14px; line-height: 1.5;
}
.gh-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
.gh-content :not(pre) > code { background: #f3f3f0; padding: 2px 5px; border-radius: 4px; }
.gh-content blockquote {
  border-left: 3px solid var(--accent); margin-left: 0; padding: 4px 0 4px 18px; color: var(--muted);
}
.gh-content a { text-decoration: underline; text-underline-offset: 2px; }

.post-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.author-box { display: flex; gap: 14px; align-items: flex-start; }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.author-avatar-large { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.author-name { font-weight: 700; margin: 0; }
.author-bio { color: var(--muted); margin: 2px 0 0; font-size: 14px; }

/* Pagination */
.pagination { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; font-size: 14px; }
.pagination a { font-weight: 600; }
.page-number { color: var(--muted); }

/* Error */
.error-page { text-align: center; padding: 80px 0; }
.error-code { font-size: 64px; margin: 0 0 8px; color: var(--accent); }
.error-message { color: var(--muted); margin: 0 0 20px; }
.error-home { font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 13px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }

@media (max-width: 600px) {
  .post-title { font-size: 27px; }
  .feed-title { font-size: 25px; }
  .site-nav { gap: 14px; }
}
