:root {
  --bg: #07111f;
  --bg-soft: #0d1b2a;
  --panel: rgba(13, 27, 42, 0.8);
  --panel-strong: #112235;
  --card: #101e2c;
  --card-alt: #0b1521;
  --primary: #4cc9f0;
  --primary-strong: #3a86ff;
  --accent: #7ae582;
  --text: #e7eef8;
  --muted: #a8b9cf;
  --border: rgba(169, 196, 219, 0.18);
  --shadow: 0 20px 45px rgba(2, 6, 23, 0.45);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(76, 201, 240, 0.18), transparent 25%),
    linear-gradient(180deg, var(--bg) 0%, #0a1320 100%);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(760px, calc(100% - 32px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(7, 17, 31, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #191930;
  color: #e8ebee;
  font-weight: 800;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover,
.text-link:hover,
.read-more:hover {
  color: var(--primary);
}

.hero {
  padding: 88px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 52px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2,
.page-shell h1 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
  max-width: 620px;
}

.lead {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #04131d;
  box-shadow: 0 14px 28px rgba(58, 134, 255, 0.35);
}

.button.secondary {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 0;
  margin: 32px 0 0;
}

.stats li {
  display: flex;
  flex-direction: column;
  min-width: 110px;
}

.stats strong {
  font-size: clamp(1.4rem, 2vw, 2rem);
  color: var(--text);
}

.stats span {
  color: var(--muted);
}

.hero-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  gap: 8px;
  padding: 18px 18px 14px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #28c840; }

.code-window {
  padding: 22px 20px 26px;
  background: linear-gradient(180deg, rgba(9, 15, 24, 0.96), rgba(10, 22, 31, 0.96));
}

.code-window code,
.code-window pre {
  margin: 0;
  font-family: "Consolas", "SFMono-Regular", monospace;
  white-space: pre-wrap;
  color: #dfeaf7;
  font-size: 0.95rem;
}

.highlights,
.articles-section,
.page-shell {
  padding: 32px 0 72px;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2,
.page-shell h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 760px;
}

.feature-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feature-item,
.article-card,
.article-item,
.empty-state {
  background: rgba(13, 27, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.feature-item {
  padding: 28px 24px;
}

.feature-item span {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.feature-item h3 {
  margin: 18px 0 10px;
  font-size: 1.45rem;
}

.feature-item p,
.article-card p,
.article-item p,
.content-body p,
.content-body li,
.intro,
.site-footer p {
  color: var(--muted);
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.text-link {
  color: var(--primary);
  font-weight: 700;
}

.article-card,
.article-item {
  padding: 24px;
}

.article-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-card h3,
.article-item h2 {
  margin: 16px 0 12px;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
}

.read-more {
  display: inline-block;
  margin-top: 14px;
  color: var(--primary);
  font-weight: 700;
}

.empty-state {
  padding: 26px 22px;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 26px;
}

.stack-card {
  background: rgba(13, 27, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
}

.stack-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.stack-brand h2 {
  margin: 0;
  font-size: 1.2rem;
}

.stack-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #06121d;
}

.stack-logo.official {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255,255,255,0.04);
}

.stack-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #06121d;
}

.redis { background: linear-gradient(135deg, #ff4d4d, #ff8a5b); }
.rabbitmq { background: linear-gradient(135deg, #ff7b54, #fcbf49); }
.mysql { background: linear-gradient(135deg, #ffb703, #ffd166); }
.postgres { background: linear-gradient(135deg, #7bdff2, #00b4d8); }
.aws { background: linear-gradient(135deg, #f7c948, #ff9f1c); }
.php { background: linear-gradient(135deg, #8892bf, #4f5d75); }
.dotnet { background: linear-gradient(135deg, #6ee7b7, #10b981); }
.node { background: linear-gradient(135deg, #7dd3fc, #22c55e); }
.sendgrid { background: linear-gradient(135deg, #c77dff, #8ecae6); }

.stack-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  font-weight: 700;
}

.page-shell h1 {
  margin-bottom: 10px;
}

.article-shell {
  padding-top: 54px;
}

.single-meta {
  margin-bottom: 22px;
}

.content-body {
  font-size: 1.06rem;
}

.content-body h2,
.content-body h3 {
  margin-top: 36px;
  margin-bottom: 14px;
}

.content-body ul,
.content-body ol {
  padding-left: 20px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 13, 20, 0.82);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-grid,
  .feature-grid,
  .article-grid,
  .footer-content,
  .section-heading.split {
    grid-template-columns: 1fr;
    display: grid;
  }

  .section-heading.split {
    align-items: start;
  }
}

@media (max-width: 640px) {
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .nav-bar {
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 18px 0;
  }

  .main-nav {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding-top: 64px;
  }

  .stats {
    gap: 14px;
  }
}
