/* ==============================================================
   POST.CSS - shared layout for /knowledge/<post>/ pages
   Sits on top of page.css.
   ============================================================== */

.post-hero {
  background: linear-gradient(160deg, var(--tint-blue) 0%, var(--white) 70%);
  padding: var(--s9) 0 var(--s7);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.post-hero::before {
  content: ""; position: absolute;
  right: -100px; top: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(79,189,240,.15), transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.post-hero .container { max-width: 760px; position: relative; z-index: 1; }
.post-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  margin-bottom: var(--s5);
}
.post-back:hover { color: var(--blue); }
.post-back svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; transition: transform .2s; }
.post-back:hover svg { transform: translateX(-3px); }

.post-tag {
  display: inline-block;
  font-family: var(--mono); font-size: 11px;
  font-weight: 700; color: var(--blue);
  letter-spacing: 0.10em; text-transform: uppercase;
  margin-bottom: var(--s4);
}
.post-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05; font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--s5);
}
.post-meta {
  display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  font-size: 13px; color: var(--ink-mute);
  padding-top: var(--s5); border-top: 1px solid var(--border);
}
.post-meta b { color: var(--ink); font-weight: 600; }
.post-meta-divider { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-faint); }

.post-body { padding: var(--s9) 0; }
.post-body .container { max-width: 760px; }

.post-content > * { max-width: 720px; }
.post-content h2 {
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em;
  margin: var(--s8) 0 var(--s4);
  color: var(--ink);
  scroll-margin-top: 100px;
}
.post-content h3 {
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.01em;
  margin: var(--s6) 0 var(--s3);
  color: var(--ink);
}
.post-content p {
  font-size: 17px; line-height: 1.75;
  color: var(--ink-soft);
  margin: 0 0 var(--s4);
}
.post-content p strong, .post-content b { color: var(--ink); font-weight: 600; }
.post-content a { color: var(--blue); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(1,96,226,.3); text-underline-offset: 3px; }
.post-content a:hover { text-decoration-color: var(--blue); }
.post-content ul, .post-content ol {
  list-style: none; padding: 0; margin: var(--s4) 0;
  display: flex; flex-direction: column; gap: var(--s3);
}
.post-content ul li {
  position: relative; padding-left: var(--s5);
  font-size: 16px; color: var(--ink-soft); line-height: 1.65;
}
.post-content ul li::before {
  content: ""; position: absolute;
  left: 0; top: 11px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--gradient);
}
.post-content ol { counter-reset: post-ol; }
.post-content ol li {
  position: relative; padding-left: var(--s7);
  font-size: 16px; color: var(--ink-soft); line-height: 1.65;
  counter-increment: post-ol;
}
.post-content ol li::before {
  content: counter(post-ol);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gradient); color: white;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}
.post-content blockquote {
  margin: var(--s7) 0;
  padding: var(--s5) var(--s6);
  background: var(--tint-blue);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 18px; line-height: 1.55; color: var(--ink); font-weight: 500;
  font-style: italic;
}
.post-content blockquote p { margin: 0; color: var(--ink); font-size: 18px; }
.post-content code {
  font-family: var(--mono); font-size: 14px;
  background: var(--paper);
  padding: 2px 6px; border-radius: 4px;
  color: var(--blue);
  border: 1px solid var(--border);
}
.post-content pre {
  margin: var(--s5) 0;
  padding: var(--s5);
  background: #0D1B4A; color: #E5EAF2;
  border-radius: var(--r-md);
  overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
}
.post-content pre code { background: transparent; border: 0; color: inherit; padding: 0; }
.post-content hr { border: 0; border-top: 1px solid var(--border); margin: var(--s7) 0; }

.callout {
  margin: var(--s7) 0;
  padding: var(--s5) var(--s6);
  background: linear-gradient(135deg, var(--white) 0%, var(--tint-blue) 100%);
  border: 1px solid var(--border-blue);
  border-radius: var(--r-lg);
}
.callout-h {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--blue); margin-bottom: var(--s2);
}
.callout p { color: var(--ink); font-size: 15px; line-height: 1.6; margin: 0; }

.tldr {
  margin-bottom: var(--s7);
  padding: var(--s5) var(--s6);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.tldr-h {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: var(--s2);
}
.tldr p { margin: 0; font-size: 16px; color: var(--ink); line-height: 1.6; }

.post-author {
  margin-top: var(--s8);
  padding: var(--s5) var(--s6);
  background: var(--paper);
  border-radius: var(--r-lg);
  display: flex; align-items: center; gap: var(--s4);
}
.post-author-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  display: grid; place-items: center;
  color: white; font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.post-author-name { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.post-author-role { font-size: 13px; color: var(--ink-soft); margin: 0; }

.post-next {
  margin-top: var(--s8);
  padding: var(--s6);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: grid; grid-template-columns: 1fr auto; gap: var(--s5);
  align-items: center;
  text-decoration: none; color: var(--ink);
  transition: all .25s;
}
.post-next:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: var(--sh-sm); color: var(--ink); }
.post-next-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; display: block; }
.post-next-h { font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.post-next-arrow { width: 44px; height: 44px; border-radius: 50%; background: var(--gradient); color: white; display: grid; place-items: center; flex-shrink: 0; }
.post-next-arrow svg { width: 18px; height: 18px; stroke: white; stroke-width: 2; fill: none; }

@media (max-width: 700px) {
  .post-content h2 { font-size: 22px; }
  .post-next { grid-template-columns: 1fr; }
  .post-next-arrow { display: none; }
  .post-author { flex-wrap: wrap; }
}
