/* Blog: index cards, post typography, audio slots, admin.
   Uses the site token system (home.css :root): --bg, --surface, --accent... */

:root {
  --bg: #0b0b0c;
  --surface: #121214;
  --surface-hover: #18181b;
  --border: #222226;
  --border-strong: #323238;
  --text: #f2f2f5;
  --text-secondary: #bcbcc6;
  --text-muted: #9a9aa4;
  --accent: #d46a58;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', monospace;
}

.hero-compact { padding: 56px 0 28px; }
.hero-compact h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; margin: 10px 0 16px; letter-spacing: -0.01em; }

/* Index */
.blog-list { display: grid; gap: 14px; margin-top: 24px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 26px; transition: border-color .15s ease; }
.post-card:hover { border-color: var(--border-strong); }
.post-card-meta { color: var(--text-muted); font-size: .8rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.post-card-title { margin: 8px 0 10px; font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.2; }
.post-card-title a { color: var(--text); text-decoration: none; }
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt { color: var(--text-secondary); line-height: 1.6; margin: 0; }
.post-tag { color: var(--accent); text-decoration: none; font-size: .85rem; }
.post-tag:hover { text-decoration: underline; }

/* Post */
.post { max-width: 720px; margin: 0 auto; padding: 32px 0 24px; }
.post-head { margin-bottom: 28px; }
.post-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.1; margin: 10px 0 16px; letter-spacing: -0.01em; }
.post-excerpt { color: var(--text-secondary); font-size: 1.08rem; line-height: 1.6; margin: 0 0 14px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.post-body { line-height: 1.75; color: var(--text); font-size: 1.02rem; }
.post-body h2 { font-family: var(--serif); font-weight: 600; font-size: 1.65rem; margin: 38px 0 12px; }
.post-body h3 { font-family: var(--serif); font-weight: 600; font-size: 1.28rem; margin: 26px 0 8px; }
.post-body p { margin: 0 0 18px; }
.post-body a { color: var(--accent); }
.post-body code { font-family: var(--mono); font-size: .88em; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }
.post-body pre { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 0 0 18px; }
.post-body pre code { background: none; border: none; padding: 0; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 22px; }
.post-body li { margin-bottom: 8px; }
.post-body blockquote { border-left: 3px solid var(--accent); margin: 0 0 18px; padding: 2px 0 2px 18px; color: var(--text-secondary); }

/* Audio slot */
.blog-audio {
  display: inline-flex; align-items: center; gap: 10px; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--accent); font-weight: 500; font-size: .95rem;
  padding: 14px 18px; cursor: pointer; margin: 4px 0 22px; font-family: inherit;
  transition: border-color .15s ease;
}
.blog-audio:hover, .blog-audio.is-playing { border-color: var(--accent); }
.blog-audio-bar { height: 3px; border-radius: 2px; background: var(--accent); width: 0%; flex: 1; }

/* Post CTA */
.post-cta { margin-top: 44px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px 28px; }
.post-cta h3 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin: 0 0 8px; }
.post-cta p { color: var(--text-secondary); margin: 0 0 16px; line-height: 1.6; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.admin-table th { color: var(--text-muted); font-weight: 500; }
.admin-link { color: var(--text); text-decoration: none; }
.admin-link:hover { color: var(--accent); }
.admin-actions { display: flex; gap: 12px; align-items: center; }
.admin-actions a { color: var(--accent); }
.admin-actions form { display: inline; margin: 0; }
.admin-actions button { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font-size: .92rem; font-family: inherit; }
.admin-actions button.danger { color: #c05545; }
.admin-form { display: grid; gap: 16px; max-width: 760px; margin-top: 24px; }
.admin-form label { display: grid; gap: 6px; color: var(--text-secondary); font-size: .9rem; }
.admin-form input, .admin-form textarea, .admin-form select {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font-family: inherit; font-size: .95rem;
}
.admin-form .mono { font-family: var(--mono); font-size: .85rem; line-height: 1.6; }
.admin-form .btn-primary, .admin-form .btn-secondary { justify-self: start; }