/* ============================================================
   App Nodex Blog — listing + single post styles
   Light theme (white background), shares typography with
   assets/style.css. The fixed dark topbar (.hero-topbar) is
   untouched — it's defined globally in style.css.
   ============================================================ */

body.blog-body { background: #fff; color: #0a0a0a; }

/* Fixed topbar for pages without a video hero (kept dark, same as site) */
.blog-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: #000;
}

/* ---------- Blog listing hero ---------- */
.blog-hero {
  padding: 170px 40px 50px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.blog-hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.4);
  margin-bottom: 18px;
  font-family: 'Space Mono', monospace;
}
.blog-hero h1 {
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0a0a0a;
  margin-bottom: 20px;
}
.blog-hero p {
  font-size: 18px;
  color: rgba(0,0,0,0.55);
  max-width: 560px;
  line-height: 1.6;
  margin: 0 auto;
}

/* ---------- Category filter tabs ---------- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 60px;
}
.blog-filter {
  display: inline-block;
  padding: 0 0 6px;
  border-bottom: 2px solid transparent;
  color: rgba(0,0,0,0.5);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.blog-filter:hover { color: #0a0a0a; }
.blog-filter.-active { color: #0a0a0a; border-color: #0a0a0a; }

/* ---------- Post grid ---------- */
.blog-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 100px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
@media (max-width: 780px) { .blog-grid { grid-template-columns: 1fr; padding: 0 20px 60px; gap: 32px; } }

.blog-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: #f2f2f4;
}
.blog-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(.25,.46,.45,.94);
}
.blog-card:hover .blog-card-thumb img { transform: scale(1.05); }

.blog-card-body { padding: 22px 4px 0; }
.blog-card-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e0293c;
  font-weight: 600;
  margin-bottom: 12px;
}
.blog-card-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: #0a0a0a;
  margin-bottom: 14px;
}
.blog-card-meta {
  font-size: 13.5px;
  color: rgba(0,0,0,0.45);
  display: flex;
  gap: 10px;
}

.blog-empty {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 120px;
  color: rgba(0,0,0,0.5);
  font-size: 16px;
  text-align: center;
}

