/* blog.css - styles for the blog pages only (blog/index.html and blog/<post>.html).
   Builds on site.css (same colors, fonts and .page-head); loaded only by pages that
   tools/blog/Publish-Blog.ps1 writes, so the rest of the site is untouched. */

.blog .page-head h1 { max-width: none; }   /* title uses the full width of the post column */

/* ---- page layout: posts on the left, side column on the right (drops below on narrow screens) ---- */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; max-width: 1180px; }
@media (max-width: 960px) { .blog-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---- list of posts: picture on the left, text on the right ---- */
.blog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.blog-item { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start;
             background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.blog-thumb { display: block; aspect-ratio: 16 / 10; border-radius: calc(var(--radius) - 3px); overflow: hidden; background: var(--accent-soft); }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.blog-item:hover .blog-thumb img { transform: scale(1.03); }
.blog-thumb-blank { display: flex; align-items: flex-end; width: 100%; height: 100%; padding: 12px 14px; box-sizing: border-box;
                    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-ink) 100%); }
.blog-thumb-blank span { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; opacity: .9; }
.blog-text h2 { font-family: var(--font-display); font-size: 21px; line-height: 1.25; margin: 2px 0 4px; }
.blog-text h2 a { color: var(--ink); text-decoration: none; }
.blog-text h2 a:hover { color: var(--accent); text-decoration: underline; }
.blog-text .blog-meta { margin: 0 0 8px; font-size: 13px; }
.blog-summary { margin: 0 0 10px; color: var(--muted); max-width: 70ch; }
.blog-text .go { font-weight: 600; color: var(--accent); text-decoration: none; font-size: 14px; }
.blog-text .go:hover { text-decoration: underline; }

/* ---- side column ---- */
.blog-side { display: grid; gap: 16px; }
.blog-side-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.blog-side-box h2 { font-family: var(--font-display); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
                    margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-soft); }
.blog-side-box ul { list-style: none; margin: 0; padding: 0; }
.blog-recent li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.blog-recent li:last-child { border-bottom: 0; padding-bottom: 0; }
.blog-recent a { display: block; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.blog-recent a:hover, .blog-recent a[aria-current="page"] { color: var(--accent); }
.blog-recent time { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.blog-links li { margin: 6px 0; }
.blog-links a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.blog-links a::before { content: "\203A"; margin-right: 6px; }
.blog-links a:hover { text-decoration: underline; }

/* ---- a single post ---- */
.blog-post { min-width: 0; }
.blog-hero { margin: 0 0 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--accent-soft); }
.blog-hero img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.blog-meta { font-size: 14px; color: var(--muted); }
.blog-back { margin: 0 0 14px; font-size: 14px; }
.blog-back a { color: var(--accent); text-decoration: none; font-weight: 600; }
.blog-back a:hover { text-decoration: underline; }
.blog-body { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
             padding: 22px 28px; margin-bottom: 18px; font-size: 16.5px; line-height: 1.65; color: var(--ink); }
.blog-body h2 { font-family: var(--font-display); font-size: 21px; margin: 26px 0 8px; line-height: 1.25; }
.blog-body h3 { font-family: var(--font-display); font-size: 17px; margin: 20px 0 6px; }
.blog-body > :first-child { margin-top: 0; }
.blog-body p { margin: 0 0 14px; }
.blog-body ul, .blog-body ol { margin: 0 0 14px 1.3em; padding: 0; }
.blog-body li { margin: 4px 0; }
.blog-body a { color: var(--accent); }
.blog-body code { font-size: .92em; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
.blog-body blockquote { margin: 18px 0; padding: 14px 18px; background: var(--accent-soft); border-left: 4px solid var(--accent);
                        border-radius: 0 var(--radius) var(--radius) 0; }
.blog-body blockquote p { margin: 0; font-size: 17px; font-style: italic; }
.blog-body blockquote cite { display: block; margin-top: 8px; font-style: normal; font-size: 14px; color: var(--muted); font-weight: 600; }
.blog-body figure { margin: 18px 0; }
.blog-body figure img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.blog-body figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.blog-draft { display: inline-block; background: #fff4c2; color: #6b5200; border: 1px solid #e0b400; border-radius: 6px;
              font-size: 12px; font-weight: 700; padding: 2px 8px; letter-spacing: .04em; }

@media (max-width: 640px) {
  .blog-body { padding: 16px 16px; font-size: 16px; }
  .blog-item { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px; }
}
@media print {
  .blog-body, .blog-item { box-shadow: none; border: 0; padding: 0; background: none; }
  .blog-back, .blog-side { display: none; }
  .blog-layout { display: block; }
}
