:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --surface: #ffffff;
  --ink: #102039;
  --ink-soft: #4e6078;
  --line: rgba(16, 32, 57, 0.14);
  --accent: #0c9a81;
  --accent-strong: #096a58;
  --shadow: 0 20px 48px rgba(16, 32, 57, 0.12);
  --top-bg: rgba(255, 255, 255, 0.78);
  --hero-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(243, 239, 230, 0.86));
  --card-shadow: 0 8px 20px rgba(16, 32, 57, 0.08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a111d;
  --surface: #111a29;
  --ink: #e8f1ff;
  --ink-soft: #9ab0cd;
  --line: rgba(146, 172, 205, 0.28);
  --accent: #19b79a;
  --accent-strong: #39cbb1;
  --shadow: 0 24px 60px rgba(1, 8, 19, 0.55);
  --top-bg: rgba(12, 20, 33, 0.86);
  --hero-bg: linear-gradient(145deg, rgba(17, 27, 42, 0.96), rgba(12, 20, 32, 0.88));
  --card-shadow: 0 12px 28px rgba(2, 10, 24, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 5%, rgba(12, 154, 129, 0.14), transparent 30%),
    radial-gradient(circle at 8% 94%, rgba(23, 66, 115, 0.1), transparent 35%),
    var(--bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 20px auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--top-bg);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 12px;
  z-index: 30;
}

.top a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 11px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Syne", "Manrope", sans-serif;
}

.hero {
  margin-top: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--hero-bg);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 42px);
}

.eyebrow {
  margin: 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-strong);
  font-weight: 800;
}

.hero h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  line-height: 1.05;
  max-width: 14ch;
}

.hero p {
  margin: 14px 0 0;
  max-width: 65ch;
  color: var(--ink-soft);
}

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

.card {
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card p {
  margin: 0;
  color: #637a96;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.card h2 {
  font-size: 1.2rem;
  line-height: 1.2;
}

.card span {
  margin-top: auto;
  color: var(--accent-strong);
  font-weight: 800;
}

.article {
  margin-top: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 38px);
}

.article .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: #5f7691;
  font-size: 0.92rem;
}

.article h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.06;
  max-width: 16ch;
}

.article h2 {
  margin-top: 24px;
  font-size: 1.55rem;
}

.article p,
.article li {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.62;
}

.article ul,
.article ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

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

.cta {
  margin-top: 24px;
  border-radius: 14px;
  border: 1px solid rgba(12, 154, 129, 0.35);
  background: rgba(12, 154, 129, 0.09);
  padding: 14px;
}

.cta a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.footer {
  margin: 16px 0 30px;
  color: #677b94;
  font-size: 0.9rem;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 92% 5%, rgba(25, 183, 154, 0.22), transparent 30%),
    radial-gradient(circle at 8% 94%, rgba(56, 88, 139, 0.2), transparent 35%),
    var(--bg);
}

html[data-theme="dark"] .card p,
html[data-theme="dark"] .article .meta,
html[data-theme="dark"] .footer {
  color: #8fa8c7;
}

html[data-theme="dark"] .cta {
  border-color: rgba(57, 203, 177, 0.4);
  background: rgba(57, 203, 177, 0.12);
}

@media (max-width: 920px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .top {
    flex-wrap: wrap;
  }
}
