:root {
  color-scheme: light;
  --bg: #f6f5ee;
  --ink: #1b201c;
  --muted: #505b52;
  --accent: #286247;
  --accent-dark: #163f2e;
  --line: #c9cfc5;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: "Baskerville", "Palatino Linotype", Georgia, serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171b17;
  --ink: #f1f2e8;
  --muted: #b7c1b6;
  --accent: #a7d6aa;
  --accent-dark: #ceeacf;
  --line: #3c493e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

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

.skip-link {
  position: absolute;
  z-index: 1;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--bg);
  background: var(--ink);
  transform: translateY(-180%);
}

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

.page {
  width: min(1120px, 88%);
  margin-inline: auto;
}

.site-header,
nav,
footer {
  display: flex;
  align-items: center;
}

.site-header,
footer {
  justify-content: space-between;
}

.site-header {
  min-height: 84px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: -0.07em;
}

.wordmark span {
  margin-inline: 0.06em;
  color: var(--accent);
}

nav {
  gap: clamp(0.9rem, 3vw, 2.25rem);
}

nav,
footer,
.text-link {
  font-size: 0.875rem;
}

nav a,
footer a {
  padding-block: 0.65rem;
}

#theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

#theme-toggle[hidden] {
  display: none;
}

.theme-icon {
  color: var(--accent);
  font-size: 1.15rem;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(5rem, 10vw, 9rem);
}

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

h1 {
  font-size: clamp(4rem, 8.8vw, 7.6rem);
  line-height: 0.97;
  letter-spacing: -0.075em;
}

h1 > span {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.065em;
}

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

.intro-copy {
  max-width: 32ch;
  margin-bottom: 0.25rem;
  font-size: clamp(1.05rem, 1.65vw, 1.35rem);
  line-height: 1.55;
}

.work {
  scroll-margin-top: 1.5rem;
}

.work h2 {
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: 2rem;
  align-items: baseline;
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--line);
}

.work-row h3 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.work-row p {
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.65;
}

.text-link {
  display: inline-block;
  margin-top: 0.8rem;
  padding-block: 0.3rem;
  color: var(--accent);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

footer {
  gap: 1rem;
  padding-block: 1.5rem 2rem;
  color: var(--muted);
}

@media (hover: hover) {
  nav a:hover,
  footer a:hover,
  .text-link:hover,
  #theme-toggle:hover {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: 0.3em;
  }
}

@media (max-width: 700px) {
  .intro,
  .work-row {
    grid-template-columns: 1fr;
  }

  .intro {
    gap: 1.75rem;
    padding-block: 4.5rem 3.5rem;
  }

  .intro-copy {
    max-width: 38ch;
  }

  .work-row {
    gap: 0.65rem;
  }
}

@media (max-width: 460px) {
  .page {
    width: 90%;
  }

  .site-header {
    min-height: 68px;
  }

  nav {
    gap: 0.7rem;
    font-size: 0.8rem;
  }

  #theme-toggle {
    position: relative;
    justify-content: center;
    width: 44px;
    height: 44px;
  }

  #theme-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .theme-icon {
    font-size: 1.4rem;
  }
}

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