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

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1d2e;
  background: #ffffff;
  transition: background 250ms ease, color 250ms ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a {
  color: #5b6af0;
  text-decoration: none;
  transition: color 150ms ease;
}
a:hover {
  color: #4455dd;
}

[data-theme=dark] {
  color: #e8eaf6;
  background: #0f1117;
  --color-bg: #0f1117;
  --color-bg-subtle: #171b25;
  --color-bg-card: #1c2030;
  --color-border: #2a2f42;
  --color-text: #e8eaf6;
  --color-text-muted: #8892aa;
}

:root {
  --color-bg: #ffffff;
  --color-bg-subtle: #f6f7fb;
  --color-bg-card: #ffffff;
  --color-border: #e5e7ef;
  --color-text: #1a1d2e;
  --color-text-muted: #6b7280;
  --color-primary: #5b6af0;
  --color-accent: #f06050;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.25;
  color: #1a1d2e;
}
[data-theme=dark] h1, [data-theme=dark] h2, [data-theme=dark] h3, [data-theme=dark] h4, [data-theme=dark] h5, [data-theme=dark] h6 {
  color: #e8eaf6;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 1.875rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: #5b6af0;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  z-index: 9999;
  transition: top 150ms ease;
}
.skip-link:focus {
  top: 1rem;
  color: white;
}

code {
  font-family: "Fira Code", "Cascadia Code", "Consolas", monospace;
  font-size: 0.875em;
  background: var(--color-bg-subtle);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

pre {
  background: #1e2030;
  color: #c0caf5;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.divider {
  color: var(--color-text-muted);
  margin: 0 0.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background 250ms ease, border-color 250ms ease;
}
[data-theme=dark] .site-header {
  background: rgba(15, 17, 23, 0.88);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.site-brand .brand-name {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1d2e;
  transition: color 150ms ease;
}
[data-theme=dark] .site-brand .brand-name {
  color: #e8eaf6;
}
.site-brand:hover .brand-name {
  color: #5b6af0;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
}
.nav-menu li a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: 6px;
  transition: color 150ms ease, background 150ms ease;
}
.nav-menu li a:hover {
  color: #1a1d2e;
  background: var(--color-bg-subtle);
}
[data-theme=dark] .nav-menu li a:hover {
  color: #e8eaf6;
}
.nav-menu li a.active {
  color: #5b6af0;
  font-weight: 600;
}
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-menu li {
    width: 100%;
  }
  .nav-menu li a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 150ms ease;
}
.nav-toggle[aria-expanded=true] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded=true] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded=true] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all 150ms ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--color-bg-subtle);
  color: #5b6af0;
  border-color: #5b6af0;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .icon-moon {
  display: none;
}
[data-theme=dark] .theme-toggle .icon-sun {
  display: none;
}
[data-theme=dark] .theme-toggle .icon-moon {
  display: block;
}

.site-footer {
  background: var(--color-bg-subtle);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}
@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-brand .site-brand .brand-name {
  font-size: 1rem;
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-nav a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.footer-nav a:hover {
  color: #5b6af0;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all 150ms ease;
}
.footer-social a:hover {
  color: #5b6af0;
  border-color: #5b6af0;
  background: rgba(91, 106, 240, 0.08);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
}
.footer-bottom p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-bg-subtle);
  padding: 5rem 0 4rem;
}
@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
    min-height: 60vh;
  }
}

.hero--photo {
  background-size: cover;
  background-position: center 22%;
  background-repeat: no-repeat;
  padding: 0;
  min-height: 90vh;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.55) 40%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0.72) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 4rem;
  align-items: center;
  padding: 5rem 0 3rem;
}
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
}

.hero-content--centered {
  grid-template-columns: 1fr;
  text-align: center;
  align-items: center;
  justify-items: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 5rem 0 2.5rem;
}

