/* Colours: light by default, dark when the visitor's system asks for it. */
:root {
  --bg: #f7f7f2;
  --text: #141414;
  --muted: #55554f;
  --line: #d6d6cc;
  --hover: #ecece3;
  --accent: #3d6b00;
  /* Tint laid over the background photo so text stays readable on it. */
  --wash: rgba(247, 247, 242, 0.85);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --text: #f2f2ee;
    --muted: #bdbdb5;
    --line: rgba(255, 255, 255, 0.18);
    --hover: rgba(0, 0, 0, 0.35);
    --accent: #c8f53a;
    --wash: rgba(14, 14, 14, 0.65);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(var(--wash), var(--wash)),
    url("bg.jpg") center 25% / cover no-repeat,
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
}

main,
footer {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  flex: 1;
  padding-top: clamp(3rem, 12vh, 7rem);
  padding-bottom: 3rem;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 15vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.intro {
  margin: 1.25rem 0 3rem;
  font-size: 1.25rem;
  color: var(--muted);
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.links li {
  border-bottom: 1px solid var(--line);
}

.links a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1rem 0.5rem;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

.links a span {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--muted);
}

/* Decorative arrow; the empty alt text keeps screen readers from announcing it. */
.links a::after {
  content: "\2197";
  content: "\2197" / "";
  color: var(--muted);
}

.links a:hover {
  background: var(--hover);
}

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

.contact {
  margin-top: 2.5rem;
}

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

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

footer {
  padding-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .links a,
  .links a::after {
    transition: background-color 0.15s, color 0.15s;
  }
}
