/* Reset and base element styles. */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-xl);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

::selection {
  background-color: var(--selection-bg);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
  color: var(--text);
}

p, li {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

hr {
  border: none;
  border-top: var(--border-width) solid var(--border);
  margin-block: var(--space-xl);
}

ul, ol {
  padding-inline-start: 1.25em;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* Visually hidden but available to screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The honeypot field: hidden from humans, present in the DOM for bots. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media print {
  .site-header,
  .site-footer,
  .comments,
  .post-nav {
    display: none;
  }
}
