/* ---------- Blog (pages built by scripts/build-blog.mjs) ---------- */
.blog-nav__link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  padding: 0.35rem 0;
}
.blog-nav__link:hover,
.blog-nav__link[aria-current] {
  color: var(--text);
}
.blog-nav__link[aria-current]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
@media (max-width: 560px) {
  .blog-nav__cta {
    display: none !important;
  }
}

/* index */
.blog-index {
  padding: calc(var(--nav-h) + 4rem) 0 var(--section);
}
.blog-index__head {
  max-width: 62ch;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.blog-index__head .lead {
  margin-top: 1.1rem;
}
.blog-index__empty {
  color: var(--muted);
}
.blog-index__empty a {
  color: var(--accent);
}

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1rem;
}
.post-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.post-card:hover {
  border-color: rgba(240, 162, 43, 0.45);
  transform: translateY(-2px);
}
.post-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
}
.post-card__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  margin-bottom: 0.75rem;
}
.post-card__draft {
  color: var(--accent);
  text-transform: uppercase;
}
.post-card__title {
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.post-card__desc {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}
.post-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
}
.post-card .tag,
.post__tags .tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
}

/* article */
.post {
  padding: calc(var(--nav-h) + 3rem) 0 var(--section);
}
.post__wrap {
  max-width: 740px;
}
.post__crumbs {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.post__crumbs a {
  color: var(--accent);
}
.post__title {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.post__lead {
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  color: var(--muted);
  margin: 1.1rem 0 0;
}
.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 1.5rem 0 0;
  font-size: 0.88rem;
  color: var(--muted-2);
}
.post__meta a {
  color: var(--accent);
}
.post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
}
.post__cover {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  margin-top: 2.25rem;
}

/* long-form text */
.prose {
  margin-top: 2.5rem;
  font-size: 1.06rem;
  line-height: 1.75;
  color: #d3d9e4;
}
.prose > * + * {
  margin-top: 1.15rem;
}
.prose p {
  margin-bottom: 0;
}
.prose h2 {
  font-size: 1.6rem;
  line-height: 1.2;
  margin-top: 2.75rem;
  color: var(--text);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.prose h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  margin-top: 2.1rem;
  color: var(--text);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.prose h4,
.prose h5,
.prose h6 {
  font-size: 1.05rem;
  margin-top: 1.75rem;
  color: var(--text);
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover {
  color: var(--accent-2);
}
.prose strong {
  color: var(--text);
}
.prose ul,
.prose ol {
  padding-left: 1.4rem;
}
.prose ul {
  list-style: disc;
}
.prose ol {
  list-style: decimal;
}
.prose li + li {
  margin-top: 0.4rem;
}
.prose li::marker {
  color: var(--accent);
}
.prose blockquote {
  margin-inline: 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}
.prose pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  line-height: 1.55;
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.86rem;
}
.prose img {
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}
.prose mark {
  background: var(--accent-soft);
  color: var(--text);
  padding: 0 0.2em;
  border-radius: 3px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}
.prose th,
.prose td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
.prose th {
  color: var(--text);
  font-weight: 600;
}
.callout {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1rem 1.15rem;
}
.callout > * + * {
  margin-top: 0.6rem;
}
.callout__title {
  font-weight: 600;
  color: var(--text);
}
.callout--warning,
.callout--danger,
.callout--important {
  border-left-color: var(--error);
}
.callout--success {
  border-left-color: var(--success);
}

.post__sources {
  margin-top: 3rem;
  font-size: 0.9rem;
}
.post__sources h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.post__sources ol {
  list-style: decimal;
  padding-left: 1.3rem;
  color: var(--muted);
}
.post__sources a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
}
.post__ai {
  margin: 2rem 0 0;
  font-size: 0.85rem;
  color: var(--muted-2);
}
.author {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.author img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.author__name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.author__role,
.author__cta {
  color: var(--muted);
  font-size: 0.93rem;
  margin-bottom: 0.5rem;
}
.author__cta {
  margin: 0;
}
.author__cta a {
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}
.post__more {
  margin-top: 4rem;
}
.post__more h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}
.post-list--compact {
  grid-template-columns: 1fr;
}
.post__all {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--accent);
  font-weight: 500;
}
@media (max-width: 560px) {
  .author {
    flex-direction: column;
  }
}
