/* ==========================================================================
   Individual blog post (/blog/post-xx.html) — article column styles.
   Banner, two-column layout and sidebar come from blog-page.css and
   blog-sidebar.css (shared Blog system). Solid canvas, no gradients.
   ========================================================================== */

/* Hidden SVG defs container (icons + dot pattern; kept renderable for <pattern>) */
.post-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Shared line-icon style */
.post-icon {
  width: var(--space-lg);
  height: var(--space-lg);
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Article column */
.post {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  min-width: 0;
}

/* Thumbnail — static asset, fixed 16:9 crop */
.post__thumb {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--c-canvas-soft);
  border: 1px solid var(--c-hairline);
  border-radius: var(--rounded-lg);
}

.post__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Meta row: author · date · category */
.post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-xl);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
  font-size: 14px;      /* body-sm */
  font-weight: 360;
  line-height: 1.45;
  color: var(--c-text-muted);
}

.post__meta li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.post__meta .post-icon {
  color: var(--c-accent-strong);
}

/* Category label — code-sm accent, links to blog.html?category= */
.post__category {
  font-family: var(--font-code);
  font-size: 15px;      /* code-sm */
  color: var(--c-accent-strong);
  text-decoration: none;
  text-underline-offset: var(--space-xs);
}

.post__category:hover,
.post__category:focus-visible {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Article body — paragraphs, subheadings, lists
   -------------------------------------------------------------------------- */

.post__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.post__body p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;      /* body-lg */
  font-weight: 360;
  line-height: 1.55;
  color: var(--c-text-secondary);
}

/* Subheading — display-lg */
.post__body h2 {
  margin: var(--space-lg) 0 0;
  font-family: var(--font-display);
  font-size: 28px;      /* display-lg */
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--c-text-primary);
}

/* Bullet list — accent markers */
.post__body ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: 0;
  padding-left: var(--space-xl);
  font-family: var(--font-body);
  font-size: 18px;      /* body-lg */
  font-weight: 360;
  line-height: 1.55;
  color: var(--c-text-secondary);
}

.post__body li::marker {
  color: var(--c-accent-strong);
}

/* Inline code — code font at body size */
.post__body code {
  font-family: var(--font-code);
  font-size: 0.85em;
  color: var(--c-text-primary);
}

/* --------------------------------------------------------------------------
   Inline figure — token-drawn graphic inside a soft card frame
   -------------------------------------------------------------------------- */

.post__figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
}

.post__figure svg {
  display: block;
  width: 100%;
  height: auto;
  background-color: var(--c-canvas-soft);
  border: 1px solid var(--c-hairline);
  border-radius: var(--rounded-lg);
}

/* Caption — body-sm muted */
.post__figure figcaption {
  font-family: var(--font-body);
  font-size: 14px;      /* body-sm */
  font-weight: 360;
  line-height: 1.45;
  color: var(--c-text-muted);
}

/* SVG drawing classes — semantic colors only */
.pg-dots { fill: var(--c-hairline); }
.pg-line { fill: none; stroke: var(--c-hairline-strong); stroke-width: 1.5; }
.pg-accent { fill: none; stroke: var(--c-accent); stroke-width: 2; }
.pg-node { fill: var(--c-canvas); stroke: var(--c-hairline-strong); stroke-width: 1.5; }
.pg-node-strong { fill: var(--c-canvas); stroke: var(--c-accent-strong); stroke-width: 1.5; }
.pg-node-accent { fill: var(--c-accent); stroke: var(--c-accent); stroke-width: 1.5; }
.pg-fill-strong { fill: var(--c-accent-strong); }
.pg-bar { fill: var(--c-hairline-strong); }
.pg-label {
  fill: var(--c-text-secondary);
  font-family: var(--font-code);
  font-size: 13px;      /* SVG user units, scales with viewBox */
}
.pg-label-strong { fill: var(--c-text-primary); }
.pg-label-muted { fill: var(--c-text-muted); }

/* --------------------------------------------------------------------------
   Highlighted quote block — card surface, accent rule, display type
   -------------------------------------------------------------------------- */

.post__quote {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: var(--space-sm) 0;
  padding: var(--space-xxl);
  background-color: var(--c-canvas-soft);
  border: 1px solid var(--c-hairline);
  border-left: var(--space-xs) solid var(--c-accent);
  border-radius: var(--rounded-lg);
}

/* Quote glyph — accent-strong line icon */
.post__quote .post-icon {
  width: var(--space-xxl);
  height: var(--space-xxl);
  color: var(--c-accent-strong);
}

.post__quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;      /* display-md */
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.3px;
  color: var(--c-text-primary);
}

/* --------------------------------------------------------------------------
   Footer: tags row + Back to Blog link
   -------------------------------------------------------------------------- */

.post__footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--c-hairline);
}

.post__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.post__tags-label {
  font-family: var(--font-body);
  font-size: 14px;      /* body-sm */
  font-weight: 360;
  line-height: 1.45;
  color: var(--c-text-muted);
}

/* Back to Blog — display-sm text link with arrow, 44px tap target */
.post__back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-sm);
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 18px;      /* display-sm */
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.2px;
  color: var(--c-accent-strong);
  text-decoration: none;
}

.post__back svg {
  width: var(--space-lg);
  height: var(--space-lg);
}

.post__back:hover span,
.post__back:focus-visible span {
  text-decoration: underline;
  text-underline-offset: var(--space-xs);
}

.post__back:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: var(--space-xxs);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Mobile: smaller type and spacing */
@media (max-width: 480px) {
  .post {
    gap: var(--space-lg);
  }

  .post__thumb,
  .post__figure svg,
  .post__quote {
    border-radius: var(--rounded-md);
  }

  /* Body → body-md, subheading → display-md */
  .post__body p,
  .post__body ul {
    font-size: 16px;    /* body-md */
    line-height: 1.5;
  }

  .post__body h2 {
    margin-top: var(--space-sm);
    font-size: 22px;    /* display-md */
    line-height: 1.25;
    letter-spacing: -0.3px;
  }

  .post__quote {
    padding: var(--space-lg);
  }

  .post__quote p {
    font-size: 18px;    /* display-sm */
    line-height: 1.3;
    letter-spacing: -0.2px;
  }
}