/* ---------- Pagination ---------- */
.blog-pagination {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 120px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.blog-pagination a, .blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  color: rgba(0,0,0,0.55);
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.12);
}
.blog-pagination a:hover { color: #0a0a0a; border-color: rgba(0,0,0,0.35); }
.blog-pagination .-current { background: #0a0a0a; color: #fff; border-color: #0a0a0a; font-weight: 600; }

/* ============================================================
   Single blog post ("inner blog page")
   ============================================================ */

/* ---------- Reading progress bar ---------- */
.post-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  z-index: 250;
  background: linear-gradient(90deg, #e0293c, #ff6a3d);
  transition: width 0.08s linear;
}

.post-hero {
  padding: 168px 40px 0;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.post-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(0,0,0,0.4);
  margin-bottom: 28px;
  font-family: 'Space Mono', monospace;
}
.post-breadcrumb a { color: rgba(0,0,0,0.55); text-decoration: none; transition: color 0.2s ease; }
.post-breadcrumb a:hover { color: #e0293c; }
.post-breadcrumb span { opacity: 0.35; }

.post-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e0293c;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-left: 18px;
}
.post-tag::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 10px; height: 2px;
  background: #e0293c;
  transform: translateY(-50%);
}
.post-title {
  font-size: clamp(32px, 5.4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #0a0a0a;
  margin-bottom: 22px;
}
.post-excerpt {
  font-size: 18.5px;
  line-height: 1.65;
  color: rgba(0,0,0,0.55);
  margin: 0 auto 32px;
  max-width: 600px;
}
.post-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-top: 26px;
  border-top: 1px solid rgba(0,0,0,0.09);
  font-size: 14px;
  color: rgba(0,0,0,0.5);
}
.post-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e0293c, #ff6a3d);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.post-meta-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.post-meta .post-author { color: #0a0a0a; font-weight: 600; }
.post-meta-sub { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.post-meta .dot { opacity: 0.35; }

.post-cover {
  max-width: 1040px;
  margin: 44px auto 0;
  padding: 0 40px;
}
.post-cover img {
  width: 100%;
  border-radius: 22px;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #f2f2f4;
  box-shadow: 0 30px 70px rgba(0,0,0,0.14);
}

/* ---------- Post article grid: sticky share rail (left gutter) + body ---------- */
.post-article-grid {
  max-width: 1400px;
  margin: 60px auto 0;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 720px 1fr;
  column-gap: 32px;
}

.post-share-rail {
  grid-column: 1;
  justify-self: end;
  position: sticky;
  top: 160px;
  height: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 6px;
}
.post-share-rail-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(0,0,0,0.35);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-bottom: 4px;
}
.post-share-rail a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.14);
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,0.65);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.post-share-rail a:hover { border-color: #e0293c; color: #fff; background: #e0293c; transform: translateY(-2px); }
.post-share-rail svg { width: 16px; height: 16px; }

.post-main { grid-column: 2; min-width: 0; }

@media (max-width: 1180px) {
  .post-article-grid { grid-template-columns: 1fr; max-width: 800px; }
  .post-main { grid-column: 1; }
  .post-share-rail { display: none; }
}

.post-body {
  max-width: none;
  margin: 0;
  padding: 0 0 8px;
  font-size: 17.5px;
  line-height: 1.8;
  color: rgba(0,0,0,0.78);
}
.post-body h2, .post-body h3 { scroll-margin-top: 130px; }
.post-body p { margin-bottom: 20px; }
.post-body p:empty { display: none; margin: 0; }
.post-body > p:first-of-type::first-letter {
  float: left;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 60px;
  line-height: 0.82;
  padding: 6px 8px 0 0;
  color: #0a0a0a;
}
.post-body h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  margin: 50px 0 20px;
}
.post-body h3 {
  font-size: 22px;
  font-weight: 600;
  color: #0a0a0a;
  margin: 38px 0 16px;
}
.post-body ul, .post-body ol { margin: 0 0 26px 22px; }
.post-body li { margin-bottom: 10px; }
.post-body a { color: #e0293c; text-decoration: underline; text-underline-offset: 3px; transition: opacity 0.2s ease; }
.post-body a:hover { opacity: 0.75; }
.post-body img { max-width: 100%; border-radius: 12px; margin: 8px 0 26px; display: block; }
.post-body hr { border: none; border-top: 1px solid rgba(0,0,0,0.1); margin: 40px 0; }
.post-body strong { color: #0a0a0a; }

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 30px;
  font-size: 15.5px;
}
.post-body th, .post-body td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.post-body th { color: #0a0a0a; font-weight: 600; background: #fafafa; }

.post-body pre {
  background: #0a0a0a;
  color: #f5f5f5;
  padding: 20px 22px;
  border-radius: 14px;
  overflow-x: auto;
  margin: 8px 0 26px;
  font-size: 14px;
  line-height: 1.6;
}
.post-body code {
  font-family: 'Space Mono', monospace;
  font-size: 0.88em;
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 5px;
}
.post-body pre code { background: transparent; padding: 0; }

/* Content pasted into the admin editor (from Google Docs, other sites, etc.)
   often carries inline color / background-color styles baked into each
   <p>, <span> and <strong>. Force everything back to the theme's palette
   regardless of what inline styles the pasted HTML contains. */
.post-body :where(p, span, strong, b, em, i, li, td, th) {
  color: inherit !important;
  background-color: transparent !important;
}
.post-body a, .post-body a * { color: #e0293c !important; background-color: transparent !important; }
.post-body h2, .post-body h2 * { color: #0a0a0a !important; background-color: transparent !important; }
.post-body h3, .post-body h3 * { color: #0a0a0a !important; background-color: transparent !important; }
.post-body blockquote, .post-body blockquote * { color: #0a0a0a !important; background-color: transparent !important; }
.post-body blockquote {
  position: relative;
  border-left: 3px solid #e0293c;
  padding: 6px 0 6px 26px;
  margin: 36px 0;
  font-size: 20px;
  font-style: italic;
  color: #0a0a0a;
}
.post-body figure { margin: 0 0 26px; }
.post-body figcaption { font-size: 14px; color: rgba(0,0,0,0.45); margin-top: 8px; }

/* ---------- Share row shown inline under the article on narrower screens ---------- */
.post-share-inline {
  display: none;
  margin: 44px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.post-share-inline > span { font-size: 13px; color: rgba(0,0,0,0.4); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.post-share-inline-icons { display: flex; align-items: center; gap: 12px; }
.post-share-inline-icons a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,0.7);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.post-share-inline-icons a:hover { border-color: #e0293c; color: #fff; background: #e0293c; transform: translateY(-2px); }
.post-share-inline-icons svg { width: 16px; height: 16px; }

@media (max-width: 1180px) {
  .post-share-inline { display: flex; }
}

.post-back {
  margin: 24px 0 40px;
}
.post-back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(0,0,0,0.55);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.25);
  padding-bottom: 3px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.post-back a:hover { color: #e0293c; border-color: #e0293c; }

/* ---------- Related posts ---------- */
.post-related {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px 120px;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.post-related-eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e0293c;
  font-weight: 700;
  margin-top: 44px;
}
.post-related h3 {
  font-size: 26px;
  font-weight: 600;
  color: #0a0a0a;
  margin: 10px 0 28px;
  letter-spacing: -0.01em;
}
.post-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .post-related-grid { grid-template-columns: 1fr; } }
.post-related .blog-card-thumb { aspect-ratio: 4/3; border-radius: 16px; }
.post-related .blog-card-body { padding: 16px 2px 0; }
.post-related .blog-card-title { font-size: 17px; }

@media (max-width: 640px) {
  .blog-hero, .post-hero, .post-article-grid, .post-related { padding-left: 20px; padding-right: 20px; }
  .post-cover { padding: 0 20px; }
  .post-hero { padding-top: 140px; }
  .post-meta { flex-wrap: wrap; }
}

/* ---------- CTA banner reused across post pages ---------- */
.post-cta {
  max-width: 1200px;
  margin: 0 auto 100px;
  padding: 64px 48px;
  border-radius: 24px;
  background: #0a0a0a;
  background-image: radial-gradient(circle at 15% 20%, rgba(224,41,60,0.4), transparent 55%),
                     radial-gradient(circle at 85% 90%, rgba(255,106,61,0.25), transparent 55%);
  text-align: center;
}
.post-cta h3 {
  font-size: clamp(24px, 3.4vw, 34px);
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.post-cta p { color: rgba(255,255,255,0.6); margin-bottom: 28px; font-size: 15.5px; }
.post-cta a {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 100px;
  background: #fff;
  color: #0a0a0a;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.post-cta a:hover { opacity: 0.9; transform: translateY(-2px); }