/* ==========================================================================
   NaxOrb Blog — component styles.
   Reuses the design tokens defined in voxorb-landing.css (:root). This file is
   loaded AFTER voxorb-landing.css so header/footer/buttons stay identical and
   blog components inherit the same colours, radii, spacing and typography.
   ========================================================================== */

.blog-main { padding-top: 128px; }

/* Shared section container mirrors .section-shell width/padding. */
.blog-shell {
  position: relative;
  width: min(100%, calc(var(--max-width) + var(--page-pad) * 2));
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: calc(var(--page-pad) + env(safe-area-inset-right, 0px));
}

/* ---------------------------------------------------------------- Breadcrumbs */
.breadcrumbs { margin: 0 0 22px; }
.breadcrumbs ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0; padding: 0; list-style: none;
  font-size: 12px; color: var(--quiet);
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: #4a4d5a; }
.breadcrumbs a { color: var(--quiet); transition: color 180ms var(--ease); }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs li[aria-current] span { color: var(--muted); }

/* ------------------------------------------------------------------- Blog hero */
.blog-hero { padding-top: 26px; padding-bottom: 40px; }
.blog-hero .eyebrow { margin-bottom: 20px; }
.blog-hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 74px);
  font-weight: 580; line-height: 0.99; letter-spacing: -0.05em;
  text-wrap: balance;
}
.blog-hero h1 span { color: var(--muted); font-weight: 430; }
.blog-hero p.lead { max-width: 640px; margin: 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); }

/* ---------------------------------------------------------------- Toolbar/filter */
.blog-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; margin: 8px 0 34px;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.025); color: var(--muted);
  font-size: 13px; font-weight: 550; transition: all 200ms var(--ease);
}
.cat-chip:hover { color: #fff; border-color: var(--line-strong); }
.cat-chip.is-active { background: #f6f7fb; color: #09090c; border-color: transparent; }
.cat-chip small { opacity: 0.6; font-weight: 600; }

.blog-search { position: relative; display: flex; align-items: center; }
.blog-search input {
  width: min(320px, 60vw); min-height: 44px;
  padding: 0 42px 0 16px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.03); color: var(--text);
  font-size: 14px; transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.blog-search input::placeholder { color: var(--quiet); }
.blog-search input:focus { outline: none; border-color: var(--violet); background: rgba(124, 92, 255, 0.06); }
.blog-search button {
  position: absolute; right: 6px; display: grid; place-content: center;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
}
.blog-search button:hover { color: #fff; }
.blog-search svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* -------------------------------------------------------------------- Post grid */
.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  margin-bottom: 20px;
}
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)), var(--surface);
  transition: transform 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.post-card:hover {
  transform: translateY(-4px); border-color: var(--line-strong);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32);
}
.post-card a.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.post-thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(124, 92, 255, 0.22), transparent 60%), var(--void-soft);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-thumb-fallback { display: grid; place-content: center; width: 100%; height: 100%; color: rgba(255, 255, 255, 0.16); }
.post-thumb-fallback svg { width: 48px; height: 48px; }
.post-body { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 22px 22px 24px; }
.post-cat {
  align-self: flex-start; padding: 4px 11px; border-radius: 999px;
  background: rgba(124, 92, 255, 0.14); color: var(--lilac);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
.post-card h3, .post-card h2 {
  margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 560;
  line-height: 1.18; letter-spacing: -0.02em; color: var(--text);
}
.post-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.post-meta { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; color: var(--quiet); font-size: 12px; }
.post-meta span { display: inline-flex; align-items: center; gap: 5px; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* Featured card (spans full width, horizontal on desktop). */
.post-featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 26px;
  background: linear-gradient(150deg, rgba(124, 92, 255, 0.08), rgba(255, 255, 255, 0.008)), var(--surface);
  margin-bottom: 30px; transition: transform 300ms var(--ease), box-shadow 300ms var(--ease), border-color 300ms var(--ease);
}
.post-featured:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34); }
.post-featured a.card-link { display: contents; color: inherit; }
.post-featured .post-thumb { aspect-ratio: auto; min-height: 320px; }
.post-featured .post-body { justify-content: center; gap: 16px; padding: clamp(28px, 4vw, 48px); }
.post-featured h2 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.06; }
.post-featured p { font-size: 16px; }
.featured-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px; background: rgba(83, 215, 255, 0.12);
  color: var(--cyan); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}

