/* ============================================================================
   Make My Web — BLOG
   Loaded on /blog and /blog/<slug> in addition to styles.css. Inner-page
   pattern (plain <body>, shared header/footer, no deck/canvas). Reading column
   constrained to --textw; long-form typography for articles.
   ============================================================================ */

.blog-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(40px, 6vw, 80px)) clamp(20px, 5vw, 56px) clamp(72px, 10vh, 120px);
}
.blog-main .page-intro { margin-bottom: clamp(32px, 5vw, 56px); padding: 0; }

/* -- shared post meta line (date · reading time · author) -- */
.post-meta {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.post-meta .dot { opacity: 0.5; }

/* -- index: list of posts -- */
.blog-list { display: flex; flex-direction: column; gap: clamp(14px, 2vw, 20px); max-width: var(--textw); margin: 0 auto; }
.post-card {
  display: block;
  padding: clamp(20px, 3vw, 30px) clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--ink-1);
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), background 0.22s var(--ease);
}
.post-card:hover { border-color: var(--accent-line); transform: translateY(-2px); background: var(--ink-2); }
.post-card-title {
  margin: 12px 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  text-wrap: balance;
}
.post-card:hover .post-card-title { color: var(--accent-hi); }
.post-excerpt { color: var(--text-2); font-size: 1rem; line-height: 1.6; }
.post-card-more { margin-top: 14px; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.blog-empty { color: var(--text-2); font-size: 1.05rem; }

/* -- tags -- */
.blog-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.blog-tag { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }

/* -- article: header -- */
.post-article-header { max-width: var(--textw); margin: 0 auto; }
.post-back {
  font-family: var(--mono); font-size: 13px; color: var(--text-3);
  display: inline-flex; gap: 7px; align-items: center; margin-bottom: 24px;
  transition: color 0.16s;
}
.post-back:hover { color: var(--accent); }
.post-title { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.06; text-wrap: balance; }
.post-article-header .post-meta { margin-top: 18px; }
.post-cover { max-width: var(--maxw); margin: clamp(24px, 4vw, 40px) auto 0; }
.post-cover img { width: 100%; height: auto; border-radius: var(--r-3); border: 1px solid var(--line); display: block; }

/* -- article: prose body -- */
.post-body {
  max-width: var(--textw);
  margin: clamp(26px, 4vw, 42px) auto 0;
  color: var(--text-2);
  font-size: 1.08rem;
  line-height: 1.75;
}
.post-body > * + * { margin-top: 1.35em; }
.post-body h2 {
  color: var(--text); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2; margin-top: 2em; margin-bottom: 0.1em; text-wrap: balance;
}
.post-body h3 {
  color: var(--text); font-size: clamp(1.2rem, 2.2vw, 1.45rem); font-weight: 700;
  letter-spacing: -0.015em; margin-top: 1.7em; margin-bottom: 0.1em;
}
.post-body h4 { color: var(--text); font-size: 1.1rem; font-weight: 600; margin-top: 1.5em; }
.post-body a {
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; text-decoration-color: var(--accent-line); transition: text-decoration-color 0.16s;
}
.post-body a:hover { text-decoration-color: var(--accent); }
.post-body strong { color: var(--text); font-weight: 700; }
.post-body em { font-style: italic; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li { margin-top: 0.5em; }
.post-body li::marker { color: var(--text-3); }
.post-body blockquote {
  border-left: 2px solid var(--accent-line); padding: 2px 0 2px 22px;
  color: var(--text); font-size: 1.14rem; line-height: 1.6;
}
.post-body blockquote p { margin: 0; }
.post-body code {
  font-family: var(--mono); font-size: 0.9em; background: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r-1); padding: 0.1em 0.4em; color: var(--text);
}
.post-body pre {
  background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--r-2);
  padding: 18px 20px; overflow-x: auto; font-size: 0.92rem; line-height: 1.6;
}
.post-body pre code { background: none; border: 0; padding: 0; font-size: inherit; color: var(--text-2); }
.post-body img { width: 100%; height: auto; border-radius: var(--r-2); border: 1px solid var(--line); display: block; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.post-body figure figcaption { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); text-align: center; margin-top: 10px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.post-body th { color: var(--text); font-weight: 600; background: var(--ink-1); }

/* -- article: end / CTA -- */
.post-end {
  max-width: var(--textw); margin: clamp(40px, 6vw, 72px) auto 0;
  padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--line);
}
.post-end-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

@media (max-width: 640px) {
  .post-body { font-size: 1.04rem; }
  .post-end-cta .button { width: 100%; text-align: center; }
}
