/* Geokite blog: shares the landing page's tokens, nav and footer; adds article typography. */
:root {
  --void: #0a0a0a;
  --graphite: #161616;
  --smoke: #b2b2b2;
  --ash: #c2c2c2;
  --frost: rgba(212, 212, 212, 0.1);
  --hairline: rgba(229, 229, 229, 0.16);
  --hairline-soft: rgba(229, 229, 229, 0.08);
  --bone: #ededed;
  --snow: #ffffff;
  --violet-wash: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,0) 40%, rgba(107,98,242,0.565) 50%, rgba(0,0,0,0) 60%, rgba(0,0,0,0));
  --inset: rgba(255, 255, 255, 0.1) 0 0 0 1px inset;

  --f-display: "DM Sans", Inter, system-ui, sans-serif;
  --f-head: "Geist", Inter, system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-ui: 10px;
  --r-nav: 19px;
  --r-card: 24px;
  --r-panel: 42px;
  --r-pill: 9999px;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--void); color: var(--bone);
  font: 400 16px/1.5 var(--f-display);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, pre { font-family: var(--f-mono); }
::selection { background: var(--snow); color: var(--graphite); }
:focus-visible { outline: 2px solid var(--snow); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--snow); color: var(--graphite); padding: 8px 14px; border-radius: var(--r-pill); }
.skip:focus { top: 16px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- buttons, tags ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  font: 500 15px/1 var(--f-display); letter-spacing: 0.01em; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; cursor: pointer; border: 0;
}
.btn svg { width: 16px; height: 16px; transition: transform .15s ease; }
.btn:hover svg { transform: translateX(2px); }
.btn-primary { background: var(--snow); color: var(--graphite); }
.btn-primary:hover { background: var(--bone); }
.btn-ghost { background: transparent; color: rgba(255,255,255,.85); box-shadow: 0 0 0 1px var(--hairline) inset; }
.btn-ghost:hover { color: var(--snow); box-shadow: 0 0 0 1px rgba(229,229,229,.45) inset; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill);
  font-size: 12px; letter-spacing: 0.03em; color: var(--ash); box-shadow: 0 0 0 1px var(--hairline) inset; white-space: nowrap;
}

/* ---------- nav ---------- */
.nav-shell { position: sticky; top: 16px; z-index: 50; padding: 0 var(--gutter); margin-top: 16px; }
.nav {
  max-width: var(--max); margin: 0 auto; height: 60px; padding: 0 10px 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(22, 22, 22, 0.82); border-radius: var(--r-nav); box-shadow: var(--inset),
    rgba(255,255,255,0.02) 0 3px 4.5px, rgba(0,0,0,0.04) 0 10px 8px, rgba(0,0,0,0.1) 0 4px 3px;
  -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font: 500 19px/1 var(--f-display); letter-spacing: -0.02em; color: var(--snow); }
.logo svg { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: var(--r-pill); font-size: 14px; letter-spacing: 0.02em; color: var(--ash); transition: color .15s ease, background-color .15s ease; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--snow); background: rgba(255,255,255,.06); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px var(--hairline) inset; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 18px; height: 18px; }
.menu-panel {
  position: absolute; right: 0; top: 52px; width: min(280px, calc(100vw - 2 * var(--gutter)));
  padding: 8px; border-radius: var(--r-card); background: var(--graphite); box-shadow: var(--inset); display: grid; gap: 2px;
}
.menu-panel a { padding: 12px 14px; border-radius: 14px; color: var(--bone); }
.menu-panel a:hover { background: rgba(255,255,255,.06); }
.menu-panel .btn { margin-top: 6px; }