/* --------------------------------------------------------------- Empty state */
.empty-state {
  display: grid; place-items: center; gap: 14px; text-align: center;
  padding: 70px 20px; border: 1px dashed var(--line); border-radius: 24px;
  background: rgba(255, 255, 255, 0.012);
}
.empty-state svg { width: 44px; height: 44px; color: var(--quiet); }
.empty-state h3 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 550; }
.empty-state p { margin: 0; max-width: 420px; color: var(--muted); font-size: 14px; }

/* --------------------------------------------------------------- Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 42px 0 10px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--muted); font-size: 14px; font-weight: 600; transition: all 200ms var(--ease);
}
.pagination a:hover { color: #fff; border-color: var(--line-strong); }
.pagination .is-current { background: #f6f7fb; color: #09090c; border-color: transparent; }
.pagination .is-disabled { opacity: 0.35; pointer-events: none; }

/* =========================================================== Article view */
.article { padding-top: 20px; }
.article-head { width: min(100%, 800px); margin: 0 auto; text-align: left; }
.article-head .post-cat { margin-bottom: 18px; }
.article-head h1 {
  margin: 0 0 18px; font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 58px); font-weight: 580; line-height: 1.03; letter-spacing: -0.04em;
  text-wrap: balance;
}
.article-lead { margin: 0 0 26px; color: var(--muted); font-size: clamp(17px, 2.2vw, 21px); line-height: 1.5; }
.article-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--quiet); font-size: 13px;
}
.article-byline .avatar {
  display: grid; place-content: center; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(140deg, var(--violet), var(--blue)); color: #fff;
  font-size: 13px; font-weight: 700;
}
.article-byline strong { color: var(--text); font-weight: 600; }
.article-byline .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

.article-cover { width: min(100%, 1080px); margin: 34px auto 0; }
.article-cover img { width: 100%; height: auto; border-radius: 24px; border: 1px solid var(--line); }
.article-cover figcaption { margin-top: 10px; color: var(--quiet); font-size: 12.5px; text-align: center; }

