/* =============================================================
   Pale Blue Nexus - Blog Design System
   Shared across blog/index.html and all article pages
   ============================================================= */

/* Google Fonts — Montserrat (matches palebluenexus.com) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&display=swap');

/* ── CSS Custom Properties — matched to palebluenexus.com ── */
:root {
  --bg: #04060e;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-article: #ffffff;
  --bg-article-muted: #f7f9fb;
  --border-subtle: rgba(255,255,255,0.07);
  --border-accent: rgba(212,168,75,0.5);
  --text-primary: #ffffff;
  --text-secondary: rgba(166,210,230,1);
  --text-dark: #1a1a1a;
  --text-body: #3a3a3a;
  --text-muted: rgba(146,196,222,0.7);
  --accent: #7EB8DA;
  --accent-blue-green: #A8DADC;
  --accent-warm: #D4A84B;
  --accent-warm-light: #F4EFBA;
  --accent-glow: rgba(126,184,218,0.15);
  --accent-warm-glow: rgba(212,168,75,0.12);
  /* category colors */
  --cat-episodes: #7EB8DA;
  --cat-episodes-bg: rgba(126,184,218,0.12);
  --cat-technology: #A8DADC;
  --cat-technology-bg: rgba(168,218,220,0.12);
  --cat-investing: #D4A84B;
  --cat-investing-bg: rgba(212,168,75,0.12);
  --cat-future: #ab47bc;
  --cat-future-bg: rgba(171,71,188,0.15);
  --nav-height: 68px;
  --reading-col: 720px;
  --content-max: 1200px;
  --radius: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 20px rgba(0,0,0,0.4);
  --shadow-card-hover: 0 8px 40px rgba(0,0,0,0.6);
  --transition: 0.22s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(13,13,13,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  padding: 0 32px;
}
.nav-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(240,240,240,0.78);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links .nav-spotify {
  background: var(--accent);
  color: #0d0d0d;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.82rem;
  transition: background var(--transition), transform var(--transition);
}
.nav-links .nav-spotify:hover { background: #81d4fa; transform: translateY(-1px); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: #0d0d0d;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-direction: column;
  gap: 0;
  z-index: 99;
  padding: 12px 0 20px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(240,240,240,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--transition);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { background: rgba(255,255,255,0.04); }

/* ── CATEGORY PILLS ── */
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.pill-episodes   { background: var(--cat-episodes-bg);   color: var(--cat-episodes); }
.pill-technology { background: var(--cat-technology-bg); color: var(--cat-technology); }
.pill-investing  { background: var(--cat-investing-bg);  color: var(--cat-investing); }
.pill-work       { background: var(--cat-future-bg);     color: var(--cat-future); }

/* ── BLOG INDEX HERO ── */
.blog-hero {
  background: var(--bg);
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-height) + 60px) 32px 56px;
}
.blog-hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}
.blog-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.blog-hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.blog-hero p {
  margin-top: 16px;
  font-size: 1.05rem;
  color: rgba(240,240,240,0.6);
  max-width: 560px;
}

/* ── CATEGORY FILTER BAR ── */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid #ebebeb;
  padding: 0 32px;
  position: sticky;
  top: var(--nav-height);
  z-index: 90;
}
.filter-bar-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 14px 0;
  scrollbar-width: none;
}
.filter-bar-inner::-webkit-scrollbar { display: none; }
.filter-btn {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid #e0e0e0;
  color: var(--text-muted);
  background: #fff;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(79,195,247,0.06);
}

/* ── BLOG CONTENT SECTION ── */
.blog-content {
  background: #fff;
  padding: 56px 32px 80px;
}
.blog-content-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ── FEATURED CARD ── */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 56px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
}
.featured-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.featured-img {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a2a3a 100%);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.featured-img-inner {
  text-align: center;
  padding: 32px;
}
.featured-img-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.85;
}
.featured-img-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.featured-body {
  padding: 40px 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-tag {
  margin-bottom: 14px;
}
.featured-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 16px;
}
.featured-excerpt {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 24px;
}
.featured-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.featured-read-more {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition);
}
.featured-card:hover .featured-read-more { gap: 10px; }

