/* ============================================
   POST PAGE — posts/[slug]/index.html
   ============================================ */

/* ---- Post header --------------------------- */
.post-header {
  padding: var(--space-24) 0 var(--space-16);
  border-bottom: 1px solid var(--color-border);
}

.post-header__inner {
  max-width: var(--max-width-narrow);
}

.post-header__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: var(--space-10);
  transition: color var(--duration-fast);
}

.post-header__back:hover {
  color: var(--color-text);
}

.post-header__back:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 4px;
  border-radius: 2px;
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.post-header__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.post-header__read-time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.post-header__read-time::before {
  content: '·';
  margin-right: var(--space-4);
  color: var(--color-border);
}

.post-header__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  color: var(--color-text);
}

.post-header__excerpt {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 640px;
}

/* ---- Post body ----------------------------- */
.post-body {
  padding: var(--space-16) 0;
}

.post-content {
  max-width: var(--max-width-narrow);
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--color-text);
}

/* First paragraph slightly larger */
.post-content > p:first-of-type {
  font-size: clamp(var(--text-lg), 1.5vw, var(--text-xl));
  line-height: 1.7;
}

.post-content p {
  margin-bottom: var(--space-6);
  color: rgba(237, 237, 237, 0.88);
}

/* Headings: Space Grotesk 500 */
.post-content h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: var(--space-20);
  margin-bottom: var(--space-6);
  color: var(--color-text);
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-top: var(--space-16);
  margin-bottom: var(--space-6);
  color: var(--color-text);
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.post-content h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.post-content ul,
.post-content ol {
  margin-bottom: var(--space-6);
  padding-left: var(--space-8);
  list-style: initial;
}

.post-content ol {
  list-style: decimal;
}

.post-content li {
  margin-bottom: var(--space-3);
  color: rgba(237, 237, 237, 0.88);
  line-height: 1.7;
}

.post-content li.checklist-item {
  list-style: none;
  margin-left: calc(-1 * var(--space-8));
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.post-content li.checklist-item input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--color-highlight);
  flex-shrink: 0;
}

.post-content blockquote {
  border-left: 2px solid var(--color-border);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  background: transparent;
}

.post-content blockquote p {
  margin-bottom: 0;
  font-style: italic;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: 1.7;
}

.post-content strong {
  font-weight: 600;
  color: var(--color-text);
}

.post-content em {
  font-style: italic;
}

/* Inline code: IBM Plex Mono */
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.4em;
  color: var(--color-text);
}

/* Code blocks */
.post-content pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  overflow-x: auto;
  margin-bottom: var(--space-6);
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.7;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-12) 0;
}

/* Links */
.post-content a {
  color: var(--color-highlight);
  text-decoration: underline;
  text-decoration-color: rgba(74, 158, 255, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--duration-fast);
}

.post-content a:hover {
  text-decoration-color: var(--color-highlight);
}

.post-content a:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Post footer --------------------------- */
.post-footer {
  padding: var(--space-16) 0 var(--space-32);
  border-top: 1px solid var(--color-border);
}

.post-footer__inner {
  max-width: var(--max-width-narrow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.post-footer__back {
  flex-shrink: 0;
}

.post-footer__cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.post-footer__cta-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
  letter-spacing: 0.05em;
}

/* ---- Responsive ---------------------------- */
@media (max-width: 768px) {
  .post-header {
    padding: var(--space-16) 0 var(--space-10);
  }

  .post-content {
    font-size: var(--text-base);
    line-height: 1.75;
  }

  .post-content > p:first-of-type {
    font-size: var(--text-lg);
  }

  .post-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
