.blog-article-page {
  min-height: 100vh;
  background: var(--black);
}

.blog-post-shell {
  width: min(100% - 2 * var(--page-inset), 72rem);
  margin: 0 auto;
  padding: 8.5rem 0 6rem;
}

.post-repo-link,
.blog-post-footer a {
  color: var(--muted-white);
  font-size: 0.85rem;
  text-decoration: none;
}

.post-repo-link:hover,
.blog-post-footer a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.blog-post {
  width: min(100%, 58rem);
  margin: 0 auto;
}

.blog-post-breadcrumb {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.blog-post-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
  color: var(--muted-white);
  font-size: 0.85rem;
  list-style: none;
}

.blog-post-breadcrumb a {
  color: var(--muted-white);
  text-decoration: none;
}

.blog-post-breadcrumb a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.blog-post-breadcrumb .breadcrumb-separator {
  color: #888;
}

.blog-post-breadcrumb [aria-current="page"] {
  color: var(--white);
}

.blog-post-header {
  padding-bottom: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule-dark);
}

.blog-post-header h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}

.blog-post-dek {
  max-width: 56ch;
  margin: 1.4rem 0 1.7rem;
  color: var(--muted-white);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.7;
}

.post-repo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--white);
}

.post-repo-link svg,
.blog-entry-links svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.blog-post-content {
  width: min(100%, 48rem);
  margin: 0 auto;
  padding-top: clamp(2rem, 5vw, 4rem);
}

.blog-post-content h2 {
  margin: 3.5rem 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.blog-post-content h3 {
  margin: 2.25rem 0 0.85rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.25;
}

.blog-post-content p,
.blog-post-content li {
  color: var(--muted-white);
  font-size: 1rem;
  line-height: 1.8;
}

.blog-post-content p {
  margin: 0 0 1.2rem;
}

.blog-post-content a {
  color: var(--white);
  text-decoration-color: rgba(245, 245, 242, 0.45);
  text-underline-offset: 0.2em;
}

.blog-post-content ul {
  display: grid;
  gap: 0.4rem;
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
}

.blog-post-content li::marker {
  color: #888;
}

.blog-post-content code {
  padding: 0.08em 0.28em;
  border: 1px solid rgba(245, 245, 242, 0.16);
  border-radius: 0.2rem;
  background: rgba(245, 245, 242, 0.06);
  color: var(--white);
  font-size: 0.9em;
}

.blog-post-content pre {
  max-width: 100%;
  overflow: auto;
  padding: 1.15rem 1.25rem;
  margin: 1.3rem 0 1.7rem;
  border: 1px solid var(--rule-dark);
  background: #0d0d0d;
  color: var(--white);
  font: 0.88rem/1.65 "IBM Plex Mono", monospace;
  tab-size: 2;
}

.blog-post-content pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.3rem 0 1.7rem;
  border-top: 1px solid var(--rule-dark);
  border-bottom: 1px solid var(--rule-dark);
}

.blog-post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.6;
}

.blog-post-content th,
.blog-post-content td {
  min-width: 7rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(245, 245, 242, 0.14);
  text-align: left;
  vertical-align: top;
}

.blog-post-content th {
  color: var(--white);
  font-weight: 500;
}

.blog-post-content td {
  color: var(--muted-white);
}

.post-figure {
  margin: 2rem 0 2.5rem;
}

.post-figure img {
  display: block;
  width: 100%;
  max-height: 42rem;
  object-fit: contain;
  object-position: left center;
  border: 1px solid var(--rule-dark);
  border-radius: 0.35rem;
  background: #0d0d0d;
}

.post-figure figcaption {
  margin-top: 0.7rem;
  color: var(--muted-white);
  font-size: 0.85rem;
  line-height: 1.6;
}

.blog-post-content .demo-frame {
  position: relative;
  left: 50%;
  width: min(94vw, 88rem);
  transform: translateX(-50%);
  overflow: hidden;
  margin: 1.6rem 0 0.8rem;
  border: 1px solid var(--rule-dark);
  border-radius: 0.5rem;
  background: #111b27;
}

.demo-frame iframe {
  display: block;
  width: 100%;
  height: min(76vh, 720px);
  min-height: 34rem;
  border: 0;
}

.blog-post-content hr {
  border: 0;
  border-top: 1px solid var(--rule-dark);
  margin: 2rem 0;
}

.post-details {
  padding-block: 1rem;
  margin: 1.2rem 0 1.7rem;
  border-block: 1px solid var(--rule-dark);
}

.post-details summary {
  color: var(--white);
  cursor: pointer;
}

.post-details[open] summary {
  margin-bottom: 1rem;
}

.blog-post-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 4rem;
  border-top: 1px solid var(--rule-dark);
}

@media (max-width: 810px) {
  .blog-post-shell {
    padding-top: 7.5rem;
  }

  .blog-post {
    margin-top: 2rem;
  }

  .blog-post-content h2 {
    margin-top: 2.75rem;
  }

  .demo-frame iframe {
    height: 72svh;
    min-height: 30rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
}
