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

html {
  font: clamp(1.333rem, 1rem + 0.666vw, 2rem) / 1.4 system-ui, sans-serif;
  font-synthesis: none;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  tab-size: 2;
  hanging-punctuation: first allow-end last;
  word-break: break-word;
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
p,
figure,
blockquote {
  margin-block-end: 0;
}

body {
  margin: 0 auto;
  width: clamp(350px, 85%, 860px);
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: hsl(240, 15%, 6%);
  color: hsl(0, 0%, 87%);
}

ul {
  list-style: none;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style-position: inside;
  ul,
  ol {
    padding-inline-start: 2ch;
  }
}

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

input,
button,
select {
  font: inherit;
}

p {
  text-wrap: pretty;
  max-inline-size: 66ch;
}

h1,
h2,
h3 {
  text-wrap: balance;
  margin-block-start: 0;
}
h1,
h2 {
  font-weight: 900;
  letter-spacing: -0.02rem;
}
h1,
h2,
h3 {
  line-height: 1.1;
}

a {
  color: hsl(196, 100%, 46%);
  text-underline-offset: 2px;
  text-decoration-skip-ink: auto;
  &:not(:is(:hover, :focus)) {
    text-decoration-color: color-mix(in srgb, currentColor, transparent 50%);
  }
}

hr {
  border-style: solid;
  border-width: 1px 0 0;
  color: inherit;
  height: 0;
  overflow: visible;
  margin-block: 2.5rem;
}

:target {
  scroll-margin-block: 5ex;
}

article {
  padding-block: 2em;
}

time {
  font-size: 0.666rem;
  color: hsl(0, 0%, 75%);
}
