:root {
  /* Color system */
  --bg: #07090d;
  --bg-elevated: #0d1118;
  --bg-deep: #05070a;
  --bg-absolute: #000000;
  --surface: #121823;
  --surface-strong: #171f2d;
  --surface-muted: #0d121a;
  --surface-input: #111827;
  --surface-code: #090c12;
  --surface-white: #ffffff;
  --surface-neutral: #333333;
  --surface-neutral-strong: #444444;
  --surface-neutral-hover: #555555;
  --surface-neutral-active: #666666;
  --surface-neutral-dark: #222222;
  --surface-neutral-page: #1a1a1a;

  --text: #f5f7fb;
  --text-strong: #ffffff;
  --text-soft: #dce3ee;
  --text-article: #d6e0e8;
  --text-subtle: #bdc7d5;
  --muted: #9ba7b8;
  --muted-strong: #aab4c3;
  --muted-article: #93a4b3;
  --muted-soft: #788496;
  --text-on-bright: #111111;
  --text-neutral: #cccccc;
  --text-neutral-soft: #aaaaaa;
  --text-neutral-light: #dddddd;
  --text-print: #f0f0f0;

  --accent-primary: #008cff;
  --accent-hover: #33a3ff;
  --accent-focus: #66b9ff;
  --accent-active: #0074d9;

  --contact-cta: #ff7a18;
  --contact-cta-hover: #ff9b45;
  --contact-cta-highlight: #ffb065;
  --brand-aegis: #ff7a18;
  --brand-aegis-hover: #ff9b45;
  --brand-aegis-text: #ffc18f;
  --brand-sans: #ff7043;
  --brand-sans-hover: #ff8a65;
  --brand-sans-text: #ffb199;
  --brand-sans-text-soft: #ffd0c2;

  --green: #39d98a;
  --warning: #e67e22;
  --danger: #e74c3c;
  --danger-strong: #ff0033;
  --difficulty-insane: #bdc3c7;

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(0, 140, 255, 0.38);
  --border-shell: rgba(255, 255, 255, 0.12);
  --border-article: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.07);
  --border-faint: rgba(255, 255, 255, 0.045);
  --border-neutral: #555555;
  --border-neutral-soft: #444444;
  --border-input: #cccccc;

  --overlay-faint: rgba(255, 255, 255, 0.018);
  --overlay-soft: rgba(255, 255, 255, 0.035);
  --overlay-medium: rgba(255, 255, 255, 0.055);
  --overlay-hover: rgba(255, 255, 255, 0.07);
  --overlay-strong: rgba(255, 255, 255, 0.13);
  --overlay-button: rgba(255, 255, 255, 0.045);
  --overlay-button-hover: rgba(255, 255, 255, 0.2);
  --accent-faint: rgba(0, 140, 255, 0.025);
  --accent-soft: rgba(0, 140, 255, 0.08);
  --accent-medium: rgba(0, 140, 255, 0.11);
  --accent-border-soft: rgba(0, 140, 255, 0.17);
  --accent-border: rgba(0, 140, 255, 0.25);
  --accent-glow: rgba(0, 140, 255, 0.18);
  --accent-active-soft: rgba(0, 116, 217, 0.06);

  /* Elevation and shape */
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --shadow-card: 0 15px 45px rgba(0, 0, 0, 0.15);
  --shadow-article: 0 24px 80px rgba(0, 0, 0, 0.34);
  --shadow-image: 0 14px 42px rgba(0, 0, 0, 0.3);
  --shadow-dropdown: 0 20px 48px rgba(0, 0, 0, 0.4);
  --shadow-button: 0 12px 30px rgba(0, 140, 255, 0.18);
  --shadow-aegis-button: 0 12px 30px rgba(255, 122, 24, 0.18);
  --shadow-status: 0 0 12px rgba(57, 217, 138, 0.8);
  --shadow-hover: 0 0 12px rgba(255, 255, 255, 0.4);
  --shadow-architecture: 0 30px 80px rgba(0, 0, 0, 0.38);
  --shadow-error: 0 30px 80px rgba(0, 0, 0, 0.42);
  --shadow-subtle: 0 0 5px #000000;
  --shadow-overlay: rgba(0, 0, 0, 0.45);
  --radius-xs: 4px;
  --radius-compact: 6px;
  --radius-control: 10px;
  --radius: 18px;
  --radius-small: 12px;
  --radius-medium: 16px;
  --radius-card: 20px;
  --radius-large: 24px;
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* Layout and spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --max-width: 1180px;
  --max-width-wide: 1600px;
  --article-width: 980px;
  --content-width: 800px;
  --content-width-wide: 900px;
  --hero-copy-width: 830px;
  --lede-width: 720px;
  --header-height: 82px;

  /* Typography */
  --font-sans: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --font-size-base: 1rem;
  --font-size-small: 0.875rem;
  --line-height-body: 1.65;
  --line-height-article: 1.8;
}

