/* Blog post article styles — uses site-pages.css for header, footer, and banner base */

.blog-post-page {
  --yellow: #ffec00;
  --yellow-2: #ffd800;
  --faint: rgba(255,255,255,0.4);
  --surface-hover: #141414;
  --container: 1320px;
}

.blog-post-page .page-banner-title {
  font-size: 46px;
  max-width: 860px;
  background: linear-gradient(180deg, #ffffff 30%, rgba(255,255,255,0.72) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-post-page .page-banner-inner > :nth-child(4) { animation-delay: 0.35s; }

.blog-post-page .post-excerpt {
  max-width: 720px;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.58);
}

.blog-post-page .post-meta {
  margin-top: 20px;
}

.post-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px;
  font-size: 13.5px; color: var(--mid);
}
.post-meta .author {
  display: inline-flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.85); font-weight: 500;
}
.post-meta .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-hover); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--yellow);
}
.post-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.25); }

.post-wrap {
  position: relative;
  background: var(--bg);
  padding: 64px 24px 96px;
}
.post-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: start;
}

.post-figure {
  margin-bottom: 44px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.post-figure img,
.post-figure .ph {
  width: 100%; aspect-ratio: 16 / 8; display: block; object-fit: cover;
}
.post-figure figcaption {
  font-size: 12.5px; color: var(--faint);
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.01em;
}

.prose > * + * { margin-top: 24px; }

.prose .lead {
  font-size: 20px; line-height: 1.6; color: rgba(255,255,255,0.78);
  font-weight: 400;
}
.prose p { font-size: 16.5px; line-height: 1.8; color: rgba(255,255,255,0.66); }
.prose a:not(.btn) { color: var(--yellow-2); text-decoration: none; border-bottom: 1px solid rgba(255,216,0,0.4); transition: border-color 0.2s; }
.prose a:not(.btn):hover { border-color: var(--yellow-2); }

.prose h2 {
  font-size: 28px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.2; color: #fff;
  margin-top: 52px; padding-top: 8px;
}
.prose h2 + p { margin-top: 16px; }
.prose h3 {
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
  color: rgba(255,255,255,0.94); margin-top: 36px;
}
.prose h3 + p { margin-top: 12px; }

.prose ul, .prose ol { padding-left: 4px; list-style: none; }
.prose li {
  position: relative;
  font-size: 16.5px; line-height: 1.75; color: rgba(255,255,255,0.66);
  padding-left: 28px; margin-top: 12px;
}
.prose ul li::before {
  content: ''; position: absolute; left: 4px; top: 11px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--yellow);
}
.prose ol { counter-reset: li; }
.prose ol li { counter-increment: li; }
.prose ol li::before {
  content: counter(li); position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--surface-hover); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--yellow);
  display: flex; align-items: center; justify-content: center;
}

.prose blockquote {
  margin: 36px 0;
  padding: 22px 26px;
  border-left: 2px solid var(--yellow);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
}
.prose blockquote p {
  font-size: 19px; line-height: 1.55; color: rgba(255,255,255,0.9);
  font-weight: 400; font-style: italic;
}
.prose blockquote cite {
  display: block; margin-top: 12px;
  font-size: 13px; font-style: normal; color: var(--faint);
  font-family: 'JetBrains Mono', monospace;
}

.callout {
  margin: 36px 0;
  display: flex; gap: 16px;
  padding: 22px 24px;
  border: 1px solid rgba(255,236,0,0.25);
  border-radius: 14px;
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(255,236,0,0.08), transparent 60%),
    var(--surface);
}
.callout-icon {
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  background: var(--yellow);
  display: flex; align-items: center; justify-content: center;
}
.callout-icon svg { width: 20px; height: 20px; stroke: #080808; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.callout-body h4 { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--yellow-2); margin-bottom: 6px; }
.callout-body p { font-size: 15px; line-height: 1.65; color: rgba(255,255,255,0.78); }

.prose figure.inline-img {
  margin: 40px 0;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border);
}
.prose figure.inline-img img,
.prose figure.inline-img .ph { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; }
.prose figure.inline-img figcaption {
  font-size: 12.5px; color: var(--faint); padding: 11px 16px;
  border-top: 1px solid var(--border); background: var(--surface);
  font-family: 'JetBrains Mono', monospace;
}

