:root {
  --bg: #08111a;
  --panel: #102130;
  --border: rgba(255, 255, 255, 0.14);
  --text: #f2f5ef;
  --muted: #b3c0cc;
  --meta: #7f90a0;
  --accent: #1d4ed8;
  --accent-alt: #3730a3;
  --accent-shadow: 0 10px 22px rgba(29, 78, 216, 0.24);
}

[data-theme='light'] {
  --bg: #f8f6ef;
  --panel: rgba(255, 255, 255, 0.9);
  --border: rgba(24, 37, 53, 0.14);
  --text: #1d2b38;
  --muted: #4d6070;
  --meta: #6d7c89;
  --accent: #1e40af;
  --accent-alt: #3730a3;
  --accent-shadow: 0 8px 20px rgba(30, 64, 175, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Manrope, Segoe UI, Arial, sans-serif;
  background: var(--bg);
  color: var(--muted);
  line-height: 1.7;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 12%, rgba(29, 78, 216, 0.16), transparent 36%),
    radial-gradient(circle at 85% 14%, rgba(55, 48, 163, 0.14), transparent 34%);
  pointer-events: none;
  z-index: -1;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 70px;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.topnav__links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

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

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 78, 216, 0.5);
}

.theme-toggle__sun {
  display: none;
}

[data-theme='light'] .theme-toggle__sun {
  display: inline;
}

[data-theme='light'] .theme-toggle__moon {
  display: none;
}

h1,
h2,
h3 {
  font-family: 'Space Grotesk', Manrope, sans-serif;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 14px;
}

h2 {
  font-size: 1.28rem;
  margin-top: 28px;
}

h3 {
  font-size: 1.06rem;
  margin-top: 18px;
}

p,
li {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.lead {
  font-size: 1.06rem;
  margin-bottom: 14px;
}

.meta {
  color: var(--meta);
  margin-bottom: 22px;
  font-size: 0.95rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin: 18px 0;
}

.label {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 4px;
}

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

a.cta {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--accent-alt), var(--accent));
  box-shadow: var(--accent-shadow);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .wrap {
    padding: 24px 16px 56px;
  }

  .topnav {
    align-items: flex-start;
  }

  .topnav__links {
    gap: 10px;
  }
}
