/* ── Variables ─────────────────────────────────────── */
:root {
  --bg-deep:    #080d12;
  --bg-card:    #0e1820;
  --border:     #1a2e38;
  --accent:     #2aa8c4;
  --text:       #b8d8e0;
  --text-muted: #4a7a8a;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); line-height: 1.6; color: var(--text); background: var(--bg-deep); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; border-radius: 6px; }

/* ── Site Nav ───────────────────────────────────────── */
.site-nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--accent); font-size: 13px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
}
.nav-logo svg { flex-shrink: 0; }
.nav-links { display: flex; gap: 28px; }
.nav-link { color: var(--text-muted); font-size: 13px; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--accent); }
body:not(.has-hero) .site-nav {
  position: static; background: var(--bg-card);
  border-bottom: 1px solid var(--border); padding: 14px 48px;
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(42,168,196,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,168,196,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(42,168,196,0.06) 0%, transparent 70%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 700px; }
.hero-eyebrow {
  color: var(--accent); font-size: 10px; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase; margin-bottom: 20px;
}
.hero-title {
  color: var(--text); font-size: clamp(30px, 5vw, 50px); font-weight: 700;
  line-height: 1.2; margin-bottom: 16px;
}
.hero-title span { color: var(--accent); }
.hero-sub {
  color: var(--text-muted); font-size: 15px; line-height: 1.75;
  margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto;
}
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent); color: var(--bg-deep);
  padding: 12px 28px; border-radius: 4px; font-weight: 700; font-size: 13px;
  letter-spacing: 0.5px; transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-ghost {
  border: 1px solid var(--border); color: var(--text-muted);
  padding: 12px 28px; border-radius: 4px; font-size: 13px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Stats Strip ──────────────────────────────────────── */
.stats-strip {
  background: var(--bg-card); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: center; gap: 56px; padding: 22px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { display: block; color: var(--accent); font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.stat-label { display: block; color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

/* ── Features ─────────────────────────────────────────── */
.features { padding: 80px 48px; max-width: 960px; margin: 0 auto; }
.features-header { text-align: center; margin-bottom: 56px; }
.features-header h2 { font-size: 26px; color: var(--text); margin-bottom: 8px; font-weight: 600; }
.features-header p { color: var(--text-muted); font-size: 15px; }
.feature-row { display: flex; align-items: flex-start; gap: 48px; margin-bottom: 56px; }
.feature-row.reverse { flex-direction: row-reverse; }
.feature-text { flex: 1; }
.feature-icon { color: var(--accent); font-size: 20px; margin-bottom: 12px; }
.feature-text h3 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.feature-text p { color: var(--text-muted); font-size: 14px; line-height: 1.8; }
.feature-box {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; padding: 20px; font-size: 12px; font-family: var(--mono);
  color: var(--text-muted); min-height: 140px; line-height: 1.7;
}
.feature-box .kw { color: var(--accent); }
.feature-box .str { color: #7ecfdf; }
.feature-box .cm { color: #2d5060; }
@media (max-width: 700px) {
  .feature-row, .feature-row.reverse { flex-direction: column; }
}

/* ── Blog Preview ─────────────────────────────────────── */
.blog-preview {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 64px 48px;
}
.blog-preview h2 {
  text-align: center; font-size: 22px; font-weight: 600; color: var(--text);
  margin-bottom: 32px; letter-spacing: 0.5px;
}
.blog-cards { display: flex; gap: 20px; max-width: 960px; margin: 0 auto 32px; flex-wrap: wrap; }
.blog-card {
  flex: 1; min-width: 220px; background: var(--bg-deep);
  border: 1px solid var(--border); border-radius: 6px; padding: 20px;
  transition: border-color 0.2s; display: block;
}
.blog-card:hover { border-color: var(--accent); }
.card-date { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.blog-card h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 8px 0; line-height: 1.4; }
.blog-card p { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.card-tag {
  display: inline-block; margin-top: 12px; font-size: 10px; color: var(--accent);
  border: 1px solid var(--border); padding: 2px 8px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.read-all { display: block; text-align: center; color: var(--accent); font-size: 13px; }
.read-all:hover { text-decoration: underline; }

/* ── Footer ───────────────────────────────────────────── */
.site-footer { background: var(--bg-deep); border-top: 1px solid var(--border); padding: 24px 48px; }
.footer-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-logo { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); font-size: 12px; }
.footer-links a:hover { color: var(--accent); }
.footer-tagline { color: var(--border); font-size: 11px; }

/* ── Blog Post ────────────────────────────────────────── */
.post-shell { display: flex; max-width: 1100px; margin: 0 auto; min-height: calc(100vh - 120px); }
.post-sidebar {
  width: 220px; flex-shrink: 0; padding: 80px 24px 40px 48px;
  border-right: 1px solid var(--border);
}
.sidebar-back { font-size: 12px; color: var(--text-muted); margin-bottom: 32px; display: block; }
.sidebar-back:hover { color: var(--accent); }
.sidebar-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.sidebar-posts { list-style: none; }
.sidebar-posts li { margin-bottom: 6px; }
.sidebar-posts a { font-size: 12px; color: var(--text-muted); line-height: 1.4; display: block; }
.sidebar-posts a:hover, .sidebar-posts a.active { color: var(--accent); }
.post-content { flex: 1; padding: 80px 48px 80px 40px; max-width: 720px; }
.post-header { margin-bottom: 40px; }
.post-date { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 12px; }
.post-header h1 { font-size: clamp(24px, 3.5vw, 36px); font-weight: 700; color: var(--text); line-height: 1.25; margin-bottom: 16px; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-tags .tag {
  font-size: 10px; color: var(--accent); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px;
}
.post-content .post-body h2 { font-size: 20px; font-weight: 600; color: var(--text); margin: 36px 0 14px; }
.post-content .post-body h3 { font-size: 16px; font-weight: 600; color: var(--text); margin: 28px 0 10px; }
.post-content .post-body p { color: var(--text-muted); font-size: 15px; line-height: 1.8; margin-bottom: 18px; }
.post-content .post-body ul, .post-content .post-body ol { color: var(--text-muted); font-size: 15px; line-height: 1.8; padding-left: 20px; margin-bottom: 18px; }
.post-content .post-body li { margin-bottom: 6px; }
.post-content .post-body strong { color: var(--text); font-weight: 600; }
.post-content .post-body a { color: var(--accent); }
.post-content .post-body a:hover { text-decoration: underline; }
.post-content .post-body code { font-family: var(--mono); font-size: 13px; background: var(--bg-card); border: 1px solid var(--border); padding: 1px 5px; border-radius: 3px; color: var(--text); }
.post-content .post-body pre { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 18px; overflow-x: auto; margin-bottom: 20px; }
.post-content .post-body pre code { background: none; border: none; padding: 0; font-size: 13px; }
.post-content .post-body blockquote { border-left: 3px solid var(--accent); padding-left: 16px; margin: 20px 0; }
.post-content .post-body blockquote p { color: var(--text-muted); font-style: italic; }
.post-content .post-body img { border: 1px solid var(--border); border-radius: 6px; margin: 20px 0; }
.post-content .post-body table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 14px; }
.post-content .post-body th { background: var(--bg-card); color: var(--text); font-weight: 600; padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.post-content .post-body td { color: var(--text-muted); padding: 8px 14px; border: 1px solid var(--border); }
@media (max-width: 768px) {
  .post-shell { flex-direction: column; }
  .post-sidebar { width: 100%; padding: 80px 24px 20px; border-right: none; border-bottom: 1px solid var(--border); }
  .post-content { padding: 24px; }
}

/* ── Blog Index ───────────────────────────────────────── */
.blog-index { max-width: 760px; margin: 0 auto; padding: 100px 48px 80px; }
.blog-index h1 { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.blog-index .subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 48px; }
.post-list { list-style: none; }
.post-list-item { border-bottom: 1px solid var(--border); padding: 24px 0; }
.post-list-item:last-child { border-bottom: none; }
.post-list-item .meta { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.post-list-item a.title { font-size: 18px; font-weight: 600; color: var(--text); display: block; margin-bottom: 8px; }
.post-list-item a.title:hover { color: var(--accent); }
.post-list-item .excerpt { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.post-list-item .tags { margin-top: 10px; display: flex; gap: 8px; }
.post-list-item .tags .tag { font-size: 10px; color: var(--accent); border: 1px solid var(--border); padding: 2px 8px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Doc Placeholder ──────────────────────────────────── */
.doc-shell { max-width: 760px; margin: 0 auto; padding: 100px 48px 80px; }
.doc-shell h1 { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.doc-shell p { color: var(--text-muted); font-size: 15px; line-height: 1.8; }
.doc-shell a { color: var(--accent); }
.doc-shell a:hover { text-decoration: underline; }
