/* ═══════════════════════════════════════════════════
   /build — Ghost Theme Stylesheet
   Design: Terminal-warm. A beautifully typeset README.
   ═══════════════════════════════════════════════════ */


/* ─────────── TOKENS ─────────── */

:root {
  /* Colors — Light Mode */
  --ink: #0f172a;
  --stone: #fafaf9;
  --surface: #ffffff;
  --text: #334155;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --warm-gray: #78716c;
  --ember: #ea580c;
  --ember-mid: #fb923c;
  --ember-light: #fff7ed;
  --terminal: #1e293b;
  --terminal-text: #e2e8f0;
  --teal: #1a656e;
  --rule: #e2e8f0;
  --white: #ffffff;

  /* Typography */
  --font-mono: 'JetBrains Mono', monospace;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --content-width: 680px;
  --content-wide: 780px;
  --page-padding: 24px;

  /* Misc */
  --radius: 8px;
  --radius-sm: 4px;
}

/* Dark mode overrides */
[data-theme="dark"] {
  --ink: #e2e8f0;
  --stone: #0f172a;
  --surface: #1e293b;
  --text: #e2e8f0;
  --text-light: #94a3b8;
  --text-muted: #64748b;
  --warm-gray: #a8a29e;
  --ember: #fb923c;
  --ember-mid: #ea580c;
  --ember-light: #431407;
  --terminal: #020617;
  --terminal-text: #e2e8f0;
  --rule: #334155;
  --white: #1e293b;
}


/* ─────────── RESET ─────────── */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--stone);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }


/* ─────────── HUB BAR ─────────── */

.hub-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: #0f172a;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6vw;
  font-family: var(--font-body);
  font-size: 12px;
}

.hub-bar a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.hub-bar a:hover { color: white; }

.hub-bar .sep {
  color: rgba(255, 255, 255, 0.2);
  margin: 0 8px;
}

.hub-bar-left,
.hub-bar-right {
  display: flex;
  align-items: center;
}


/* ─────────── MASTHEAD (Homepage) ─────────── */

.masthead {
  margin-top: 32px;
  background: #0f172a;
  padding: 56px 8vw 48px;
  text-align: center;
  position: relative;
}

.masthead-top {
  display: flex;
  justify-content: flex-end;
  position: absolute;
  top: 16px;
  right: 6vw;
}

.masthead-brand {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 16px;
}

.masthead-brand .cursor {
  color: #ea580c;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
  font-weight: 400;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.masthead-tagline {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.5px;
}


/* ─────────── THEME TOGGLE ─────────── */

.theme-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  transition: all 0.2s ease;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }


/* ─────────── CONTAINER ─────────── */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--page-padding);
}


/* ─────────── INTRO (Homepage) ─────────── */

.intro {
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.intro p {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.65;
}


/* ─────────── SECTION HEADER ─────────── */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}

.section-header a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ember);
  text-decoration: none;
}

.section-header a:hover { text-decoration: underline; }


/* ─────────── ARTICLE GRID (Homepage) ─────────── */

.articles-section {
  padding: 48px 0 40px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}


/* ─────────── ARTICLE CARD ─────────── */

.article-card {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.article-card:hover {
  border-color: var(--ember);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.article-card .card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 10px;
}

.article-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 10px;
}

.article-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.55;
  margin-bottom: 16px;
}

.article-card .card-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-transform: lowercase;
}


/* Featured card — spans full width */

.article-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.article-card.featured .card-preview {
  background: var(--terminal);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--terminal-text);
  overflow: hidden;
  white-space: pre;
}

.article-card.featured .card-preview .cm { color: #64748b; }
.article-card.featured .card-preview .kw { color: #fb923c; }
.article-card.featured .card-preview .st { color: #86efac; }
.article-card.featured .card-preview .fn { color: #93c5fd; }


/* ─────────── ARTICLE HEADER (Post page) ─────────── */

.article-header {
  margin-top: 32px;
  background: #0f172a;
  padding: 40px var(--page-padding) 44px;
}

.article-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.header-masthead {
  margin-bottom: 36px;
}

.header-masthead a {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.header-masthead a:hover { color: var(--ember-mid); }

.header-masthead .cursor {
  color: #ea580c;
  animation: blink 1s step-end infinite;
  font-weight: 400;
}

.article-header .masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: static;
}

.article-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ea580c;
  margin-bottom: 16px;
}

.article-header h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 20px;
}

.article-deck {
  font-family: var(--font-body);
  font-size: 18px;
  color: rgba(226, 232, 240, 0.7);
  line-height: 1.6;
  margin-bottom: 28px;
}


/* ─────────── AUTHOR CARD ─────────── */

.author-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ea580c;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.author-role {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(226, 232, 240, 0.5);
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(226, 232, 240, 0.4);
  text-transform: lowercase;
}


/* ─────────── ARTICLE BODY ─────────── */

.gh-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 48px var(--page-padding) 60px;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text);
  line-height: 1.75;
}

