:root {
  --bg: #0a0e13;
  --bg-2: #0f141b;
  --bg-3: #141a23;
  --line: #1e2733;
  --line-2: #2a3544;
  --text: #e6ecf2;
  --muted: #8a98a8;
  --accent: #4ade80;
  --accent-dim: #1a3a26;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 222, 128, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(10, 14, 19, 0.7);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.logo-mark {
  width: 32px; height: 32px;
  border: 1.5px solid var(--accent);
  position: relative;
}
.logo-mark::before, .logo-mark::after {
  content: ''; position: absolute; background: var(--accent);
  width: 14px; height: 2px; left: 50%; transform: translateX(-50%);
}
.logo-mark::before { top: 9px; }
.logo-mark::after { bottom: 9px; }
.logo-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--accent);
  color: #0a0e13 !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn:hover { background: #6ee79a; transform: translateY(-1px); }

.nav-inner .btn {
  font-size: 18px;
  font-weight: 800;
  padding: 16px 28px;
  letter-spacing: -0.01em;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.5), 0 0 32px rgba(74, 222, 128, 0.45);
  animation: phonePulse 1.8s ease-in-out infinite;
  position: relative;
}
.nav-inner .btn svg { width: 18px; height: 18px; stroke-width: 2.8; }
.nav-inner .btn::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  opacity: 0;
  animation: phoneRing 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes phonePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.5), 0 0 32px rgba(74, 222, 128, 0.45); transform: translateY(0); }
  50%      { box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.85), 0 0 44px rgba(74, 222, 128, 0.7); transform: translateY(-1px); }
}
@keyframes phoneRing {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.15); }
}
.nav-inner { padding: 14px 32px; }
.btn-outline {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--line-2);
}
.btn-outline:hover { background: var(--bg-3); border-color: var(--accent); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--accent);
}

/* BLOG INDEX */
.blog-hero {
  padding: 160px 0 80px;
  border-bottom: 1px solid var(--line);
}
.blog-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.blog-hero h1 .accent { color: var(--accent); }
.blog-hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 620px;
}

.posts {
  padding: 80px 0 120px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  transition: all 0.25s;
  text-decoration: none;
  color: var(--text);
}
.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.post-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-3), var(--bg));
  position: relative;
  overflow: hidden;
}
.post-thumb img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.85;
  transition: opacity 0.3s;
}
.post-card:hover .post-thumb img { opacity: 1; }
.post-thumb-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(74, 222, 128, 0.06) 0%, transparent 50%),
    linear-gradient(to top, rgba(10,14,19,0.7), transparent 60%);
  pointer-events: none;
}
.post-meta {
  padding: 28px 28px 8px;
  display: flex;
  gap: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.post-meta .cat { color: var(--accent); }
.post-card h3 {
  padding: 0 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.post-card p {
  padding: 0 28px 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.post-card .read {
  padding: 0 28px 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: auto;
}

/* SINGLE POST */
.post-hero {
  padding: 140px 0 60px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
  letter-spacing: 0.05em;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.post-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(34px, 4.8vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  max-width: 920px;
}
.post-hero-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.post-hero-meta .cat { color: var(--accent); }

.post-cover {
  margin: 0 0 60px;
  aspect-ratio: 16/8;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.post-cover img {
  width: 100%; height: 100%; object-fit: cover;
}
.post-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(74,222,128,0.05), transparent 60%);
  pointer-events: none;
}

.post-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px 80px;
  font-size: 18px;
  line-height: 1.75;
  color: #d4dce4;
}
.post-body .lead {
  font-size: 22px;
  line-height: 1.6;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.post-body p {
  margin-bottom: 24px;
}
.post-body h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 56px 0 20px;
}
.post-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin: 40px 0 14px;
}
.post-body ul, .post-body ol {
  margin: 0 0 28px 0;
  padding-left: 24px;
}
.post-body li {
  margin-bottom: 10px;
}
.post-body strong { color: var(--text); font-weight: 600; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.callout {
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  padding: 24px 28px;
  margin: 36px 0;
  font-size: 17px;
  color: var(--text);
}
.callout .label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.post-footer-cta {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 64px 0;
  text-align: center;
}
.post-footer-cta h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.post-footer-cta p {
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.related {
  padding: 80px 0;
}
.related h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.related-card {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s;
}
.related-card:hover { border-color: var(--accent); }
.related-card .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.related-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-meta {
  color: var(--muted);
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}

.mobile-call {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: var(--accent);
  color: #0a0e13 !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 20px;
  text-align: center;
  z-index: 200;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(74,222,128,0.4);
  letter-spacing: -0.01em;
}

@media (max-width: 860px) {
  .nav-links a:not(.btn) { display: none; }
  .posts { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .post-body { font-size: 17px; padding: 0 22px 60px; }
  .post-body h2 { font-size: 26px; }
  .container { padding: 0 22px; }
  .post-hero { padding: 110px 0 40px; }
  .blog-hero { padding: 120px 0 60px; }
  .mobile-call { display: flex; }
  body { padding-bottom: 80px; }
}
