/* Latin subsets of Fraunces, Source Serif 4 and IBM Plex Mono (SIL OFL 1.1), self-hosted from Google Fonts.
   Body text (Source Serif 4) uses font-display:optional: the first visit paints at once in the
   fallback serif instead of re-painting when the font lands (the largest paint on most pages). */
@font-face{font-family:"Fraunces";font-style:normal;font-weight:400 700;font-display:swap;src:url("/assets/fonts-web/Fraunces-normal-400-700.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts-web/IBMPlexMono-normal-400.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts-web/IBMPlexMono-normal-500.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Source Serif 4";font-style:italic;font-weight:400;font-display:optional;src:url("/assets/fonts-web/SourceSerif4-italic-400.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:400 600;font-display:optional;src:url("/assets/fonts-web/SourceSerif4-normal-400-600.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
/* Ford Prior: warm, handmade style. Paper, ink and a handwritten voice.
   Loaded after each legacy page's own <style>, so these tokens override theirs. */
@font-face {
  font-family: "Ford Hand";
  src: url("/assets/fonts/hand.woff2") format("woff2");
  font-display: swap;
}
:root {
  --paper: #f7f1e6;
  --sheet: #fcf8f1;
  --ink: #2b241e;
  --muted: #66574a;
  --rule: #cdbca3;
  --wash: #efe6d6;
  --on-ink: #fcf8f1;
  --hot: #9c3f1c;
  --accent: #9c3f1c;
  --link: #1f4f72;
  --water: #2f6f8f;
  --power: #8a560b;
  --air: #5b6b4a;
  --heat: #9c3f1c;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --hand: "Ford Hand", "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(43, 36, 30, 0.06), 0 6px 18px -10px rgba(43, 36, 30, 0.25);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1e1915;
    --sheet: #26201b;
    --ink: #f3eadb;
    --muted: #bfae98;
    --rule: #5a4d40;
    --wash: #2d261f;
    --on-ink: #1e1915;
    --hot: #f0a072;
    --accent: #f0a072;
    --link: #9cc7e6;
    --water: #7fb6d1;
    --power: #e2b25a;
    --air: #b4c79a;
    --heat: #f0a072;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1e1915;
  --sheet: #26201b;
  --ink: #f3eadb;
  --muted: #bfae98;
  --rule: #5a4d40;
  --wash: #2d261f;
  --on-ink: #1e1915;
  --hot: #f0a072;
  --accent: #f0a072;
  --link: #9cc7e6;
  --water: #7fb6d1;
  --power: #e2b25a;
  --air: #b4c79a;
  --heat: #f0a072;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  overflow-x: clip;
}
body {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}
/* Paper: a faint fibre texture, drawn once, no image request. */
body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .32 0 0 0 0 .24 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1,
h2,
h3 {
  font-family: var(--display);
  text-transform: none;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 50;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
main a:not([class]) {
  color: var(--link);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.hand {
  font-family: var(--hand);
  font-weight: 500;
  letter-spacing: 0;
}
.fp-skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 50;
  background: var(--ink);
  color: var(--on-ink);
  padding: 8px 12px;
}
.fp-skip:focus {
  left: 12px;
}

/* Buttons: soft corners, ink fill. */
.btn {
  font: 600 15px/1 var(--body);
  letter-spacing: 0.01em;
  text-transform: none;
  border-radius: 999px;
  padding: 11px 16px;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.btn.solid {
  background: var(--ink);
  color: var(--on-ink);
}
.btn:hover {
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover {
    transform: none;
  }
}

/* Header */
.fp-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.fp-bar .wrap {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  padding-block: 10px;
  flex-wrap: wrap;
}
.fp-bar .mark {
  font: 500 30px/1 var(--hand);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  margin-right: auto;
}
.fp-bar nav {
  display: flex;
  gap: 4px 18px;
  flex-wrap: wrap;
}
.fp-bar nav a {
  font: 500 16px/1 var(--body);
  text-transform: none;
  letter-spacing: 0;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.fp-bar nav a:hover,
.fp-bar nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
}
.fp-book {
  padding: 9px 14px;
  min-height: 40px;
}
.fp-theme {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: none;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}
@media (max-width: 720px) {
  .fp-bar nav {
    order: 3;
    flex: 1 1 100%;
    overflow-x: auto;
    gap: 16px;
    scrollbar-width: none;
  }
  .fp-bar nav a {
    white-space: nowrap;
  }
  .fp-bar .mark {
    font-size: 26px;
  }
}

/* Footer */
.fp-foot {
  margin-block: 72px 32px;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  display: grid;
  gap: 16px;
}
.fp-foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 24px;
  align-items: start;
}
.fp-sign {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
  margin: 0 0 12px;
}
.fp-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}
.fp-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 17px;
}
.fp-contact a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--link);
}
.fp-more {
  display: grid;
  gap: 8px;
  font-size: 17px;
}
.fp-foot .small {
  font: 400 13px/1.4 var(--mono);
  color: var(--muted);
  margin: 0;
}
@media (max-width: 760px) {
  .fp-foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Shared content blocks for the new pages */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
.prose {
  max-width: 68ch;
  font-size: 19px;
  line-height: 1.65;
}
.prose h2 {
  font-size: 30px;
  margin: 1.6em 0 0.4em;
}
.prose h3 {
  font-size: 23px;
  margin: 1.4em 0 0.3em;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.prose pre {
  overflow-x: auto;
  background: var(--wash);
  padding: 14px;
  border-radius: var(--radius);
  font: 14px/1.5 var(--mono);
}
.prose blockquote {
  margin: 1.2em 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.kicker {
  font: 500 14px/1.3 var(--mono);
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: none;
}
.page-head {
  padding-block: clamp(32px, 6vw, 72px) 12px;
  display: grid;
  gap: 12px;
}
.page-head h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1;
  margin: 0;
}
.page-head .lede {
  font-size: clamp(19px, 2.3vw, 23px);
  max-width: 58ch;
  margin: 0;
  color: var(--ink);
}
.margin-note {
  font: 500 22px/1.2 var(--hand);
  color: var(--accent);
  transform: rotate(-1.5deg);
  display: inline-block;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
  margin-top: 24px;
}
.card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  gap: 8px;
  align-content: start;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
}
.card h2,
.card h3 {
  font-size: 24px;
  line-height: 1.15;
  margin: 0;
}
.card p {
  margin: 0;
}
a.card:hover {
  border-color: var(--ink);
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font: 500 14px/1 var(--body);
  padding: 9px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  min-height: 40px;
  text-transform: none;
  letter-spacing: 0;
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--on-ink);
}
.tag {
  font: 500 13px/1 var(--mono);
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.placeholder {
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.placeholder::before {
  content: "Placeholder · ";
  font: 600 13px var(--mono);
  color: var(--accent);
}
.src {
  font: 400 13px/1.4 var(--mono);
  color: var(--muted);
}
.src a {
  color: var(--link);
}
.need {
  font: 600 13px var(--mono);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 1px 5px;
  border-radius: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
table.data {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
table.data th,
table.data td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.data th {
  font-weight: 600;
}
details > summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}
section.block {
  margin-top: 56px;
}
section.block > h2 {
  font-size: clamp(30px, 4.5vw, 44px);
  margin: 0 0 8px;
}

/* Hero handwriting */
.hero-hand {
  display: block;
  width: min(100%, 640px);
  height: auto;
  color: var(--ink);
  overflow: visible;
}
.hero-hand path {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.2;
}
.hero-hand.write path {
  fill-opacity: 0;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation:
    fp-write var(--dur, 1.1s) ease-out forwards,
    fp-fill 0.5s ease-out forwards;
  animation-delay: var(--d, 0s), calc(var(--d, 0s) + var(--dur, 1.1s) * 0.8);
}
@keyframes fp-write {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes fp-fill {
  to {
    fill-opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-hand.write path {
    animation: none;
    fill-opacity: 1;
    stroke-dashoffset: 0;
  }
}

/* Legacy pages: soften the old engineering look without touching their markup. */
.label {
  text-transform: none;
  letter-spacing: 0.01em;
  font-family: var(--mono);
}
.panel,
.pcard,
.cards {
  border-radius: var(--radius);
}
.pcard {
  background: var(--sheet);
}
.sub-hero h1,
.skills h1,
.sec-head h2 {
  text-transform: none;
}
.fp-hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
}
.fp-what {
  font: 500 clamp(20px, 2.4vw, 25px)/1.35 var(--body);
  max-width: 44ch;
  margin: 6px 0 0;
}
.lang-btn {
  border-radius: 999px !important;
  font: 600 13px/1 var(--body) !important;
  letter-spacing: 0.02em !important;
  min-height: 40px;
  padding: 8px 12px !important;
}
.back {
  text-transform: none;
  letter-spacing: 0;
  font: 500 15px/1 var(--body);
}
.hero-hand.sig {
  width: min(60%, 260px);
}
.post-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.post-list .post h3 {
  font-size: clamp(22px, 2.6vw, 28px);
}
.yr > h2 {
  font: 500 34px/1 var(--hand);
  color: var(--accent);
}
.post-page .page-head h1 {
  font-size: clamp(34px, 5.5vw, 58px);
  max-width: 24ch;
}
.post-foot {
  margin-top: 40px;
  max-width: 68ch;
  display: grid;
  gap: 16px;
}
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .post-nav {
    grid-template-columns: 1fr;
  }
}
.prose {
  overflow-wrap: anywhere;
  min-width: 0;
}
.prose pre {
  max-width: 100%;
  overflow-wrap: normal;
}
.prose pre code {
  white-space: pre;
}
.prose table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}
/* Work, speaking, about, now */
.case-grid {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 18px;
}
.case h2 {
  font-size: 25px;
}
.case h2 a {
  text-decoration: none;
}
.case h2 a:hover {
  text-decoration: underline;
}
.case-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 4px 0;
  font-size: 16px;
}
.case-dl dt {
  font: 500 13px/1.6 var(--mono);
  color: var(--muted);
}
.case-dl dd {
  margin: 0;
}
.quote blockquote {
  margin: 0;
  font-size: 18px;
}
.quote figcaption {
  font: 500 14px var(--mono);
  color: var(--muted);
}
.talks {
  display: grid;
  gap: 18px;
}
.talk {
  grid-template-columns: minmax(0, 220px) 1fr;
  gap: 18px;
  align-items: start;
}
.talk img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}
@media (max-width: 600px) {
  .talk {
    grid-template-columns: 1fr;
  }
}
.about {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.about-photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about-sign {
  margin-top: 12px;
  color: var(--ink);
}
@media (max-width: 700px) {
  .about {
    grid-template-columns: 1fr;
  }
  .about-photo {
    max-width: 280px;
  }
}
.now-h {
  font-size: clamp(48px, 8vw, 84px) !important;
  font-family: var(--hand) !important;
  font-weight: 500;
}
.now {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}
.now-card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
  transform: rotate(-0.4deg);
  box-shadow: var(--shadow);
}
.now-card:nth-child(2) {
  transform: rotate(0.5deg);
}
.now-card h2 {
  font-size: 34px;
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 500;
}
.hand-list {
  font: 500 23px/1.3 var(--hand);
  padding-left: 20px;
  margin: 0;
  display: grid;
  gap: 10px;
}
.fp-cvpdf {
  padding-top: 16px;
}
@media (prefers-reduced-motion: reduce) {
  .now-card {
    transform: none;
  }
}
