:root {
  --bg: #071527;
  --surface: rgba(13, 34, 61, 0.88);
  --surface-2: rgba(8, 24, 43, 0.86);
  --line: rgba(151, 190, 246, 0.24);
  --text: #edf5ff;
  --muted: rgba(233, 243, 255, 0.75);
  --brand: #63bdff;
  --mint: #52d9c2;
  --gold: #f6cf74;
  --ink: #06111f;
  --shadow: 0 18px 48px rgba(0, 8, 20, 0.42);
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(99, 189, 255, 0.24), transparent),
    radial-gradient(760px 520px at 95% 2%, rgba(82, 217, 194, 0.14), transparent),
    linear-gradient(160deg, var(--bg), #091a31 50%, #06111f);
  line-height: 1.62;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.shell {
  width: min(100% - 30px, var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 18, 33, 0.9);
  border-bottom: 1px solid rgba(151, 190, 246, 0.14);
  backdrop-filter: blur(10px);
}

.site-header .shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.brand strong {
  display: block;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: 1.05rem;
}

.brand span span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 8px 11px;
}

.nav a:hover,
.nav a.active {
  background: rgba(99, 189, 255, 0.14);
  color: var(--text);
}

.hero {
  padding: 46px 0 20px;
}

.hero-card,
.article,
.card,
.cta {
  border: 1px solid var(--line);
  background: linear-gradient(155deg, var(--surface), rgba(8, 24, 43, 0.92));
  box-shadow: var(--shadow);
}

.hero-card {
  border-radius: 24px;
  padding: clamp(22px, 4vw, 36px);
  overflow-wrap: break-word;
}

.kicker {
  display: inline-flex;
  border: 1px solid rgba(151, 190, 246, 0.28);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(8, 24, 43, 0.78);
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 14px;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", Manrope, sans-serif;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.55rem);
  max-width: 820px;
  margin-bottom: 14px;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0 4px;
}

.card {
  border-radius: 18px;
  padding: 16px;
  min-height: 230px;
  display: grid;
  align-content: start;
  gap: 9px;
  overflow-wrap: break-word;
}

.card .tag,
.article-meta {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card h2 {
  font-size: 1.08rem;
}

.card p {
  color: var(--muted);
  font-size: 0.91rem;
}

.read-link {
  color: #bde2ff;
  font-weight: 900;
  margin-top: auto;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
  padding: 18px 0 8px;
}

.article {
  border-radius: 22px;
  padding: clamp(18px, 3.2vw, 32px);
  min-width: 0;
  overflow-wrap: break-word;
}

.article h1 {
  font-size: clamp(1.9rem, 4vw, 3.05rem);
}

.article h2 {
  margin: 28px 0 10px;
  font-size: clamp(1.22rem, 2.6vw, 1.55rem);
}

.article h3 {
  margin: 18px 0 8px;
  font-size: 1.05rem;
}

.article p,
.article li {
  color: var(--muted);
  font-size: 0.96rem;
}

.article p + p {
  margin-top: 12px;
}

.article ul,
.article ol {
  margin: 10px 0 0 20px;
  display: grid;
  gap: 7px;
}

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

.article a {
  color: #bde2ff;
  font-weight: 800;
}

.toc {
  position: sticky;
  top: 90px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 24, 43, 0.86);
  padding: 14px;
}

.toc h2 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.toc ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.toc a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.toc a:hover {
  color: var(--text);
}

.template {
  border: 1px solid rgba(151, 190, 246, 0.2);
  border-radius: 16px;
  background: rgba(8, 24, 43, 0.72);
  padding: 14px;
  margin-top: 12px;
}

.template h3 {
  margin-top: 0;
}

.cta {
  border-radius: 18px;
  padding: 16px;
  margin-top: 24px;
}

.cta p {
  margin-top: 6px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  padding: 10px 14px;
  text-align: center;
}

.btn.primary {
  background: linear-gradient(130deg, var(--brand), var(--mint));
  color: var(--ink);
}

.btn.secondary {
  border: 1px solid var(--line);
  color: var(--text);
}

.references {
  margin-top: 24px;
  border-top: 1px solid rgba(151, 190, 246, 0.16);
  padding-top: 16px;
}

.site-footer {
  margin-top: 28px;
  border-top: 1px solid rgba(151, 190, 246, 0.15);
  background: rgba(5, 14, 26, 0.64);
  padding: 24px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

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

@media (max-width: 940px) {
  .article-grid,
  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header .shell {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav {
    justify-content: flex-start;
    gap: 6px;
  }

  .hero {
    padding-top: 28px;
  }

  .article-grid {
    gap: 10px;
  }

  .card,
  .article,
  .hero-card,
  .cta,
  .toc {
    border-radius: 16px;
  }

  .button-row .btn {
    flex: 1 1 150px;
  }
}

@media (max-width: 420px) {
  .shell {
    width: min(100% - 20px, var(--max));
  }

  .nav a {
    font-size: 0.82rem;
    padding: 7px 9px;
  }

  .button-row {
    display: grid;
  }
}
