/* ============================================================
   Marvin Blog — style.css
   Matches consultmarvin.com design system exactly
   ============================================================ */

/* --- Custom Properties (from globals.css dark theme) --- */
:root {
  --bg: #0a0a0a;                    /* hsl(0 0% 3.9%) */
  --fg: #fafafa;                    /* hsl(0 0% 98%) */
  --muted: #a3a3a3;                 /* hsl(0 0% 63.9%) */
  --border: #262626;                /* hsl(0 0% 14.9%) */
  --border-subtle: rgba(255, 255, 255, 0.1); /* border-white/10 */
  --card-bg: #0a0a0a;              /* same as bg (dark .card) */
  --secondary-bg: #262626;          /* hsl(0 0% 14.9%) */
  --code-bg: #1a1a1a;
  --destructive: #ef4444;           /* hsl(0 86% 59%) */
  --max-w: 1280px;
  --max-w-article: 768px;
  --font: 'DM Sans', sans-serif;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --header-h: 4rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:visited {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* --- Reading Progress Bar --- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--fg);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* --- Site Header (matches navbar.tsx exactly) --- */
.site-header {
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 1024px) {
  .header-inner {
    padding: 0;
  }
}

/* Logo (left side) */
.header-logo {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo-link {
  display: flex;
  align-items: center;
  color: var(--fg);
}

.logo {
  width: 32px;
  height: 32px;
}

/* Right side: nav + auth + hamburger */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .header-actions {
    gap: 2.25rem;
  }
}

/* Desktop Nav (matches navbar.tsx gap-9 = 2.25rem) */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 2.25rem;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }
}

.desktop-nav a,
.desktop-nav a:visited {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(250, 250, 250, 0.8);
  transition: color 0.15s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--fg);
}

/* Desktop auth button */
.desktop-auth {
  display: none;
}

@media (min-width: 768px) {
  .desktop-auth {
    display: flex;
    align-items: center;
  }
}

/* Buttons (matches shadcn Button default variant) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius);
  transition: background 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.btn-primary,
.btn-primary:visited {
  background: var(--fg);
  color: var(--bg);
}

.btn-primary:hover {
  background: rgba(250, 250, 250, 0.9);
  color: var(--bg);
}

.btn-full {
  width: 100%;
}

/* Mobile hamburger */
.mobile-menu-btn {
  display: flex;
  padding: 0.5rem;
  color: var(--fg);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* --- Mobile Menu (matches Sheet component) --- */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .mobile-sheet {
    width: 400px;
  }
}

.mobile-sheet.open {
  transform: translateX(0);
}

.mobile-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
}

.mobile-sheet-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

.mobile-sheet-header button {
  color: var(--muted);
  padding: 0.25rem;
}

.mobile-sheet-body {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

.mobile-nav-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav a {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--fg);
  padding: 0.5rem 0;
  transition: color 0.15s ease;
}

.mobile-nav a:hover {
  color: var(--fg);
  opacity: 0.8;
}

.mobile-divider {
  height: 1px;
  background: var(--border);
}

.mobile-sheet-actions {
  padding-top: 0;
}

/* --- Main Content --- */
.main-content {
  min-height: calc(100vh - var(--header-h));
  padding-top: var(--header-h);
}

