*{
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  margin: 0;
}

:root {
  --text: #00193d;
  --background: #c8ffe2;
  --accent: #0637b1;
  --subheader: #870e07;

  --nav-background: #1e293b;
  --nav-text: #f1f5f9;
  --nav-border: #334155;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e5e5e5;
    --background: #121212;
    --accent: #2fbbee;
    --subheader: #fb190e;
  }
}

body {
  color: var(--text);
  background: var(--background);
}

header, main, footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1 { font-size: 2.5rem; margin-bottom: 0; }
h2 { margin-top: 2.5rem; }
section { margin-bottom: 2rem; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.highlight {
  color: var(--subheader);
}

html {
  scroll-behavior: smooth;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-background);
  border-bottom: 1px solid var(--nav-border);
}

.nav-inner {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-name {
  font-weight: 700;
  color: var(--nav-text);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  overflow-x: auto;
}

.nav-links a {
  color: var(--nav-text);
  opacity: 0.7;
  white-space: nowrap;
}

.nav-links a:hover {
  opacity: 1;
  text-decoration: none;
}

section {
  scroll-margin-top: 4rem;
}

@media (max-width: 600px) {
  .nav-name {
    display: none;
  }
}