/* ── POST GRID ── */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.post-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.post-card-img {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a2a3a 100%);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}
.post-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-tag { margin-bottom: 10px; }
.post-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 10px;
  flex: 1;
}
.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 16px;
}
.post-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}

/* ── ARTICLE LAYOUT ── */
.article-page {
  background: var(--bg-article);
  min-height: 100vh;
}
.article-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 56px) 32px 80px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: start;
}
.article-main { min-width: 0; }
.article-header { margin-bottom: 36px; }
.article-category { margin-bottom: 16px; }
.article-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.article-byline {
  font-weight: 600;
  color: var(--text-body);
}
.article-divider {
  border: none;
  border-top: 1px solid #ebebeb;
  margin: 32px 0;
}

/* Article body */
.article-body { color: var(--text-body); font-size: 1rem; line-height: 1.8; }
.article-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
}
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 28px 0 12px;
}
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol {
  margin: 0 0 20px 24px;
  list-style: disc;
}
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text-dark); font-weight: 600; }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  margin: 28px 0;
  background: #f5fbfe;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-dark);
  font-size: 1.05rem;
  line-height: 1.7;
}
.article-body .pull-quote {
  border-left: 4px solid var(--accent);
  padding: 20px 28px;
  margin: 32px 0;
  background: #f5fbfe;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body .pull-quote p {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 8px;
}
.article-body .pull-quote cite {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 600;
}

/* ── STICKY TOC SIDEBAR ── */
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
}
.toc-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid #ebebeb;
}
.toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 0; }
.toc-list a {
  display: block;
  padding: 7px 0;
  font-size: 0.83rem;
  color: var(--text-body);
  border-bottom: 1px solid #f0f0f0;
  transition: color var(--transition), padding-left var(--transition);
  line-height: 1.4;
}
.toc-list li:last-child a { border-bottom: none; }
.toc-list a:hover, .toc-list a.active {
  color: var(--accent);
  padding-left: 6px;
}

/* ── FAQ SECTION ── */
.faq-section {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid #ebebeb;
}
.faq-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}
.faq-item { margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 20px; }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.faq-a { font-size: 0.92rem; color: var(--text-body); line-height: 1.7; }

/* ── CTA BLOCK ── */
.cta-block {
  margin-top: 48px;
  background: linear-gradient(135deg, #0d0d0d 0%, #0f2233 100%);
  border-radius: var(--radius);
  padding: 40px 36px;
  text-align: center;
}
.cta-block h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.cta-block p {
  font-size: 0.92rem;
  color: rgba(240,240,240,0.65);
  margin-bottom: 24px;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0d0d0d;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  transition: background var(--transition), transform var(--transition);
}
.cta-btn:hover { background: #81d4fa; transform: translateY(-2px); }

/* ── FOOTER ── */
.site-footer {
  background: var(--bg);
  color: rgba(240,240,240,0.5);
  text-align: center;
  padding: 32px;
  font-size: 0.82rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.site-footer a { color: var(--accent); }

/* ── BREADCRUMB ── */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb span { color: var(--text-muted); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-card { grid-template-columns: 1fr; }
  .featured-img { min-height: 200px; }
  .article-container {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-height) + 32px);
  }
  .article-sidebar { display: none; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .post-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: calc(var(--nav-height) + 40px) 20px 40px; }
  .blog-content { padding: 36px 20px 60px; }
  .filter-bar { padding: 0 20px; }
  .article-container { padding: calc(var(--nav-height) + 24px) 20px 60px; }
  .featured-body { padding: 28px 24px; }
  .cta-block { padding: 28px 20px; }
}

@media (max-width: 400px) {
  .nav { padding: 0 16px; }
  .nav-logo { font-size: 0.95rem; }
}

/* ── HIDDEN UTILITY ── */
[data-cat] { transition: opacity 0.18s; }
[data-cat].hidden { display: none; }
