:root {
  color-scheme: light;
  --background: #f5f1ed;
  --foreground: #181717;
  --muted: #77716c;
  --accent: #df3f73;
  --selection: #f5b2c9;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #171516;
  --foreground: #f2eeeb;
  --muted: #aaa29d;
  --accent: #ff6c9e;
  --selection: #8a2e4e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
  transition: background-color 180ms ease, color 180ms ease;
}

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

.site-shell {
  width: min(70%, 900px);
  min-height: 100svh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr;
}

.site-header {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font: 700 1.3rem/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: -0.025em;
}

.theme-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: color 150ms ease;
}

.theme-toggle:hover { color: var(--accent); }
.theme-icon { font: 400 1.35rem/1 Georgia, "Times New Roman", serif; }
.theme-toggle:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.intro { align-self: start; padding: clamp(36px, 4vw, 56px) 0 80px; }

.bio {
  max-width: 790px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.805rem, 1.38vw, 1.127rem);
  line-height: 1.48;
  letter-spacing: -0.014em;
  text-wrap: pretty;
}

.bio p { margin: 0; }
.bio p + p { margin-top: 1.25em; }
.bio a { color: var(--accent); text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

@media (max-width: 640px) {
  .site-shell { width: calc(100% - 32px); }
  .site-header { min-height: 84px; }
  .intro { padding: 32px 0 64px; }
  .bio { font-size: 0.805rem; line-height: 1.52; }
}

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}
