:root {
  --brand-deep: #0066ab;
  --brand-mid: #39a4dc;
  --brand-cyan: #12c3f4;
  --brand-gradient: linear-gradient(135deg, #0066ab 0%, #12c3f4 100%);

  --bg: #ffffff;
  --bg-soft: #f4f9fd;
  --bg-card: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.92);

  --text: #0b2333;
  --text-muted: #5b7283;
  --border: #dbe7f0;
  --border-strong: #b8cfdf;

  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;

  --shadow-sm: 0 1px 2px rgba(11, 35, 51, 0.06);
  --shadow-md: 0 4px 16px rgba(11, 35, 51, 0.08);
  --shadow-lg: 0 16px 48px rgba(11, 35, 51, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Be Vietnam Pro', var(--font-ui);

  --container: 1120px;
  --header-h: 68px;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b1a26;
  --bg-soft: #112433;
  --bg-card: #152a3a;
  --header-bg: rgba(11, 26, 38, 0.92);

  --text: #e6edf3;
  --text-muted: #8aa3b8;
  --border: #1f3a52;
  --border-strong: #2e5575;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);

  color-scheme: dark;
}

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

html, body { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  max-width: 100vw;
}

/* Prevent any inline <code>, long URLs, etc. from forcing horizontal scroll on mobile */
p, .hero__lead { overflow-wrap: anywhere; word-break: break-word; }
p code, .text-muted code { word-break: break-all; overflow-wrap: anywhere; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); }
h2 { font-size: clamp(1.5rem, 1.5vw + 1rem, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
  color: var(--brand-deep);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .site-header__logo img { filter: brightness(0) invert(1); opacity: 0.95; }

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  flex: 0 0 38px;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .theme-toggle__sun,
.theme-toggle .theme-toggle__moon,
.theme-toggle .theme-toggle__auto { display: none; }
[data-theme-mode="light"] .theme-toggle .theme-toggle__sun { display: block; }
[data-theme-mode="dark"]  .theme-toggle .theme-toggle__moon { display: block; }
[data-theme-mode="auto"]  .theme-toggle .theme-toggle__auto { display: block; }

.site-nav { margin-left: auto; }

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}

.site-header__logo img {
  height: 32px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.site-nav__icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.site-nav__link:hover {
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
}

.site-nav__link.is-active {
  background: var(--brand-deep);
  color: #fff;
}

.site-header__menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-left: 8px;
}

@media (max-width: 720px) {
  .site-header__menu-btn { display: inline-flex; margin-left: auto; }
  .theme-toggle { margin-left: 0; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
    margin: 0;
  }
  .site-nav.is-open { display: flex; }
  .site-nav__link { padding: 12px 14px; }
}

/* Main / hero */
main { flex: 1 0 auto; }

.page-section { padding: 48px 0; }
.page-section--tight { padding: 28px 0; }

.hero {
  padding: 56px 0 32px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.hero__eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(18, 195, 244, 0.12);
  color: var(--brand-deep);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero__lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 32px 0;
  margin-top: 64px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--text-muted); }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