.gh-content > * + * {
  margin-top: 24px;
}

.gh-content p {
  margin-bottom: 0;
}

.gh-content h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 52px;
  line-height: 1.2;
}

.gh-content h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 40px;
  line-height: 1.3;
}

.gh-content a {
  color: var(--ember);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gh-content a:hover {
  color: var(--ember-mid);
}

.gh-content strong {
  font-weight: 600;
  color: var(--ink);
}

.gh-content em {
  font-style: italic;
}

.gh-content ul,
.gh-content ol {
  padding-left: 1.5em;
}

.gh-content li {
  margin-bottom: 8px;
}

.gh-content li + li {
  margin-top: 0;
}

.gh-content blockquote {
  border-left: 3px solid var(--ember);
  padding-left: 24px;
  font-style: italic;
  color: var(--text-light);
}

.gh-content hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}

/* Inline code */
.gh-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--ember-light);
  color: var(--ember);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Code blocks override inline style */
.gh-content pre {
  background: var(--terminal);
  color: var(--terminal-text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  padding: 24px 28px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-left: -24px;
  margin-right: -24px;
  max-width: calc(var(--content-wide) + 48px);
}

.gh-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}


/* ─────────── GHOST CARD STYLES ─────────── */

/* Code card */
.kg-code-card {
  margin-left: -24px;
  margin-right: -24px;
  max-width: calc(var(--content-wide) + 48px);
}

.kg-code-card pre {
  margin: 0;
}

.kg-code-card figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Image card */
.kg-image-card {
  margin-top: 32px;
  margin-bottom: 32px;
}

.kg-image-card img {
  border-radius: var(--radius);
}

.kg-image-card.kg-width-wide {
  margin-left: -50px;
  margin-right: -50px;
  max-width: calc(var(--content-wide) + 100px);
}

.kg-image-card.kg-width-full {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
}

.kg-image-card.kg-width-full img {
  border-radius: 0;
}

.kg-image-card figcaption {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
}

