/* Latin subsets, trimmed to the weights in use. OFL — licenses sit alongside in fonts/. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(/fonts/fraunces.woff2) format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url(/fonts/fraunces-italic.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(/fonts/jetbrains-mono.woff2) format('woff2');
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Cream paper, dark ink, copper once. Fraunces carries the text; the mono is for labels and small print. */
:root {
  color-scheme: light;
  --bg: #f4efe5;
  --ink: #1a1714;
  --ink-soft: #4d463d;
  --ink-mute: #857c6e;
  --rule: #ddd4c3;
  --thread: #a87852;
  --thread-soft: #a8785266;
  --serif: 'Fraunces', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--thread); color: var(--bg); }

a {
  color: var(--thread);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--thread-soft);
  text-underline-offset: 0.18em;
  transition: color 0.15s, text-decoration-color 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgb(168 120 82 / 0.2);
}
a:hover { color: var(--ink); text-decoration-color: var(--ink); }
a:focus-visible { outline: 2px solid var(--thread); outline-offset: 3px; border-radius: 2px; }

img { display: block; max-width: 100%; height: auto; }

/* Small print: eyebrows, dates, nav, footer. */
.mono, h2, .dated, .meta, .contact, footer {
  font-family: var(--mono);
  font-weight: 400;
}

/* One readable column. Footer sits at the bottom when there's room, follows the content when there isn't. */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 14vh, 8rem) 1.5rem 2rem;
  display: grid;
  grid-template-rows: 1fr auto;
}

.wm {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.5vw, 4.25rem);
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
}
.wm .good { color: var(--thread); }

.tagline {
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.3;
  color: var(--ink-soft);
  margin-top: 1rem;
  text-wrap: balance;
}

.intro {
  margin-top: 2.5rem;
  max-width: 34rem;
  font-size: 1.06em;
  text-wrap: pretty;
}

h2 {
  margin-top: 3rem;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Project list: a hairline above each entry, a mono meta line under the name. */
.projects {
  list-style: none;
  margin-top: 0.75rem;
  border-top: 1px solid var(--rule);
}
.projects li {
  padding: 1.35rem 0 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.projects h3 {
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
.projects h3 a { color: inherit; text-decoration-color: var(--rule); }
.projects h3 a:hover { color: var(--thread); text-decoration-color: var(--thread); }
.projects .meta {
  margin-top: 0.3rem;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.projects p:not(.meta) {
  margin-top: 0.6rem;
  max-width: 34rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.contact {
  margin-top: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-size: 13.5px;
}

footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--ink-mute);
}
/* The legal line may wrap at the separator on narrow screens, never inside a name. */
footer > .legal { white-space: normal; }
.legal > span { white-space: nowrap; }

/* Subpages: a small wordmark home link, a page title, plain prose. */
.page.sub {
  padding-top: clamp(2rem, 6vh, 3.5rem);
  grid-template-rows: auto 1fr auto;
}

a.wm-sm {
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
}
a.wm-sm:hover { color: var(--ink-soft); }

.title {
  margin-top: clamp(3rem, 9vh, 5rem);
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.title.product {
  font-size: clamp(2.4rem, 5.5vw, 3.25rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.lead {
  margin-top: 1rem;
  max-width: 34rem;
  font-size: 1.12em;
  color: var(--ink);
  text-wrap: pretty;
}

.dated {
  margin-top: 0.75rem;
  font-size: 12px;
  color: var(--ink-mute);
}

.prose > p,
.prose > ul {
  margin-top: 1rem;
  max-width: 34rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.prose > .lead { color: var(--ink); }
.prose > h2 { padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.prose > h2 + p,
.prose > h2 + ul { margin-top: 0.75rem; }
.prose > .projects { max-width: none; border-top: 0; }
.prose > .projects li:last-child { border-bottom: 0; }

/* Legal small print at the foot of a product page. */
.prose > .fine {
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-mute);
}

.list { list-style: none; }
.list li {
  position: relative;
  padding-left: 1.5rem;
}
.list li + li { margin-top: 0.5rem; }
.list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--ink-mute);
}

/* Product pages: title and lead, then the screenshots, then the sections. On wide screens the
   screenshots move into a second column beside the text. They are the real app, cropped to the
   phone, framed by a hairline. No shadow. */
.page.wide { max-width: 60rem; }
.product {
  display: grid;
  grid-template-columns: minmax(0, 34rem);
  align-content: start;
  align-items: start;
}
.product .body { margin-top: 1rem; }
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 14rem));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.shots img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 12%/5.5%;
  background: var(--ink);
}
.shots figcaption {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
}
@media (min-width: 60rem) {
  .product:has(.shots) {
    grid-template-columns: minmax(0, 34rem) minmax(13rem, 17rem);
    grid-template-rows: auto 1fr;
    column-gap: 4rem;
  }
  .product .head { grid-column: 1; grid-row: 1; }
  .product .body { grid-column: 1; grid-row: 2; }
  .product .shots {
    grid-column: 2;
    grid-row: 1 / span 2;
    grid-template-columns: 1fr;
    margin-top: clamp(3rem, 9vh, 5rem);
  }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .page { padding-top: clamp(2.5rem, 9vh, 4.5rem); }
  .page.sub { padding-top: 1.75rem; }
  .shots { grid-template-columns: repeat(2, 1fr); }
}