/* Body + TOC layout */
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 56px;
  width: min(100%, 1080px); margin: 44px auto 0; align-items: start;
}
.article-body { max-width: 720px; }
.toc { position: sticky; top: 110px; }
.toc-inner { border-left: 1px solid var(--line); padding-left: 18px; }
.toc h2 { margin: 0 0 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--quiet); font-family: var(--font-body); }
.toc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.toc li.lvl-3 { padding-left: 14px; }
.toc a { color: var(--muted); font-size: 13px; line-height: 1.4; transition: color 180ms var(--ease); }
.toc a:hover, .toc a.is-active { color: #fff; }
.toc a.is-active { font-weight: 600; }

/* Article typography */
.article-body > * { margin: 0 0 22px; }
.article-body h2 {
  margin: 44px 0 16px; font-family: var(--font-display);
  font-size: clamp(25px, 3vw, 33px); font-weight: 560; line-height: 1.12; letter-spacing: -0.03em;
  scroll-margin-top: 110px;
}
.article-body h3 {
  margin: 34px 0 12px; font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 24px); font-weight: 560; line-height: 1.2; letter-spacing: -0.02em;
  scroll-margin-top: 110px;
}
.article-body h4 { margin: 26px 0 10px; font-size: 18px; font-weight: 620; }
.article-body p { color: #d3d5df; font-size: 17px; line-height: 1.75; }
.article-body a { color: var(--lilac); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(170, 153, 255, 0.4); transition: text-decoration-color 200ms var(--ease); }
.article-body a:hover { text-decoration-color: var(--lilac); }
.article-body ul, .article-body ol { padding-left: 24px; color: #d3d5df; font-size: 17px; line-height: 1.7; }
.article-body li { margin: 9px 0; }
.article-body ul li::marker { color: var(--violet); }
.article-body blockquote {
  margin: 30px 0; padding: 22px 26px; border-left: 3px solid var(--violet);
  border-radius: 0 16px 16px 0; background: rgba(124, 92, 255, 0.06);
  color: var(--text); font-size: 18px; line-height: 1.6;
}
.article-body blockquote strong { color: #fff; }
.article-body img, .article-body figure img { max-width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); }
.article-body figure { margin: 30px 0; }
.article-body figcaption { margin-top: 10px; color: var(--quiet); font-size: 13px; text-align: center; }
.article-body .content-callout, .article-body .content-note, .article-body .content-info {
  margin: 28px 0; padding: 20px 22px; border: 1px solid rgba(83, 215, 255, 0.22);
  border-radius: 16px; background: rgba(83, 215, 255, 0.05); font-size: 15.5px; line-height: 1.6; color: var(--muted);
}
.article-body .content-callout strong, .article-body .content-note strong { color: #fff; }
.article-body pre {
  margin: 26px 0; padding: 20px 22px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 16px; background: #0a0b10;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; color: #d6d8e2;
}
.article-body :not(pre) > code {
  padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.07);
  font-family: var(--font-mono); font-size: 0.88em; color: var(--cyan);
}
.article-body table {
  width: 100%; margin: 28px 0; border-collapse: collapse; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px; font-size: 14.5px;
}
.article-body thead { background: rgba(255, 255, 255, 0.03); }
.article-body th, .article-body td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.article-body th { color: var(--text); font-weight: 650; }
.article-body td { color: var(--muted); }
.article-body tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

/* Article footer blocks */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; }
.tag-chip {
  padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.02); color: var(--muted); font-size: 12.5px; transition: all 200ms var(--ease);
}
.tag-chip:hover { color: #fff; border-color: var(--line-strong); }

.share { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.share span { color: var(--quiet); font-size: 12px; }
.share a, .share button {
  display: grid; place-content: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.02);
  color: var(--muted); cursor: pointer; transition: all 200ms var(--ease);
}
.share a:hover, .share button:hover { color: #fff; border-color: var(--line-strong); }
.share svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.author-box {
  display: flex; gap: 18px; align-items: flex-start; width: min(100%, 720px); margin: 44px 0 0;
  padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, 0.02);
}
.author-box .avatar { width: 52px; height: 52px; flex: none; font-size: 17px; display: grid; place-content: center; border-radius: 50%; background: linear-gradient(140deg, var(--violet), var(--blue)); color: #fff; font-weight: 700; }
.author-box h3 { margin: 0 0 5px; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.author-box p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.adjacent-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px auto 0; width: min(100%, 1080px); }
.adjacent-nav a {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.02);
  transition: all 250ms var(--ease);
}
.adjacent-nav a:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.adjacent-nav span { color: var(--quiet); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.adjacent-nav strong { color: var(--text); font-size: 15px; font-weight: 550; line-height: 1.3; }
.adjacent-nav .next { text-align: right; }

.article-cta {
  width: min(100%, 1080px); margin: 56px auto 0; padding: clamp(30px, 5vw, 52px);
  text-align: center; border: 1px solid var(--line); border-radius: 26px;
  background: radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.14), transparent 60%), var(--surface);
}
.article-cta h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px); font-weight: 560; letter-spacing: -0.03em; }
.article-cta p { margin: 0 auto 24px; max-width: 520px; color: var(--muted); font-size: 16px; }

.related { width: min(100%, calc(var(--max-width) + var(--page-pad) * 2)); margin: 70px auto 0; }
.related h2 { margin: 0 0 26px; font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); font-weight: 560; letter-spacing: -0.03em; }

/* Search results */
.search-summary { margin: 0 0 26px; color: var(--muted); font-size: 15px; }
.search-summary strong { color: var(--text); }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; margin-bottom: 30px; order: -1; }
  .toc-inner { border-left: 0; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
  .post-featured { grid-template-columns: 1fr; }
  .post-featured .post-thumb { min-height: 220px; }
}
@media (max-width: 820px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 560px) {
  .blog-main { padding-top: 104px; }
  .post-grid { grid-template-columns: 1fr; }
  .blog-toolbar { flex-direction: column; align-items: stretch; }
  .blog-search input { width: 100%; }
  .adjacent-nav { grid-template-columns: 1fr; }
  .article-body p, .article-body ul, .article-body ol { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card, .post-featured, .post-thumb img { transition: none; }
  .post-card:hover, .post-featured:hover { transform: none; }
}
