/* ============================================================
   Blog — article reading layout
   Editorial long-form: serif body, sans headings, 680px measure.
   Shared by the dynamic post template and the static posts.
   ============================================================ */

.post-wrap { max-width: 680px; margin: 0 auto; padding: 56px 40px 100px; }

.post-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--fg-muted); text-decoration: none;
  margin-bottom: 40px; transition: color 0.15s;
}
.post-back:hover { color: var(--accent); }
.post-back svg { width: 14px; height: 14px; }

.post-title {
  font-family: var(--font-sans);
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.022em;
  color: var(--fg);
  margin-bottom: 24px;
}

.post-byline {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 28px; margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.post-byline img {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex: none;
}
.post-author { font: 500 15px var(--font-sans); color: var(--fg); }
.post-byline-sub { font: 400 14px var(--font-sans); color: var(--fg-muted); margin-top: 2px; }

.post-cover {
  width: 100%; border-radius: 4px; margin-bottom: 40px; display: none;
}
.post-cover.loaded { display: block; }

.post-body {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.6;
  letter-spacing: -0.003em;
  color: var(--fg);
}
.post-body p { margin-bottom: 28px; }
.post-body h2 {
  font-family: var(--font-sans);
  font-size: clamp(24px, 4vw, 28px); font-weight: 700;
  color: var(--fg); letter-spacing: -0.018em; line-height: 1.3;
  margin: 48px 0 16px;
}
.post-body h3 {
  font-family: var(--font-sans);
  font-size: 22px; font-weight: 700; color: var(--fg);
  letter-spacing: -0.01em; margin: 36px 0 12px;
}
.post-body a {
  color: var(--fg); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.post-body a:hover { color: var(--accent); }
.post-body ul, .post-body ol { padding-left: 26px; margin-bottom: 28px; }
.post-body li { margin-bottom: 8px; }
.post-body code {
  font-family: var(--font-mono); font-size: 0.85em;
  background: var(--surface-2, var(--surface)); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 5px; color: var(--fg);
}
.post-body pre {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px 24px; overflow-x: auto; margin-bottom: 28px;
}
.post-body pre code { background: none; border: none; padding: 0; font-size: 14px; line-height: 1.65; }
.post-body blockquote {
  border-left: 3px solid var(--fg); padding-left: 22px; margin: 0 0 28px;
  color: var(--fg-muted); font-style: italic; font-size: 21px; line-height: 1.5;
}
.post-body img {
  width: 100%; border-radius: 4px; margin: 12px 0 32px; display: block;
}
.post-body iframe {
  width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px;
  margin: 12px 0 32px; display: block;
}
.post-body .embed { position: relative; width: 100%; margin: 12px 0 32px; border-radius: 8px; overflow: hidden; background: var(--surface); }
.post-body .embed.embed-ar { aspect-ratio: 16/9; }
.post-body .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; margin: 0; border: none; border-radius: 0; }
.post-body .embed-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 12px 0 32px; text-decoration: none; color: var(--fg); background: var(--surface); transition: background .12s; }
.post-body .embed-card:hover { background: var(--surface-2, var(--surface)); }
.post-body .embed-card-fav { width: 22px; height: 22px; border-radius: 5px; flex: none; margin: 0; border: none; }
.post-body .embed-card-txt { min-width: 0; }
.post-body .embed-card-host { display: block; font: 600 14px var(--font-sans); color: var(--fg); }
.post-body .embed-card-url { display: block; font: 400 12.5px var(--font-mono); color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-body figure.us-fig { margin: 12px 0 32px; }
.post-body figure.us-fig img { margin: 0; }
.post-body figure.us-fig figcaption { text-align: center; font: 400 13px var(--font-sans); color: var(--fg-muted); margin-top: 10px; }
.post-body hr { border: none; margin: 44px 0; }
.post-body hr::before { content: '· · ·'; color: var(--fg-muted); font-size: 22px; letter-spacing: 14px; display: block; text-align: center; }

.post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 44px 0 8px; }
.post-tag {
  font: 500 13px var(--font-sans); color: var(--fg-muted);
  background: transparent; border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 16px;
  text-decoration: none; transition: background .15s, color .15s;
}
a.post-tag:hover { background: var(--surface-2, var(--surface)); color: var(--fg); }

@media (max-width: 600px) {
  .post-wrap { padding: 36px 20px 72px; }
  .post-body { font-size: 19px; }
}
