@font-face {
  font-family: "Courier Prime";
  src: url("fonts/courier-prime-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: url("fonts/courier-prime-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --blue: #b1fcff;
  --dim: rgba(177, 252, 255, 0.45);
  --gutter: 24px;
  --courier: "Courier Prime", "Courier New", Courier, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--black);
  color: var(--blue);
  font-family: var(--courier);
  font-size: 1.0625rem;
  line-height: 1.6;
}

::selection { background: var(--blue); color: var(--black); }

a { color: inherit; text-underline-offset: 0.25em; }

a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* Header */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--gutter);
  padding: var(--gutter);
}

.toolbar {
  display: flex;
  gap: 2ch;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.current { color: var(--dim); }

.logo {
  display: block;
  font-family: "Roboto", sans-serif;
  font-size: clamp(1rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  text-decoration: none;
}

.logo span { display: block; }

/* Page content */

.content {
  max-width: calc(62ch + 2 * var(--gutter));
  margin-top: 12vh;
  padding: 0 var(--gutter) 96px;
}

.content p + p { margin-top: 1.6em; }

.update + .update { margin-top: 4em; }

.update time {
  display: block;
  color: var(--dim);
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Intro */

.intro-screen { display: none; }

.intro body { overflow: hidden; }

.intro .intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: var(--black);
}

.tagline {
  /* The longest line is 46 characters of 0.6em each, plus room for the cursor. */
  font-size: min(calc((100vw - 2 * var(--gutter)) / 28.3), 2.25rem);
  font-weight: 700;
  line-height: 1.45;
  visibility: hidden;
}

.intro.ready .tagline { visibility: visible; }

.tagline .line { display: block; white-space: pre; }

.tagline .untyped { visibility: hidden; }

/* Zero width, so moving the cursor never shifts the centred text. */
.cursor {
  position: relative;
  display: inline-block;
  width: 0;
}

.cursor::after {
  content: "";
  position: absolute;
  left: 0.05em;
  bottom: -0.12em;
  width: 0.6em;
  height: 0.95em;
  background: var(--blue);
  animation: blink 1s steps(1) infinite;
}

.cursor.solid::after { animation: none; }

@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .cursor::after { animation: none; }
}
