:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5b616b;
  --line: #e4e1da;
  --accent: #1f5f5b;
  --accent-soft: #e6f0ee;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181b;
    --surface: #1c2024;
    --text: #e8e6e1;
    --muted: #a3a9b1;
    --line: #2e343a;
    --accent: #7cc4bb;
    --accent-soft: #1f2e2c;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Header and navigation */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

main { padding: 2.5rem 0 3.5rem; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5rem; }
h1 { font-size: 2rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin-top: 2.5rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }

.lede { color: var(--muted); font-size: 1.15rem; margin-bottom: 1.5rem; }

/* Home intro */
.intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}
.photo {
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .intro { flex-direction: row; align-items: center; gap: 2rem; }
  h1 { font-size: 2.4rem; }
}

.links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.button.primary { background: var(--accent); color: var(--bg); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.25rem 1.35rem;
  margin: 1rem 0;
}
.card p:last-child { margin-bottom: 0; }
.meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.5rem; }

/* Lists */
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }
.role { font-weight: 600; }

footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site .wrap { padding-top: 1.25rem; padding-bottom: 1.5rem; }
