:root {
  color-scheme: light;
  --page-bg: #f2f4f8;
  --surface: #ffffff;
  --surface-alt: #fafbfd;
  --text: #1d2330;
  --muted: #556178;
  --heading: #162238;
  --brand: #0b7285;
  --brand-dark: #0f4c5c;
  --accent: #cc5803;
  --border: #d8e1eb;
  --surface-border: rgba(23, 32, 56, 0.12);
  --header-bg: rgba(249, 251, 253, 0.92);
  --header-border: rgba(12, 76, 92, 0.16);
  --card-bg: linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
  --card-shadow: 0 6px 16px rgba(23, 32, 56, 0.08);
  --toggle-bg: linear-gradient(180deg, #ffffff 0%, #ecf9fc 100%);
  --toggle-border: rgba(11, 114, 133, 0.25);
  --toggle-color: #0f4c5c;
  --toggle-hover-bg: linear-gradient(180deg, #ffffff 0%, #dbf0f5 100%);
  --layout-max-width: 1180px;
  --layout-fluid-width: 94vw;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #101725;
  --surface: #111a2b;
  --surface-alt: #0f1a2e;
  --text: #d9e4f2;
  --muted: #9ab0c8;
  --heading: #eef5ff;
  --brand: #7ed2df;
  --brand-dark: #bde7f0;
  --accent: #ffbe86;
  --border: #2c3a52;
  --surface-border: rgba(126, 210, 223, 0.2);
  --header-bg: rgba(11, 18, 31, 0.9);
  --header-border: rgba(126, 210, 223, 0.24);
  --card-bg: linear-gradient(180deg, #17243a 0%, #121d31 100%);
  --card-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
  --toggle-bg: linear-gradient(180deg, #1e2e46 0%, #18263b 100%);
  --toggle-border: rgba(126, 210, 223, 0.35);
  --toggle-color: #d3ebff;
  --toggle-hover-bg: linear-gradient(180deg, #263a59 0%, #1e2e46 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 2%, rgba(11, 114, 133, 0.16) 0%, rgba(11, 114, 133, 0) 40%),
    radial-gradient(circle at 90% 22%, rgba(204, 88, 3, 0.12) 0%, rgba(204, 88, 3, 0) 37%),
    linear-gradient(180deg, #f7fafc 0%, var(--page-bg) 56%, #eef2f7 100%);
  color: var(--text);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.76;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 2%, rgba(126, 210, 223, 0.16) 0%, rgba(126, 210, 223, 0) 40%),
    radial-gradient(circle at 90% 22%, rgba(255, 190, 134, 0.14) 0%, rgba(255, 190, 134, 0) 37%),
    linear-gradient(180deg, #0a1220 0%, var(--page-bg) 56%, #0b1322 100%);
}

a {
  color: var(--brand-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.container {
  width: min(var(--layout-max-width), var(--layout-fluid-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.3rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.brand-block {
  display: grid;
  gap: 0.18rem;
  text-decoration: none;
}

.site-title {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--brand-dark);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.45rem;
  background: linear-gradient(135deg, var(--brand-dark), var(--accent));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.site-tagline {
  margin: 0 0 0 2.2rem;
  color: var(--muted);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
}

.nav-pill,
.theme-toggle,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  border-radius: 999px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.86rem;
  font-weight: 650;
}

.nav-pill {
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(11, 114, 133, 0.25);
  background: var(--toggle-bg);
  color: var(--brand-dark);
  text-decoration: none;
}

.nav-pill:hover,
.theme-toggle:hover {
  background: var(--toggle-hover-bg);
  border-color: rgba(15, 76, 92, 0.5);
}

.theme-toggle {
  width: 2.55rem;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  color: var(--toggle-color);
  cursor: pointer;
}

.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-content {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
  min-height: min(720px, calc(100vh - 5rem));
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--heading);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  max-width: 14ch;
  font-size: clamp(2.65rem, 7vw, 5.8rem);
}

.article-hero h1 {
  max-width: 18ch;
  font-size: clamp(2.2rem, 5.5vw, 4.8rem);
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

h3 {
  font-size: 1.08rem;
}

.lede {
  max-width: 62ch;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.13rem;
}

.hero-panel,
.content-panel {
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.hero-panel {
  padding: clamp(1.2rem, 3vw, 1.7rem);
}

.hero-stat {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.hero-stat:last-child {
  border-bottom: 0;
}

.hero-stat strong {
  display: block;
  color: var(--heading);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1rem;
}

.hero-stat span {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.button {
  padding: 0.56rem 1.05rem;
  border: 1px solid var(--brand-dark);
  background: var(--brand-dark);
  color: var(--surface);
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--brand-dark);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.3rem;
}

.feature-card {
  min-height: 12rem;
  padding: 1.1rem;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.feature-card p,
.content-panel p,
.article-section p {
  color: var(--muted);
}

.feature-card p {
  margin-bottom: 0;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
}

.article-shell > * {
  min-width: 0;
}

.article-hero {
  position: sticky;
  top: 6.2rem;
}

.content-panel {
  max-width: 100%;
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.article-section {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.article-section:first-child {
  padding-top: 0;
}

.article-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.article-section h2 {
  margin-bottom: 0.65rem;
}

.article-section p {
  max-width: 74ch;
}

.lede,
.article-section p,
.feature-card p,
.hero-stat span {
  overflow-wrap: anywhere;
}

.site-footer {
  border-top: 1px solid var(--header-border);
  background: rgba(255, 255, 255, 0.28);
}

:root[data-theme="dark"] .site-footer {
  background: rgba(8, 14, 25, 0.32);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.8rem;
}

@media (max-width: 900px) {
  .hero,
  .article-shell,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .article-hero {
    position: static;
  }
}

@media (max-width: 680px) {
  .container {
    width: calc(100% - 2rem);
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: flex-start;
    width: 100%;
  }

  .nav-pill,
  .theme-toggle {
    min-height: 2.35rem;
    font-size: 0.82rem;
  }

  .nav-pill {
    padding-inline: 0.72rem;
  }

  .content-panel {
    max-width: calc(100vw - 2rem);
    padding: 1.05rem;
    width: min(100%, 330px);
  }

  .lede,
  .article-section p {
    max-width: 30ch;
  }

  .article-section p {
    max-width: 28ch;
  }

  h1,
  .article-hero h1 {
    max-width: 11ch;
    font-size: 2.65rem;
  }
}
