:root {
  --bg: #0a0f1a;
  --surface: #111827;
  --surface2: #1a2236;
  --accent: #4ade80;
  --text: #f1f5f9;
  --muted: #64748b;
  --border: rgba(255, 255, 255, 0.07);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 760px; margin: 0 auto; padding: 24px 20px 80px; }

nav {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.logo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s infinite ease-in-out;
}
@keyframes pulse { 50% { opacity: 0.4; } }
.nav-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.nav-right a { color: var(--muted); }
.nav-right a:hover { color: var(--text); text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.btn-primary:hover { background: #86efac; text-decoration: none; }

.post header { margin-bottom: 28px; }
.post header h1 { font-size: 2.2rem; line-height: 1.2; margin: 8px 0 6px; }
.post header time, .post header .meta {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
}
.prose p { margin: 1em 0; }
.prose h2 { font-family: var(--font-sans); margin-top: 2em; font-size: 1.5rem; }
.prose h3 { font-family: var(--font-sans); margin-top: 1.6em; font-size: 1.2rem; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.95em;
}
.prose pre {
  background: var(--surface2);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--border);
}
.prose pre code { background: transparent; padding: 0; }
.prose blockquote {
  margin: 1.5em 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-size: 0.92em;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.cta {
  margin-top: 4em;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}
.cta p { margin: 0 0 16px; font-family: var(--font-sans); color: var(--muted); }

.lead-magnet {
  margin-top: 2em;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.lead-magnet h3 { margin: 0 0 6px; font-family: var(--font-sans); }
.lead-magnet p { margin: 0 0 12px; color: var(--muted); font-family: var(--font-sans); font-size: 0.95rem; }
.lead-magnet form { display: flex; flex-wrap: wrap; gap: 8px; }
.lead-magnet input {
  flex: 1 1 200px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font-sans);
}
.lead-magnet button {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
}
.lead-magnet button:hover { background: #86efac; }
.lead-magnet a.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #042f1c;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  margin: 4px 0 8px;
}
.lead-magnet a.btn-primary:hover { background: #86efac; }
.lead-fine { font-size: 0.8rem; margin-top: 12px; color: var(--muted); }

.blog-index-hero { margin: 30px 0 40px; text-align: center; }
.blog-index-hero h1 { font-size: 2.4rem; margin-bottom: 8px; }
.blog-index-hero p { color: var(--muted); font-size: 1.05rem; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.post-list li:first-child { border-top: none; }
.post-list a { display: block; color: var(--text); }
.post-list a:hover { text-decoration: none; }
.post-list time {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post-list h2 { margin: 4px 0 6px; font-size: 1.35rem; }
.post-list p { color: var(--muted); margin: 0 0 8px; }
.tags { font-size: 0.8rem; color: var(--muted); }

footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
footer a { color: var(--muted); }

/* --- CTAs: inline / endcard / sticky --- */

.cta-inline {
  margin: 28px 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.08), rgba(74, 222, 128, 0.02));
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 10px;
  text-align: center;
}
.cta-inline .btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #042f1c;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
}
.cta-inline .btn-primary:hover { background: #86efac; }

.cta-endcard {
  margin: 40px 0 24px;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}
.cta-endcard h3 {
  font-size: 1.4rem;
  margin: 0 0 8px;
  font-family: var(--font-sans);
}
.cta-endcard p {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 0.95rem;
}
.cta-endcard .btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #042f1c;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
}
.cta-endcard .btn-primary:hover { background: #86efac; }

/* Sticky bottom bar — only on mobile (≤768px), hidden by default on desktop
   where the inline + end-card CTAs already cover the funnel. */
.cta-sticky { display: none; }
@media (max-width: 768px) {
  .cta-sticky:not([hidden]) {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 50;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--accent);
    color: #042f1c;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font-weight: 600;
  }
  .cta-sticky-link {
    flex: 1;
    color: #042f1c;
    text-decoration: none;
    font-size: 0.95rem;
  }
  .cta-sticky-dismiss {
    background: transparent;
    border: 0;
    color: #042f1c;
    font-size: 1.4rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.7;
  }
  .cta-sticky-dismiss:hover { opacity: 1; }
}
