/*
 * Four things on an empty page.
 *
 * No webfont, no script, no image beyond an inline SVG. Nothing can shift after
 * paint and a crawler that runs no JavaScript sees everything there is. The
 * designer's site can spend the budget this one is saving.
 *
 * The brand is monochrome, so the palette is three tokens and the mark inherits
 * `currentColor`. Dark mode is the same page with them swapped.
 */

:root {
  --paper: #ffffff;
  --ink: #101010;
  --ink-soft: #6b6b6b;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a0a0a;
    --ink: #f2f2f2;
    --ink-soft: #8c8c8c;
  }
}

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

body {
  margin: 0;
  /* System stack. A webfont would cost a request and a reflow to set eight
     words. */
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

main {
  /* `svh`, not `vh`: on mobile Safari `100vh` is taller than the visible area
     while the address bar is showing, which pushes a centred layout off the
     bottom of the screen it is meant to be centred in. */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.mark {
  height: 3.25rem;
  width: auto;
  color: var(--ink);
  margin-bottom: 1.75rem;
}

h1 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.by {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.contact {
  margin: 2.5rem 0 0;
  font-size: 0.9375rem;
}

/* ---------------------------------------------------------------------------
   The arrival
   ---------------------------------------------------------------------------
   One sequence, once, on load. The mark is drawn from three separate paths, so
   they come in as three — which is the only ornament on the page and the only
   place the animation says anything about the subject rather than about
   itself.

   `both` fill mode matters: without it every element paints at full opacity
   for the first frame and then snaps to hidden when its animation starts,
   which reads as a flicker rather than a fade.

   Everything is opacity and transform. Neither triggers layout, so the
   sequence cannot shift a single pixel of the page it is revealing.
   --------------------------------------------------------------------------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(0.5rem); }
  to   { opacity: 1; transform: none; }
}

@keyframes settle {
  from { opacity: 0; transform: translateY(0.75rem) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.mark path {
  animation: settle 0.75s cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

/* Staggered by an eighth of a second — enough to read as three strokes
   arriving, short enough that the whole mark is present before anyone has
   decided to look away. */
.mark path:nth-child(1) { animation-delay: 0.05s; }
.mark path:nth-child(2) { animation-delay: 0.18s; }
.mark path:nth-child(3) { animation-delay: 0.31s; }

h1       { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.25, 1) 0.5s both; }
.by      { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.25, 1) 0.62s both; }
.contact { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.25, 1) 0.78s both; }

/* Motion is a preference the page has no business overriding. Reduced means
   the sequence does not run at all — not that it runs faster. */
@media (prefers-reduced-motion: reduce) {
  .mark path,
  h1,
  .by,
  .contact {
    animation: none;
  }

  a { transition: none; }
}

a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 0.15s ease;
}

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

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}
