@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f4f4f5;
  --bg-card: #ffffff;
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --border-color: #e4e4e7;
  --accent-color: #09090b;
}

html.dark {
  --bg-primary: #09090b;
  --bg-secondary: #121215;
  --bg-card: #121215;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --border-color: #27272a;
  --accent-color: #ffffff;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Editorial Serif for article titles */
.font-serif-title {
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 9999px;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #27272a;
}

/* ─── Post Body: Rich Editorial Typography ─── */

.post-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-body h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.post-body h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.post-body p {
  margin-bottom: 1.4rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.post-body strong {
  color: var(--text-primary);
  font-weight: 700;
}

.post-body em {
  font-style: italic;
}

.post-body a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-color);
  transition: text-decoration-color 0.15s ease;
}
.post-body a:hover {
  text-decoration-color: var(--text-primary);
}

.post-body ul, .post-body ol {
  margin-bottom: 1.4rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}
.post-body ul { list-style-type: disc; }
.post-body ol { list-style-type: decimal; }
.post-body li {
  margin-bottom: 0.6rem;
  line-height: 1.75;
  padding-left: 0.25rem;
}

.post-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 0 0.75rem 0.75rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-body pre {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.65;
}

.post-body code {
  padding: 0.15em 0.4em;
  font-size: 0.85em;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.35rem;
}

.post-body pre code {
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.post-body img {
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
}

/* Styled callout boxes inside post content */
.post-body > div[class*="rounded"] {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Table styles inside post body */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}
.post-body th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-color);
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-secondary);
}
.post-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}
.post-body tr:last-child td {
  border-bottom: none;
}
