/* DNA+ Journal — shared styles for /blog and every post.
   Fonts are the same self-hosted files the homepage uses. Each post keeps its own palette in
   its inline styles; this file only owns the shared chrome (nav, footer) and the /blog index. */

@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/jetbrains-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/jetbrains-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/manrope-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0a0a0a;
  --surface: #131313;
  --border: #2c2c2c;
  --gold: #b8962e;
  --gold-lt: #d4ae52;
  --white: #f5f5f5;
  --text: #ededed;
  --muted: #9a9a9a;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }

/* ANCHOR: site-nav (shared by every blog page) */
.bl-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 3rem;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.bl-nav-logo img { height: 30px; width: auto; display: block; }
.bl-nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.bl-nav-links a {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); text-decoration: none; white-space: nowrap;
}
.bl-nav-links a:hover, .bl-nav-links a[aria-current="page"] { color: var(--gold-lt); }
.bl-nav-cta {
  background: linear-gradient(135deg, #c19a2c 0%, var(--gold-lt) 50%, var(--gold) 100%);
  color: #0a0a0a !important; padding: 0.6rem 1.1rem; border-radius: 8px;
  font-family: var(--sans) !important; font-weight: 700 !important; letter-spacing: 0.08em !important;
}

/* Site footer styles live in /footer.css (shared with the homepage). */

@media (max-width: 720px) {
  .bl-nav { padding: 0.85rem 1rem; }
  .bl-nav-logo img { height: 24px; }
  .bl-nav-links { gap: 1rem; }
  .bl-nav-links li.bl-hide-sm { display: none; }
}

/* ANCHOR: blog-index */
.bi { background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
.bi-hero { max-width: 1160px; margin: 0 auto; padding: 96px 24px 56px; }
.bi-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-lt); }
.bi-hero h1 { margin: 20px 0 18px; font-size: clamp(40px, 6vw, 72px); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; color: #f6f1e6; }
.bi-hero h1 span { color: var(--gold-lt); }
.bi-hero p { margin: 0; max-width: 620px; font-size: 20px; line-height: 32px; color: #b9b3a6; }
.bi-list { max-width: 1160px; margin: 0 auto; padding: 0 24px 112px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.bi-card {
  display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; background: var(--surface); text-decoration: none; color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.bi-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.bi-card:focus-visible { outline: 2px solid var(--gold-lt); outline-offset: 3px; }
.bi-cover { height: 210px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; }
.bi-cover-tag { align-self: flex-start; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.bi-cover-title { font-size: 26px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }
.bi-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.bi-body p { margin: 0; font-size: 16px; line-height: 26px; color: #c9c3b6; }
.bi-meta { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.bi-meta strong { color: var(--gold-lt); font-weight: 700; }

/* Cover palette: every post uses the DNA+ brand colors (black + gold) */
.bi-cover--dark  { background: #0a0a0a; border-bottom: 1px solid #222; }
.bi-cover--dark  .bi-cover-tag { background: #1b1709; color: #d4ae52; }
.bi-cover--dark  .bi-cover-title { color: #f6f1e6; }
.bi-cover--dark  .bi-cover-title span { color: #d4ae52; }

/* ANCHOR: share-bar — static share links on every post; blog.js adds Copy link + native share.
   Themed per post through data-theme so it sits in each post's own palette. */
.bl-share-row { max-width: 1160px; margin: 0 auto; padding: 0 24px 48px; }
.bl-share-end { max-width: 1160px; margin: 0 auto; padding: 8px 24px 88px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.bl-share-end h2 { margin: 0; font-family: var(--sans); font-size: 22px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; color: var(--sh-head); }
.bl-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bl-share-label { margin-right: 4px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sh-label); }
.bl-share a, .bl-share button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--sh-bd); border-radius: 999px; background: var(--sh-bg); color: var(--sh-fg);
  font-family: var(--sans); font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.bl-share a:hover, .bl-share button:hover { border-color: var(--sh-accent); transform: translateY(-1px); }
.bl-share a:focus-visible, .bl-share button:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 2px; }
.bl-share svg { width: 16px; height: 16px; flex: 0 0 16px; }
.bl-share [hidden] { display: none !important; }
[data-theme="dark"]  { --sh-bg: #141414; --sh-bd: #2c2c2c; --sh-fg: #ede6d6; --sh-accent: #d4ae52; --sh-label: #9b968c; --sh-head: #f6f1e6; }

/* ANCHOR: breadcrumbs — Home / Blog / Post at the top of every post (plus BreadcrumbList JSON-LD) */
.bl-crumbs { max-width: 1160px; margin: 0 auto; padding: 22px 24px 0; }
.bl-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sh-label); }
.bl-crumbs li + li::before { content: "/"; margin-right: 10px; opacity: 0.6; }
.bl-crumbs a { color: var(--sh-label); text-decoration: none; }
.bl-crumbs a:hover { color: var(--sh-accent); }
.bl-crumbs [aria-current] { color: var(--sh-fg); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ANCHOR: related-posts — "Keep reading" links between posts */
.bl-related { max-width: 1160px; margin: 0 auto; padding: 0 24px 96px; }
.bl-related h2 { margin: 0 0 16px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sh-label); }
.bl-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.bl-related a { display: block; padding: 24px; border: 1px solid var(--sh-bd); border-radius: 16px; background: var(--sh-bg); color: var(--sh-fg); text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease; }
.bl-related a:hover { border-color: var(--sh-accent); transform: translateY(-2px); }
.bl-related a:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 2px; }
.bl-related strong { display: block; margin-bottom: 8px; font-family: var(--sans); font-size: 20px; line-height: 1.25; font-weight: 800; }
.bl-related span { display: block; font-size: 15px; line-height: 24px; color: var(--sh-label); }

/* Blog index card titles are h2s for heading structure */
h2.bi-cover-title { margin: 0; }

/* ANCHOR: centered-posts — a post opts in with class="bl-centered" on <body> (all posts since 2026-10-16, Devin).
   Titles, labels, headings and short intros are centered; long paragraphs stay left-aligned in a centered column.
   Works on both post styles (post.css classes and inline styles), so inline-style overrides use !important. */
.bl-centered .bl-crumbs ol, .bl-centered .bl-share-row .bl-share { justify-content: center; }
.bl-centered .bl-share-end { align-items: center; text-align: center; }
.bl-centered .bl-related h2 { text-align: center; }
.bl-centered main :is(h1, h2) { text-align: center; }
/* The label/eyebrow right before a heading */
.bl-centered main :has(+ :is(h1, h2)) { text-align: center; align-self: center !important; }
/* A heading's own container: center its items; with at most one paragraph after the heading it is a header, so center its text too */
.bl-centered main :is(div, header, section):has(> :is(h1, h2)) { align-items: center; }
.bl-centered main :is(div, header, section):has(> :is(h1, h2)):not(:has(> :is(h1, h2) ~ p ~ p)) { text-align: center; }
.bl-centered main :is(div, header, section):has(> :is(h1, h2)) > :is(div, ul):has(> span + span) { justify-content: center; }
/* Two-column heroes (text beside a graphic) stack into one centered column */
.bl-centered main section:has(> div > h1) { flex-direction: column !important; align-items: center !important; text-align: center; }
.bl-centered main section:has(> div > h1) > div { flex: none !important; width: 100%; max-width: 860px; }
.bl-centered main section:has(> div > h1) > div:not(:has(> h1)) { max-width: 560px; }
/* Header boxes sit in the middle of the page, not pinned left */
.bl-centered main :is(div, header):has(> :is(h1, h2)):not(:has(> :is(h1, h2) ~ p ~ p)) { margin-left: auto !important; margin-right: auto !important; }
/* Two-column sections (heading beside content, CTA beside a button) stack into one centered column */
.bl-centered main [style*="flex-wrap: wrap"]:has(> div > h2) { flex-direction: column !important; align-items: center !important; }
.bl-centered main [style*="flex-wrap: wrap"]:has(> div > h2) > div { flex: none !important; width: 100%; max-width: 860px; }
.bl-centered main [style*="flex-wrap: wrap"]:has(> div > h2) > div:has(> h2) { max-width: 720px; }
/* The button column of a stacked CTA box */
.bl-centered main [style*="flex-wrap: wrap"]:has(> div > h2) > div:has(> a) { align-items: center !important; text-align: center; }
