@charset "UTF-8";
/* ============================================================
   Tech blog — design tokens & layout
   Theme tokens switch on [data-theme]; accent + fonts come in
   as --accent / --font-head / --font-body set by the app.
   ============================================================ */
:root {
  --maxw: 1180px;
  --gut: 28px;
  --radius: 14px;
  --radius-sm: 9px;
}

[data-theme=light] {
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --text: #0b0b0d;
  --text-2: #3f3f46;
  --muted: #71717a;
  --border: #e7e7ea;
  --border-strong: #d6d6db;
  --code-bg: #0d0d10;
  --code-text: #e9e9ee;
  --shadow: 0 1px 2px rgba(10,10,15,.04), 0 8px 24px -12px rgba(10,10,15,.10);
  --shadow-lg: 0 1px 2px rgba(10,10,15,.05), 0 24px 48px -20px rgba(10,10,15,.18);
  --accent-tint: color-mix(in oklch, var(--accent) 12%, var(--bg));
  --accent-tint-2: color-mix(in oklch, var(--accent) 22%, var(--bg));
}

[data-theme=dark] {
  --bg: #08080a;
  --bg-soft: #0c0c0f;
  --surface: #121216;
  --surface-2: #16161b;
  --text: #f4f4f6;
  --text-2: #c4c4cc;
  --muted: #8a8a94;
  --border: #232329;
  --border-strong: #303038;
  --code-bg: #131318;
  --code-text: #e9e9ee;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -16px rgba(0,0,0,.6);
  --shadow-lg: 0 1px 2px rgba(0,0,0,.5), 0 28px 56px -24px rgba(0,0,0,.7);
  --accent-tint: color-mix(in oklch, var(--accent) 18%, var(--bg));
  --accent-tint-2: color-mix(in oklch, var(--accent) 30%, var(--bg));
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app {
  min-height: 100vh;
  background: var(--bg);
}

::selection {
  background: var(--accent-tint-2);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* ---------------- Top nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.03em;
  cursor: pointer;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 55%);
}

.brand-mark span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  position: relative;
  z-index: 1;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.nav-link.active {
  color: var(--text);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13.5px;
  min-width: 200px;
  cursor: text;
}

