:root {
  color-scheme: light dark;
  --paper: #faf7f0;
  --card: #f1ecdf;
  --ink: #1d2420;
  --muted: #5b635c;
  --line: #ddd6c4;
  --sky: #1f5080;
  --wheat: #c8962e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12171b;
    --card: #1a2127;
    --ink: #ebe7dc;
    --muted: #a2a99f;
    --line: #2c353c;
    --sky: #93c2ea;
    --wheat: #e0b252;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--wheat); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--sky); }
a:focus-visible { outline: 3px solid var(--wheat); outline-offset: 4px; border-radius: 2px; }
code { font-family: var(--mono); font-size: .88em; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: 16px; top: -100px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 10; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 26px; padding-bottom: 26px; }
.mark {
  font-family: var(--serif); font-size: 20px; letter-spacing: .02em; text-decoration: none;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1.5px solid var(--ink); border-radius: 50%;
}
.mark:hover { border-color: var(--sky); }
.top nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 26px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); padding: 6px 0; }
.top nav a:hover { color: var(--ink); }

/* hero */
.hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 48px; padding-top: 56px; padding-bottom: 72px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); margin-bottom: 14px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 8vw, 76px); line-height: 1.02; letter-spacing: -.02em; }
.tagline { font-family: var(--serif); font-style: italic; font-size: clamp(21px, 3vw, 27px); color: var(--muted); margin-top: 12px; }
.lead { margin-top: 26px; max-width: 34em; font-size: 18.5px; }
.portrait { width: 220px; height: 220px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--line), 10px 10px 0 0 var(--wheat); }

.links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 26px; font-weight: 600; font-size: 16px; }
.links.small { margin-top: 10px; font-size: 14.5px; font-weight: 500; gap: 4px 18px; }

/* sections */
.section { padding-top: 56px; padding-bottom: 28px; }
h2 {
  font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: -.01em;
  padding-bottom: 12px; border-bottom: 1.5px solid var(--ink);
}
.section-note { margin-top: 22px; color: var(--muted); max-width: 40em; }

.rows { margin-top: 4px; }
.row { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.when { font-size: 13px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
h3 { font-size: 18.5px; font-weight: 650; line-height: 1.35; }
.row h3 + p { margin-top: 6px; color: var(--muted); max-width: 38em; }

/* featured project */
.feature {
  display: grid; grid-template-columns: 1fr 330px; gap: 36px; align-items: center;
  margin-top: 28px; padding: 40px 40px 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.feature-text { padding-bottom: 40px; }
.feature + .feature { margin-top: 24px; }
.feature.flip { grid-template-columns: 330px 1fr; }
.feature.flip .phones { order: -1; }
.feature-name { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; }
.feature-name img { border-radius: 10px; }
.feature h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.1; letter-spacing: -.015em; margin: 18px 0 14px; }
.feature p:not(.feature-name) { color: var(--muted); }
.phones { position: relative; align-self: end; height: 380px; }
.phone { position: absolute; width: 200px; border-radius: 26px 26px 0 0; overflow: hidden; border: 5px solid #1d2420; border-bottom: 0; background: #1d2420; box-shadow: 0 12px 30px rgb(0 0 0 / .18); }
.phone img { border-radius: 21px 21px 0 0; }
.phone.back { left: 0; top: 56px; }
.phone.front { right: 0; top: 0; }

/* open source */
.prs { margin-top: 18px; }
.prs li { display: grid; grid-template-columns: 300px 1fr; gap: 24px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.repo { font-family: var(--mono); font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

/* about */
.prose { margin-top: 26px; max-width: 38em; }
.prose p + p { margin-top: 16px; }

/* footer */
footer { margin-top: 72px; color: var(--muted); }
.horizon { display: block; width: 100%; max-width: 1200px; height: auto; margin: 0 auto; color: var(--ink); }
.horizon .far { opacity: .35; }
.horizon .sun { stroke: var(--wheat); stroke-width: 2; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; padding-top: 18px; padding-bottom: 36px; font-size: 14.5px; }

@media (max-width: 800px) {
  .feature, .feature.flip { grid-template-columns: 1fr; padding: 28px 24px 0; gap: 8px; }
  .feature.flip .phones { order: 0; }
  .feature-text { padding-bottom: 20px; }
  .phones { width: 330px; max-width: 100%; margin: 0 auto; height: 300px; }
  .prs li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 20px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 28px; padding-bottom: 44px; }
  .portrait { width: 132px; height: 132px; order: -1; box-shadow: 0 0 0 1.5px var(--line), 7px 7px 0 0 var(--wheat); }
  .row { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .when { padding-top: 0; }
  .section { padding-top: 40px; }
  .phone { width: 170px; }
}
