/* ── Base fonts ── */
body { font-family: 'Merriweather', Georgia, serif; }
h1, h2, h3, h4, h5, h6, nav, .btn, .badge { font-family: 'Montserrat', sans-serif; }

/* ── Nav responsive ── */
.desktop-only { display: flex; margin-left: auto; }
.mobile-only  { display: none !important; }
@media (max-width: 1160px) {
  .desktop-only { display: none !important; }
  .mobile-only  { display: flex !important; }
}
.hamburger-btn {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; background: transparent; border: none; transition: background 0.15s;
}
.hamburger-btn:hover { background: rgba(0,0,0,0.06); }
@media (max-width: 580px) { .logo-brand-text { display: none !important; } }

/* ── Site header ── */
.site-header {
  position: sticky; top: 0; z-index: 50; background: white;
  border-bottom: 3px solid #000; box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.site-header .desktop-only a:hover { color: #c8831c !important; }
#mobile-menu {
  display: none; position: fixed; top: 86px; left: 0; right: 0; z-index: 49;
  background: white; border-bottom: 3px solid #000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15); padding: 1.5rem;
}
#mobile-menu.open { display: block; }
@media (max-width: 620px) { #mobile-menu { top: 66px; } }

/* ── Post hero (full-bleed image + editorial overlay) ── */
.post-hero {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  background: #0d1117;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.post-hero-noimg {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,0.025) 0,
    rgba(255,255,255,0.025) 1px,
    transparent 0,
    transparent 50%
  );
  background-size: 24px 24px;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8,12,20,0.95) 0%,
    rgba(8,12,20,0.6) 40%,
    rgba(8,12,20,0.18) 100%
  );
}
.post-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 10% 3.5rem;
}
.post-hero-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c8831c;
  margin-bottom: 1rem;
}
.post-hero-cat::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: #c8831c;
  flex-shrink: 0;
}
.post-hero-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 3.8vw, 3.5rem);
  color: white;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
  max-width: 820px;
}
.post-hero-date {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
}
@media (max-width: 900px) {
  .post-hero { min-height: 340px; }
  .post-hero-inner { padding: 0 1.5rem 2.5rem; }
}

/* ── Diagonal separator ── */
.post-separator {
  display: block; width: 100%; height: 48px;
  margin-top: -2px;
}

/* ── Two-column body ── */
.post-body {
  padding: 2rem 15%;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
  background: white;
}