.site-header {
  width: 100%;
  min-height: 82px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-shell);
  color: var(--text-strong);
}

.site-header .site-header-inner {
  box-sizing: border-box;
  width: min(var(--max-width), calc(100% - 32px));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text-strong);
  text-decoration: none;
}

.site-header .site-header-logo {
  display: block;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  max-width: 64px;
  object-fit: contain;
}

.site-header .brand-copy { display: grid; gap: 2px; }
.site-header .brand-name { color: var(--text-strong); font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.site-header .brand-tagline { color: var(--muted-strong); font-size: 0.76rem; line-height: 1.25; }
.site-header .site-nav { margin-left: auto; }
.site-header .site-nav ul { display: flex; align-items: center; gap: 5px; margin: 0; padding: 0; list-style: none; }
.site-header .site-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; color: var(--text-strong); text-decoration: none; font-size: 0.9rem; }
.site-header .site-nav a:hover, .site-header .site-nav a:focus-visible { color: var(--accent-hover); }
.site-header .site-nav .site-contact-cta { margin-left: 7px; padding: 0 18px; border-radius: 6px; background: var(--contact-cta); color: var(--surface-input); font-weight: 700; }
.site-header .site-nav .site-contact-cta:hover, .site-header .site-nav .site-contact-cta:focus-visible { background: var(--contact-cta-hover); color: var(--surface-input); }
.site-header .site-nav .site-contact-cta:focus-visible { outline: 3px solid var(--contact-cta-highlight); outline-offset: 3px; }

.site-footer { width: 100%; background: var(--bg); border-top: 1px solid var(--border-shell); color: var(--text-strong); }
.site-footer .footer-main, .site-footer .footer-legal { box-sizing: border-box; width: min(var(--max-width), calc(100% - 32px)); margin: 0 auto; }
.site-footer .footer-main { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 30px 0 20px; }
.site-footer .footer-brand strong { display: block; margin-bottom: 5px; }
.site-footer .footer-brand p, .site-footer .footer-legal p { margin: 0; color: var(--muted-strong); }
.site-footer .social-links { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.site-footer .social-links a { display: inline-grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border-shell); border-radius: 50%; color: var(--text-strong); text-decoration: none; }
.site-footer .social-links img { width: 22px; height: 22px; max-width: 22px; border-radius: 50%; object-fit: cover; }
.site-footer .footer-legal { display: grid; gap: 8px; padding: 18px 0 28px; border-top: 1px solid var(--border-shell); font-size: 0.78rem; line-height: 1.55; }

@media (max-width: 980px) {
  .site-header .site-header-inner { align-items: flex-start; flex-direction: column; gap: 12px; padding: 12px 0 14px; }
  .site-header .site-nav { width: 100%; margin-left: 0; overflow-x: auto; }
  .site-header .site-nav ul { width: max-content; }
}

@media (max-width: 680px) {
  .site-header .brand-tagline { display: none; }
  .site-header .site-header-logo { flex-basis: 52px; width: 52px; height: 52px; max-width: 52px; }
  .site-footer .footer-main { align-items: flex-start; flex-direction: column; }
}
