/* ============================================================
   TOMFOOLERING — Post / Article Styles
   ============================================================ */

/* ── Post Hero ──────────────────────────────────────────────── */
.post-hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.post-hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.post-hero:hover .post-hero-img { transform: scale(1.03); }
.post-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,6,15,1) 0%, rgba(6,6,15,.6) 40%, rgba(6,6,15,.15) 80%);
}
.post-hero-content {
  position: relative; z-index: 2;
  padding: 64px 0 52px;
  width: 100%;
}
.post-hero-content .container { max-width: 900px; }
.post-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; color: var(--muted);
  margin-bottom: 20px;
}
.post-breadcrumb a { color: var(--muted); }
.post-breadcrumb a:hover { color: var(--cyan); }
.post-breadcrumb svg { opacity: .5; }
.post-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.post-hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 820px;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.post-hero-subtitle {
  font-size: 1.15rem;
  color: rgba(224,224,240,.8);
  max-width: 680px;
  margin-top: 16px;
  line-height: 1.6;
}
.post-meta-bar {
  display: flex; align-items: center; gap: 24px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  flex-wrap: wrap;
}
.post-meta-bar .meta-item {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: rgba(224,224,240,.7);
}
.post-meta-bar .meta-item svg { opacity: .6; }

/* ── Article Layout ─────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 64px;
  align-items: start;
  padding: 60px 0 80px;
}
.article-body { min-width: 0; }
.article-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 28px; }

/* ── Article Content ────────────────────────────────────────── */
.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(224,224,240,.9);
}
.article-content h2 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin: 56px 0 24px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.article-content h2::before {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 99px;
  margin-bottom: 16px;
}
.article-content h3 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  margin: 40px 0 16px;
}
.article-content h4 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cyan);
  margin: 28px 0 12px;
}
.article-content p { margin-bottom: 24px; }
.article-content a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(0,212,255,.3);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
.article-content a:hover { text-decoration-color: var(--cyan); }

.article-content strong { color: #fff; font-weight: 600; }
.article-content em { color: rgba(224,224,240,.85); }

.article-content ul, .article-content ol {
  margin: 0 0 28px 0;
  padding-left: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.article-content ul { list-style: none; padding-left: 0; }
.article-content ul li { padding-left: 24px; position: relative; }
.article-content ul li::before {
  content: '▸';
  position: absolute; left: 0;
  color: var(--cyan);
  font-size: .9em;
}
.article-content ol { list-style: decimal; }
.article-content ol li::marker { color: var(--cyan); font-weight: 600; }

.article-content blockquote {
  margin: 32px 0;
  padding: 24px 28px;
  background: rgba(0,212,255,.04);
  border-left: 3px solid var(--cyan);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: rgba(224,224,240,.85);
  font-size: 1.1rem;
}
.article-content blockquote::before {
  content: '"';
  display: block;
  font-size: 3rem;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 8px;
  font-style: normal;
}

.article-content code:not([class*="language-"]) {
  background: rgba(0,212,255,.08);
  border: 1px solid rgba(0,212,255,.15);
  color: var(--cyan);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .875em;
}

.article-content img {
  width: 100%;
  border-radius: var(--radius);
  margin: 32px 0;
  border: 1px solid var(--border);
}

.article-content .callout {
  padding: 20px 24px;
  border-radius: var(--radius);
  margin: 28px 0;
  display: flex; gap: 16px;
  align-items: flex-start;
}
.article-content .callout-info {
  background: rgba(0,212,255,.06);
  border: 1px solid rgba(0,212,255,.2);
}
.article-content .callout-warn {
  background: rgba(255,230,0,.06);
  border: 1px solid rgba(255,230,0,.2);
}
.article-content .callout-tip {
  background: rgba(0,255,136,.06);
  border: 1px solid rgba(0,255,136,.2);
}
.callout-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.callout-body { flex: 1; }
.callout-title { font-weight: 600; margin-bottom: 4px; color: #fff; }

/* ── Table of Contents ──────────────────────────────────────── */
.toc-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.toc-widget h3 {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.toc-list { display: flex; flex-direction: column; gap: 4px; }
.toc-list a {
  display: block;
  font-size: .875rem;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all .2s var(--ease);
  line-height: 1.4;
}
.toc-list a:hover, .toc-list a.active {
  color: var(--cyan);
  background: rgba(0,212,255,.07);
}
.toc-list .toc-h3 { padding-left: 20px; font-size: .82rem; }

/* ── Author Box ─────────────────────────────────────────────── */
.author-box {
  display: flex; gap: 24px; align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin: 48px 0;
}
.author-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid var(--cyan);
  object-fit: cover; flex-shrink: 0;
}
.author-info h4 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.author-info .author-role { font-size: .82rem; color: var(--cyan); margin-bottom: 10px; }
.author-info p { font-size: .9rem; color: var(--muted); line-height: 1.6; }

/* ── Share Bar ──────────────────────────────────────────────── */
.share-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 32px 0;
}
.share-bar span { font-size: .85rem; color: var(--muted); margin-right: 8px; }
.share-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.share-btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,212,255,.07); }

/* ── Related Posts ──────────────────────────────────────────── */
.related-posts { margin-top: 60px; }
.related-posts h3 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 28px;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ── Progress Bar ───────────────────────────────────────────── */
#read-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  width: 0%;
  transition: width .1s linear;
  box-shadow: 0 0 12px rgba(0,212,255,.6);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .post-hero { height: 420px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .post-hero { height: 340px; }
  .post-hero-content { padding: 40px 0 36px; }
  .post-hero-title { font-size: 1.8rem; }
  .author-box { flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }
  .share-bar { flex-wrap: wrap; }
}