/* ---------- article header ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; letter-spacing: 0.025em; color: var(--smoke); margin: 56px 0 24px; }
.crumbs a:hover { color: var(--snow); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: rgba(255,255,255,.3); }
.post-head { max-width: 860px; }
.post-head h1, .blog-head h1 {
  font: 500 clamp(36px, 5.6vw, 60px)/1.04 var(--f-display); letter-spacing: -0.035em; color: var(--snow);
}
.post-head .lede, .blog-head .lede { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--ash); max-width: 62ch; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 28px; font-size: 14px; color: var(--smoke); }
.meta .by { display: inline-flex; align-items: center; gap: 8px; color: var(--bone); }
.meta .by svg { width: 20px; height: 20px; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.35); }
.cover {
  margin-top: 40px; border-radius: var(--r-panel); overflow: hidden; aspect-ratio: 1200 / 630;
  background: var(--graphite); box-shadow: var(--inset);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- article layout ---------- */
.post { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; margin-top: 64px; align-items: start; }
.toc { position: sticky; top: 100px; font-size: 14px; }
.toc p { font: 500 13px/1 var(--f-display); letter-spacing: 0.04em; color: var(--smoke); margin-bottom: 14px; }
.toc ol { display: grid; gap: 2px; border-left: 1px solid var(--hairline-soft); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ash); line-height: 1.4; transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--snow); }
.toc a.on { color: var(--snow); border-left-color: var(--snow); }

/* ---------- prose ---------- */
.prose { max-width: 720px; font-size: 17px; line-height: 1.75; color: var(--ash); }
.prose > * + * { margin-top: 20px; }
.prose h2 {
  margin-top: 64px; font: 500 clamp(26px, 3vw, 32px)/1.15 var(--f-head); letter-spacing: -0.02em; color: var(--snow);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 40px; font: 600 20px/1.3 var(--f-head); letter-spacing: -0.01em; color: var(--snow); }
.prose h2 + *, .prose h3 + * { margin-top: 16px; }
.prose strong { color: var(--bone); font-weight: 500; }
.prose a { color: var(--snow); text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; transition: text-decoration-color .15s; }
.prose a:hover { text-decoration-color: var(--snow); }
.prose a.btn { text-decoration: none; }
.prose ul, .prose ol { display: grid; gap: 10px; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 22px; }
.prose ul > li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.prose ol { counter-reset: n; }
.prose ol > li { position: relative; padding-left: 34px; counter-increment: n; }
.prose ol > li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 0.15em; font: 400 13px/1.6 var(--f-mono); color: var(--smoke); }
.prose :not(pre) > code {
  font-size: 0.86em; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.07); color: var(--bone); white-space: nowrap;
}

/* code blocks */
.code-card { border-radius: var(--r-card); background: var(--graphite); box-shadow: var(--inset); overflow: hidden; }
.prose > .code-card, .prose > .table-card, .prose > .note, .prose > figure { margin-top: 28px; margin-bottom: 8px; }
.code-label {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; border-bottom: 1px solid var(--hairline-soft);
  font-size: 12px; letter-spacing: 0.03em; color: var(--smoke);
}
.code-label + pre + .code-label { border-top: 1px solid var(--hairline-soft); }
.code-label b { font-weight: 500; color: var(--bone); }
.code-card pre {
  margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 13px; line-height: 1.7; color: var(--bone); tab-size: 2;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
}
.code-card .c { color: #8f8f8f; font-style: italic; }
.code-card .k { color: var(--ash); }
.code-card .s { color: var(--snow); }
.code-card .hl { color: var(--snow); background: rgba(255,255,255,.08); border-radius: 4px; padding: 1px 3px; margin: 0 -3px; }

/* tables */
.table-card { border-radius: var(--r-card); background: var(--frost); overflow: hidden; }
.table-scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th { text-align: left; font: 500 12px/1.3 var(--f-display); letter-spacing: 0.05em; text-transform: uppercase; color: var(--smoke); padding: 14px 18px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.prose td { padding: 13px 18px; border-bottom: 1px solid var(--hairline-soft); vertical-align: top; color: var(--ash); }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--bone); white-space: nowrap; }
.prose td code { white-space: nowrap; }

/* callout */
.note { border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--hairline) inset; padding: 22px 24px; font-size: 16px; line-height: 1.65; }
.note b { display: block; margin-bottom: 6px; font: 600 15px/1.3 var(--f-head); color: var(--snow); }

