:root {
  color-scheme: light;
  --page-bg: #fff;
  --surface-bg: #fff;
  --text-color: #303532;
  --muted-color: #555;
  --border-color: #d9dedb;
  --hover-bg: #eef1ef;
  --link-color: #4EA3D0;
  --inline-code-bg: #f1f0ef;
  --code-block-bg: #f3f4f3;
  --inline-code-color: #c84b45;
  color: var(--text-color);
  background: var(--page-bg);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #292c2a;
  --surface-bg: #323533;
  --text-color: #e6e9e7;
  --muted-color: #aeb6b1;
  --border-color: #414a45;
  --hover-bg: #343d38;
  --link-color: #4EA3D0;
  --inline-code-bg: #393431;
  --code-block-bg: #393d3a;
  --inline-code-color: #f08a80;
  --syntax-error-color: #ff9292;
  --syntax-comment-color: #9eaaa6;
  --syntax-attribute-color: #e7c77c;
  --syntax-number-color: #8ed8bd;
  --syntax-keyword-color: #ffad87;
  --syntax-special-color: #9bc8ff;
  --syntax-constant-color: #f2a0a0;
  --syntax-function-color: #9ec2ff;
  --syntax-operator-color: #d6ddd9;
  --syntax-preprocessor-color: #e6c77c;
  --syntax-string-color: #b6d692;
  --syntax-variable-color: #d5b7f5;
}

:root[data-font-style="serif"] {
  font-family: Georgia, "Times New Roman", serif;
}

:root[data-font-style="mono"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

header {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0 1rem;
}

.site-header-content,
footer > a {
  display: block;
  max-width: 40rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

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

.site-header-tools {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.font-picker {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  position: relative;
}

.font-picker summary {
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  font-family: inherit;
  font-size: 1.25rem;
  height: 2.25rem;
  justify-content: center;
  line-height: 1;
  list-style: none;
  width: 2.5rem;
}

.font-picker summary::-webkit-details-marker {
  display: none;
}

.font-picker-menu {
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 12%);
  padding: 1rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: min(17.5rem, calc(100vw - 2rem));
  z-index: 1;
}

.font-picker-title {
  color: var(--muted-color);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.font-options {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.font-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  justify-content: center;
  min-height: 4.8rem;
  padding: 0.35rem;
}

.font-sample {
  font-size: 2.3rem;
  line-height: 1.2;
}

.font-sample--default {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.font-sample--serif {
  font-family: Georgia, "Times New Roman", serif;
}

.font-sample--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.font-option:hover {
  background: var(--hover-bg);
}

:root:not([data-font-style]) .font-option[data-font-style="default"],
:root[data-font-style="default"] .font-option[data-font-style="default"],
:root[data-font-style="serif"] .font-option[data-font-style="serif"],
:root[data-font-style="mono"] .font-option[data-font-style="mono"] {
  background: var(--hover-bg);
  box-shadow: inset 0 0 0 1px var(--link-color);
}

.appearance-settings {
  border-top: 1px solid var(--border-color);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.appearance-settings h3 {
  color: var(--muted-color);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.35rem;
}

.theme-setting {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 2.5rem;
}

.theme-setting input {
  appearance: none;
  background: #d8dbd9;
  border: 0;
  border-radius: 1rem;
  cursor: pointer;
  height: 1.65rem;
  margin: 0;
  position: relative;
  transition: background-color 150ms ease;
  width: 3.35rem;
}

.theme-setting input::before {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 1.25rem;
  left: 0.2rem;
  position: absolute;
  top: 0.2rem;
  transition: transform 150ms ease;
  width: 1.25rem;
}

.theme-setting input:checked {
  background: #2583e5;
}

.theme-setting input:checked::before {
  transform: translateX(1.7rem);
}

.theme-setting input:focus-visible {
  outline: 3px solid #a94717;
  outline-offset: 3px;
}

.font-picker-menu button:focus-visible,
.font-picker summary:focus-visible {
  outline: 3px solid #a94717;
  outline-offset: 2px;
}

main {
  flex: 1;
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  padding: 2.5rem 1rem;
}

footer {
  border-top: 1px solid var(--border-color);
  color: var(--muted-color);
  font-size: 0.9rem;
  padding: 1rem 0 1.5rem;
}

.site-title {
  font-size: 1.2rem;
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 1.5em 0 0.65em;
}

h1 {
  font-size: 2.15rem;
  margin-top: 0;
}

h2 {
  font-size: 1.55rem;
}

h3 {
  font-size: 1.2rem;
}

p,
ul,
ol,
blockquote,
pre {
  margin-top: 0;
  margin-bottom: 1rem;
}

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

a {
  color: var(--link-color);
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid #a94717;
  outline-offset: 3px;
}

.post-date {
  color: var(--muted-color);
  font-size: 0.9em;
}

blockquote {
  border-left: 3px solid #aeb6b0;
  margin-left: 0;
  padding-left: 1rem;
}

code {
  background: var(--inline-code-bg);
  border-radius: 4px;
  color: var(--inline-code-color);
  font-size: 0.9em;
  padding: 0.12em 0.32em;
}

pre {
  background: var(--code-block-bg);
  border-radius: 4px;
  max-width: 100%;
  overflow-x: auto;
  font-size: 0.9rem; /* monospace fonts can look too large otherwise */
  padding: 1rem;
}

/* Pandoc scrolls this wrapper, so keep the block surface here to clip overflow. */
div.sourceCode {
  background: var(--code-block-bg);
  border-radius: 4px;
}

/* Let the wrapper scroll instead of creating a nested scroll area. */
div.sourceCode pre.sourceCode {
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

pre code {
  background: transparent;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
  padding: 0;
}

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

:root[data-theme="dark"] code span.al,
:root[data-theme="dark"] code span.er {
  color: var(--syntax-error-color);
}

:root[data-theme="dark"] code span.an,
:root[data-theme="dark"] code span.co,
:root[data-theme="dark"] code span.cv,
:root[data-theme="dark"] code span.do,
:root[data-theme="dark"] code span.in,
:root[data-theme="dark"] code span.wa {
  color: var(--syntax-comment-color);
}

:root[data-theme="dark"] code span.at,
:root[data-theme="dark"] code span.dt {
  color: var(--syntax-attribute-color);
}

:root[data-theme="dark"] code span.bn,
:root[data-theme="dark"] code span.dv,
:root[data-theme="dark"] code span.fl {
  color: var(--syntax-number-color);
}

:root[data-theme="dark"] code span.cf,
:root[data-theme="dark"] code span.im,
:root[data-theme="dark"] code span.kw,
:root[data-theme="dark"] code span.ot {
  color: var(--syntax-keyword-color);
}

:root[data-theme="dark"] code span.ch,
:root[data-theme="dark"] code span.sc,
:root[data-theme="dark"] code span.vs {
  color: var(--syntax-special-color);
}

:root[data-theme="dark"] code span.cn {
  color: var(--syntax-constant-color);
}

:root[data-theme="dark"] code span.bu,
:root[data-theme="dark"] code span.fu {
  color: var(--syntax-function-color);
}

:root[data-theme="dark"] code span.op {
  color: var(--syntax-operator-color);
}

:root[data-theme="dark"] code span.pp {
  color: var(--syntax-preprocessor-color);
}

:root[data-theme="dark"] code span.ss,
:root[data-theme="dark"] code span.st {
  color: var(--syntax-string-color);
}

:root[data-theme="dark"] code span.va {
  color: var(--syntax-variable-color);
}