/* Reset, typography and the shared treatment of links, headings and focus. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 1.5rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
}

p { margin: 0 0 1rem; }

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

/* Links: the underline is drawn as a background so it can wipe in on hover
   instead of blinking on. */
a {
  color: var(--blue-deep);
  text-decoration: none;
  background-image: linear-gradient(var(--blue), var(--blue));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--t-mid) var(--ease), color var(--t-fast) linear;
}

a:hover {
  color: var(--blue);
  background-size: 100% 1px;
}

:focus-visible {
  outline: 2px solid var(--blue-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Small monospace label — used for the rail, eyebrows, years and tags. */
.label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow {
  margin: 0 0 var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--blue);
}

.display {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: -0.045em;
  margin-bottom: var(--s-4);
}

.heading {
  font-size: var(--text-xl);
  max-width: 18ch;
}

.lead {
  font-size: var(--text-md);
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 0;
}

.prose {
  max-width: var(--measure);
  color: var(--ink-soft);
}

.prose p:last-child { margin-bottom: 0; }

.skip {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: var(--text-sm);
}

.skip:focus { top: 0; }

.noscript {
  margin: 0;
  padding: var(--s-3) var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  text-align: center;
}