.prose hr {
  border: none; height: 1px; background: var(--border); margin: 44px 0;
}

.ph {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 12px, transparent 12px 24px),
    var(--surface-hover);
  position: relative;
}
.ph::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

.author-card {
  margin-top: 56px;
  display: flex; gap: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.author-card .ac-avatar {
  width: 64px; height: 64px; border-radius: 12px; flex-shrink: 0;
  background: var(--surface-hover); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: var(--yellow);
}
.author-card .ac-role {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--yellow-2); margin-bottom: 6px;
}
.author-card h4 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.author-card p { font-size: 14.5px; line-height: 1.6; color: var(--mid); }

.prose h2,
.prose h3 {
  scroll-margin-top: calc(var(--site-header-height) + 24px);
}

/* Sidebar */
.post-aside {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aside-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 22px;
}

.aside-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.toc-list a {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  color: var(--mid);
  text-decoration: none;
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}

.toc-list a:hover,
.toc-list a.active {
  color: #fff;
  border-left-color: var(--yellow);
}

.share-row { display: flex; gap: 10px; }
.share-btn {
  width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.share-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.share-btn:hover { background: var(--yellow); border-color: var(--yellow); color: #080808; }

.aside-cta {
  border: 1px solid rgba(255,236,0,0.25);
  border-radius: 14px;
  padding: 24px;
  background:
    radial-gradient(130% 160% at 100% 0%, rgba(255,236,0,0.12), transparent 60%),
    var(--surface);
}

.aside-cta h4 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 8px;
}

.aside-cta p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mid);
  margin-bottom: 18px;
}

.aside-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--yellow);
  color: #080808;
  font-family: 'DM Sans', 'DM Sans Fallback', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 9px;
  text-decoration: none;
  border: none;
  box-shadow: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.aside-cta .btn:hover { opacity: 0.88; }

.aside-cta .btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.aside-cta .btn:hover svg { transform: translateX(3px); }

/* Categories */
.aside-cat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.aside-cat-list li + li {
  border-top: 1px solid var(--border);
}

.aside-cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  transition: color 0.2s;
}

.aside-cat-list a:hover { color: #fff; }

.aside-cat-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
  flex-shrink: 0;
}

/* Recent posts */
.aside-recent-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aside-recent-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.aside-recent-item:hover { opacity: 0.88; }

.aside-recent-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface-hover);
}

.aside-recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aside-recent-thumb--ph {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 8px, transparent 8px 16px),
    var(--surface-hover);
}

.aside-recent-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.aside-recent-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

.aside-recent-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Footer links */
.aside-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--yellow-2);
  text-decoration: none;
  transition: opacity 0.2s;
}

.aside-more-link:hover { opacity: 0.85; }

.aside-more-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Tags */
.aside-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aside-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.aside-tag:hover {
  color: #fff;
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.related {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 72px 24px 88px;
}
.related-inner { max-width: var(--container); margin: 0 auto; }
.related-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 32px;
}
.related-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow-2); }
.related-head span { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--yellow-2); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--surface); text-decoration: none; display: block;
  transition: border-color 0.25s, transform 0.25s;
}
.related-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.related-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.related-card .ph { aspect-ratio: 16 / 9; }
.related-card-body { padding: 20px 22px 24px; }
.related-card .rc-cat {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--yellow-2); margin-bottom: 10px;
}
.related-card h3 { font-size: 17px; font-weight: 600; line-height: 1.35; color: #fff; margin-bottom: 10px; letter-spacing: -0.01em; }
.related-card .rc-meta { font-size: 12.5px; color: var(--faint); }

.progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: var(--yellow); width: 0%; z-index: 200;
  transition: width 0.1s linear;
}

@media (max-width: 1080px) {
  .post-inner { grid-template-columns: 1fr; gap: 0; }
  .post-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 48px;
  }
  .aside-card,
  .aside-cta { flex: 1; min-width: 240px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-post-page .page-banner-title { font-size: 32px; }
  .prose .lead { font-size: 18px; }
  .related-grid { grid-template-columns: 1fr; }
  .post-aside { flex-direction: column; }
  .author-card { flex-direction: column; gap: 14px; }
}
