/* IBM Plex, self-hosted latin subsets (OFL) */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F7F6F3;
  --surface: #EFEEEA;
  --rule: #E3E1DB;
  --rule-strong: #CFCCC4;
  --text: #1A1A19;
  --text-2: #55534E;
  --text-3: #6E6C66;
  --accent: #2346C9;
  --img-edge: rgba(0, 0, 0, .08);
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
  interpolate-size: allow-keywords;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110; --surface: #1A1A18; --rule: #262523; --rule-strong: #3A3936;
    --text: #EDECE8; --text-2: #A9A7A0; --text-3: #8A8881; --accent: #93A8FF;
    --img-edge: rgba(255, 255, 255, .08);
  }
  body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
}
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; hanging-punctuation: first; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font: 400 16px/26px var(--sans);
  font-kerning: normal;
  font-synthesis: none;
}
h1, h2, h3, p, ol, ul, figure, pre { margin: 0; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
  transition: text-decoration-color .15s;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.arrow { display: inline-block; transition: transform .15s var(--ease); }
a:hover .arrow { transform: translate(2px, -2px); color: var(--accent); }

.skip {
  position: absolute; left: 24px; top: 16px; z-index: 10;
  padding: 4px 8px; background: var(--bg);
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

/* Layout: label rail + one content column */
.page { max-width: 908px; margin: 0 auto; padding: 120px 24px 0; }
.section { display: grid; grid-template-columns: 140px minmax(0, 720px); column-gap: 48px; }
main .section { margin-top: 128px; }
.section > * { grid-column: 2; }
.section > h2 {
  grid-column: 1; grid-row: 1 / span 20; align-self: start;
  position: sticky; top: 32px;
  font: 400 14px/24px var(--sans); color: var(--text-3);
  padding-top: 1px;
}
.measure { max-width: 62ch; }

/* Intro */
.intro h1 { font: 500 16px/24px var(--sans); color: var(--text); }
.role { color: var(--text-2); line-height: 24px; }
.lede {
  margin-top: 40px; max-width: 30em;
  font-size: clamp(20px, 1.1rem + .55vw, 24px); line-height: 1.417;
  letter-spacing: -.012em; color: var(--text); text-wrap: balance;
}
.lede em { font-style: italic; color: var(--text-2); }
.intro .body { margin-top: 24px; }
.links { margin-top: 20px; font-size: 15px; line-height: 24px; display: flex; flex-wrap: wrap; gap: 0 24px; }

/* Featured work */
.project + .project { margin-top: 72px; }
.project-head { display: flex; align-items: baseline; gap: 16px; }
.project h3 {
  font: 500 17px/26px var(--sans); letter-spacing: -.005em; color: var(--text);
  text-wrap: balance;
}
.project h3 a { text-decoration: none; }
.project h3 a:hover { text-decoration: underline; text-decoration-color: currentColor; }
.source { margin-left: auto; font-size: 14px; line-height: 26px; color: var(--text-2); white-space: nowrap; }
.source a { color: var(--text-2); }
.meta, .stack, .status, .evidence {
  font: 400 12.5px/20px var(--mono); color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.meta { margin-top: 8px; }
.meta .source-m { display: none; }
.project .desc { margin-top: 16px; }
.status { margin-top: 12px; max-width: 62ch; }

.plate { margin-top: 24px; }
.plate-frame, .plate-open {
  display: block; width: 100%; padding: 10px; border: 0; margin: 0;
  background: var(--surface); border-radius: 12px; font: inherit; color: inherit;
}
.plate-open { cursor: zoom-in; }
.plate-open:focus-visible { outline-offset: 2px; border-radius: 12px; }
.plate img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center;
  border-radius: 6px; outline: 1px solid var(--img-edge); outline-offset: -1px;
  background: var(--bg);
}
.plate figcaption { margin-top: 10px; font-size: 13px; line-height: 20px; color: var(--text-3); }

/* More: index rows */
.index { border-bottom: 1px solid var(--rule); }
.index details { border-top: 1px solid var(--rule); }
.index summary {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) 96px 16px; column-gap: 16px;
  align-items: baseline; min-height: 52px; padding: 13px 0; cursor: pointer;
  list-style: none;
}
.index summary::-webkit-details-marker { display: none; }
.index summary:focus-visible { outline-offset: -2px; }
.row-title { font-weight: 500; color: var(--text); }
.row-line { color: var(--text-2); font-size: 15px; line-height: 24px; }
.row-kind { font: 400 12.5px/20px var(--mono); color: var(--text-3); text-align: right; }
.chev {
  align-self: center; width: 16px; height: 16px; color: var(--text-3);
  transition: transform .24s var(--ease);
}
details[open] > summary .chev { transform: rotate(90deg); }
@media (hover: hover) and (pointer: fine) {
  .index summary:hover .row-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  .index summary:hover .chev { transform: translateX(2px); }
  .index details[open] > summary:hover .chev { transform: rotate(90deg) translateY(-2px); }
}
details::details-content {
  block-size: 0; overflow: clip;
  transition: block-size .24s var(--ease), content-visibility .24s allow-discrete;
}
details[open]::details-content { block-size: auto; }
.row-body { padding: 0 0 24px 216px; }
.row-body > * + * { margin-top: 12px; }
.row-body .plate { margin-top: 20px; }
.row-body .source-line { font-size: 14px; }

pre {
  margin-top: 20px; padding: 16px; border-radius: 8px; background: var(--surface);
  font: 400 13px/22px var(--mono); color: var(--text); overflow-x: auto;
  font-variant-numeric: tabular-nums;
}

/* How I build */
.habits { list-style: none; padding: 0; counter-reset: habit; }
.habits li { counter-increment: habit; position: relative; padding-left: 28px; max-width: calc(62ch + 28px); }
.habits li + li { margin-top: 32px; }
.habits li::before {
  content: counter(habit) "."; position: absolute; left: 0; top: 0;
  color: var(--text-3); font-variant-numeric: tabular-nums;
}
.habits h3 { font: 500 16px/26px var(--sans); color: var(--text); }
.habits p { margin-top: 4px; }
p code { font: 400 .875em/1 var(--mono); color: var(--text); overflow-wrap: anywhere; }
.evidence { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.evidence a { color: var(--text-3); }
.evidence a:hover { color: var(--text); }

/* Footer */
.foot {
  margin-top: 128px; padding: 20px 0 48px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  font-size: 13px; line-height: 20px; color: var(--text-3);
}

/* Founded: launched products */
.ventures { list-style: none; padding: 0; margin-top: 32px; border-bottom: 1px solid var(--rule); }
.ventures li {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) 96px; column-gap: 16px; row-gap: 2px;
  align-items: baseline; padding: 13px 0 14px; border-top: 1px solid var(--rule);
}
.ventures .v-name { grid-column: 1; grid-row: 1 / span 2; font: 500 16px/26px var(--sans); color: var(--text); }
.ventures .v-name a { text-decoration-color: var(--rule-strong); }
.ventures .v-name a:hover { text-decoration-color: currentColor; }
.ventures .v-line { grid-column: 2; font-size: 15px; line-height: 24px; color: var(--text-2); }
.ventures .v-when { grid-column: 3; grid-row: 1; text-align: right; }
.ventures .v-when, .ventures .v-meta {
  font: 400 12.5px/20px var(--mono); color: var(--text-3); font-variant-numeric: tabular-nums;
}
.ventures .v-meta { grid-column: 2 / -1; }
.ventures .v-meta a { color: var(--text-3); }
.ventures .v-meta a:hover { color: var(--text); }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; margin: auto; background: transparent; color: var(--text-3);
  max-width: min(1440px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow: visible;
}
.lightbox::backdrop { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.lightbox img {
  width: auto; max-width: 100%; max-height: calc(100vh - 110px); margin: 0 auto;
  border-radius: 6px; outline: 1px solid var(--img-edge); outline-offset: -1px;
}
.lightbox p { margin-top: 12px; font-size: 13px; line-height: 20px; text-align: center; }
.lightbox form { position: fixed; top: 16px; right: 16px; }
.lightbox .close {
  font: 400 14px/24px var(--sans); color: var(--text-2); background: none; border: 0;
  padding: 4px 8px; cursor: pointer; border-radius: 3px;
}
::view-transition-group(*) { animation-duration: .24s; animation-timing-function: var(--ease); }

/* Single column below 900px */
@media (max-width: 899px) {
  .page { padding: 64px 20px 0; }
  .section { display: block; }
  main .section { margin-top: 88px; }
  .section > h2 { position: static; margin-bottom: 16px; }
  .project + .project { margin-top: 56px; }
  .lede { margin-top: 32px; }
  .row-body { padding-left: 0; }
  .index summary { grid-template-columns: minmax(0, 1fr) 96px 16px; row-gap: 2px; }
  .row-title { grid-column: 1; grid-row: 1; }
  .row-kind { grid-column: 2; grid-row: 1; }
  .chev { grid-column: 3; grid-row: 1; }
  .row-line { grid-column: 1 / -1; grid-row: 2; }
  .foot { margin-top: 88px; }
  .ventures li { grid-template-columns: minmax(0, 1fr) auto; }
  .ventures .v-name { grid-row: 1; grid-column: 1; }
  .ventures .v-when { grid-column: 2; grid-row: 1; }
  .ventures .v-line, .ventures .v-meta { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .source { display: none; }
  .meta .source-m { display: inline; }
  .lightbox { max-width: calc(100vw - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::details-content { transition: none !important; animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
