/* ------------------------------------------------------------------
   Chris McNosky — single page. No build step, no dependencies.
   Edit copy in index.html; edit design here.
   ------------------------------------------------------------------ */

:root {
  --bg:      #fbfaf8;
  --fg:      #1a1a1d;
  --muted:   #5f5f68;
  --accent:  #9c4221;
  --rule:    #e5e2dc;
  --card:    #ffffff;
  --card-fg: #1a1a1d;
  --mark:    #f4efe7;

  --serif: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #131318;
    --fg:      #e9e7e3;
    --muted:   #9b9ba6;
    --accent:  #f0a06a;
    --rule:    #2a2a33;
    --card:    #1b1b22;
    --card-fg: #e9e7e3;
    --mark:    #23232c;
  }
}

/* The viewer's theme toggle must win in both directions. */
:root[data-theme="light"] {
  --bg: #fbfaf8; --fg: #1a1a1d; --muted: #5f5f68; --accent: #9c4221;
  --rule: #e5e2dc; --card: #ffffff; --card-fg: #1a1a1d; --mark: #f4efe7;
}
:root[data-theme="dark"] {
  --bg: #131318; --fg: #e9e7e3; --muted: #9b9ba6; --accent: #f0a06a;
  --rule: #2a2a33; --card: #1b1b22; --card-fg: #e9e7e3; --mark: #23232c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

.hero, main, footer {
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

p { margin: 0 0 1.1rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 650; }
code {
  font-family: var(--mono);
  font-size: 0.87em;
  background: var(--mark);
  padding: 0.12em 0.35em;
  border-radius: 3px;
}

/* ---------- hero ---------- */

.hero { padding-top: 4.5rem; }

h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 1.1rem;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3.4vw, 1.5rem);
  line-height: 1.35;
  color: var(--fg);
  margin-bottom: 1.6rem;
}

.pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.8rem 0;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  align-items: center;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}
.contact a { font-weight: 550; }

/* ---------- sections ---------- */

main { padding-top: 1rem; }

section { margin: 3.5rem 0; }

h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  margin: 0 0 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.quiet { color: var(--muted); font-size: 0.95rem; }

/* ---------- the ask ---------- */

.ask {
  background: var(--mark);
  border-radius: 8px;
  padding: 1.5rem 1.6rem 1rem;
}
.ask h2 { border-bottom: none; padding-bottom: 0; margin-bottom: 0.7rem; }
.ask p:last-child { margin-bottom: 0.6rem; }

/* ---------- projects ---------- */

.project {
  background: var(--card);
  color: var(--card-fg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.6rem 1.7rem 1.2rem;
  margin-bottom: 1.6rem;
}

.project h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}
.project h3 a { color: inherit; text-decoration: none; }
.project h3 a:hover { color: var(--accent); text-decoration: underline; }

.tagline {
  font-weight: 620;
  color: var(--fg);
  margin-bottom: 1rem;
}

.rules { margin: 0 0 1.1rem; padding-left: 1.15rem; }
.rules li { margin-bottom: 0.5rem; }

blockquote {
  margin: 1.2rem 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-size: 0.96rem;
}
blockquote p:last-child { margin-bottom: 0; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--rule);
}

/* ---------- method ---------- */

dl.method { margin: 0; }
dl.method dt {
  font-weight: 650;
  margin-top: 1.2rem;
  font-size: 1rem;
}
dl.method dt:first-child { margin-top: 0; }
dl.method dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/* ---------- call to action ---------- */

.cta { margin-bottom: 4rem; }
a.big {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 4vw, 1.65rem);
  font-weight: 600;
  word-break: break-word;
}

.forward {
  margin-top: 2rem;
  border: 1px dashed var(--rule);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
}
.forward-label {
  font-size: 0.82rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.forward-text {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding-top: 1.3rem;
  padding-bottom: 3rem;
  font-size: 0.9rem;
  color: var(--muted);
}
footer p { margin: 0; }

/* ---------- small screens ---------- */

@media (max-width: 34rem) {
  body { font-size: 16px; }
  .hero { padding-top: 3rem; }
  .project { padding: 1.2rem 1.2rem 0.9rem; }
  .ask { padding: 1.2rem 1.2rem 0.8rem; }
  section { margin: 2.75rem 0; }
}
