/* =========================================================================
   TrueSignal Blog — styles
   Matches the visual language of index.html (dark + green + Syne/DM Mono)
   while adding reading-optimized body typography (Inter) for long-form posts.
   ========================================================================= */

:root {
  --bg: #0d0d1a;
  --bg2: #111122;
  --navy: #1a1a2e;
  --green: #2ecc71;
  --green-glow: rgba(46, 204, 113, 0.35);
  --green-soft: rgba(46, 204, 113, 0.08);
  --green-border: rgba(46, 204, 113, 0.18);
  --yellow: #f1c40f;
  --red: #e74c3c;
  --gray: #95a5a6;
  --white: #ffffff;
  --muted: #aaaacc;
  --text: #ebebf8;
  --text-soft: #c9c9dd;
  --rule: rgba(255, 255, 255, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Noise overlay (matches homepage) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* Grid lines (matches homepage) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(46,204,113,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,204,113,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* =========================================================================
   NAV (matches homepage)
   ========================================================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(13,13,26,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(46,204,113,0.08);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
  animation: pulse-dot 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 6px var(--green-glow); }
  50% { box-shadow: 0 0 16px var(--green), 0 0 32px var(--green-glow); }
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--green); }

@media (max-width: 720px) {
  nav { padding: 16px 20px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 11px; }
}

/* =========================================================================
   MAIN CONTAINER
   ========================================================================= */
.site-main {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 140px 24px 80px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 720px) {
  .site-main { padding: 110px 20px 60px; }
}

/* =========================================================================
   BLOG INDEX — hero + post list
   ========================================================================= */
.blog-hero {
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
}

.blog-hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}

.blog-hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 16px;
}

.blog-hero-desc {
  font-size: 18px;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 640px;
}

.post-list { display: flex; flex-direction: column; gap: 8px; }

.post-list-empty {
  color: var(--muted);
  font-style: italic;
  padding: 32px 0;
}

.post-card {
  border-bottom: 1px solid var(--rule);
  transition: background 0.3s ease;
}

.post-card:last-child { border-bottom: none; }

.post-card:hover { background: rgba(46, 204, 113, 0.02); }

.post-card-link {
  display: block;
  padding: 32px 0;
  text-decoration: none;
  color: inherit;
}

.post-card-meta {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.post-card-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 12px;
  transition: color 0.2s;
}

.post-card:hover .post-card-title { color: var(--green); }

.post-card-desc {
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 16px;
}

.post-card-readmore {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

/* =========================================================================
   POST — header, body, footer
   ========================================================================= */
.post {
  max-width: 720px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

.post-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 20px;
}

.post-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 5.5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 20px;
}

.post-description {
  font-size: 19px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 24px;
}

.post-meta {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}

.post-meta-divider { margin: 0 10px; opacity: 0.5; }

/* Body typography */
.post-body { color: var(--text); }

.post-body > * + * { margin-top: 1.4em; }

.post-body p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
}

.post-body h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.post-body h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 24px);
  line-height: 1.3;
  color: var(--white);
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}

.post-body strong { color: var(--white); font-weight: 600; }
.post-body em { color: var(--text); }

.post-body a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 204, 113, 0.4);
  transition: border-color 0.2s, color 0.2s;
}
.post-body a:hover {
  color: var(--white);
  border-bottom-color: var(--green);
}

.post-body ul, .post-body ol {
  padding-left: 28px;
  font-size: 18px;
  line-height: 1.75;
}

.post-body li { margin-bottom: 0.5em; }
.post-body li::marker { color: var(--green); }

.post-body blockquote {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 24px;
  margin: 1.5em 0;
  color: var(--text-soft);
  font-style: italic;
}

.post-body code {
  font-family: 'DM Mono', monospace;
  font-size: 0.9em;
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
}

.post-body pre {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.5em 0;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5em 0;
}

/* =========================================================================
   POST FOOTER — CTA, navigation, back link
   ========================================================================= */
.post-footer { margin-top: 64px; }

.post-cta {
  background: linear-gradient(135deg, rgba(46,204,113,0.06), rgba(46,204,113,0.02));
  border: 1px solid var(--green-border);
  border-radius: 12px;
  padding: 32px 28px;
  text-align: center;
  margin-bottom: 48px;
}

.post-cta-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.post-cta-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.post-cta-desc {
  color: var(--text-soft);
  margin-bottom: 20px;
  font-size: 16px;
}

.post-cta-btn {
  display: inline-block;
  background: var(--green);
  color: var(--bg);
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--green-glow);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 600px) {
  .post-nav { grid-template-columns: 1fr; }
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.post-nav-link:hover {
  border-color: var(--green-border);
  background: var(--green-soft);
}

.post-nav-link.next { text-align: right; align-items: flex-end; }

.post-nav-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-nav-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
}

.post-back {
  text-align: center;
}

.post-back a {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.post-back a:hover { color: var(--green); }

/* =========================================================================
   FOOTER (matches homepage approximately)
   ========================================================================= */
footer {
  position: relative;
  z-index: 1;
  padding: 48px 24px 32px;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-links a {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--green); }

.footer-copy {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  opacity: 0.7;
}
