:root {
  color-scheme: light dark;
  --background: #f4f8f5;
  --surface: #ffffff;
  --text: #163b40;
  --secondary: #48666a;
  --line: #c8d8d5;
  --accent: #075c63;
  --selection: #e4f0db;
}

* { box-sizing: border-box; }

html { scrollbar-color: var(--secondary) var(--background); }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 1rem/1.75 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--accent); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
  border-radius: 2px;
}

.skip { position: absolute; left: 1.5rem; top: -10rem; }
.skip:focus {
  top: 1rem;
  z-index: 1;
  padding: .625rem 1rem;
  background: var(--surface);
}

header {
  max-width: 72rem;
  margin: auto;
  padding: 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.025em;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 3rem;
  height: 3rem;
  padding: .375rem;
  background: #ffffff;
  border-radius: .75rem;
}

nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .5rem .125rem;
  color: var(--secondary);
  text-decoration: none;
}
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }
nav a[aria-current="page"] {
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

main {
  width: min(100%, 72ch);
  margin: auto;
  padding: 3.5rem 1.5rem 2rem;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 .875rem;
  font-size: clamp(2.125rem, 5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 700;
  text-wrap: balance;
}

.lead { margin: 0 0 2rem; color: var(--secondary); font-size: 1.125rem; }

h2 {
  margin: 2.75rem 0 .625rem;
  font-size: 1.375rem;
  line-height: 1.35;
  letter-spacing: -.02em;
  font-weight: 650;
  text-wrap: balance;
}

p { margin: .875rem 0; }
strong { font-weight: 650; }

code { font-size: .9375em; }

.contact {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}
.contact h2 { margin-top: 0; }
.contact p:last-child { margin-bottom: 0; }

footer {
  max-width: 72rem;
  margin: 2rem auto 0;
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--secondary);
  font-size: .875rem;
}

@media (max-width: 36rem) {
  header { padding: 1rem 1.5rem; }
  main { padding-top: 2.5rem; }
  nav { gap: 1rem; }
  .contact { padding: 1.125rem; }
  footer { padding-inline: 1.5rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #081c20;
    --surface: #102a2f;
    --text: #f0f6f4;
    --secondary: #b4cfce;
    --line: #3c585b;
    --accent: #defa77;
    --selection: #36514b;
  }
}

@media (prefers-contrast: more) {
  :root { --secondary: var(--text); --line: var(--text); }
}

@media (forced-colors: active) {
  nav a[aria-current="page"] { color: LinkText; }
}
