@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #000000;
  --muted: #6b6b6b;
  --sans: "Instrument Sans", system-ui, sans-serif;
  /* The same margin on all four sides of the window. */
  --margin: clamp(20px, 3.5vw, 48px);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

/* One screen: masthead, statement, footer, inside an even margin. */
body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  margin: 0;
  padding: var(--margin);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

h1,
p,
ul {
  margin: 0;
  padding: 0;
}

a {
  color: var(--ink);
  text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.aside {
  color: var(--muted);
}

/* Text blocks are trimmed to the top of the capitals and the last baseline, so every
   measurement on the page runs from the edges of the letters, not from line-height padding. */
.name,
.statement,
.apps,
.contact {
  text-box: trim-both cap alphabetic;
}

/* Masthead: the cat spans the two-line name, ears at the top of the capitals,
   base on the second baseline. */

.lockup {
  display: flex;
  align-items: last baseline;
  justify-self: start;
  gap: 0.55em;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.mark {
  display: block;
  width: auto;
  height: calc(1lh + 1cap);
}

.name > span {
  display: block;
}

/* Statement: centered between the masthead's baseline and the footer rule. */

main {
  display: grid;
  align-content: center;
  padding-block: var(--margin);
}

.statement {
  max-width: 24ch;
  font-size: clamp(1.75rem, 1.1rem + 2.2vw, 3rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.statement h1 {
  font: inherit;
}

.statement p {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

/* Footer: apps against the left margin, contact against the right, two lines each
   so their baselines pair up. */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
  font-size: 0.9375rem;
}

.apps {
  list-style: none;
}

.contact {
  text-align: right;
}

@media (max-width: 40rem) {
  .site-footer {
    flex-direction: column;
  }

  .contact {
    text-align: left;
  }
}
