:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --ink: #1a1f1c;
  --muted: #545c57;
  --line: #d3d8d3;
  --accent: #0b6e4f;
  --accent-ink: #ffffff;
  --focus: #0b6e4f;
  --measure: 62ch;
  --gutter: clamp(16px, 5vw, 64px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --surface: #1a201c;
    --ink: #eceeea;
    --muted: #a3aca6;
    --line: #2d3530;
    --accent: #4ccb97;
    --accent-ink: #0d1a14;
    --focus: #4ccb97;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 650;
}

p { margin: 0; }

a { color: inherit; }

a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 0.5rem; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.mark {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: clamp(0.75rem, 3vw, 1.75rem);
  row-gap: 0.25rem;
  font-size: 0.95rem;
}

.top nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.top nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

@media (max-width: 560px) {
  .top { flex-wrap: wrap; row-gap: 0.4rem; padding-top: 0.7rem; padding-bottom: 0.6rem; }
  .top nav { flex-basis: 100%; }
  html { scroll-padding-top: 6rem; }
}

/* Sections */
main > section {
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter);
  border-bottom: 1px solid var(--line);
}

main > section:last-child { border-bottom: 0; }

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

/* Hero */
.hero {
  padding-top: clamp(4rem, 12vw, 9rem);
  padding-bottom: clamp(4rem, 12vw, 9rem);
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 6rem);
  letter-spacing: -0.03em;
  max-width: 14ch;
  line-height: 0.98;
}

.lede {
  margin-top: 1.5rem;
  max-width: var(--measure);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.45;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn:hover { border-color: var(--accent); }

/* Work */
.case {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.case:last-of-type { border-bottom: 1px solid var(--line); }

.case figure { margin: 0; }

.case img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--surface);
}

.case h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  max-width: 24ch;
}

.case dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1.25rem;
  row-gap: 0.75rem;
  margin: 1.25rem 0 0;
  max-width: var(--measure);
}

.case dt {
  color: var(--muted);
  font-size: 0.95rem;
  padding-top: 0.15rem;
}

.case dd { margin: 0; }

.case dd:last-of-type { font-weight: 600; }

@media (max-width: 480px) {
  .case dl { grid-template-columns: 1fr; row-gap: 0.2rem; }
  .case dd + dt { margin-top: 0.8rem; }
}

.also {
  margin-top: 2rem;
  max-width: var(--measure);
  color: var(--muted);
}

@media (min-width: 760px) {
  /* Two columns only when a photo is present; text-only cases stay one column. */
  .case:has(> figure) {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
    padding: 3rem 0;
  }
}

/* Products, in development, for businesses */
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card-list li {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  padding: 1.5rem;
}

.card-list h3 { font-size: 1.15rem; }

.card-list p { margin-top: 0.5rem; max-width: 46ch; }

.card-list .goal { color: var(--muted); }

.goal span { font-weight: 600; color: var(--ink); }

.card-link { margin-top: auto; padding-top: 1rem; }

.card-link a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 3px;
}

@media (min-width: 640px) {
  .card-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .card-list.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.case .summary {
  margin-top: 1rem;
  max-width: var(--measure);
  font-size: 1.1rem;
}

/* About + contact */
.about-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.headshot {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

@media (min-width: 640px) {
  .about-body {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(1.5rem, 4vw, 3rem);
  }
}

.about p { max-width: var(--measure); }
.about p + p { margin-top: 1.25rem; }

.ask {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}

footer {
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
