/* =====================================================================
   Cameron Leo | Single blog post
   Loaded after styles.css on blog posts only. Uses the site tokens.
   .post-prose styles every rich text element a post can contain, so
   new articles render consistently whatever markup they use.
   ===================================================================== */

.post { padding-top: clamp(6rem, 14vw, 8rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.post-wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--space-6); }
@media (min-width: 768px) { .post-wrap { padding-inline: var(--space-8); } }

/* ---------------------------------------------------------------- header */
.post-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; color: var(--text-muted); }
.post-breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 200ms var(--ease); }
.post-breadcrumb a:hover { color: var(--text); }
.post-breadcrumb [aria-current] { color: var(--text); }

.post-intro { max-width: 820px; margin-top: var(--space-8); }
.post-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pop-red); }
.post-kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.post-title { margin: 18px 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(2.5rem, 6.5vw, 5.25rem); line-height: 0.96; letter-spacing: 0.005em; text-transform: uppercase; color: var(--text); }
.post-dek { margin: 22px 0 0; max-width: 40ch; font-family: var(--font-serif); font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.45; color: #d4d4cf; }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--border); }
.post-author { display: flex; align-items: center; gap: 14px; }
.post-author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.post-author-name { display: block; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.post-author-role { display: block; font-size: 0.82rem; color: var(--text-muted); }
.post-dates { display: flex; flex-wrap: wrap; gap: 28px; margin: 0; font-size: 0.82rem; }
.post-dates div { display: flex; flex-direction: column; gap: 2px; }
.post-dates dt { color: var(--text-muted); }
.post-dates dd { margin: 0; color: var(--text); }

/* ----------------------------------------------------------------- cover */
.post-cover { width: 100%; max-width: 1280px; margin: var(--space-8) auto 0; padding-inline: var(--space-6); }
@media (min-width: 768px) { .post-cover { padding-inline: var(--space-8); } }
.post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); background: var(--bg-elevated); }
.post-cover figcaption { max-width: 1120px; margin: 14px auto 0; font-size: 0.82rem; line-height: 1.5; color: var(--text-muted); }

/* ---------------------------------------------------------------- layout */
.post-layout { display: grid; gap: var(--space-12); margin-top: clamp(3rem, 6vw, 4.5rem); }
@media (min-width: 1024px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; align-items: start; }
  .post-aside { position: sticky; top: 110px; }
}

/* ----------------------------------------------------------------- prose */
.post-prose.article-body { max-width: 720px; }
.post-prose { font-size: 1.125rem; line-height: 1.75; color: #d4d4cf; }
.post-prose > * { margin: 0; }
.post-prose > * + * { margin-top: var(--space-6); }
.post-prose > p:first-child { font-size: 1.3rem; line-height: 1.65; color: var(--text); }
.post-prose p { color: inherit; font-size: inherit; line-height: inherit; }

.post-prose h2 { margin-top: 3.5rem; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.75rem, 3.2vw, 2.15rem); line-height: 1.08; letter-spacing: 0.005em; text-transform: uppercase; color: var(--text); scroll-margin-top: 110px; }
.post-prose h3 { margin-top: 2.5rem; font-family: var(--font-serif); font-weight: 600; font-size: 1.5rem; line-height: 1.3; letter-spacing: 0; text-transform: none; color: var(--text); scroll-margin-top: 110px; }
.post-prose h4, .post-prose h5, .post-prose h6 { margin-top: 2rem; font-family: var(--font-body); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.post-prose h2 + *, .post-prose h3 + *, .post-prose h4 + *, .post-prose h5 + *, .post-prose h6 + * { margin-top: 14px; }

.post-prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--pop-red); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color 200ms var(--ease); }
.post-prose a:hover { color: var(--pop-red); }
.post-prose strong, .post-prose b { color: var(--text); font-weight: 600; }
.post-prose em, .post-prose i { font-family: var(--font-serif); font-style: italic; font-size: 1.04em; }
.post-prose mark { background: rgba(243, 80, 59, 0.22); color: var(--text); padding: 0 4px; border-radius: 3px; }
.post-prose small { font-size: 0.85em; color: var(--text-muted); }
.post-prose sup, .post-prose sub { font-size: 0.72em; line-height: 0; }
.post-prose abbr[title] { text-decoration: underline dotted; cursor: help; }
.post-prose kbd { font-family: ui-monospace, Menlo, monospace; font-size: 0.85em; padding: 2px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--radius-sm); color: var(--text); }
.post-prose code { font-family: ui-monospace, Menlo, monospace; font-size: 0.88em; background: var(--bg-elevated-2); padding: 2px 6px; border-radius: var(--radius-sm); color: var(--text); }
.post-prose pre { overflow-x: auto; padding: var(--space-5) var(--space-6); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 0.9rem; line-height: 1.6; }
.post-prose pre code { background: none; padding: 0; }

