/* Blog styles. Loaded after /stylesheet.css, so it reuses the site's colours and fonts. */

.nav-links a[aria-current="page"] { color: var(--text); }

.blog-index, .blog-post { padding-top: 72px; }

/* ---------- post list ---------- */
.post-card { display: flex; flex-direction: column; }
.post-card .card-text { flex: 1; }
.post-card .card-title a { color: var(--text); text-decoration: none; }
.post-card .card-title a:hover { color: #c4b5fd; }
.post-card-img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top;
  border-radius: 10px; border: 1px solid rgba(109, 139, 247, .25); margin-bottom: 1rem; display: block;
}
.post-list:has(> .post-card:only-child) { grid-template-columns: minmax(0, 520px); justify-content: center; }

.section-sub a, .copyright a { color: #a5b4fc; }

.tags { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li {
  font-size: .75rem; padding: .2rem .55rem; border-radius: 6px;
  color: #c7d2fe; background: rgba(109, 139, 247, .12); border: 1px solid rgba(109, 139, 247, .25);
}
.card-cta {
  align-self: flex-start; margin-top: 1rem; font-weight: 600; font-size: .92rem; color: #a5b4fc;
  text-decoration: none; border-bottom: 1px solid rgba(165, 180, 252, .4); padding-bottom: 1px;
}
.card-cta:hover, .card-cta:focus-visible { color: #c4b5fd; border-bottom-color: #c4b5fd; }

/* ---------- single post ---------- */
.post-meta { color: var(--text-muted); font-size: .88rem; margin-bottom: .5rem; }
.post-back { margin-bottom: 28px; }
.post-back a { color: var(--text-muted); text-decoration: none; font-size: .92rem; }
.post-back a:hover { color: var(--text); }
.post-header { margin-bottom: 32px; }
.post-header .tags { margin-top: .75rem; }
.post-title { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.post-hero {
  width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border);
  margin-bottom: 36px; display: block;
}

.prose { font-size: 1.06rem; color: #cbd5e1; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-top: 2em; line-height: 1.3; }
.prose h3 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-top: 1.6em; }
.prose a { color: #a5b4fc; text-underline-offset: 3px; }
.prose a:hover { color: #c4b5fd; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose blockquote {
  border-left: 3px solid var(--accent-purple); padding: .2em 0 .2em 1.1em; color: var(--text-muted); font-style: italic;
}
.prose code {
  font-family: var(--mono); font-size: .88em; background: rgba(109, 139, 247, .12);
  border: 1px solid rgba(109, 139, 247, .2); border-radius: 5px; padding: .1em .35em;
}
.prose pre {
  background: #0b1120; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; overflow-x: auto; font-size: .9rem; line-height: 1.55;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: #a5b4fc; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: .5em .75em; text-align: left; }
.prose th { color: var(--text); background: rgba(109, 139, 247, .08); }

.post-cta { margin-top: 56px; text-align: center; }
.post-cta:hover { transform: none; }
.post-cta .card-text { margin-bottom: 20px; }

@media (max-width: 768px) {
  .blog-index, .blog-post { padding-top: 48px; }
}