.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: #5b6af0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-family: "Lora", Georgia, "Times New Roman", serif;
  line-height: 1.25;
  color: #1a1d2e;
  margin-bottom: 1rem;
}
[data-theme=dark] .hero-title {
  color: #e8eaf6;
}

.hero-title--light {
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}
[data-theme=dark] .hero-title--light {
  color: #ffffff;
}

.hero-dynamic {
  font-size: 2.25rem;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  min-height: 2em;
}

.hero-dynamic--light {
  color: rgba(255, 255, 255, 0.85);
  min-height: 2em;
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-family: "Lora", Georgia, "Times New Roman", serif;
  margin-bottom: 1.25rem;
}

#typewriter {
  font-weight: 600;
  border-right: 2px solid currentColor;
  padding-right: 2px;
  white-space: nowrap;
  animation: cursor-blink 0.75s step-end infinite;
}
.hero-dynamic #typewriter {
  color: #5b6af0;
  border-color: #5b6af0;
}
.hero-dynamic--light #typewriter {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.8);
}

@keyframes cursor-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    border-color: transparent;
  }
}
.hero-description {
  font-size: clamp(1.5rem, 4.5vw, 1.875rem);
  color: var(--color-text-muted);
  line-height: 1.8;
  max-width: 50ch;
  margin-bottom: 2rem;
}

.hero-description--light {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: clamp(1.5rem, 4.5vw, 1.875rem);
  line-height: 1.8;
  max-width: 52ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-content--centered .hero-actions {
  justify-content: center;
}

.btn-ghost-light {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.9);
  color: #ffffff;
}

.hero-attribution {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  z-index: 2;
  font-size: 0.75rem;
  font-family: "Fira Code", "Cascadia Code", "Consolas", monospace;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}
.hero-attribution em {
  font-style: italic;
}

@media (max-width: 1024px) {
  .hero-visual {
    display: none;
  }
}

.hero-chart-preview {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.08);
  height: 260px;
  position: relative;
}
.hero-chart-preview canvas {
  width: 100% !important;
  height: 100% !important;
}

@keyframes blob-drift {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 30px) scale(0.95);
  }
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .hero-visual {
    display: none;
  }
}

.hero-chart-preview {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.08);
  height: 260px;
  position: relative;
}
.hero-chart-preview canvas {
  width: 100% !important;
  height: 100% !important;
}

.recent-posts {
  padding: 4rem 0;
}

.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2.5rem;
  background: var(--color-bg-subtle);
}

.page-title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-family: "Lora", Georgia, "Times New Roman", serif;
  margin-bottom: 0.75rem;
}
[data-theme=dark] .page-title {
  color: #e8eaf6;
}

.page-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin: 0;
}

.blog-listing {
  padding-bottom: 5rem;
}

.post-hero {
  padding: 3rem 0 2rem;
  background: var(--color-bg-subtle);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2.5rem;
}

.post-meta-top {
  margin-bottom: 1rem;
}

.post-title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-family: "Lora", Georgia, "Times New Roman", serif;
  max-width: 22ch;
  margin-bottom: 1rem;
}
[data-theme=dark] .post-title {
  color: #e8eaf6;
}

.post-subtitle {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 1rem;
  max-width: 55ch;
}

.post-byline {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: 0.25rem;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 3rem;
}
@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
  }
}

.post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1a1d2e;
}
[data-theme=dark] .post-content {
  color: #e8eaf6;
}
.post-content {
  max-width: 68ch;
}
.post-content h2 {
  font-size: 1.875rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.post-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.post-content h4 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.post-content p {
  margin-bottom: 1.25rem;
}
.post-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid #5b6af0;
  background: rgba(91, 106, 240, 0.04);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--color-text-muted);
}
.post-content blockquote p {
  margin-bottom: 0;
}
.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.post-content ul li, .post-content ol li {
  margin-bottom: 0.5rem;
}
.post-content img {
  border-radius: 12px;
  margin: 2rem auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}
