:root {
  --bg: #fbfaf7;
  --text: #1f2630;
  --muted: #5a6573;
  --rule: #e6e2d8;
  --accent: #3f6b86; /* warm slate blue */
  --accent-hover: #2c536b;
  --max-width: 40rem; /* ~640px */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181d;
    --text: #e8e6e0;
    --muted: #9aa3ad;
    --rule: #2a3038;
    --accent: #7fb1cc;
    --accent-hover: #a8cde2;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}

.hero {
  margin-bottom: 2.5rem;
}

.portrait {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.75rem;
  background: var(--rule);
}

@media (min-width: 32rem) {
  .hero {
    display: flex;
    align-items: center;
    gap: 1.75rem;
  }
  .hero-text {
    flex: 1 1 auto;
    min-width: 0;
  }
  .portrait {
    order: 2;
    flex: 0 0 auto;
    width: 170px;
    height: 170px;
    margin-bottom: 0;
  }
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

.tagline {
  color: var(--muted);
  margin: 0;
  font-size: 1.0625rem;
}

.intro p {
  margin: 0 0 2.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
  border-bottom-color: currentColor;
}

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

.links {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}

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

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

.links li {
  margin: 0 0 0.6rem;
}

.inline-photo {
  margin: 2rem 0 0;
}

.inline-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.inline-photo figcaption {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.6rem;
}

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}

footer p {
  margin: 0;
}
