/* ==========================================================================
   blog.css — modern, personal blog
   Dark theme, consistent with the site's Midnight & Aurora palette (site.css).
   Uses the CSS variables defined in site.css :root.
   ========================================================================== */

/* ---- list header ---- */
.blog-head{ padding-bottom: 6px; }
.blog-head .h1{ margin-top: 6px; }
.blog-head .lead{ margin-top: 10px; }

/* ---- post list ---- */
.post-list{
  margin-top: 28px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.post-item{
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: padding-left .18s ease;
}
.post-item:hover{ padding-left: 8px; }
.post-item-static{ cursor: default; }
.post-item-static:hover{ padding-left: 0; }
.draft-actions{ display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.post-item-meta{ color: var(--muted-fg); }
.post-item-title{
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.16;
  margin: 8px 0;
  transition: color .15s ease;
}
.post-item:hover .post-item-title{ color: var(--primary); }
.post-item-summary{ margin: 0; max-width: 62ch; }
.post-item-more{
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--primary);
}

/* ---- single post ---- */
.post{ padding-top: 4px; }
.post .backlink{ margin: 0 0 26px; }
.draft-flag{
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--accent);
  border: 1px solid rgb(var(--accent-rgb) / .35);
  background: rgb(var(--accent-rgb) / .08);
}
.post-header{ margin-bottom: 30px; }
.post-header .post-title{
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.08;
  margin: 10px 0 16px;
}
.post-summary{
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: rgba(230, 236, 245, .72);
  margin: 0 0 20px;
  max-width: 60ch;
}
.byline{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-fg);
  font-size: 14px;
}
.byline .avatar{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .04em;
  color: hsl(218 60% 10%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.byline .dot{ opacity: .5; }

/* featured image */
.post-figure{ margin: 0 0 34px; }
.post-figure img{
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
}

/* post footer */
.post-footer{
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---- prose (rendered markdown), dark ---- */
.prose{ color: rgba(230, 236, 245, .86); line-height: 1.8; font-size: 18px; }
.prose > *:first-child{ margin-top: 0; }
.prose p{ margin: 0 0 20px; }
.prose h1, .prose h2, .prose h3, .prose h4{
  font-family: var(--font-display);
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--fg);
  margin: 40px 0 14px;
}
.prose h1{ font-size: 30px; }
.prose h2{ font-size: 25px; }
.prose h3{ font-size: 20px; }
.prose a{
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover{ color: var(--secondary); }
.prose strong{ color: var(--fg); }
.prose ul, .prose ol{ margin: 0 0 20px 24px; }
.prose li{ margin: 8px 0; }
.prose blockquote{
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--secondary);
  color: rgba(230, 236, 245, .78);
  font-style: italic;
}
.prose code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 6px;
  padding: 2px 6px;
}
.prose pre{
  background: rgb(2 6 18 / .6);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 16px 18px;
  overflow: auto;
  margin: 0 0 22px;
}
.prose pre code{ background: none; border: 0; padding: 0; font-size: .92em; color: rgba(230,236,245,.92); }
.prose img{ max-width: 100%; border-radius: 12px; margin: 26px auto; border: 1px solid rgba(255,255,255,.08); }
.prose hr{ border: 0; height: 1px; background: rgba(255,255,255,.10); margin: 34px 0; }
.prose table{ width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 16px; }
.prose th, .prose td{ padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.10); text-align: left; }
.prose th{
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-fg);
}

/* ---- editor (write / edit) ---- */
.blog-editor-head{ margin-bottom: 24px; }
.blog-editor .field{ margin-bottom: 18px; }
.blog-editor select{
  width: auto;
  min-width: 200px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,.22);
  color: var(--fg);
  border: 1px solid rgba(255,255,255,.10);
}
.blog-editor select:focus{
  outline: none;
  border-color: rgb(var(--primary-rgb) / .55);
  box-shadow: 0 0 0 3px rgb(var(--primary-rgb) / .15);
}
.btn-sm{ padding: 8px 12px; font-size: 14px; }
.md-toolbar{ display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; }
.md-upload-status{ font-size: 13px; }

/* markdownx editor layout */
.markdownx{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px){ .markdownx{ grid-template-columns: 1fr; } }
.markdownx textarea{
  width: 100%;
  min-height: 360px;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
}
.markdownx-preview{
  min-height: 360px;
  max-height: 540px;
  overflow: auto;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.14);
  color: rgba(230, 236, 245, .86);
  line-height: 1.7;
}
.markdownx-preview img{ max-width: 100%; border-radius: 10px; }