.post-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}
.post-content table th, .post-content table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
}
.post-content table th {
  background: var(--color-bg-subtle);
  font-weight: 600;
}
.post-content table tr:hover td {
  background: var(--color-bg-subtle);
}

@media (max-width: 1024px) {
  .post-sidebar {
    display: none;
  }
}

.sidebar-sticky {
  position: sticky;
  top: calc(64px + 1.5rem);
}

.toc-widget {
  padding: 1.25rem;
  background: var(--color-bg-subtle);
  border-radius: 12px;
  border: 1px solid var(--color-border);
}
.toc-widget h3 {
  font-size: 0.875rem;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.toc-widget #toc a {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 0.25rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: all 150ms ease;
}
.toc-widget #toc a:hover {
  color: #5b6af0;
  border-color: #5b6af0;
}
.toc-widget #toc a.active {
  color: #5b6af0;
  border-color: #5b6af0;
  font-weight: 500;
}
.toc-widget #toc .toc-h3 {
  padding-left: 1.5rem;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .post-nav {
    grid-template-columns: 1fr;
  }
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem;
  background: var(--color-bg-subtle);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: all 150ms ease;
}
.post-nav-link:hover {
  border-color: #5b6af0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.post-nav-link.next {
  text-align: right;
  grid-column: 2;
}

.nav-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.nav-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1d2e;
}
[data-theme=dark] .nav-title {
  color: #e8eaf6;
}

sup[id^=fnref] a {
  color: #5b6af0;
  font-weight: 700;
  text-decoration: none;
  padding: 0 2px;
  border-radius: 2px;
  cursor: pointer;
}
sup[id^=fnref] a:hover {
  background: rgba(91, 106, 240, 0.12);
}

.footnote-popover {
  position: absolute;
  z-index: 300;
  max-width: min(360px, 100vw - 24px);
  padding: 1rem 2.5rem 1rem 1.25rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--color-text);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.footnote-popover.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.footnote-popover::before {
  content: "";
  position: absolute;
  top: -5px;
  left: var(--fn-arrow-left, 50%);
  width: 9px;
  height: 9px;
  background: var(--color-bg-card);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  transform: translateX(-50%) rotate(45deg);
}
.footnote-popover p {
  margin: 0;
  line-height: 1.8;
}
.footnote-popover a {
  color: #5b6af0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footnote-popover__number {
  font-size: 0.75rem;
  font-weight: 700;
  color: #5b6af0;
  margin-right: 0.5rem;
}

.footnote-popover__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  border-radius: 6px;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
}
.footnote-popover__close:hover {
  color: var(--color-text);
  background: var(--color-bg-subtle);
}

.footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.footnotes::before {
  content: "Notes";
  display: block;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.footnotes ol {
  padding-left: 1.25rem;
}
.footnotes li {
  margin-bottom: 0.5rem;
}
.footnotes a {
  color: #5b6af0;
}
.footnotes.js-hidden {
  display: none;
}

.page-content {
  max-width: 720px;
  padding-bottom: 5rem;
  font-size: 1.125rem;
  line-height: 1.8;
}
.page-content h2 {
  font-size: 1.875rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.page-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.page-content p {
  margin-bottom: 1.25rem;
}
.page-content ul, .page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.page-content ul li, .page-content ol li {
  margin-bottom: 0.5rem;
}
.page-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}
.page-content strong {
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: #5b6af0;
  color: white;
}
.btn-primary:hover {
  background: #4455dd;
  color: white;
  box-shadow: 0 4px 16px rgba(91, 106, 240, 0.4);
}

.btn-ghost {
  background: transparent;
  color: #1a1d2e;
  border-color: var(--color-border);
}
[data-theme=dark] .btn-ghost {
  color: #e8eaf6;
}
.btn-ghost:hover {
  background: var(--color-bg-subtle);
  color: #5b6af0;
  border-color: #5b6af0;
}

.btn-outline {
  background: transparent;
  color: #5b6af0;
  border-color: #5b6af0;
}
.btn-outline:hover {
  background: #5b6af0;
  color: white;
}

.category-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(91, 106, 240, 0.1);
  color: #5b6af0;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 150ms ease;
}
[data-theme=dark] .category-badge {
  background: rgba(91, 106, 240, 0.2);
}
.category-badge:hover {
  background: rgba(91, 106, 240, 0.2);
}
.category-badge--sm {
  padding: 2px 0.5rem;
  font-size: 0.65rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: "Fira Code", "Cascadia Code", "Consolas", monospace;
  border: 1px solid var(--color-border);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.section-title {
  font-size: 1.875rem;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  color: #1a1d2e;
}
[data-theme=dark] .section-title {
  color: #e8eaf6;
}

.section-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #5b6af0;
  white-space: nowrap;
}
.section-link:hover {
  color: #4455dd;
}

