@font-face {
  font-family: "Departure Mono";
  src: url("/assets/DepartureMono-Regular.woff2") format("woff2");
  font-display: swap;
  font-feature-settings: "locl";
}

:root {
  color-scheme: light dark;
  --accent: #e96f18;
  --background: #f2f0e9;
  --foreground: #191918;
  --muted: #67665f;
  --rule: #c7c4ba;
  --page-gutter: clamp(22px, 7vw, 132px);
  --measure: 66ch;
  font-family: "Departure Mono", monospace;
  font-size: 22px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #191918;
    --foreground: #e8e5dc;
    --muted: #aaa79d;
    --rule: #484740;
  }
}

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

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 280px;
  color: var(--foreground);
  background: var(--background);
  line-height: 1.5;
  cursor: url("/assets/arrow.svg") 0 0, default;
}

::selection {
  color: var(--background);
  background: var(--accent);
}

a {
  color: currentColor;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  cursor: url("/assets/pointer.svg") 5 0, pointer;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 11px;
  left: 11px;
  padding: 11px;
  color: var(--background);
  background: var(--foreground);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
.post {
  margin-left: var(--page-gutter);
  margin-right: 22px;
  max-width: var(--measure);
}

.site-header {
  padding: 33px 0 66px;
}

.site-title {
  font-size: 22px;
  line-height: 33px;
  text-decoration: none;
  text-transform: lowercase;
}

.post-header {
  padding-bottom: 44px;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 44px;
}

.post + .post {
  margin-top: 132px;
  padding-top: 66px;
  border-top: 2px solid var(--rule);
}

.eyebrow,
.metadata,
figcaption,
.site-footer {
  color: var(--muted);
  font-size: 11px;
  line-height: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent);
}

.post-title {
  max-width: 15ch;
  margin: 0 0 33px;
  font-size: 55px;
  font-weight: 400;
  line-height: 66px;
  letter-spacing: -0.025em;
}

.metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0 11px;
  margin: 0;
}

.post > p,
.post > ol,
.post > ul,
.post > blockquote {
  margin-top: 0;
  margin-bottom: 33px;
}

.lede {
  font-size: 22px;
  line-height: 33px;
  color: var(--accent);
}

.post h2,
.post h3,
.post h4,
.post h5,
.post h6,
.section-label {
  font-weight: 400;
}

.post h2 {
  margin: 88px 0 33px;
  font-size: 44px;
  line-height: 55px;
  letter-spacing: -0.02em;
}

.post h3 {
  margin: 66px 0 33px;
  padding-top: 22px;
  border-top: 2px solid var(--rule);
  font-size: 33px;
  line-height: 44px;
}

.post h4 {
  margin: 55px 0 22px;
  font-size: 22px;
  line-height: 33px;
  color: var(--accent);
}

.post h5 {
  margin: 44px 0 22px;
  font-size: 22px;
  line-height: 33px;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.22em;
}

.post h6 {
  margin: 44px 0 22px;
  font-size: 22px;
  line-height: 33px;
}

.post h6::before {
  content: "// ";
  color: var(--accent);
}

.section-label {
  margin: 44px 0 22px;
  color: var(--muted);
  font-size: 11px;
  line-height: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

blockquote {
  padding: 22px 0 22px 22px;
  border-left: 11px solid var(--accent);
}

blockquote p {
  margin: 0 0 11px;
  font-size: 22px;
  line-height: 33px;
}

blockquote cite {
  color: var(--muted);
  font-size: 11px;
  line-height: 22px;
  font-style: normal;
  text-transform: uppercase;
}

pre {
  max-width: 100%;
  margin: 0 0 33px;
  padding: 22px;
  overflow-x: auto;
  border: 2px solid var(--rule);
  font: inherit;
  font-size: 11px;
  line-height: 22px;
}

code {
  color: var(--accent);
  font-family: inherit;
}

pre code {
  color: inherit;
}

hr {
  margin: 66px 0;
  border: 0;
  border-top: 2px solid var(--rule);
}

ol,
ul {
  padding-left: 33px;
}

li {
  margin-bottom: 11px;
  padding-left: 11px;
}

ul {
  list-style: none;
}

ul li {
  position: relative;
}

ul li::before {
  content: "◊";
  position: absolute;
  right: calc(100% + 11px);
  color: var(--accent);
}

ol li::marker {
  color: var(--accent);
}

figure {
  margin: 55px 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--rule);
  filter: grayscale(1) contrast(1.06);
}

.image-dithered img,
img.image-dithered {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

figcaption {
  margin-top: 11px;
}

.image-full {
  width: min(1100px, calc(100vw - var(--page-gutter) - 22px));
}

.image-inline {
  float: left;
  width: min(50%, 330px);
  margin: 0 33px 22px 0;
}

.postscript {
  clear: both;
  padding-top: 33px;
  border-top: 2px solid var(--rule);
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 66px 0 44px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 700px) {
  :root {
    --page-gutter: 22px;
  }

  .site-header {
    padding-bottom: 44px;
  }

  .post-title,
  .post h2 {
    font-size: 33px;
    line-height: 44px;
  }

  .post h3 {
    font-size: 22px;
    line-height: 33px;
  }

  .image-inline {
    float: none;
    width: 100%;
    margin: 44px 0;
  }

  .image-full {
    width: 100%;
    max-width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}

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