/* ═══════════════════════════════════════════════════════════════
   Blueprint.gg — Blog Post Template Styles
   Individual article pages. Listing page styles are in blog.css.
   ═══════════════════════════════════════════════════════════════ */

/* Progress bar, TOC, floating TOC → shared.css */

/* Dark hero base styles → shared.css (.hero--dark) */

.post-hero__badge {
  margin-bottom: var(--space-6);
}

/* Override shared h1 — wider max-width + larger bottom margin for deck */
.post-hero h1 {
  max-width: var(--max-w-5xl);
  margin-inline: auto;
  margin-bottom: var(--space-6);
}

.post-hero__deck {
  font-size: var(--text-xl);
  color: var(--color-slate-400);
  max-width: var(--max-w-3xl);
  margin-inline: auto;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
}

.post-hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--color-slate-400);
}

.post-hero__author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.post-hero__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--space-10);
  height: var(--space-10);
  border-radius: var(--radius-full);
  background: var(--color-teal);
  color: var(--color-white);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.post-hero__author-name {
  font-weight: var(--weight-medium);
  color: var(--color-slate-300);
}

.post-hero__date,
.post-hero__read,
.post-hero__category {
  position: relative;
  padding-left: var(--space-6);
}

.post-hero__date::before,
.post-hero__read::before,
.post-hero__category::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--color-slate-600);
}

/* Hide leading dot when date is the first child (guides — no author element) */
.post-hero__meta > :first-child::before {
  display: none;
}

.post-hero__meta > :first-child {
  padding-left: 0;
}

/* Category link styling */
.post-hero__category a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

.post-hero__category a:hover {
  color: var(--color-teal);
}

@media (max-width: 767px) {
  /* .post-hero h1 responsive → shared.css (.hero--dark) */

  .post-hero__deck {
    font-size: var(--text-lg);
  }

  .post-hero__meta {
    flex-direction: column;
    gap: var(--space-2);
  }

  .post-hero__date,
  .post-hero__read,
  .post-hero__category {
    padding-left: 0;
  }

  .post-hero__date::before,
  .post-hero__read::before,
  .post-hero__category::before {
    display: none;
  }
}

/* ── TL;DR / Callout Boxes ── */
.post-callout {
  background: var(--color-teal-light);
  border-left: var(--space-1) solid var(--color-teal);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.post-callout__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-teal-dark);
  margin-bottom: var(--space-3);
}

.post-callout ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.post-callout li {
  position: relative;
  padding-left: var(--space-6);
  font-size: var(--text-base);
  color: var(--color-slate-700);
  line-height: var(--leading-relaxed);
}

.post-callout li::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--space-2);
  width: var(--space-2);
  height: var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-teal);
}

.post-callout--warning {
  background: var(--color-warning-8);
  border-left-color: var(--color-warning);
}

.post-callout--warning .post-callout__title {
  color: var(--color-warning);
}

.post-callout--warning li::before {
  background: var(--color-warning);
}

.post-callout--info {
  background: var(--color-indigo-6);
  border-left-color: var(--color-indigo);
}

.post-callout--info .post-callout__title {
  color: var(--color-indigo);
}

.post-callout--info li::before {
  background: var(--color-indigo);
}

/* ── Article Body ── */
.post-body {
  max-width: var(--max-w-4xl);
  margin-inline: auto;
  padding: var(--space-16) var(--space-4);
}

.post-body h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-slate-900);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

.post-body h2:first-child {
  margin-top: 0;
}

