:root {
  --paper: #f4efe6;
  --ink: #2a241e;
  --muted: #5e574e;
  --rule: rgba(42, 36, 30, 0.16);
  --clay: #7a4534;
  --display: "Cormorant Garamond", Palatino, "Palatino Linotype", Georgia, serif;
  /* Mobile column. Tablet and desktop media queries raise this. */
  --sheet-width: min(34rem, calc(100% - 2.75rem));
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family: "Public Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  padding: 0.45rem 0.7rem;
  background: var(--ink);
  color: var(--paper);
}

.skip:focus { transform: none; }

.sheet {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: var(--sheet-width);
  margin-inline: auto;
  padding: 1.15rem 0 1.35rem;
}

.letterhead {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule);
}

.mast {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.letterhead .mast {
  padding-bottom: 0;
  border-bottom: 0;
}

.domain { text-decoration: none; }

.where { margin: 0; color: var(--muted); }

h1 {
  margin: 1.15rem 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 3.35rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
}

h1 span { display: block; }

h1 span:last-child { font-style: italic; }

#person-name {
  white-space: nowrap;
}

#person-name span {
  display: inline;
}

#person-name span + span {
  margin-left: 0.22em;
}

.lede {
  max-width: 38em;
  margin: 0.7rem 0 0;
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.3;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
}

.action {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
}

.action-name {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  line-height: 1;
}

.action-address {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.action:hover .action-name {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.folio {
  margin-top: 1.15rem;
}

.tabs {
  display: none;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: baseline;
  margin-top: 0.65rem;
}

.js .tabs { display: flex; }

.tab {
  appearance: none;
  margin: 0;
  padding: 0 0 0.16rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.15;
  text-transform: uppercase;
}

.tab[aria-selected="true"] {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--clay);
}

.tab:hover { color: var(--clay); }

.js .panel { display: none; }

.js[data-tab="about"] #panel-about,
.js[data-tab="principles"] #panel-principles,
.js[data-tab="projects"] #panel-projects,
.js[data-tab="books"] #panel-books,
.js[data-tab="things"] #panel-things,
.js[data-tab="writing"] #panel-writing { display: block; }

.panel { padding-top: 0.15rem; }

.panel + .panel {
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}

.js .panel + .panel {
  margin-top: 0;
  border-top: 0;
}

.panel h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.65rem, 2.8vw, 2.05rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.panel-note {
  max-width: 22em;
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.35;
}

.work article {
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
}

.work article:first-child {
  border-top: 0;
  padding-top: 0.15rem;
}

.work h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.25;
}

.work p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.principles ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: principle;
}

.principles li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  column-gap: 0.75rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
  counter-increment: principle;
}

.principles li:first-child {
  border-top: 0;
  padding-top: 0.15rem;
}

.principles li::before {
  content: counter(principle);
  grid-row: 1 / -1;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--clay);
}

.principles h3,
.principles p,
.principles blockquote { grid-column: 2; }

.principles h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.25;
}

.principles p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.principles blockquote {
  margin: 0.7rem 0 0;
  padding: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.28rem;
  line-height: 1.3;
}

footer {
  margin-top: auto;
  padding-top: 2.75rem;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
}

.copyright {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cookieless {
  max-width: 24em;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-family: "Public Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  margin-top: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

footer a { text-decoration: none; }

a:hover { color: var(--clay); }

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

.noscript {
  width: var(--sheet-width);
  margin: 0 auto 2rem;
}

@media (max-width: 560px) {
  .sheet { padding-top: 0.85rem; }

  .letterhead { padding-bottom: 0.35rem; }

  .mast { font-size: 0.84rem; letter-spacing: 0.11em; }

  h1 {
    margin-top: 1.15rem;
    font-size: 2.15rem;
  }

  .lede {
    margin-top: 0.7rem;
    font-size: 1.15rem;
    line-height: 1.35;
  }

  .folio { margin-top: 1.2rem; }

  .panel h2 { margin-bottom: 0.7rem; }

  .panel-note {
    font-size: 1.18rem;
    line-height: 1.42;
  }

  .actions {
    gap: 0.75rem 1rem;
    margin-top: 1.2rem;
    padding-top: 0.75rem;
  }

  .action { gap: 0.2rem; }

  .action-name { font-size: 1.6rem; }

  .action-address { font-size: 0.84rem; }

  .js .tabs {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
    column-gap: 1.05rem;
    row-gap: 0.42rem;
    margin-top: 0.6rem;
  }

  .tab {
    font-size: 0.78rem;
    letter-spacing: 0.07em;
  }
}

/* Tablet: wider than the phone column, still inset from the viewport edges. */
@media (min-width: 768px) {
  :root { --sheet-width: min(42rem, calc(100% - 3.5rem)); }

  .panel-note { max-width: 28em; }
}

/* Desktop: about half of a 1440px window, near 70 characters of body text. */
@media (min-width: 1100px) {
  :root { --sheet-width: min(48rem, calc(100% - 6rem)); }

  .panel-note { max-width: 32em; }
}

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

.fit-title {
  margin-top: 1.8rem;
  font-size: clamp(3rem, 9vw, 4.2rem);
}

.dek {
  max-width: 36em;
  margin: 1.15rem 0 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.35;
}

.field {
  display: block;
  margin-top: 1.25rem;
}

.field-name {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.45rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.field select {
  padding-right: 1.4rem;
}

.field select:has(option[value=""]:checked) { color: var(--muted); }

.field option { color: var(--ink); }

.field input:focus,
.field select:focus { outline: none; border-bottom-color: var(--clay); }

.error {
  display: block;
  margin-top: 0.35rem;
  color: var(--clay);
  font-size: 0.85rem;
}

.error:empty { display: none; }

fieldset.optional {
  margin: 1.7rem 0 0;
  padding: 0;
  border: 0;
}

fieldset.optional legend {
  padding: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.45rem;
  font-weight: 500;
}

.submit {
  display: block;
  margin-top: 1.8rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.85rem, 5vw, 2.35rem);
  line-height: 1.05;
  text-align: left;
}

.submit:hover { color: var(--clay); }

.follow-submit { margin-top: 0.85rem; font-size: 1.85rem; }

.fine {
  max-width: 42em;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.result { margin-top: 2rem; padding-top: 1.15rem; border-top: 1px solid var(--rule); }

.result h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.result h2:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

.result p {
  max-width: 40em;
  margin: 0.85rem 0 0;
  font-size: 1.02rem;
  line-height: 1.55;
}

.draft {
  display: inline-block;
  margin-top: 1.15rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.35rem;
  font-weight: 500;
  text-decoration: none;
}

.revise {
  display: block;
  margin-top: 1.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.revise:hover { color: var(--clay); }

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
