:root {
  --bg: #050a12;
  --surface: #0c1420;
  --surface-2: #111d2e;
  --surface-3: #16263c;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --blue: #1a6fd4;
  --blue-light: #3d9eff;
  --teal: #00c896;
  --teal-dim: #00a07a;
  --text: #f0f4ff;
  --text-soft: #ccd7ea;
  --muted: #7a8ba6;
  --shadow-lg: 0 32px 90px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 22px 60px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background:
    radial-gradient(circle at 92% 4%, rgba(26, 111, 212, 0.16), transparent 28%),
    radial-gradient(circle at 6% 88%, rgba(0, 200, 150, 0.12), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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.03'/%3E%3C/svg%3E");
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
}

nav,
section,
main,
article,
footer {
  position: relative;
  z-index: 1;
}

nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 10, 18, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 200, 150, 0.3));
}

.nav-logo span {
  color: var(--text);
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.btn-nav {
  background: var(--teal);
  color: #000 !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px !important;
  font-weight: 600 !important;
  transition: opacity 0.2s ease !important;
}

.btn-nav:hover {
  opacity: 0.85;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(0, 200, 150, 0.1);
  border: 1px solid rgba(0, 200, 150, 0.25);
  color: var(--teal);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 28px;
}

.hero-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(0, 200, 150, 0.45);
  animation: pulse 2s infinite;
}

.btn-primary,
.btn-secondary,
.article-cta a {
  display: inline-block;
  text-decoration: none;
  border-radius: 8px;
  padding: 16px 36px;
  font-size: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary,
.article-cta a {
  background: linear-gradient(135deg, var(--blue), var(--teal-dim));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(26, 111, 212, 0.24);
}

.btn-primary:hover,
.article-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(26, 111, 212, 0.32);
}

.btn-secondary {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 500;
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.blog-home .hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 156px 24px 56px;
  text-align: center;
}

.blog-home .hero h1 {
  font-family: "Syne", sans-serif;
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
}

.blog-home .hero .highlight {
  background: linear-gradient(135deg, var(--blue-light), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-home .hero p {
  max-width: 700px;
  margin: 22px auto 0;
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--muted);
  line-height: 1.55;
  font-weight: 300;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.posts {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.post-card,
.related-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(17, 29, 46, 0.95), rgba(12, 20, 32, 0.96));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover,
.related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 158, 255, 0.34);
  box-shadow: 0 24px 60px rgba(5, 10, 18, 0.55);
}

.post-meta,
.related-meta,
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(61, 158, 255, 0.22);
  background: rgba(61, 158, 255, 0.12);
  color: var(--blue-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.post-card h2,
.related-card h3,
.related h2,
.article-body h2,
.article-body h3,
.article-cta h3 {
  font-family: "Syne", sans-serif;
}

.post-card h2 {
  margin-top: 18px;
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.6px;
}

.post-card p,
.related-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.article-page article {
  max-width: 900px;
  margin: 0 auto;
  padding: 132px 24px 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--text-soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--blue-light);
}

.breadcrumb .sep {
  color: rgba(122, 139, 166, 0.8);
}

.article-header {
  margin-bottom: 30px;
  padding: 36px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(17, 29, 46, 0.96), rgba(12, 20, 32, 0.96));
  box-shadow: var(--shadow-lg);
}

.article-meta {
  margin-bottom: 18px;
}

.article-page h1 {
  font-family: "Syne", sans-serif;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -1.4px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 18%, var(--blue-light) 72%, var(--teal) 118%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-page .lead {
  max-width: 42rem;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.6;
  color: var(--text-soft);
  font-weight: 300;
}

.article-body {
  padding: 38px 36px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(12, 20, 32, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body h2 {
  margin-top: 56px;
  margin-bottom: 18px;
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: -0.7px;
}

.article-body h3 {
  margin-top: 38px;
  margin-bottom: 14px;
  font-size: 22px;
  line-height: 1.25;
  color: var(--teal);
}

.article-body p,
.article-body li {
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.82;
}

.article-body p {
  margin-bottom: 22px;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--text);
}

.article-body a {
  color: var(--blue-light);
}

.article-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--teal);
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 14px;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border-strong);
  margin: 48px 0;
}

.article-body .footer-note {
  margin-top: 40px;
  padding: 24px 28px;
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  background: rgba(17, 29, 46, 0.95);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  font-style: italic;
}

.article-body .footer-note em {
  font-style: normal;
}

.article-cta {
  margin-top: 44px;
  padding: 34px;
  border-radius: 20px;
  border: 1px solid rgba(0, 200, 150, 0.16);
  background: linear-gradient(135deg, rgba(0, 200, 150, 0.08), rgba(61, 158, 255, 0.06));
  text-align: center;
}

.article-cta h3 {
  margin-bottom: 12px !important;
  margin-top: 0 !important;
  font-size: 24px;
  line-height: 1.15;
}

.article-cta p {
  margin-bottom: 20px !important;
  color: var(--text-soft);
  font-size: 16px !important;
}

.related {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  border-top: 1px solid var(--border);
}

.related h2 {
  margin-bottom: 28px;
  font-size: 32px;
  letter-spacing: -0.8px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.related-card h3 {
  margin-top: 16px;
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.4px;
}

footer {
  padding: 40px 24px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

footer p + p {
  margin-top: 10px;
}

footer a {
  color: var(--blue-light);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(0, 200, 150, 0.45);
  }

  50% {
    opacity: 0.35;
    box-shadow: 0 0 0 8px rgba(0, 200, 150, 0);
  }
}

@media (max-width: 900px) {
  .post-card h2 {
    font-size: 24px;
  }

  .article-header,
  .article-body {
    padding: 28px;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 14px 20px;
  }

  .nav-logo img {
    width: 48px;
    height: 48px;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-links a:not(.btn-nav) {
    display: none;
  }

  .blog-home .hero {
    padding-top: 140px;
  }

  .posts,
  .related {
    padding-left: 20px;
    padding-right: 20px;
  }

  .article-page article {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 640px) {
  .blog-home .hero {
    padding-bottom: 40px;
  }

  .blog-home .hero h1 {
    font-size: 38px;
    letter-spacing: -1.1px;
  }

  .blog-home .hero p,
  .article-page .lead {
    font-size: 17px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .article-cta a {
    width: 100%;
    padding: 15px 24px;
  }

  .post-card,
  .related-card,
  .article-header,
  .article-body,
  .article-cta {
    padding: 24px;
    border-radius: 18px;
  }

  .post-card h2,
  .related-card h3 {
    font-size: 22px;
  }

  .article-page h1 {
    font-size: 34px;
  }

  .article-body h2 {
    margin-top: 40px;
    font-size: 26px;
  }

  .article-body h3 {
    font-size: 20px;
  }

  .article-body p,
  .article-body li {
    font-size: 16px;
  }
}