.section-footer {
  margin-top: 2.5rem;
  text-align: center;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  transition: box-shadow 250ms ease, transform 250ms ease, border-color 250ms ease;
  overflow: hidden;
}
.post-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
  border-color: rgba(91, 106, 240, 0.3);
}
.post-card--featured {
  grid-column: 1/-1;
}
@media (min-width: 1024px) {
  .post-card--featured {
    grid-column: span 2;
  }
}
.post-card--featured .post-card-inner {
  padding: 2rem;
}
.post-card--featured .post-card-title {
  font-size: 1.875rem;
}
.post-card--featured .post-card-excerpt {
  display: block;
}

.post-card-inner {
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-card-category {
  margin-bottom: 0.75rem;
}

.post-card-title {
  font-size: 1.25rem;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
[data-theme=dark] .post-card-title {
  color: #e8eaf6;
}
.post-card-title a {
  color: inherit;
}
.post-card-title a:hover {
  color: #5b6af0;
}

.post-card-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: auto;
  flex-wrap: wrap;
}

.reading-time {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.editorial-image {
  background: #0d0d0d;
  margin: 0;
}

.editorial-figure {
  margin: 0;
}
.editorial-figure img {
  display: block;
  width: 100%;
  max-height: 580px;
  object-fit: cover;
  object-position: center 20%;
}

.editorial-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: #0d0d0d;
}
@media (max-width: 640px) {
  .editorial-caption {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1rem;
  }
}

.caption-text {
  font-size: 0.875rem;
  font-style: italic;
  color: #999;
  max-width: 60ch;
}

.caption-credit {
  font-size: 0.75rem;
  font-family: "Fira Code", "Cascadia Code", "Consolas", monospace;
  color: #555;
  white-space: nowrap;
  flex-shrink: 0;
}

.featured-post {
  padding: 1rem 0 3rem;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 28px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 250ms ease, transform 250ms ease;
}
.featured-card:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}
@media (max-width: 768px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
}

.featured-card-image {
  overflow: hidden;
  max-height: 420px;
}
.featured-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 768px) {
  .featured-card-image {
    max-height: 280px;
  }
}

.featured-card-body {
  padding: 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}
@media (max-width: 768px) {
  .featured-card-body {
    padding: 1.5rem;
  }
}

.featured-card-title {
  font-size: 1.875rem;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  line-height: 1.4;
  color: #1a1d2e;
}
[data-theme=dark] .featured-card-title {
  color: #e8eaf6;
}

.featured-card-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.featured-card-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.featured-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  margin-top: auto;
}

.featured-card-cta {
  margin-left: auto;
  font-weight: 600;
  color: #5b6af0;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
  transition: background 150ms ease;
}
.post-list-item:first-child {
  border-top: 1px solid var(--color-border);
}
.post-list-item.hidden {
  display: none;
}
.post-list-item:hover .post-list-arrow {
  opacity: 1;
  transform: translateX(0);
  color: #5b6af0;
}

