/* Simple, modern, minimal: system fonts, light or dark background, one accent.
   Backgrounds and the dark theme match the blog posts' style.css. */

:root {
  --bg: #fdfdfb;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #2563eb;

  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --text: #e4e4e0;
    --muted: #9a9a94;
    --accent: #78aeed;
  }
}

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

html {
  background: var(--bg);
}

body {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 96px;
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  margin-bottom: 48px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-size: 15px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

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

/* Content ----------------------------------------------------------------- */

main > :first-child {
  margin-top: 0;
}

main > :last-child {
  margin-bottom: 0;
}

p {
  margin: 0 0 1.25em;
}

h2 {
  margin: 2em 0 0.75em;
  font-size: 1rem;
  font-weight: 600;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transition: text-decoration-color 0.15s;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.projects {
  margin: 0;
  padding: 0;
  list-style: none;
}

.projects li + li {
  margin-top: 20px;
}

.projects a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

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

.projects span {
  display: block;
  color: var(--muted);
  font-size: 15px;
}

/* Small screens ----------------------------------------------------------- */

@media (max-width: 640px) {
  body {
    padding: 32px 16px 64px;
    font-size: 16px;
  }

  .site-header {
    margin-bottom: 32px;
  }

  nav {
    gap: 4px 18px;
  }
}