.nav-search kbd {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 1px 5px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.icon-btn:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.btn-primary {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: filter 0.15s, transform 0.05s;
}

.btn-primary:hover {
  filter: brightness(1.07);
}

.btn-primary:active {
  transform: translateY(1px);
}

/* ---------------- Page head ---------------- */
.page-head {
  padding: 56px 0 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.page-title {
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.035em;
}

.page-sub {
  margin-top: 16px;
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------------- Featured / hero ---------------- */
.featured {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.featured:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.featured-cover {
  min-height: 380px;
  position: relative;
}

.featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.featured-body .post-title {
  font-size: 30px;
  margin: 14px 0 14px;
}

.featured-excerpt {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.6;
}

.featured .read-on {
  margin-top: auto;
  padding-top: 28px;
}

/* ---------------- Filter pills ---------------- */
.filters {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 64px 0 28px;
}

.section-label {
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-right: 8px;
}

.pill {
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}

.pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.pill.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.filters-spacer {
  flex: 1;
}

.sort {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------------- Post grid ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  padding-bottom: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.card-cover {
  height: 178px;
  position: relative;
}

.card-body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card .post-title {
  font-size: 19px;
  margin-bottom: 9px;
}

.card-excerpt {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .meta {
  margin-top: auto;
  padding-top: 18px;
}

/* ---------------- Shared post bits ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--accent-tint);
  color: var(--accent);
}

.post-title {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: var(--text);
  text-wrap: balance;
}

.card:hover .post-title, .featured:hover .post-title {
  color: var(--accent);
}

.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
}

.meta .author {
  color: var(--text-2);
  font-weight: 500;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-strong);
  flex: none;
}

.read-on {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
}

.read-on svg {
  transition: transform 0.2s;
}

.featured:hover .read-on svg, .card:hover .read-on svg {
  transform: translateX(4px);
}

/* ---------------- Newsletter strip ---------------- */
.cta {
  margin: 64px 0 0;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: radial-gradient(120% 140% at 100% 0%, var(--accent-tint), transparent 60%), var(--surface);
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.cta h3 {
  font-size: 26px;
}

.cta p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 420px;
}

.cta-form {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.cta-input {
  height: 44px;
  width: 240px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}

.cta-input::placeholder {
  color: var(--muted);
}

.cta-form .btn-primary {
  height: 44px;
}

/* ---------------- Footer ---------------- */
.footer {
  margin-top: 72px;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer .muted {
  color: var(--muted);
  font-size: 13.5px;
}

.footer-links {
  margin-left: auto;
  display: flex;
  gap: 20px;
}

.footer-links span {
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
}

.footer-links span:hover {
  color: var(--accent);
}

/* ============================================================
   Article view
   ============================================================ */
.article {
  padding-bottom: 40px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 40px 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
}

.back:hover {
  color: var(--text);
}

.article-head {
  max-width: 760px;
  margin: 16px auto 0;
  text-align: center;
}

.article-title {
  font-size: clamp(32px, 4.6vw, 50px);
  letter-spacing: -0.035em;
  margin: 18px 0 20px;
  text-wrap: balance;
}

.article-deck {
  font-size: 20px;
  color: var(--muted);
  line-height: 1.5;
  text-wrap: pretty;
}

.byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.byline .avatar {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.byline .author {
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
}

.article-cover {
  height: 420px;
  margin: 44px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.prose {
  max-width: 720px;
  margin: 48px auto 0;
}

.prose p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-2);
  margin: 0 0 26px;
}

.prose p.lead {
  font-size: 21px;
  line-height: 1.65;
  color: var(--text);
}

.prose h2 {
  font-size: 28px;
  margin: 48px 0 18px;
  letter-spacing: -0.025em;
  scroll-margin-top: 80px;
}

.prose h3 {
  font-size: 21px;
  margin: 36px 0 14px;
}

.prose ul {
  margin: 0 0 26px;
  padding-left: 0;
  list-style: none;
}

.prose ul li {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-2);
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a.link {
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid var(--accent-tint-2);
}

.prose blockquote {
  margin: 36px 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text);
}

.codeblock {
  margin: 0 0 30px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.codeblock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.codeblock-bar .fname {
  margin-left: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  color: #9b9ba6;
}

.codeblock-bar .copy {
  margin-left: auto;
  font-size: 12px;
  color: #9b9ba6;
}

.cdot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.codeblock pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--code-text);
}

.tok-key {
  color: #c792ea;
}

.tok-fn {
  color: #82aaff;
}

.tok-str {
  color: #c3e88d;
}

.tok-num {
  color: #f78c6c;
}

.tok-com {
  color: #5f6477;
  font-style: italic;
}

.tok-pun {
  color: #89ddff;
}

.article-tags {
  max-width: 720px;
  margin: 44px auto 0;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.article-tags .chip {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--surface);
}

.author-card {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  display: flex;
  gap: 18px;
  align-items: center;
}

.author-card .avatar {
  width: 56px;
  height: 56px;
  font-size: 20px;
}

.author-card h4 {
  font-size: 17px;
}

.author-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Related */
.related {
  max-width: var(--maxw);
  margin: 72px auto 0;
}

.related h3 {
  font-size: 22px;
  margin-bottom: 22px;
}

/* ---------------- responsive ---------------- */
@media (max-width: 940px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .featured {
    grid-template-columns: 1fr;
  }
  .featured-cover {
    min-height: 220px;
  }
  .nav-search {
    display: none;
  }
}
@media (max-width: 620px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .cta-form {
    margin-left: 0;
  }
}
/* entrance — disabled: keep content visible in all contexts (paused-anim tabs,
   print/export, reduced-motion). Hover/transition polish lives on the elements. */
.rise {
  opacity: 1;
}

/* ============================================================
   ANCBD additions — real-data integration helpers
   (covers backed by real featured images instead of SVG art)
   ============================================================ */
/* Real featured images fill the cover containers exactly like <Cover>. */
.featured-cover img,
.card-cover img,
.article-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Accent-tinted fallback for posts with no featured image. */
.cover-fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 140% at 100% 0%, var(--accent-tint-2), transparent 60%), var(--accent-tint);
  display: grid;
  place-items: center;
  color: var(--accent);
}

.cover-fallback span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 40px;
  opacity: 0.5;
  letter-spacing: -0.04em;
}

/* Empty state on the list page. */
.blog-empty {
  margin: 48px 0;
  padding: 56px 28px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-2);
}

/* Pagination row (reuses .pill styling for the links). */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 8px;
  flex-wrap: wrap;
}

/* Anchor nav links (design used <span>; we use <a> — same look). */
a.nav-link {
  text-decoration: none;
}

/* Ordered lists + images inside article prose (design only styled <ul>). */
.prose ol {
  margin: 0 0 26px;
  padding-left: 0;
  list-style: none;
  counter-reset: li;
}

.prose ol li {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-2);
  position: relative;
  padding-left: 38px;
  margin-bottom: 12px;
  counter-increment: li;
}

.prose ol li::before {
  content: counter(li);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--accent-tint);
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12.5px;
  display: grid;
  place-items: center;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 0 0 26px;
}

.prose h2:first-child, .prose h3:first-child {
  margin-top: 0;
}

/* ============================================================
   Article alignment override (requested)
   The reference design used a wide hero cover + a narrow centered
   text column, which left the body copy indented from the cover.
   Align the whole article into ONE column flush with the cover's
   edges (the full .wrap content width), left-aligned.
   ============================================================ */
.article-head,
.prose,
.article-tags,
.author-card {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.article-head {
  text-align: left;
}

.byline {
  justify-content: flex-start;
}