/* ── Prose content ── */
.post-content {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #1f2937;
  min-width: 0;
}
.post-content h2 {
  font-family: 'Montserrat', sans-serif; font-weight: 800;
  font-size: 1.55rem; margin: 2.5rem 0 1rem; color: #111;
  border-left: 4px solid #82c0c7; padding-left: 1rem;
  scroll-margin-top: 100px;
}
.post-content h3 {
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: 1.2rem; margin: 2rem 0 0.75rem; color: #111;
  scroll-margin-top: 100px;
}
.post-content p { margin: 0 0 1.25rem; }
.post-content ul, .post-content ol { margin: 0 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content blockquote {
  border-left: 4px solid #82c0c7; margin: 1.75rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem; color: #374151;
}
.post-content img { max-width: 80%; height: auto; border-radius: 0.5rem; margin: 1.5rem auto; display: block; }
.post-content .caption { max-width: 90%; margin: -0.5rem auto 1.25rem; font-size: 0.88rem; color: #6b7280; text-align: center; font-style: italic; }
.post-content a { color: #82c0c7; }
.post-content strong { font-weight: 700; }
.post-content em { font-style: italic; }
.post-content img { cursor: zoom-in; }

/* ── Inline TOC ── */
.post-content .toc {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #c8831c;
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem 1.25rem 1.75rem;
  margin: 0.5rem 0 2rem;
}
.post-content .toc p {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #111; margin: 0 0 0.85rem !important;
}
.post-content .toc p strong { font-weight: 800; }
.post-content .toc ul { margin: 0 !important; padding-left: 1.1rem; list-style: none; }
.post-content .toc ul ul { margin: 0.2rem 0 0.2rem 1rem !important; }
.post-content .toc > ul > li {
  margin-bottom: 0.4rem;
  background: #eef2f5;
  border-radius: 0.35rem;
  padding: 0.55rem 0.85rem;
}
.post-content .toc > ul > li:last-child { margin-bottom: 0; }
.post-content .toc li { margin-bottom: 0.25rem; }
.post-content .toc ul ul { margin: 0.3rem 0 0 1rem !important; }
.post-content .toc a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem; font-weight: 600;
  color: #1f2937; text-decoration: none;
}
.post-content .toc ul ul a { font-weight: 500; color: #374151; font-size: 0.83rem; }
.post-content .toc a:hover { color: #c8831c; }
.video-embed {
  position: relative; padding-bottom: 56.25%; height: 0;
  overflow: hidden; border-radius: 0.5rem; margin: 1.75rem 0;
}
.video-embed iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

/* ── Sidebar ── */
.post-sidebar {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.post-sidebar::-webkit-scrollbar { width: 4px; }
.post-sidebar::-webkit-scrollbar-track { background: transparent; }
.post-sidebar::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 99px; }
.sidebar-toc {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.1rem 1.5rem;
  margin-bottom: 1.25rem;
}
.sidebar-toc-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #111;
  margin-bottom: 0.75rem;
}
.sidebar-toc ul {
  margin: 0; padding: 0; list-style: none;
}
.sidebar-toc ul ul {
  margin: 0.2rem 0 0.2rem 1.1rem;
}
.sidebar-toc > ul > li { margin-bottom: 0; padding: 0.45rem 0; border-top: 1px solid #e5e7eb; }
.sidebar-toc > ul > li:first-child { border-top: none; padding-top: 0; }
.sidebar-toc > ul > li:last-child { padding-bottom: 0; }
.sidebar-toc li { margin-bottom: 0.3rem; }
.sidebar-toc a {
  color: #374151; text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem; font-weight: 500;
}
.sidebar-toc a:hover { color: #82c0c7; }
.sidebar-toc ul ul a { font-size: 0.81rem; color: #6b7280; }
.sidebar-tags { margin-top: 1rem; }
.sidebar-tags-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #9ca3af; margin-bottom: 0.6rem;
}
.sidebar-tags-list {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.sidebar-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em;
  background: #e8f4fd;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
}

/* ── Related posts ── */
.related-posts { margin-top: 1.5rem; }
.related-posts-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #111; margin-bottom: 0.9rem;
}
.related-post-card {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.65rem 0; border-bottom: 1px solid #f3f4f6;
  text-decoration: none; color: inherit;
}
.related-post-card:last-child { border-bottom: none; }
.related-post-card img {
  width: 72px; height: 54px; object-fit: cover;
  border-radius: 0.3rem; flex-shrink: 0;
}
.related-post-info { min-width: 0; }
.related-post-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem; font-weight: 600; color: #1f2937;
  line-height: 1.35; margin-bottom: 0.2rem;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.related-post-card:hover .related-post-title { color: #82c0c7; }
.related-post-date {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem; color: #9ca3af;
}

/* ── Contact CTA strip ── */
.contact-strip {
  background: #111827;
  padding: 2rem 15%;
  display: flex;
  gap: 1.25rem;
  align-items: stretch;
  flex-wrap: wrap;
}
.contact-card {
  flex: 1; min-width: 260px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  text-decoration: none; color: inherit; transition: border-color 0.15s;
}
.contact-card:hover { border-color: rgba(46,163,242,0.5); }
.contact-card-eyebrow {
  font-family: 'Montserrat', sans-serif; font-size: 0.65rem;
  font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.contact-card-title {
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: 0.98rem; color: white; line-height: 1.3;
}
.contact-card-desc {
  font-family: 'Merriweather', serif; font-size: 0.84rem;
  color: rgba(255,255,255,0.6); line-height: 1.65; flex: 1;
}
.contact-card-btn {
  display: inline-block; width: fit-content; margin-top: 0.6rem;
  font-family: 'Montserrat', sans-serif; font-size: 0.75rem;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.42rem 1.1rem; border-radius: 99px;
  background: #82c0c7; color: white;
}
.contact-card:hover .contact-card-btn { background: #1a8fd1; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .post-body {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  .post-sidebar { position: static; }
  .contact-strip { padding: 1.5rem; }
}

/* ── Footer ── */
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; color: white;
  text-decoration: none; flex-shrink: 0; transition: transform 0.15s, filter 0.15s;
}
.social-icon:hover { transform: translateY(-2px); filter: brightness(1.1); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr auto !important; } }
@media (max-width: 620px) {
  .footer-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .footer-bottom { flex-direction: column-reverse !important; align-items: flex-start !important; }
  .site-header > div { height: 64px !important; padding: 0 1rem !important; }
}