.post-body h3 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-slate-900);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.post-body p {
  font-size: var(--text-lg);
  color: var(--color-slate-600);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.post-body p strong {
  color: var(--color-slate-900);
  font-weight: var(--weight-semibold);
}

.post-body a {
  color: var(--color-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body a:hover {
  color: var(--color-teal-dark);
}

/* Lists */
.post-body ul,
.post-body ol {
  margin-bottom: var(--space-6);
  padding-left: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.post-body ul li,
.post-body ol li {
  font-size: var(--text-lg);
  color: var(--color-slate-600);
  line-height: var(--leading-relaxed);
}

.post-body ul li::marker {
  color: var(--color-teal);
}

.post-body ol li::marker {
  color: var(--color-teal);
  font-weight: var(--weight-semibold);
}

/* Blockquotes */
.post-body blockquote {
  border-left: var(--space-1) solid var(--color-teal);
  background: var(--color-slate-50);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.post-body blockquote p {
  font-style: italic;
  color: var(--color-slate-700);
  margin-bottom: 0;
}

/* Code */
.post-body code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--color-slate-100);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--color-slate-700);
}

.post-body pre {
  background: var(--color-slate-900);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  overflow-x: auto;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: var(--color-slate-300);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

/* Images */
.post-body img {
  width: 100%;
  border-radius: var(--radius-xl);
  margin: var(--space-8) 0;
}

.post-body figure {
  margin: var(--space-8) 0;
}

.post-body figcaption {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-slate-500);
  margin-top: var(--space-3);
}

/* Horizontal rule */
.post-body hr {
  border: none;
  border-top: 1px solid var(--color-slate-200);
  margin: var(--space-12) 0;
}

/* ── Key Takeaways ── */
.post-takeaways {
  background: var(--color-slate-50);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-top: var(--space-12);
}

.post-takeaways__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-slate-900);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.post-takeaways__title svg {
  color: var(--color-teal);
  flex-shrink: 0;
}

.post-takeaways ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.post-takeaways li {
  position: relative;
  padding-left: var(--space-8);
  font-size: var(--text-base);
  color: var(--color-slate-700);
  line-height: var(--leading-relaxed);
}

.post-takeaways li svg {
  position: absolute;
  left: 0;
  top: var(--space-1);
  color: var(--color-teal);
  flex-shrink: 0;
}

/* ── Internal Link Cards ── */
.post-link-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--color-slate-50);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  text-decoration: none;
  transition: border-color var(--duration-base) var(--ease-default),
              background var(--duration-base) var(--ease-default);
}

.post-link-card:hover {
  border-color: var(--color-teal);
  background: var(--color-white);
}

.post-link-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--space-10);
  height: var(--space-10);
  border-radius: var(--radius-md);
  background: var(--color-teal-light);
  color: var(--color-teal);
  flex-shrink: 0;
}

.post-link-card__text {
  flex: 1;
}

.post-link-card__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-slate-500);
  font-weight: var(--weight-medium);
}

.post-link-card__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-slate-900);
}

.post-link-card__arrow {
  color: var(--color-slate-400);
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-default);
}

.post-link-card:hover .post-link-card__arrow {
  transform: translateX(var(--space-1));
}

@media (max-width: 767px) {
  .post-body {
    padding: var(--space-10) var(--space-4);
  }

  .post-body h2 {
    font-size: var(--text-2xl);
    margin-top: var(--space-10);
  }

  .post-body h3 {
    font-size: var(--text-xl);
    margin-top: var(--space-8);
  }

  .post-body p,
  .post-body ul li,
  .post-body ol li {
    font-size: var(--text-base);
  }
}

/* ── Author Bio ── */
.post-author {
  background-color: var(--color-white);
}

.post-author__card {
  max-width: var(--max-w-4xl);
  margin-inline: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  padding: var(--space-8);
  background: var(--color-slate-50);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-xl);
}

.post-author__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--space-16);
  height: var(--space-16);
  border-radius: var(--radius-full);
  background: var(--color-teal-light);
  color: var(--color-teal-dark);
  font-weight: var(--weight-bold);
  font-size: var(--text-2xl);
  flex-shrink: 0;
}

.post-author__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.post-author__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-slate-500);
  font-weight: var(--weight-medium);
}

.post-author__name {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-slate-900);
}

.post-author__bio {
  font-size: var(--text-sm);
  color: var(--color-slate-600);
  line-height: var(--leading-relaxed);
}

@media (max-width: 767px) {
  .post-author__card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ── Related Posts ── */
.post-related {
  background-color: var(--color-slate-50);
}

.post-related__heading {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  text-align: center;
  margin-bottom: var(--space-8);
  color: var(--color-slate-900);
}

.post-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

@media (max-width: 1023px) {
  .post-related__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .post-related__grid {
    grid-template-columns: 1fr;
  }

  .post-related__heading {
    font-size: var(--text-2xl);
  }
}

/* CTA styles → shared.css */
