/*
 * Eknetra Productions — blog.css
 * Blog/Insights archive and single post styles.
 * Loaded on is_single() and is_archive() for posts.
 * Supplements archive.php ekna-blog-* classes and single.php.
 */

/* ── Typography scale for article body ── */
.ekn-post-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 6vw;
  color: #a1a1aa;
}

.ekn-post-content > * + * {
  margin-top: 1.4em;
}

.ekn-post-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -.025em;
  color: #f5f5f7;
  margin-top: 52px;
  margin-bottom: 16px;
  line-height: 1.15;
}

.ekn-post-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  color: #f5f5f7;
  margin-top: 36px;
  margin-bottom: 12px;
}

.ekn-post-content h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ffb800;
  margin-top: 28px;
  margin-bottom: 10px;
}

.ekn-post-content p {
  font-size: 17px;
  line-height: 1.8;
  color: #a1a1aa;
}

.ekn-post-content a {
  color: #ffb800;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,184,0,.4);
  transition: color .2s ease, text-decoration-color .2s ease;
}

.ekn-post-content a:hover {
  color: #ff2d55;
  text-decoration-color: rgba(255,45,85,.5);
}

/* ── Lists ── */
.ekn-post-content ul,
.ekn-post-content ol {
  padding-left: 24px;
  color: #a1a1aa;
  font-size: 16px;
  line-height: 1.8;
}

.ekn-post-content ul { list-style: none; }

.ekn-post-content ul li::before {
  content: "✦";
  color: #ffb800;
  font-size: 10px;
  margin-right: 10px;
  margin-left: -20px;
  vertical-align: middle;
}

.ekn-post-content ol {
  list-style: decimal;
}

.ekn-post-content ol li {
  padding-left: 4px;
}

.ekn-post-content ol li::marker {
  color: #ffb800;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

/* ── Blockquote ── */
.ekn-post-content blockquote {
  border-left: 3px solid #ffb800;
  padding: 20px 28px;
  margin: 36px 0;
  font-family: 'Rubik', sans-serif;
  font-style: italic;
  font-size: 20px;
  color: #f5f5f7;
  line-height: 1.55;
  background: rgba(255,184,0,.04);
  border-radius: 0 14px 14px 0;
  position: relative;
}

.ekn-post-content blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #71717a;
  letter-spacing: .1em;
  font-style: normal;
  text-transform: uppercase;
}

/* ── Code ── */
.ekn-post-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px;
  padding: 2px 7px;
  color: #ffb800;
}

.ekn-post-content pre {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  margin: 28px 0;
}

.ekn-post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #a1a1aa;
}

/* ── Images in post body ── */
.ekn-post-content img {
  border-radius: 12px;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255,255,255,.06);
  margin: 8px 0;
}

.ekn-post-content figure {
  margin: 32px 0;
}

.ekn-post-content figcaption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #52525b;
  letter-spacing: .1em;
  text-align: center;
  margin-top: 10px;
  text-transform: uppercase;
}

/* ── Horizontal rule ── */
.ekn-post-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,184,0,.3), transparent);
  margin: 48px 0;
}

/* ── Info boxes ── */
.ekn-post-content .wp-block-callout,
.ekn-post-content .notice {
  background: rgba(255,184,0,.06);
  border: 1px solid rgba(255,184,0,.2);
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 15px;
  color: #d4d4d8;
}

/* ── Table ── */
.ekn-post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 28px 0;
}

.ekn-post-content th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #71717a;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-align: left;
}

.ekn-post-content td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  color: #a1a1aa;
  vertical-align: top;
}

.ekn-post-content tr:hover td {
  background: rgba(255,255,255,.02);
}

/* ── Post header ── */
.ekn-post-header {
  background: linear-gradient(180deg, #13091f 0%, #0a0a0f 100%);
  padding: 160px 6vw 80px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.ekn-post-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -.035em;
  font-weight: 700;
  color: #f5f5f7;
  max-width: 820px;
  margin: 20px 0 16px;
}

/* ── Author avatar ── */
.ekn-author-avatar {
  border-radius: 50%;
  border: 2px solid rgba(255,184,0,.3);
  width: 48px;
  height: 48px;
  object-fit: cover;
}

/* ── Featured image ── */
.ekn-post-thumb {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 6vw;
}

.ekn-post-thumb img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
}

/* ── Post navigation ── */
.ekn-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 6vw 60px;
  max-width: 760px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
}

.ekn-post-nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #a1a1aa;
  letter-spacing: .08em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color .25s ease;
}

.ekn-post-nav a:hover { color: #ffb800; }

/* ── Reading progress bar ── */
.ekn-reading-progress {
  position: fixed;
  top: 72px; /* below nav */
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffb800, #ff2d55);
  z-index: 999;
  width: 0%;
  transition: width .1s linear;
}

/* ── Sticky TOC (optional sidebar) ── */
.ekn-toc {
  position: sticky;
  top: 100px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 20px;
}

.ekn-toc h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #71717a;
  margin: 0 0 14px;
}

.ekn-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-counter;
}

.ekn-toc ol li {
  counter-increment: toc-counter;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 13px;
}

.ekn-toc ol li a {
  color: #71717a;
  text-decoration: none;
  transition: color .2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ekn-toc ol li a::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #3f3f46;
}

.ekn-toc ol li a:hover { color: #ffb800; }

/* ── Related posts ── */
.ekn-related {
  background: #0a0a0f;
  padding: 80px 6vw;
  border-top: 1px solid rgba(255,255,255,.05);
}

.ekn-related h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: #f5f5f7;
  margin: 0 0 40px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

.ekn-related-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── Share buttons ── */
.ekn-share {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 6vw 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ekn-share-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #52525b;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.ekn-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  color: #a1a1aa;
  text-decoration: none;
  transition: all .25s ease;
}

.ekn-share-btn:hover {
  border-color: rgba(255,184,0,.4);
  color: #ffb800;
  background: rgba(255,184,0,.05);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .ekn-post-content {
    padding: 60px 5vw;
  }
  .ekn-post-content p {
    font-size: 16px;
  }
  .ekn-post-header {
    padding: 130px 5vw 60px;
  }
  .ekn-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ekn-post-content blockquote {
    padding: 16px 20px;
    font-size: 18px;
  }
  .ekn-share {
    flex-direction: column;
    align-items: flex-start;
  }
}