.post-list-item-inner {
  flex: 1;
}

.post-list-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.post-list-title {
  font-size: 1.5rem;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
[data-theme=dark] .post-list-title {
  color: #e8eaf6;
}
.post-list-title a {
  color: inherit;
}
.post-list-title a:hover {
  color: #5b6af0;
}

.post-list-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.post-list-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 65ch;
}

.post-list-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-list-arrow {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 150ms ease;
  align-self: center;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .post-list-arrow {
    display: none;
  }
}

.blog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.blog-search {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.blog-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  background: var(--color-bg-subtle);
  color: var(--color-text);
  font-size: 0.875rem;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  outline: none;
}
.blog-search input:focus {
  border-color: #5b6af0;
  box-shadow: 0 0 0 3px rgba(91, 106, 240, 0.15);
}
.blog-search input::placeholder {
  color: var(--color-text-muted);
}
.blog-search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.blog-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: all 150ms ease;
}
.filter-btn:hover {
  border-color: #5b6af0;
  color: #5b6af0;
}
.filter-btn.active {
  background: #5b6af0;
  border-color: #5b6af0;
  color: white;
}

.no-results {
  text-align: center;
  padding: 4rem 0;
  color: var(--color-text-muted);
}

.scale-section {
  padding: 4rem 0;
  background: var(--color-bg-subtle);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.scale-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.scale-heading {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.875rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  color: #1a1d2e;
}
[data-theme=dark] .scale-heading {
  color: #e8eaf6;
}

.scale-text p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.scale-text p:last-child {
  margin-bottom: 0;
}

.scale-viz-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

#billion-iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: none;
}

.viz-container {
  margin: 2rem 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #f6f7fb;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}
.viz-container iframe {
  display: block;
  width: 100%;
  border: none;
}

.topics-section {
  padding: 4rem 0;
  background: var(--color-bg-subtle);
}

.topics-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.topic-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 150ms ease;
}
.topic-card:hover {
  border-color: #5b6af0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.topic-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1a1d2e;
}
[data-theme=dark] .topic-name {
  color: #e8eaf6;
}

.topic-count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  padding: 2px 0.5rem;
  border-radius: 9999px;
}

.about-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
}

.about-photo {
  position: sticky;
  top: calc(64px + 1.5rem);
}

.photo-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--color-bg-subtle);
  border: 3px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
@media (max-width: 768px) {
  .photo-placeholder {
    width: 100px;
    height: 100px;
  }
}

.about-bio {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1a1d2e;
}
[data-theme=dark] .about-bio {
  color: #e8eaf6;
}
.about-bio h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}
.about-bio p {
  margin-bottom: 1.25rem;
}
.about-bio ul, .about-bio ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.about-bio ul li, .about-bio ol li {
  margin-bottom: 0.5rem;
}
.about-bio hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

.data-section {
  padding: 2rem 0 5rem;
}

.chart-block {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: box-shadow 250ms ease;
}
.chart-block:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}
.chart-block--half {
  flex: 1;
  min-width: 0;
}

.chart-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 768px) {
  .chart-row {
    flex-direction: column;
  }
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.chart-title {
  font-size: 1.5rem;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  margin-bottom: 0.5rem;
}
[data-theme=dark] .chart-title {
  color: #e8eaf6;
}

.chart-description {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 0;
}

.chart-source {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
  font-style: italic;
  margin-bottom: 0;
}

.chart-container {
  position: relative;
  height: 360px;
}
.chart-container--bar {
  height: 300px;
}
.chart-container--sm {
  height: 260px;
}

.chart-controls {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.chart-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: all 150ms ease;
}
.chart-btn:hover {
  border-color: #5b6af0;
  color: #5b6af0;
}
.chart-btn.active {
  background: #5b6af0;
  border-color: #5b6af0;
  color: white;
}

/*# sourceMappingURL=main.css.map */