:root {
  color-scheme: light dark;
  --page-bg: light-dark(#f8f6f1, #191c20);
  --page-text: light-dark(#292c30, #e0e2e5);
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

html {
  min-height: 100%;
  background-color: var(--page-bg);

}

body {
  max-width: 650px;
  margin: 40px auto;
  padding: 0 10px;
  color: var(--page-text);
  font: 16px/1.6 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.3;
}

h4,
h5,
h6 {
  font-weight: normal;
}

h1 {
  font-size: 2.025rem;
}

h2 {
  font-size: 1.6875rem;
}

h3 {
  font-size: 1.40625rem;
}

h4 {
  font-size: 1.125rem;
}

h5 {
  font-size: 1.0125rem;
}

h6 {
  font-size: 0.9rem;
}

a {
  color: inherit;
}

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

code,
pre,
kbd,
samp {
  font-family: inherit;
}

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  filter: grayscale(1);
}

.theme-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.25em 0;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.links .icon {
  width: 1em;
  height: 1em;
  flex: none;
}

.writing ul {
  padding: 0;
  list-style: none;
}

.writing li {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5em;
}

.writing time {
  white-space: nowrap;
}

.post-date {
  display: block;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}

.post-content > :first-child {
  margin-top: 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
}

.post-content pre,
.post-content .table-scroll {
  overflow-x: auto;
}

.currently-using a,
.currently-exploring a {
  text-underline-offset: 0.15em;
}

:root[data-theme="dark"] .links .icon {
  filter: invert(1);
}

@media (forced-colors: active) {
  html {
    background: Canvas;
  }

  body {
    color: CanvasText;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .links .icon {
    filter: invert(1);
  }
}
