/* Anybody by Etcetera Type Co., SIL Open Font License 1.1 (fonts/OFL.txt).
   Latin subset of the variable font, weight 100–900 and width 50–150%. */
@font-face {
  font-family: "Anybody";
  src: url("/fonts/anybody-variable-latin-5.3.0.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #eceef3;
  --ink: #141b2d;
  --quiet: #586079;
  --link: #2b4bd8;

  /* The two halves of the name are set at different widths so both lines
     end on the same edge. Tuned against the font above. */
  --stretch-first: 150%;
  --stretch-last: 126%;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121829;
    --ink: #e9ecf5;
    --quiet: #9aa3bd;
    --link: #a5b6ff;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Anybody", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-stretch: 100%;
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: clamp(1.25rem, 5vw, 4.5rem);
}

/* The name is sized against the width of this block, which is capped by the
   viewport height so the two lines never outgrow a short landscape screen. */
.signature {
  container-type: inline-size;
  width: min(100%, 118svh);
}

.name {
  margin: 0;
  font-weight: 800;
  font-size: 23.5cqi;
  line-height: 0.84;
  letter-spacing: -0.01em;
}

.name-first,
.name-last {
  display: block;
  width: max-content;
  animation: settle 1100ms cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.name-first {
  font-stretch: var(--stretch-first);
  --from: 50%;
}

.name-last {
  font-stretch: var(--stretch-last);
  --from: 75%;
  animation-delay: 60ms;
}

/* One load moment: both halves of the name open out from a condensed width
   until they meet the same right edge. Only the width moves, so a renderer
   that never runs the animation still shows the whole name, and no frame is
   wider than the final layout. */
@keyframes settle {
  from {
    font-stretch: var(--from);
  }
}

/* The places to go from here: one link on the 404 page, a short list of
   destinations on the home page, laid side by side and wrapping on a phone. */
.signature > .profile,
.destinations {
  margin-top: clamp(1.75rem, 6cqi, 3.5rem);
}

.destinations {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem clamp(2rem, 7cqi, 4.5rem);
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.profile {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--ink);
  text-decoration: none;
}

.profile-label {
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.75rem);
  font-weight: 650;
  font-stretch: 112%;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-color: var(--link);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}

.profile-url {
  color: var(--quiet);
  font-size: 1rem;
  font-stretch: 92%;
}

.profile:hover .profile-label {
  color: var(--link);
}

.profile:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 6px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .name-first,
  .name-last {
    animation: none;
  }
}