/* --- Blog Index --- */
.blog-index {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.blog-index-header {
  margin-bottom: 3rem;
}

.blog-index-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.blog-index-header p {
  font-size: 1.125rem;
  color: var(--muted);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Blog Card */
.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.blog-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.blog-card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.blog-card-description {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.blog-card-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

/* --- Article Container --- */
.article-container {
  max-width: var(--max-w-article);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.breadcrumb-link {
  color: var(--muted);
  transition: color 0.15s ease;
}

.breadcrumb-link:hover {
  color: var(--fg);
}

.breadcrumb-sep {
  flex-shrink: 0;
  opacity: 0.5;
}

.breadcrumb-current {
  color: var(--fg);
  font-weight: 500;
}

/* Article Header */
.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.article-description {
  font-size: 1.25rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.article-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-date-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.freshness-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.read-time {
  color: var(--muted);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* Article Thumbnail */
.article-thumbnail {
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Author Bio */
.author-bio {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 0.875rem;
  font-weight: 600;
}

.author-role {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* --- Table of Contents --- */
.toc {
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.toc details {
  padding: 0;
}

.toc summary {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.875rem 1rem;
  cursor: pointer;
  user-select: none;
  color: var(--fg);
  background: var(--secondary-bg);
  border-bottom: 1px solid var(--border);
  list-style: none;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc summary::before {
  content: '+';
  display: inline-block;
  width: 1.25rem;
  font-weight: 400;
  color: var(--muted);
}

.toc details[open] > summary::before {
  content: '-';
}

.toc-list {
  padding: 0.75rem 1rem;
  list-style: none;
}

.toc-list li {
  margin: 0;
}

.toc-h2 {
  margin-bottom: 0.25rem;
}

.toc-h2 > a {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  padding: 0.25rem 0;
  border-left: 2px solid var(--fg);
  padding-left: 0.75rem;
  transition: color 0.15s ease;
}

.toc-h2 > a:hover {
  color: var(--muted);
}

.toc-h3 {
  margin-left: 1.25rem;
}

.toc-h3 > a {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 0.2rem 0;
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
  transition: color 0.15s ease;
}

.toc-h3 > a:hover {
  color: var(--fg);
}

.toc-h2 > ul {
  list-style: none;
  padding: 0;
}

/* --- Article Content (Prose) --- */
.article-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: rgba(250, 250, 250, 0.88);
}

.article-content > * + * {
  margin-top: 1.5rem;
}

/* Headings */
.article-content h2 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--fg);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--fg);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.article-content h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

/* Paragraphs */
.article-content p {
  margin-bottom: 1.25rem;
}

/* Links */
.article-content a,
.article-content a:visited {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  transition: text-decoration-color 0.15s ease;
}

.article-content a:hover {
  text-decoration-color: var(--fg);
}

/* Lists */
.article-content ul,
.article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content li {
  margin-bottom: 0.375rem;
}

.article-content li::marker {
  color: var(--muted);
}

/* Blockquotes */
.article-content blockquote {
  border-left: 3px solid var(--fg);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: rgba(250, 250, 250, 0.9);
}

.article-content blockquote p {
  margin-bottom: 0;
}

/* Code: Inline */
.article-content code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Code: Blocks */
.article-content pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
}

.article-content pre code {
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  line-height: 1.65;
}

.highlight {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.5rem 0;
  overflow: hidden;
}

.highlight pre {
  background: transparent;
  border: none;
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
}

.highlight pre code {
  padding: 0;
  border: none;
  background: transparent;
}

/* Code Copy Button */
.code-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.625rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: background 0.15s ease, color 0.15s ease;
  z-index: 10;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--fg);
}

.code-copy-btn.copied {
  color: #4ade80;
}

/* Tables (alternating row striping per Figma) */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.article-content thead {
  border-bottom: 1px solid var(--border);
}

.article-content th {
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--fg);
  white-space: nowrap;
}

.article-content td {
  padding: 0.75rem 1rem;
  color: rgba(250, 250, 250, 0.8);
}

.article-content tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

.article-content tr:last-child td {
  border-bottom: none;
}

/* Images in content */
.article-content img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.article-content figure {
  margin: 1.5rem 0;
}

.article-content figcaption {
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* Horizontal Rule */
.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Strong and Em */
.article-content strong {
  font-weight: 600;
  color: var(--fg);
}

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

/* --- TLDR Box --- */
.tldr-box,
.article-content .tldr-box {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--fg);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.tldr-box strong {
  color: var(--fg);
}

/* --- Definition Box --- */
.definition-box,
.article-content .definition-box {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

/* --- FAQ Section --- */
.faq-section {
  margin: 2.5rem 0;
}

.faq-section h2 {
  margin-bottom: 1.25rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-item summary {
  font-weight: 600;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  color: var(--fg);
  background: var(--secondary-bg);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: '+';
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-weight: 400;
  font-size: 1.125rem;
}

.faq-item[open] > summary::before {
  content: '-';
}

.faq-item .faq-answer {
  padding: 0 1.25rem 1rem;
  color: rgba(250, 250, 250, 0.8);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* --- CTA Banner (after article content, per Figma) --- */
.article-cta {
  margin: 3rem 0;
  padding: 2rem 1.5rem;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .article-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.5rem;
  }
}

.article-cta-text {
  flex: 1;
}

.article-cta-text h3 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.375rem;
  color: var(--fg);
}

.article-cta-text p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.article-cta-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.article-cta-actions .btn-primary {
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
}

.article-cta-actions .cta-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  transition: opacity 0.15s ease;
}

.article-cta-actions .cta-link:hover {
  opacity: 0.7;
}

/* --- Share Section --- */
.share-section {
  margin: 3rem 0 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.share-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-btn,
.share-btn:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.share-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

/* --- Related Posts --- */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-posts h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

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

@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related-card,
.related-card:visited {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  transition: border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  color: var(--fg);
}

.related-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.related-card h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.related-card p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.related-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

/* --- Internal Links / Further Reading --- */
.internal-links {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.internal-links h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--fg);
}

.internal-links ul {
  list-style: none;
  padding: 0;
}

.internal-links li {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
}

.internal-links li:last-child {
  margin-bottom: 0;
}

.internal-links a,
.internal-links a:visited {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.internal-links a:hover {
  opacity: 0.7;
}

/* --- Site Footer (matches Footer.tsx) --- */
.site-footer {
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

.footer-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
}

@media (min-width: 640px) {
  .footer-inner {
    padding: 3rem 1.5rem 2rem;
  }
}

@media (min-width: 1024px) {
  .footer-inner {
    padding: 4rem 2rem 2rem;
  }
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 1024px) {
  .footer-top {
    flex-direction: row;
    gap: 3rem;
  }
}

.footer-logo {
  flex-shrink: 0;
  color: var(--fg);
  display: flex;
  align-items: center;
}

.footer-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .footer-nav {
    flex-direction: row;
    justify-content: flex-start;
    gap: 2rem;
  }
}

.footer-nav a {
  font-size: 1rem;
  color: var(--muted);
  transition: color 0.15s ease;
}

@media (min-width: 1024px) {
  .footer-nav a {
    font-size: 1.125rem;
  }
}

.footer-nav a:hover {
  color: var(--fg);
}

.footer-social {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .footer-social {
    margin-left: auto;
    gap: 1.25rem;
  }
}

.footer-social a {
  color: var(--muted);
  transition: color 0.15s ease;
}

.footer-social a:hover {
  color: var(--fg);
}

.footer-divider {
  height: 1px;
  background: #1f2937;
  margin-bottom: 2rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--muted);
}

@media (min-width: 1024px) {
  .footer-bottom p {
    font-size: 1rem;
  }
}

.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-legal {
    flex-direction: row;
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .footer-legal {
    gap: 2rem;
  }
}

.footer-bottom a,
.footer-legal a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.15s ease;
}

@media (min-width: 1024px) {
  .footer-bottom a,
  .footer-legal a {
    font-size: 1rem;
  }
}

.footer-bottom a:hover,
.footer-legal a:hover {
  color: var(--fg);
}

/* Footer Watermark Icon (per Figma — centered Marvin icon) */
.footer-bg-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 2rem 0 1.5rem;
}

.footer-bg-logo svg {
  opacity: 0.15;
  color: var(--fg);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .article-title {
    font-size: 1.875rem;
  }

  .article-description {
    font-size: 1.0625rem;
  }

  .blog-index-header h1 {
    font-size: 2rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .article-container {
    padding: 1.5rem 1rem 3rem;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 1.5rem;
  }

  .breadcrumbs {
    font-size: 0.75rem;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    justify-content: center;
  }
}

/* --- Rouge Syntax Highlighting (Dark) --- */
.highlight .c,
.highlight .c1,
.highlight .cm,
.highlight .cs {
  color: #6a737d;
  font-style: italic;
}

.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kc,
.highlight .kt {
  color: #ff7b72;
}

.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .sb,
.highlight .sc,
.highlight .sh,
.highlight .sx {
  color: #a5d6ff;
}

.highlight .si {
  color: #a5d6ff;
}

.highlight .sr {
  color: #a5d6ff;
}

.highlight .na {
  color: #79c0ff;
}

.highlight .nb {
  color: #ffa657;
}

.highlight .nc {
  color: #ffa657;
  font-weight: 600;
}

.highlight .no {
  color: #79c0ff;
}

.highlight .ni {
  color: #c9d1d9;
}

.highlight .ne {
  color: #ffa657;
  font-weight: 600;
}

.highlight .nf,
.highlight .nx {
  color: #d2a8ff;
}

.highlight .nn {
  color: #ffa657;
}

.highlight .nt {
  color: #7ee787;
}

.highlight .nv,
.highlight .vi,
.highlight .vc,
.highlight .vg,
.highlight .vs {
  color: #79c0ff;
}

.highlight .o,
.highlight .ow {
  color: #ff7b72;
}

.highlight .p {
  color: #c9d1d9;
}

.highlight .mi,
.highlight .mf,
.highlight .mh,
.highlight .mo,
.highlight .il {
  color: #79c0ff;
}

.highlight .gd {
  color: #ffa198;
  background-color: rgba(248, 81, 73, 0.1);
}

.highlight .gi {
  color: #56d364;
  background-color: rgba(46, 160, 67, 0.1);
}

.highlight .ge {
  font-style: italic;
}

.highlight .gs {
  font-weight: 600;
}

/* --- Print --- */
@media print {
  .site-header,
  .reading-progress,
  .mobile-overlay,
  .mobile-sheet,
  .share-section,
  .code-copy-btn,
  .site-footer {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .article-content a {
    color: black;
    text-decoration: underline;
  }

  .main-content {
    padding-top: 0;
  }
}
