:root {
  color-scheme: light dark;
  --bg: #f7f6f3;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --accent: #2f5d8c;
  --surface: #eceae4;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #ececec;
    --muted: #a0a0a0;
    --accent: #7eb0e0;
    --surface: #1c1c1c;
  }
}

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

body {
  margin: 0 auto;
  max-width: 65ch;
  padding: 1.5rem;
  overflow-wrap: break-word;
}

h1,
h2 {
  line-height: 1.25;
  font-weight: 650;
  margin: 0 0 0.6rem;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
}

p,
ul,
pre {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--text);
}

.lede,
.site-name {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.site-name {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.site-name a {
  color: inherit;
  text-decoration: none;
}

.site-name a:hover {
  color: var(--accent);
}

nav ul,
footer ul,
.project-list {
  list-style: none;
  padding: 0;
}

nav ul,
footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0 0 1.75rem;
}

nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.project-list li {
  margin-bottom: 1.1rem;
}

.project-list p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.button:hover {
  background: var(--surface);
  color: var(--accent);
}

code,
kbd,
pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

code,
kbd {
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

pre {
  background: var(--surface);
  padding: 0.9rem 1rem;
  border-radius: 6px;
  overflow-x: auto;
  max-width: 100%;
}

pre code {
  display: block;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.9em;
  overflow-wrap: normal;
  white-space: pre;
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}

footer ul {
  margin: 0;
}

footer a {
  color: inherit;
}

footer a:hover {
  color: var(--accent);
}
