/* jsonbolt design tokens */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

@font-face {
  font-family: "Poppins";
  font-weight: 900;
  font-style: normal;
  src: url("fonts/Poppins-Black.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  font-weight: 900;
  font-style: italic;
  src: url("fonts/Poppins-BlackItalic.ttf") format("truetype");
  font-display: swap;
}

:root {
  --jb-yellow: #fedb05;
  --jb-yellow-soft: #fff36b;
  --jb-black: #1c1c1c;
  --jb-ink: #0c0c0c;
  --jb-paper: #f4f1ea;
  --jb-paper-2: #ebe7dd;
  --jb-line: rgba(255, 255, 255, 0.08);
  --jb-line-dark: rgba(28, 28, 28, 0.12);
  --jb-mute: #8a8a8a;
  --jb-mute-2: #5e5e5e;

  --jb-rad-md: 6px;
  --jb-rad-lg: 14px;

  --jb-display: "Poppins", system-ui, sans-serif;
  --jb-mono: "JetBrains Mono", ui-monospace, monospace;

  --jb-shadow-yellow: 0 0 0 1px var(--jb-yellow), 0 12px 40px -8px rgba(254, 219, 5, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--jb-black);
  color: #f5f5f5;
  font-family: var(--jb-display);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection {
  background: var(--jb-yellow);
  color: var(--jb-black);
}

/* utilities */
.jb-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

.jb-mono {
  font-family: var(--jb-mono);
  font-feature-settings: "ss01", "ss02";
}

.jb-eyebrow {
  font-family: var(--jb-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jb-yellow);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.jb-eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--jb-yellow);
}

.jb-display {
  font-family: var(--jb-display);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.jb-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--jb-rad-md);
  font-family: var(--jb-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out, background 180ms ease-out;
  border: 0;
  text-decoration: none;
}
.jb-btn-primary {
  background: var(--jb-yellow);
  color: var(--jb-black);
}
.jb-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px 2px rgba(254, 219, 5, 0.5);
}
.jb-btn-ghost {
  background: transparent;
  color: #f5f5f5;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.jb-btn-ghost:hover {
  border-color: var(--jb-yellow);
  color: var(--jb-yellow);
}
.jb-btn-dark {
  background: var(--jb-black);
  color: #f5f5f5;
}
.jb-btn-dark:hover {
  transform: translateY(-2px);
}

/* nav */
.jb-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 28, 28, 0.94);
  border-bottom: 1px solid var(--jb-line);
}
.jb-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.jb-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--jb-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.04em;
}
.jb-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
}
.jb-nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}
.jb-nav-links a:hover {
  color: var(--jb-yellow);
}
.jb-nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* docs dropdown */
.jb-nav-dropdown {
  position: relative;
}
.jb-nav-dropdown-trigger {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: inherit;
}
.jb-nav-dropdown-trigger:hover,
.jb-nav-dropdown[data-active="true"] .jb-nav-dropdown-trigger {
  color: var(--jb-yellow);
}
.jb-nav-dropdown-caret {
  transition: transform 160ms ease;
  opacity: 0.7;
}
.jb-nav-dropdown:hover .jb-nav-dropdown-caret,
.jb-nav-dropdown[data-open="true"] .jb-nav-dropdown-caret {
  transform: rotate(180deg);
}
.jb-nav-submenu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: rgba(28, 28, 28, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--jb-line);
  border-radius: 8px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.jb-nav-dropdown:hover .jb-nav-submenu,
.jb-nav-dropdown[data-open="true"] .jb-nav-submenu {
  display: flex;
}
/* Invisible hover bridges so the cursor can travel from the trigger
   to the submenu without losing :hover. Two of them — one extends the
   wrapper down into the visual gap, the other extends the submenu up. */
.jb-nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
  pointer-events: auto;
}
.jb-nav-submenu::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -8px;
  right: -8px;
  height: 16px;
}
.jb-nav-submenu a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 5px;
  font-weight: 500;
}
.jb-nav-submenu a:hover {
  color: var(--jb-yellow);
  background: rgba(254, 219, 5, 0.06);
}

/* footer */
.jb-footer {
  background: var(--jb-ink);
  border-top: 1px solid var(--jb-line);
  padding: 80px 0 40px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}
.jb-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}
.jb-footer h5 {
  font-family: var(--jb-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 16px;
  font-weight: 600;
}
.jb-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jb-footer a:hover {
  color: var(--jb-yellow);
}
.jb-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--jb-line);
  font-family: var(--jb-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* shared section */
.jb-section {
  padding: 120px 0;
  position: relative;
}
.jb-section-title {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 24px;
}
.jb-section-sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
  max-width: 620px;
  line-height: 1.5;
  margin: 0;
}

.jb-yellow {
  color: var(--jb-yellow);
}
.jb-italic {
  font-style: italic;
}

/* tag/chip */
.jb-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--jb-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.jb-tag-yellow {
  border-color: var(--jb-yellow);
  color: var(--jb-yellow);
}
.jb-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jb-yellow);
}