/* FAQ */
.faq { display: grid; margin-top: 24px; }
.faq details { border-bottom: 1px solid var(--hairline-soft); }
.faq details:first-child { border-top: 1px solid var(--hairline-soft); }
.faq summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px;
  padding: 18px 0; font: 500 18px/1.35 var(--f-head); letter-spacing: -0.01em; color: var(--bone); transition: color .15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover, .faq details[open] summary { color: var(--snow); }
.faq .pm { width: 20px; height: 20px; position: relative; }
.faq .pm::before, .faq .pm::after { content: ""; position: absolute; left: 3px; right: 3px; top: 9px; height: 1.5px; background: var(--ash); border-radius: 2px; transition: transform .2s ease; }
.faq .pm::after { transform: rotate(90deg); }
.faq details[open] .pm::after { transform: rotate(0); }
.faq details > div { padding: 0 0 20px; }

/* end-of-post call to action */
.cta {
  position: relative; overflow: hidden; isolation: isolate; margin-top: 64px;
  border-radius: var(--r-panel); background: var(--graphite); box-shadow: var(--inset); padding: clamp(32px, 5vw, 56px);
}
.cta::before {
  content: ""; position: absolute; z-index: -1; width: 800px; height: 800px; right: -300px; bottom: -520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(107,98,242,.7), rgba(107,98,242,.25) 45%, rgba(255,255,255,0) 100%);
}
.cta::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--violet-wash); }
.cta h2 { margin: 0; font: 500 clamp(28px, 3.6vw, 40px)/1.08 var(--f-display); letter-spacing: -0.03em; color: var(--snow); max-width: 18ch; }
.cta p { margin-top: 16px; max-width: 52ch; color: var(--ash); }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* post cards (blog index, related) */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; border-radius: var(--r-card); background: var(--frost); overflow: hidden; transition: box-shadow .15s ease; }
.card:hover { box-shadow: 0 0 0 1px rgba(229,229,229,.3) inset; }
.card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.card .in { padding: 24px 26px 28px; display: grid; gap: 12px; }
.card .when { font-size: 13px; letter-spacing: 0.025em; color: var(--smoke); }
.card h2, .card h3 { font: 600 22px/1.25 var(--f-head); letter-spacing: -0.02em; color: var(--snow); }
.card p { color: var(--ash); font-size: 15px; line-height: 1.6; }
.card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; color: var(--snow); }
.card .more svg { width: 14px; height: 14px; }
.related { margin-top: var(--section); }
.related > h2 { font: 500 clamp(26px, 3vw, 32px)/1.15 var(--f-head); letter-spacing: -0.02em; color: var(--snow); margin-bottom: 28px; }
.blog-head { max-width: 760px; margin-bottom: 56px; }

/* ---------- footer ---------- */
footer { margin-top: var(--section); border-top: 1px solid var(--hairline-soft); padding: 56px 0 40px; }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot p { margin-top: 14px; color: var(--ash); font-size: 14px; max-width: 36ch; }
.foot h4 { font: 500 13px/1 var(--f-display); letter-spacing: 0.04em; color: var(--smoke); margin-bottom: 16px; }
.foot ul { display: grid; gap: 10px; }
.foot ul a { font-size: 14px; color: var(--bone); transition: color .15s; }
.foot ul a:hover { color: var(--snow); text-decoration: underline; text-underline-offset: 3px; }
.attrib { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hairline-soft); display: grid; gap: 8px; font-size: 12.5px; line-height: 1.6; color: var(--smoke); }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .nav-links { display: none; }
  .menu { display: block; }
  .post { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 48px; }
  .toc { display: none; }
  .foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-cta .btn-ghost { display: none; }
  .crumbs { margin-top: 40px; }
  .cover { border-radius: var(--r-card); margin-top: 32px; }
  .prose { font-size: 16.5px; }
  .code-card pre { font-size: 12px; padding: 16px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