.post-prose ul, .post-prose ol { padding-left: 1.6rem; }
.post-prose li { padding-left: 0.35rem; }
.post-prose li + li { margin-top: 10px; }
.post-prose li > ul, .post-prose li > ol { margin-top: 10px; }
.post-prose ul > li::marker { color: var(--pop-red); }
.post-prose ol > li::marker { color: var(--pop-red); font-weight: 700; font-variant-numeric: tabular-nums; }
.post-prose li strong { color: var(--text); }

.post-prose blockquote { margin-top: 2.5rem; padding: 4px 0 4px 28px; border-left: 2px solid var(--pop-red); }
.post-prose blockquote p { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.45; font-style: italic; color: var(--text); }
.post-prose blockquote p + p { margin-top: var(--space-4); }
.post-prose blockquote cite, .post-prose blockquote footer { display: block; margin-top: 14px; font-style: normal; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }

.post-prose hr { margin-top: 3.5rem; border: 0; height: 1px; background: var(--border); }
.post-prose hr + * { margin-top: 3.5rem; }

.post-prose img, .post-prose video { display: block; max-width: 100%; height: auto; border-radius: var(--radius-md); }
.post-prose figure { margin-top: 2.5rem; }
.post-prose figcaption { margin-top: 12px; font-size: 0.875rem; line-height: 1.5; color: var(--text-muted); }
.post-prose iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-md); }

.post-prose table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; }
.post-prose caption { caption-side: bottom; text-align: left; margin-top: 12px; font-size: 0.875rem; color: var(--text-muted); }
.post-prose th { text-align: left; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); padding: 0 16px 12px 0; border-bottom: 1px solid var(--border-strong); }
.post-prose td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--border); vertical-align: top; }

.post-prose dl dt { color: var(--text); font-weight: 600; }
.post-prose dl dd { margin: 4px 0 0; }
.post-prose dl dd + dt { margin-top: var(--space-4); }

.post-prose details { border-top: 1px solid var(--border); }
.post-prose details + details { margin-top: 0; }
.post-prose details:last-of-type { border-bottom: 1px solid var(--border); }
.post-prose summary { cursor: pointer; padding: 18px 0; font-weight: 600; color: var(--text); }
.post-prose details > :not(summary) { padding-bottom: 18px; }

/* ----------------------------------------------------------------- aside */
.post-aside { display: flex; flex-direction: column; gap: var(--space-8); }
.post-aside-label { margin: 0 0 14px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.post-toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--border); font-size: 0.875rem; line-height: 1.45; }
.post-toc a { display: block; margin-left: -1px; padding: 8px 0 8px 16px; border-left: 2px solid transparent; color: var(--text-muted); text-decoration: none; transition: color 200ms var(--ease), border-color 200ms var(--ease); }
.post-toc a:hover { color: var(--text); border-left-color: var(--pop-red); }
.post-share-links { display: flex; gap: 10px; }
.post-share-links a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--text); transition: border-color 200ms var(--ease); }
.post-share-links a:hover { border-color: var(--text); }
.post-share-links svg { width: 18px; height: 18px; }
.post-aside-cta { padding: var(--space-6); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.post-aside-cta p { margin: 0; }
.post-aside-cta .post-aside-title { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; line-height: 1.3; color: var(--text); }
.post-aside-cta p + p { margin-top: 8px; font-size: 0.875rem; line-height: 1.55; color: var(--text-muted); }
.post-aside-cta .btn { width: 100%; margin-top: var(--space-4); }
@media (max-width: 1023px) { .post-toc { display: none; } }

/* ---------------------------------------------------------------- author */
.post-author-box { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; max-width: 720px; margin-top: var(--space-12); padding: var(--space-6); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.post-author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.post-author-box div { flex: 1 1 260px; min-width: 0; }
.post-author-box p { margin: 0; }
.post-author-box .post-aside-label { margin: 0; }
.post-author-box .post-author-box-name { margin-top: 8px; font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; color: var(--text); }
.post-author-box .post-author-box-bio { margin-top: 8px; font-size: 1rem; line-height: 1.6; color: #d4d4cf; }
.post-author-box a { display: inline-block; margin-top: 12px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
