/* ── Blog shared nav override ───────────────────────────────────────────
   Loaded after the inline <style> to fix nav centering and mobile layout.
   ─────────────────────────────────────────────────────────────────────── */

/* Container: match main site padding */
.container {
  padding-left:  2rem;
  padding-right: 2rem;
}

/* CSS Grid nav - logo left, links perfectly centered, CTA right */
nav.navbar .inner {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
}

.nav-links {
  justify-self: center;
  gap: 2rem; /* match main site */
}

.nav-cta {
  justify-self: end;
}

/* Hamburger button (hidden on desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: .25rem;
  justify-self: end;
}

.blog-mobile-menu.open .hamburger {
  display: none !important;
}

/* Mobile overlay menu */
.blog-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(13, 17, 23, .97);
  backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  overflow-y: auto;
  padding: 3rem 1.5rem;
}

.blog-mobile-menu.open { display: flex; }

.blog-mobile-menu a {
  color: #e6edf3;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 600;
  transition: color .2s;
}

.blog-mobile-menu a:hover { color: #00c8ff; }

.blog-mobile-menu .close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #e6edf3;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  z-index: 1002 !important;
  width: 44px;
  height: 44px;
  display: none !important;
  align-items: center;
  justify-content: center;
}

.blog-mobile-menu.open .close-btn {
  display: flex !important;
}

/* ── Nav dropdown ────────────────────────────────────────────────────── */
.has-dropdown { position: relative; }
.has-dropdown::after { content: ''; position: absolute; bottom: -.7rem; left: 0; right: 0; height: .7rem; }
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + .65rem);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 27, 34, .98);
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: .4rem;
  min-width: 210px;
  list-style: none;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.has-dropdown:hover .nav-dropdown { display: block; }
.nav-dropdown li a {
  display: block;
  padding: .5rem .9rem;
  border-radius: 6px;
  color: #8b949e;
  font-size: .88rem;
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s, background .15s;
}
.nav-dropdown li a:hover { color: #e6edf3; background: rgba(255,255,255,.05); }
.nav-dropdown li a.active { color: #00c8ff; }
.has-dropdown.active-parent > a { color: #00c8ff; }
.has-dropdown > a::after { content: ' \25BE'; font-size: .75em; opacity: .55; }

/* ── Responsive breakpoint: match main site at 900px ─────────────────── */
@media (max-width: 900px) {
  nav.navbar .inner {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
  }

  .nav-links,
  .nav-cta { display: none !important; }

  .hamburger { display: flex !important; }
}

@media (max-width: 600px) {
  .container {
    padding-left:  1rem;
    padding-right: 1rem;
  }
}

/* ── Prose / article body links ──────────────────────────────────────── */
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(0, 200, 255, .25);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}

.prose a:hover {
  color: #fff;
  text-decoration-color: var(--accent);
}

/* ── Table of Contents ────────────────────────────────────────────────── */
.toc {
  background: rgba(22, 27, 34, 0.7);
  border: 1px solid rgba(0, 200, 255, 0.18);
  border-left: 3px solid #00c8ff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 0 0 2.75rem 0;
  max-width: 760px;
}

.toc-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #00c8ff;
  margin-bottom: .9rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-counter;
}

.toc-list li {
  counter-increment: toc-counter;
  display: flex;
  gap: .75rem;
  align-items: baseline;
  margin-bottom: .35rem;
}

.toc-list li::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: .72rem;
  color: #8b949e;
  flex-shrink: 0;
  line-height: 1.75;
  min-width: 1.75rem;
}

.toc-list a {
  color: #c9d1d9;
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.65;
  transition: color .2s;
}

.toc-list a:hover {
  color: #00c8ff;
}

@media (max-width: 600px) {
  .toc { padding: 1rem 1.1rem; }
  .toc-list a { font-size: .85rem; }
}