/* paper section override */
.jb-paper {
  background: var(--jb-paper);
  color: var(--jb-black);
}
.jb-paper .jb-section-sub {
  color: rgba(28, 28, 28, 0.65);
}
.jb-paper .jb-tag {
  border-color: rgba(28, 28, 28, 0.18);
  color: rgba(28, 28, 28, 0.7);
}

/* mobile nav toggle (hamburger) */
.jb-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f5f5f5;
  width: 40px;
  height: 40px;
  border-radius: var(--jb-rad-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.jb-nav-toggle:hover {
  border-color: var(--jb-yellow);
  color: var(--jb-yellow);
}
.jb-nav-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* shared mobile responsive rules */
@media (max-width: 768px) {
  .jb-container {
    padding: 0 20px;
  }
  .jb-section {
    padding: 80px 0;
  }

  .jb-nav-inner {
    position: relative;
  }
  .jb-nav-links {
    display: none;
  }
  .jb-nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(28, 28, 28, 0.97);
    backdrop-filter: blur(14px);
    padding: 16px 20px 24px;
    gap: 14px;
    border-bottom: 1px solid var(--jb-line);
  }
  .jb-nav-links.is-open a {
    padding: 8px 0;
    font-size: 16px;
  }
  .jb-nav-links.is-open .jb-nav-dropdown {
    width: 100%;
  }
  .jb-nav-links.is-open .jb-nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
  }
  .jb-nav-links.is-open .jb-nav-submenu {
    position: static;
    transform: none;
    display: flex;
    background: transparent;
    backdrop-filter: none;
    border: 0;
    padding: 4px 16px 4px;
    box-shadow: none;
    gap: 4px;
  }
  .jb-nav-links.is-open .jb-nav-submenu a {
    padding: 6px 0;
    font-size: 15px;
  }
  .jb-nav-toggle {
    display: inline-flex;
  }
  .jb-nav-cta .jb-btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  .jb-footer {
    padding: 56px 0 32px;
  }
  .jb-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
  }
  .jb-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .jb-container {
    padding: 0 16px;
  }
  .jb-section {
    padding: 56px 0;
  }
  .jb-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .jb-section-title {
    font-size: clamp(36px, 9vw, 48px);
  }
}

/* ---------- BLOG POST ---------- */
.post-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 120px;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}
.post-crumb {
  font-family: var(--jb-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jb-yellow);
  margin-bottom: 32px;
}
.post-crumb a { color: var(--jb-yellow); text-decoration: none; }
.post-crumb a:hover { text-decoration: underline; }
.post-shell h1 {
  font-family: var(--jb-display);
  font-weight: 900;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #fff;
  margin: 0 0 20px;
}
.post-shell h1 .y { color: var(--jb-yellow); font-style: italic; }
.post-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--jb-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.post-meta .cat { color: var(--jb-yellow); }
.post-shell .lede {
  font-size: 22px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin: 0 0 48px;
}
.post-shell h2 {
  font-family: var(--jb-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  margin: 56px 0 16px;
}
.post-shell h3 {
  font-family: var(--jb-display);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  margin: 36px 0 12px;
}
.post-shell p { margin: 0 0 20px; }
.post-shell a { color: var(--jb-yellow); }
.post-shell strong { color: #fff; font-weight: 600; }
.post-shell code {
  font-family: var(--jb-mono);
  font-size: 0.9em;
  background: rgba(254, 219, 5, 0.1);
  color: var(--jb-yellow);
  padding: 2px 6px;
  border-radius: 3px;
}
.post-shell pre {
  font-family: var(--jb-mono);
  font-size: 13px;
  line-height: 1.55;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 20px 22px;
  overflow-x: auto;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.85);
}
.post-shell pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}
.post-shell pre .cm { color: rgba(255, 255, 255, 0.4); font-style: italic; }
.post-shell pre .pr { color: var(--jb-yellow); }
.post-shell pre .st { color: #f6c66c; }
.post-shell pre .kw { color: var(--jb-yellow); font-weight: 600; }
.post-shell ul, .post-shell ol {
  margin: 0 0 24px;
  padding-left: 22px;
}
.post-shell li { margin-bottom: 8px; }
.post-callout {
  background: rgba(254, 219, 5, 0.06);
  border-left: 3px solid var(--jb-yellow);
  padding: 18px 22px;
  margin: 0 0 28px;
  border-radius: 0 4px 4px 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}
.post-callout b { color: var(--jb-yellow); }
.post-foot {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--jb-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}
.post-foot a { color: var(--jb-yellow); text-decoration: none; }
.post-foot a:hover { text-decoration: underline; }
.post-bench-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--jb-mono);
  font-size: 13px;
  margin: 0 0 28px;
}
.post-bench-table th, .post-bench-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.post-bench-table th {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}
.post-bench-table tr.jb td { color: var(--jb-yellow); font-weight: 600; }

@media (max-width: 600px) {
  .post-shell { padding: 40px 20px 80px; font-size: 16px; }
  .post-meta { gap: 12px; font-size: 11px; }
  .post-shell .lede { font-size: 19px; }
  .post-shell h2 { font-size: 26px; margin: 44px 0 14px; }
  .post-shell h3 { font-size: 18px; }
  .post-bench-table { font-size: 12px; }
  .post-bench-table th, .post-bench-table td { padding: 8px 10px; }
}
