/* ========== BLOG POST DETAIL ========== */
.post-page {
  position: relative;
  padding-bottom: 100px;
}

/* Back-to-blog link */
.post-back {
  max-width: 1240px; margin: 0 auto;
  padding: 110px 28px 0;
}
.post-back a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .15s;
}
.post-back a:hover {
  color: var(--fg); border-color: var(--line-2);
}
.post-back a .arr {
  transition: transform .15s;
  display: inline-block;
}
.post-back a:hover .arr { transform: translateX(-3px); }

/* Hero */
.post-hero {
  max-width: 1100px; margin: 40px auto 0;
  padding: 0 28px;
  position: relative;
}
.post-hero .eyebrow {
  margin-bottom: 28px;
}
.post-hero h1 {
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin-bottom: 28px;
  max-width: 900px;
}
.post-hero h1 .serif {
  color: var(--red);
}
.post-lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 720px;
  margin-bottom: 40px;
  letter-spacing: -0.005em;
}
.post-meta-strip {
  display: flex; align-items: center; gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.post-author {
  display: flex; align-items: center; gap: 12px;
}
.post-author .av {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff;
  background: var(--red);
}
.post-author .meta {
  display: flex; flex-direction: column;
}
.post-author .nm {
  font-size: 14px; font-weight: 500;
}
.post-author .role {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.post-meta-strip .sep {
  width: 1px; height: 24px;
  background: var(--line);
}
.post-meta-strip .info {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.post-meta-strip .info .v { color: var(--fg-2); }
.post-meta-strip .share {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
}
.post-meta-strip .share .lbl {
  font-family: 'Geist Mono', monospace;
  font-size: 10px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-right: 6px;
}
.post-meta-strip .share button {
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg-2);
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  cursor: pointer;
  background: transparent;
}
.post-meta-strip .share button:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Cover */
.post-cover {
  max-width: 1100px; margin: 40px auto 0;
  padding: 0 28px;
}
.post-cover-inner {
  aspect-ratio: 21/9;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.post-cover-inner::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 8px, transparent 8px 16px);
  pointer-events: none;
}
.post-cover-inner.c-product { background: linear-gradient(135deg, #1a0508 0%, #050505 100%); }
.post-cover-inner.c-ai      { background: linear-gradient(135deg, #0a0a14 0%, #050505 100%); }
.post-cover-inner.c-growth  { background: linear-gradient(135deg, #0a1408 0%, #050505 100%); }
.post-cover-inner.c-stripe  { background: linear-gradient(135deg, #14080a 0%, #050505 100%); }
.post-cover-inner.c-stories { background: linear-gradient(135deg, #140a08 0%, #050505 100%); }
.post-cover-inner .cover-glyph {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(180px, 24vw, 360px);
  line-height: 0.85;
  position: relative; z-index: 2;
  text-align: center;
}
.post-cover-inner.c-product .cover-glyph { color: var(--red); }
.post-cover-inner.c-ai .cover-glyph      { color: var(--purple); }
.post-cover-inner.c-growth .cover-glyph  { color: var(--lime); }
.post-cover-inner.c-stripe .cover-glyph  { color: var(--yellow); }
.post-cover-inner.c-stories .cover-glyph { color: var(--blue); }
.post-cover-inner::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(238,39,55,0.08), transparent 60%);
  pointer-events: none;
}

/* Body layout */
.post-body-wrap {
  max-width: 1100px; margin: 80px auto 0;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 80px;
  align-items: start;
}
.post-toc {
  position: sticky; top: 90px;
  display: flex; flex-direction: column; gap: 4px;
}
.post-toc .lbl {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--fg-3);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.post-toc a {
  display: block;
  font-size: 12.5px;
  color: var(--fg-2);
  padding: 7px 0 7px 12px;
  border-left: 1px solid var(--line);
  transition: all .15s;
  line-height: 1.4;
}
.post-toc a:hover {
  color: var(--fg); border-color: var(--line-2);
}
.post-toc a.active {
  color: var(--red);
  border-color: var(--red);
}
.post-toc .reading-progress {
  margin-top: 24px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.post-toc .reading-progress .bar {
  height: 2px;
  background: var(--line);
  border-radius: 1px;
  margin-top: 8px;
  overflow: hidden;
}
.post-toc .reading-progress .bar-fill {
  height: 100%;
  background: var(--red);
  width: 0%;
  transition: width .1s linear;
}

/* Body */
.post-body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-2);
  max-width: 740px;
}
.post-body > * { letter-spacing: -0.003em; }
.post-body p {
  margin-bottom: 22px;
}
.post-body p:first-of-type::first-letter {
  font-family: 'Instrument Serif', serif;
  font-size: 5em;
  float: left;
  line-height: 0.8;
  margin: 0.08em 0.1em 0 -0.04em;
  color: var(--red);
  font-style: italic;
  font-weight: 400;
}
.post-body strong {
  color: var(--fg);
  font-weight: 500;
}
.post-body em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--fg);
  font-size: 1.04em;
  letter-spacing: -0.005em;
}
.post-body a {
  color: var(--red);
  border-bottom: 1px solid rgba(238,39,55,0.3);
  transition: border-color .15s;
}
.post-body a:hover { border-color: var(--red); }
.post-body h2 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--fg);
  margin: 56px 0 18px;
  scroll-margin-top: 100px;
}
.post-body h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 36px 0 12px;
}
.post-body ul, .post-body ol {
  margin: 0 0 22px 8px;
  padding-left: 18px;
}
.post-body li {
  margin-bottom: 8px;
}
.post-body li::marker {
  color: var(--red);
}

.post-body blockquote.pullquote {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 48px -20px;
  padding: 20px 0 20px 28px;
  border-left: 2px solid var(--red);
  max-width: 660px;
}
.post-body blockquote.pullquote .attribution {
  display: block;
  margin-top: 14px;
  font-family: 'Geist Mono', monospace;
  font-style: normal;
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.post-body .callout {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 32px 0;
  font-size: 15px;
  color: var(--fg-2);
}
.post-body .callout .lbl {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 6px;
}
.post-body .callout strong { color: var(--fg); }

.post-body .stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 36px 0;
}
.post-body .stat {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.post-body .stat .v {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--red);
  line-height: 1;
}
.post-body .stat .l {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin-top: 8px;
}

.post-body pre {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
  overflow-x: auto;
  margin: 28px 0;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-2);
}
.post-body code {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Geist Mono', monospace;
  font-size: 0.92em;
  color: var(--lime);
}
.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--fg-2);
}
.post-body .hl-red { color: var(--red); }
.post-body .hl-lime { color: var(--lime); }
.post-body .hl-mute { color: var(--fg-3); }

