:root {
  --bg: #0f1012;
  --fg: #ffffff;
  --fg-muted: #8c8c8c;

  /* Desktop defaults */
  --page-padding: 80px;
  --logo-size: 28px;
  --logo-line: 32px;
  --avatar-size: 32px;
  --logo-gap: 16px;

  /* Display text stays 72px until the longest word ("construction.") would no
     longer fit on one line, then shrinks just enough to keep it fitting.
     5.65 = width of "construction." in ems in Inter Tight Regular (5.60,
     plus a small safety margin). If the copy changes, re-measure the longest word. */
  --longest-word: 5.65;
  --display-size: min(72px, calc((100vw - 2 * var(--page-padding)) / var(--longest-word)));
}

/* Large laptop / small desktop */
@media (max-width: 1199px) {
  :root {
    --page-padding: 56px;
  }
}

/* Tablet */
@media (max-width: 899px) {
  :root {
    --page-padding: 40px;
    --logo-size: 24px;
    --logo-line: 28px;
    --avatar-size: 28px;
  }
}

/* Mobile */
@media (max-width: 599px) {
  :root {
    --page-padding: 24px;
    --logo-size: 20px;
    --logo-line: 24px;
    --avatar-size: 24px;
    --logo-gap: 12px;
  }
}

/* Small mobile */
@media (max-width: 379px) {
  :root {
    --page-padding: 20px;
  }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* logotype to top, display text to bottom */
  padding: var(--page-padding);
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.logotype {
  display: flex;
  align-items: center;
  gap: var(--logo-gap);
  font-size: var(--logo-size);
  line-height: var(--logo-line);
}

.avatar {
  flex: none;
  display: block;
  height: var(--avatar-size);
  width: auto; /* face.png is 56x64, so width follows the aspect ratio */
}

.name {
  font-weight: 400;
}

.display {
  margin: 0;
  font-size: var(--display-size);
  line-height: 1; /* 72/72 at max size, scales with the text */
  font-weight: 400;
  text-wrap: balance;
  overflow-wrap: break-word; /* safety net: a 72px word can be wider than a phone screen */
}

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

/* 404 page */
.home-link {
  color: inherit;
  text-decoration: none;
}

.nowrap {
  white-space: nowrap; /* arrow never wraps onto a line of its own */
}

.home-icon {
  display: inline-block;
  width: 1em; /* icon is drawn on a 72 grid, matching the 72px display size */
  height: 1em;
  margin-left: 0.2em;
  /* The arrow's visual centre sits ~0.47em from the top of its box, so drop the
     box until that centre lines up with the cap-height midpoint (~0.36em above baseline). */
  vertical-align: -0.17em;
}

.home-link:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 0.1em;
}
