:root { color-scheme: light dark; }

body {
  margin: 0;
  font: 18px/1.6 system-ui, sans-serif;
}

body > header,
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

body > header {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

main { padding-bottom: 4rem; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.site-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.site-title a { text-decoration: none; }

/* Back-to-index triangle on a post. Drawn as a pseudo-element so it never
   enters the accessibility tree: it is redundant with the link text, and a
   screen reader announcing "triangle" would be noise. currentColor keeps it
   in step with the light and dark schemes; em units keep it in step with the
   font size. inline-flex centres it against the text without magic offsets. */
.back-link a {
  display: inline-flex;
  align-items: center;
  gap: .3em;
}

.back-link a::before {
  content: "";
  width: .38em;
  height: .52em;
  background: currentColor;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}

/* Available to assistive tech, removed from the visual design. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.intro {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.intro p { margin: 0; }

.site-image {
  flex: none;
  width: 120px;
  height: auto;
  border-radius: 50%;
}

@media (max-width: 480px) {
  .intro {
    flex-direction: column;
    align-items: flex-start;
  }
}

h1, h2, h3 { line-height: 1.2; }

.date, time { opacity: .65; }

.posts {
  list-style: none;
  padding: 0;
}

.posts li { margin: .6rem 0; }

.posts time {
  display: inline-block;
  width: 7rem;
  font-variant-numeric: tabular-nums;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  background: rgba(127,127,127,.12);
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* opacity rather than a fixed grey, so the contrast ratio holds up in both
   the light and dark schemes. */
.sub_description {
  font-size: 16px;
  opacity: .65;
}
