@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ink: #0b0e1a;
  --paper: #f4f6ff;
  --accent: #2e68e8;
  --muted: #61697a;
  --line: rgba(11, 14, 26, 0.15);
  --globe-accent: #2e68e8;
  --globe-grid: #8ea7de;
  --globe-ghost: #bcc8e3;
  --focus: #2e68e8;
  /* One shell width for every page: header, footer, and page content all
     align to it. Overridden once at the 700px breakpoint. */
  --shell: min(1320px, calc(100% - 64px));
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4f6ff;
  --paper: #0b0e1a;
  --accent: #7fa6ff;
  --muted: #9ca6ba;
  --line: rgba(244, 246, 255, 0.14);
  --globe-accent: #7fa6ff;
  --globe-grid: #52668f;
  --globe-ghost: #273149;
  --focus: #b7ccff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  color: inherit;
  font: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.theme-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent), transparent 30%);
}

.brand-inline {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.brand-inline__mark {
  display: block;
  width: 46px;
  height: 34px;
  flex: 0 0 auto;
  fill: var(--accent);
}

.brand-inline__type {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.brand-inline__name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.0213em;
}

.brand-inline__labs {
  margin-top: 6px;
  margin-left: 1px;
  font-size: 6.2px;
  font-weight: 400;
  letter-spacing: 0.4167em;
  opacity: 0.72;
}

/* --- Site chrome ---------------------------------------------------------
   The header, nav, and footer are identical on every page; only the nav
   links differ. Style them here and nowhere else — this markup used to be
   duplicated per page and the two copies drifted 40px apart. */

.site-header,
.site-footer,
.site-shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}

.header-actions,
.site-nav {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 28px;
}

.site-nav {
  gap: 26px;
}

.site-header .theme-toggle {
  border-radius: 2px;
  background: transparent;
}

.site-header .toggle-dot {
  border-radius: 1px;
  box-shadow: none;
}

.site-nav a,
.text-link {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  font-size: 0.875rem;
}

.text-link {
  display: inline-block;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.site-nav a:hover,
.text-link:hover {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.site-footer {
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.globe-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  image-rendering: pixelated;
  touch-action: pan-y;
}

.globe-canvas:active {
  cursor: grabbing;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 700px) {
  :root {
    --shell: min(100% - 32px, 1320px);
  }

  .site-nav {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .site-footer {
    min-height: 150px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .brand-inline__mark {
    width: 41px;
    height: 31px;
  }

  .brand-inline__name {
    font-size: 17px;
  }

  .brand-inline__labs {
    margin-top: 5px;
    font-size: 5.6px;
  }

  .theme-toggle {
    min-height: 44px;
  }
}
