/* blog post + talk detail pages */

/* Prose content */
.prose { font-size: 15px; line-height: 1.72; max-width: 68ch; }
.prose a { border-bottom: 1px dashed var(--line-strong); padding-bottom: 1px; transition: border-color .15s, color .15s; }
.prose a:hover { border-color: var(--accent); color: var(--accent); }
.prose h2 { font-size: 18px; margin: 34px 0 12px; letter-spacing: -0.02em; }
.prose h2::before { content: "## "; color: var(--accent); }
.prose h3 { font-size: 15px; margin: 26px 0 10px; color: var(--dim); }
.prose h3::before { content: "### "; color: var(--accent); }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li { margin: 4px 0; }
.prose code { font-family: inherit; background: var(--line); padding: 1px 5px; border-radius: 2px; font-size: 0.92em; }
.prose pre {
  background: var(--card); border: 1px dashed var(--line-strong); padding: 16px 18px;
  overflow-x: auto; font-size: 13px; line-height: 1.55; margin: 16px 0; position: relative;
}
.prose pre code { background: none; padding: 0; }
.prose pre code.hljs { background: none; padding: 0; color: inherit; }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: 16px; color: var(--dim); margin: 16px 0; }
.prose hr { border: none; border-top: 1px dashed var(--line-strong); margin: 32px 0; }
.prose img {
  display: block;
  width: auto;
  max-width: min(100%, 560px);
  height: auto;
  margin: 22px auto;
  border: 1px dashed var(--line-strong);
}
.prose img[width][height] {
  max-height: 520px;
  object-fit: contain;
}
.prose img[width][height][width="4450"],
.prose img[width][height][width="4523"],
.prose img[width][height][width="5236"] {
  max-width: 100%;
  max-height: none;
}

/* Post cover image */
.post-cover {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  margin: 24px auto 0;
  border: 1px dashed var(--line-strong);
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 200;
  pointer-events: none;
  transition: width 80ms linear;
}

/* Code copy button */
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--dim);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  cursor: pointer;
  transition: color .15s, border-color .15s, opacity .15s;
  opacity: 0;
  line-height: 1.6;
}
.prose pre:hover .copy-btn,
.copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
@media (hover: none) { .copy-btn { opacity: 0.7; } }

/* Post navigation */
.post-nav { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Related posts */
.related-posts { margin-top: 48px; }
.related-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.related-item:first-of-type { border-top: 1px dashed var(--line); }
.related-item .when { color: var(--accent); font-size: 12px; }
.related-item .title { font-weight: 500; }
.related-item .meta { color: var(--dim); font-size: 12px; margin-top: 3px; }
.related-item .trail { color: var(--dim); font-size: 11px; }
.related-item:hover .title { color: var(--accent); }

@media (max-width: 720px) {
  .prose { font-size: 14px; line-height: 1.68; }
  .prose pre { padding: 12px 14px; font-size: 12px; }
  .related-item { grid-template-columns: 1fr; gap: 4px; }
  .related-item .when { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
  .related-item .trail { font-size: 11px; color: var(--faint); }
}