/* Callout card (Ghost's built-in) */
.kg-callout-card {
  background: var(--ember-light);
  border-left: 3px solid var(--ember);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.kg-callout-card .kg-callout-text {
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
}

/* Bookmark card */
.kg-bookmark-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.kg-bookmark-card:hover {
  border-color: var(--ember);
}

.kg-bookmark-content {
  padding: 20px;
}

.kg-bookmark-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.kg-bookmark-description {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 8px;
  line-height: 1.5;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.kg-bookmark-icon {
  width: 16px;
  height: 16px;
}

/* Toggle card */
.kg-toggle-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.kg-toggle-heading-text {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

/* HTML card — no special styling (custom components use their own classes) */
.kg-html-card {
  margin-top: 32px;
  margin-bottom: 32px;
}


/* ─────────── CUSTOM COMPONENTS (for HTML cards) ─────────── */

/* Stat Callout */
.stat-callout {
  background: var(--ember-light);
  border-left: 3px solid var(--ember);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 28px 32px;
  margin: 36px 0;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-context {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.5;
}

/* Two-up stats */
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 36px 0;
}

.stat-row .stat-callout {
  margin: 0;
}

/* "What we tried" muted section */
.tried-before {
  opacity: 0.75;
  border-left: 2px solid var(--rule);
  padding-left: 24px;
  margin: 32px 0;
}

.tried-before p {
  color: var(--text-light);
  font-size: 17px;
}

.tried-before .tried-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Slack quote */
.slack-quote {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 32px 0;
  font-style: italic;
}

.slack-quote p {
  color: var(--text-light) !important;
  font-size: 17px !important;
  margin-bottom: 16px !important;
}

.slack-quote p:last-child {
  margin-bottom: 0 !important;
}

.slack-quote .slack-header {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.slack-quote strong {
  color: var(--text) !important;
  font-style: normal;
}

/* Code block with label (used in HTML cards) */
.code-block {
  background: var(--terminal);
  color: var(--terminal-text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  padding: 24px 28px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 32px -24px;
  max-width: calc(var(--content-wide) + 48px);
  white-space: pre;
}

.code-block .code-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #334155;
  white-space: normal;
}

.code-block .cm { color: #64748b; }
.code-block .kw { color: #fb923c; }
.code-block .st { color: #86efac; }
.code-block .fn { color: #93c5fd; }
.code-block .nb { color: #fbbf24; }


/* ─────────── SUBSCRIBE ─────────── */

.subscribe-section {
  padding: 48px 0;
  border-top: 1px solid var(--rule);
}

.subscribe-box {
  background: var(--terminal);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.subscribe-box h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.subscribe-box p {
  font-size: 15px;
  color: rgba(226, 232, 240, 0.7);
  margin-bottom: 24px;
  line-height: 1.55;
}

.subscribe-form {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
}

.subscribe-form input[type="email"] {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 16px;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  background: #0f172a;
  color: #e2e8f0;
  outline: none;
  transition: border-color 0.2s ease;
}

.subscribe-form input[type="email"]:focus {
  border-color: #ea580c;
}

.subscribe-form input[type="email"]::placeholder {
  color: #475569;
}

.subscribe-form button {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  background: #ea580c;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.subscribe-form button:hover {
  background: #c2410c;
}

/* Subscribe form states (Ghost adds .loading, .success, .error to the form) */
.subscribe-form .button-loading { display: none; }
.subscribe-form.loading .button-text { display: none; }
.subscribe-form.loading .button-loading { display: inline; }
.subscribe-form.loading button { opacity: 0.7; cursor: wait; }

.subscribe-success,
.subscribe-error { display: none; margin-top: 16px; font-size: 14px; }

.subscribe-box p.subscribe-success {
  color: #fb923c;
  font-size: 15px;
  font-weight: 600;
}

.subscribe-box p.subscribe-error {
  color: #fb923c;
  font-size: 15px;
}

.subscribe-form.success ~ .subscribe-success { display: block; }
.subscribe-form.success { display: none; }
.subscribe-form.success ~ .subscribe-desc { display: none; }

.subscribe-form.error ~ .subscribe-error { display: block; }

/* Ghost's built-in subscribe form */
.gh-subscribe {
  max-width: 600px;
  margin: 0 auto;
}


/* ─────────── RELATED POSTS ─────────── */

.related {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--page-padding) 48px;
  border-top: 1px solid var(--rule);
  padding-top: 32px;
}

.related h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.related-card {
  text-decoration: none;
  color: inherit;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.related-card:hover { border-color: var(--ember); }

.related-card .card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 8px;
}

.related-card h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}


/* ─────────── FOOTER ─────────── */

.site-footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--rule);
}

.site-footer .container {
  max-width: var(--content-width);
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.footer-attune {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-attune a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}

.footer-attune a:hover { text-decoration: underline; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
}

.footer-links a:hover { color: var(--ink); }

.footer-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 20px;
}


/* ─────────── TAG PAGE ─────────── */

.tag-header {
  margin-top: 32px;
  background: #0f172a;
  padding: 40px var(--page-padding) 36px;
  text-align: center;
}

.tag-header h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 600;
  color: #ffffff;
}

.tag-header p {
  font-family: var(--font-body);
  font-size: 16px;
  color: rgba(226, 232, 240, 0.6);
  margin-top: 8px;
}

.tag-content {
  padding: 48px 0;
}


/* ─────────── AUTHOR PAGE ─────────── */

.author-header {
  margin-top: 32px;
  background: #0f172a;
  padding: 48px var(--page-padding);
  text-align: center;
}

.author-header .author-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #ea580c;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 600;
  margin: 0 auto 16px;
  overflow: hidden;
}

.author-header .author-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-header h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.author-header .author-bio {
  font-size: 16px;
  color: rgba(226, 232, 240, 0.6);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}


/* ─────────── PAGINATION ─────────── */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 32px 0;
  font-family: var(--font-mono);
  font-size: 14px;
}

.pagination a {
  color: var(--ember);
  text-decoration: none;
  font-weight: 500;
}

.pagination a:hover {
  text-decoration: underline;
}

.pagination .page-number {
  color: var(--text-muted);
}


/* ─────────── ERROR PAGE ─────────── */

.error-page {
  text-align: center;
  padding: 100px var(--page-padding);
}

.error-code {
  font-family: var(--font-mono);
  font-size: 96px;
  font-weight: 700;
  color: var(--rule);
  line-height: 1;
  margin-bottom: 16px;
}

.error-page h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.error-page p {
  font-size: 17px;
  color: var(--text-light);
  margin-bottom: 32px;
}

.error-page a {
  color: var(--ember);
  text-decoration: underline;
}


/* ─────────── RESPONSIVE ─────────── */

@media (max-width: 768px) {
  .masthead-brand { font-size: 36px; }
  .masthead { padding: 40px 6vw 36px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card.featured { grid-template-columns: 1fr; }
  .article-card.featured .card-preview { display: none; }
  .section-header h2 { font-size: 20px; }
  .subscribe-form { flex-direction: column; }

  .article-header h1 { font-size: 30px; }
  .gh-content { font-size: 17px; }
  .stat-number { font-size: 36px; }
  .stat-row { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .gh-content pre,
  .code-block {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    padding: 20px 16px;
  }
  .kg-code-card {
    margin-left: -16px;
    margin-right: -16px;
  }
}

@media (max-width: 480px) {
  .hub-bar { padding: 0 16px; font-size: 11px; }
  .masthead { padding: 32px 16px 28px; }
  .masthead-brand { font-size: 28px; }
  .container { padding: 0 16px; }
  .article-header { padding: 32px 16px 36px; }
  .gh-content { padding: 32px 16px 48px; }
  .article-header .masthead-top {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}
