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

* {
  margin: 0;
}

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

/* ---- Scrollbar ---- */
html {
  scrollbar-color: var(--c-taupe) var(--c-bg-alt);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--c-bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--c-taupe);
  border: 3px solid var(--c-bg-alt);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-accent);
}

html, body {
  height: 100%;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

/* ---- Typography ---- */
html {
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-bg);
}

body {
  min-height: 100vh;
  /* Sticky footer */
  display: flex;
  flex-direction: column;
}

h1, h2 {
  font-family: var(--f-display);
  line-height: var(--lh-tight);
  font-weight: 700;
}

h1 {
  font-size: var(--fs-3xl);
}

h2 {
  font-size: var(--fs-2xl);
}

h3, h4, h5, h6 {
  font-family: var(--f-body);
  line-height: var(--lh-tight);
  font-weight: 700;
}

h3 {
  font-size: var(--fs-xl);
}

p {
  max-width: var(--measure);
}

a {
  color: var(--c-accent);
}

a:hover {
  color: var(--c-accent-hover);
}

.eyebrow,
nav,
time,
figcaption {
  font-family: var(--f-label);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

/* ---- Accessibility ---- */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-2);
  z-index: 100;
  background: var(--c-surface);
  color: var(--c-text);
  padding: var(--sp-1) var(--sp-2);
  border: 1px solid var(--c-border);
  font-family: var(--f-label);
  font-size: var(--fs-sm);
}

.skip-link:focus-visible {
  top: var(--sp-2);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Page transitions ----
   Used by pjax.js when moving between the home page and a post:
   the chrome stays put and only #main crossfades. ---- */
.site-checkerboard {
  view-transition-name: site-checkerboard;
}

.margin-band {
  view-transition-name: site-margin-band;
}

.site-header {
  view-transition-name: site-header;
}

.site-footer {
  view-transition-name: site-footer;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
