/* Native color-scheme and light-dark() keep the theme control entirely in CSS. */
:root {
  color-scheme: light dark;
  --paper: light-dark(#f8f5ef, #20251f);
  --surface: light-dark(#fffdf8, #2b312a);
  --ink: light-dark(#2e342d, #eeeae1);
  --muted: light-dark(#62685e, #b7bdb0);
  --accent: light-dark(#46634f, #b4c9a7);
  --accent-strong: light-dark(#2e4c39, #d2e3c8);
  --line: light-dark(#d7dace, #454e40);
  --wash: light-dark(#edf0e5, #2b3429);
  --shadow: light-dark(rgb(40 48 36 / 8%), rgb(0 0 0 / 18%));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.7;
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  accent-color: var(--accent);
}

:root:has(#theme-light:checked) {
  color-scheme: light;
}

:root:has(#theme-dark:checked) {
  color-scheme: dark;
}

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

body {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

h1,
h2,
p,
figure {
  margin: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

section {
  scroll-margin-top: 2rem;
}

.page-shell {
  width: min(100% - 4rem, 67rem);
  margin-inline: auto;
}

.visually-hidden,
.theme-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  z-index: 1;
  top: 0.75rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.heading-dot {
  color: var(--accent);
}

.theme-control {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  font-size: 0.75rem;
  line-height: 1.4;
}

.theme-option {
  position: relative;
  cursor: pointer;
}

.theme-option span {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 2rem;
  color: var(--muted);
}

.theme-option:hover span {
  color: var(--ink);
}

.theme-option input:checked + span {
  background: var(--ink);
  color: var(--paper);
}

.theme-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.eyebrow,
.interest-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin-block: 0.75rem 1.5rem;
  font-size: clamp(3.8rem, 7.5vw, 6.1rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.introduction {
  max-width: 38ch;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.work-note {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.work-note p {
  margin-bottom: 0.35rem;
}

.work-note p a {
  color: inherit;
}

.text-link {
  display: inline-block;
  font-weight: 500;
}

.text-link span {
  margin-left: 0.4rem;
}

.portrait-frame {
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--surface);
  box-shadow: 0 12px 32px var(--shadow);
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.2rem;
  filter: saturate(0.78);
}

.portrait figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.outlook .eyebrow {
  margin-bottom: 0.7rem;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 4rem;
}

.interest {
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--line);
}

.interest-label {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.interest-label > span {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.interest h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.55rem, 2.5vw, 1.9rem);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.interest > p:not(.interest-label) {
  max-width: 49ch;
  color: var(--muted);
}

.interest > p + p {
  margin-top: 1rem;
}

.interest .donation-note {
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  font-size: 0.85rem;
}

.outlook {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--wash);
}

.outlook-copy p {
  color: var(--muted);
}

.outlook-copy p + p {
  margin-top: 0.85rem;
}

.outlook-copy .text-link {
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 4rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer p span {
  margin-inline: 0.35rem;
}

@media (max-width: 48rem) {
  .page-shell {
    width: min(100% - 3rem, 67rem);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 13rem;
    gap: 2rem;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 8vw, 4.5rem);
  }

  .interests-grid {
    column-gap: 2rem;
  }

  .outlook {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .outlook h2 br {
    display: none;
  }
}

@media (max-width: 38rem) {
  .page-shell {
    width: calc(100% - 2.5rem);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-block: 3rem;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 14vw, 5rem);
  }

  .introduction {
    max-width: 38ch;
    font-size: 1.15rem;
  }

  .portrait {
    width: min(100%, 15rem);
  }

  .interests-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .interest {
    padding-block: 1.5rem 2rem;
  }

  .outlook {
    margin-top: 1.5rem;
  }

  .site-footer {
    margin-top: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}

@media (forced-colors: active) {
  .theme-option input:checked + span {
    outline: 2px solid Highlight;
    outline-offset: -3px;
  }
}