/* End matter */
.post-end {
  max-width: 1100px;
  margin: 60px auto 0;
  padding: 60px 28px 0;
  border-top: 1px solid var(--line);
}
.post-end-share {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.post-end-share .left {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.post-end-share .actions {
  display: flex; gap: 8px;
}
.post-end-share .actions button {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--fg-2);
  background: transparent;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.post-end-share .actions button:hover {
  border-color: var(--red); color: var(--red);
}

/* Related posts */
.related {
  max-width: 1240px; margin: 100px auto 0;
  padding: 0 28px;
}
.related-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 28px;
}
.related-head h3 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.related-head h3 .serif { color: var(--red); }
.related-head a {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex; align-items: center; gap: 6px;
}
.related-head a:hover { color: var(--fg); }
.related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}

@media (max-width: 1000px) {
  .post-body-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .post-toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }
  .post-toc .lbl { width: 100%; margin-bottom: 0; padding-bottom: 0; border: none; }
  .post-toc a {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
  }
  .post-toc .reading-progress { display: none; }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .post-back, .post-hero, .post-cover, .post-body-wrap, .post-end, .related {
    padding-left: 18px; padding-right: 18px;
  }
  .post-body { font-size: 16px; }
  .post-body .stat-row { grid-template-columns: 1fr; }
}
