Typography

The type system uses two font families loaded via Google Fonts, a responsive fluid scale, and tight letter-spacing for headings.

Font families

TokenValueUsage
--font-sans'Inter', ui-sans-serif, system-ui, sans-serifAll body text, headings, UI
--font-monoui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospaceCode, product names, labels

Fonts are loaded from Google Fonts with preconnect:

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />

Type scale

All sizes use clamp() for fluid responsiveness where appropriate.

TokenValueUsage
--text-displayclamp(2.35rem, 5vw, 4.2rem)Hero titles
--text-h1clamp(1.9rem, 3.2vw, 3rem)Page headings
--text-h2clamp(1.2rem, 2vw, 1.65rem)Section headings
--text-h31.125remSubsection titles
--text-body1remDefault body text
--text-body-lgclamp(1.05rem, 1.8vw, 1.325rem)Hero subtitles, lead text
--text-small0.875remButtons, sidebar, table cells
--text-xs0.75remBadges, labels, captions
--text-code0.875remCode blocks, inline code

Line heights

TokenValueUsage
--leading-tight1.05Headings, display text
--leading-normal1.7Body text
--leading-relaxed1.65Large body, docs prose

Heading styles

LevelSizeWeightLetter-spacing
h1var(--text-h1)800-0.035em
h2var(--text-h2)800-0.025em
h3var(--text-h3)600-0.015em
displayvar(--text-display)800-0.04em

Body defaults

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);    /* 1rem */
  font-weight: 400;
  line-height: var(--leading-normal);  /* 1.7 */
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

Section labels

Used for uppercase category headers above sections:

.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}