/* ===== Post page — extends styles.css ===== */
.post-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in oklch, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--line);
}
.post-nav__inner {
  display: flex; align-items: center; gap: 16px;
  padding-block: 14px;
}
.post-nav__back {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  transition: all .2s var(--ease);
}
.post-nav__back:hover { color: var(--fg); border-color: var(--line-strong); background: var(--bg-2); }
.post-nav__back .arrow { transition: transform .2s var(--ease); }
.post-nav__back:hover .arrow { transform: translateX(-3px); }

.post-nav__brand {
  font-family: var(--font-mono);
  font-size: 13px;
  margin-left: auto;
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.post-nav__brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 12px var(--accent-1);
}

.post-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: max(120px, 14vh) var(--gutter) 80px;
}
.post-meta {
  display: flex; gap: 12px; align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.post-meta .tag-pill {
  color: var(--accent-1);
  border: 1px solid var(--accent-1);
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}
.post-title {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  font-weight: 500;
  text-wrap: balance;
}
.post-lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--fg-2);
  margin: 0 0 48px;
  text-wrap: pretty;
  line-height: 1.5;
}
.post-divider {
  height: 1px;
  background: var(--line);
  margin: 0 0 48px;
  position: relative;
}
.post-divider::before {
  content: ""; position: absolute;
  left: 0; top: -1px; width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}

/* Hero image (optional, before the divider) */
.post-hero {
  margin: 0 0 32px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  aspect-ratio: 16/9;
}
.post-hero img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
.post-hero--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(135deg,
      var(--bg-3) 0 12px,
      var(--bg-2) 12px 24px);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Inline figure for images mid-post */
.post-figure {
  margin: 32px 0;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.post-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.post-figure figcaption {
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  border-top: 1px solid var(--line);
  text-wrap: balance;
}
.post-body { color: var(--fg); font-size: 17px; line-height: 1.7; }
.post-body p { margin: 0 0 22px; color: var(--fg-2); }
.post-body h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.015em;
  margin: 48px 0 16px;
  font-weight: 500;
}
.post-body h3 {
  font-size: 19px;
  margin: 32px 0 12px;
  font-weight: 500;
}
.post-body ul, .post-body ol { padding-left: 22px; margin: 0 0 22px; color: var(--fg-2); }
.post-body li { margin-bottom: 8px; }
.post-body blockquote {
  margin: 28px 0;
  padding: 16px 22px;
  border-left: 2px solid var(--accent-1);
  background: var(--bg-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--fg-2);
  font-style: italic;
}
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.post-body pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.post-body pre code { background: none; border: 0; padding: 0; }
.post-body a {
  color: var(--accent-1);
  border-bottom: 1px solid color-mix(in oklch, var(--accent-1) 50%, transparent);
  transition: border-color .2s var(--ease);
}
.post-body a:hover { border-bottom-color: var(--accent-1); }
.post-body strong { color: var(--fg); font-weight: 500; }

/* Table (e.g. typology matrix) */
.post-table-wrap { overflow-x: auto; margin: 28px 0; }
.post-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
.post-table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.post-table th, .post-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--fg-2);
}
.post-table thead th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-1);
  border-bottom: 1px solid var(--line-strong);
}
.post-table tbody tr:hover { background: color-mix(in oklch, var(--accent-1) 5%, transparent); }
.post-table td:first-child { color: var(--fg); font-weight: 500; }

/* References list */
.post-refs { font-size: 14.5px; line-height: 1.55; }
.post-refs li { margin-bottom: 10px; color: var(--fg-3); }
.post-refs em { color: var(--fg-2); font-style: italic; }

.post-foot {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.post-foot a {
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .2s var(--ease);
}
.post-foot a:hover { color: var(--accent-1); }
