* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
}

:root {
  --lh: 1.5em;
  --page: #f2f2f2;
  --ink: #000;
  --muted: #555;
  --code: #e5e5e5;
  --code-border: #d5d5d5;
}

::selection {
  color: var(--ink);
  background: #ddd;
}

html {
  height: 100%;
  margin-left: calc(-100% + 100vw);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: grid;
  min-height: 100%;
  padding: 16vh 2em 0;
  grid-template-columns: minmax(auto, 64ch);
  grid-template-rows: 1fr auto;
  justify-content: center;
  color: var(--ink);
  background: var(--page);
  font: 1em/var(--lh) monospace;
}

a {
  display: inline-block;
  margin-left: -0.16666em;
  padding: 0.16666em;
  text-decoration: none;
}

a i {
  border-bottom: 1px dotted;
  font-style: normal;
}

a:active i {
  border: 0;
}

.identity {
  margin-bottom: calc(var(--lh) * 2);
}

.featured {
  margin-bottom: calc(var(--lh) * 2);
}

.writing {
  margin-bottom: calc(var(--lh) * 2);
}

.featured h2,
.writing h2,
.featured > p,
.writing > p {
  margin-bottom: var(--lh);
}

.featured h2 a i,
.writing h2 a i,
.collection h2 a i {
  border-bottom: 0;
}

.featured h2 a,
.writing h2 a,
.collection h2 a {
  margin: 0;
  padding: 0;
}

.featured ol {
  margin: 0;
  list-style: none;
}

.logo {
  display: block;
  width: auto;
  height: 4.75em;
  object-fit: contain;
}

.logo-link {
  display: block;
  margin: 0 0 calc(var(--lh) / 2);
  padding: 0;
}

.logo-link:focus-visible {
  outline: 1px dotted currentColor;
  outline-offset: 4px;
}

h1 {
  margin: 0;
}

.title {
  margin: 0;
  color: var(--muted);
}

.post .identity h1,
.post .identity .title {
  margin-bottom: 0;
}

main > p,
nav {
  margin-bottom: var(--lh);
}

nav,
.v {
  margin-top: -0.16666em;
}

.v a {
  margin-left: -1em;
  padding-right: 1em;
  padding-left: 1em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

footer {
  padding: calc(var(--lh) * 2) 0 8vh;
}

footer p {
  margin: 0;
}

footer a,
footer a i {
  border-bottom: 0;
}

.footer-status {
  color: var(--muted);
}

.post h1,
.post h2,
.post h3,
.post p,
.post pre,
.post blockquote {
  margin-bottom: var(--lh);
}

.post article img,
.post article video {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: var(--lh);
}

.post ul,
.post ol {
  margin: 0 0 var(--lh) 2ch;
}

.post ul {
  list-style: none;
}

.post ul li {
  text-indent: -2ch;
}

.post ul li::before {
  content: "* ";
}

.post a {
  display: inline;
  margin: 0;
  padding: 0;
  border-bottom: 0;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.post .logo-link {
  display: block;
  margin: 0 0 calc(var(--lh) / 2);
  padding: 0;
  border-bottom: 0;
}

.post blockquote {
  padding-left: 2ch;
  border-left: 1px solid var(--muted);
}

.post pre {
  overflow: auto;
  padding: calc(var(--lh) / 2);
  border: 1px solid var(--code-border);
  border-radius: 3px;
  background: var(--code);
}

.post code {
  background: var(--code);
}

.post pre code {
  background: transparent;
}

.post time {
  display: block;
}

.archive .project-list {
  margin-left: 0;
  list-style: none;
}

.archive a {
  display: inline-block;
  margin-left: -0.16666em;
  padding: 0.16666em;
  border-bottom: 0;
}

.not-found {
  max-width: 42ch;
}

.not-found h1,
.not-found > p {
  margin-bottom: var(--lh);
}

.not-found nav {
  margin-top: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #171717;
    --ink: #ededed;
    --muted: #aaa;
    --code: #252525;
    --code-border: #3a3a3a;
  }

  ::selection {
    color: #fff;
    background: #555;
  }

  .logo {
    filter: none;
  }
}

@media (max-device-width: 600px), (max-width: 600px) {
  body {
    padding-top: 2em;
    justify-content: start;
  }

  footer {
    padding-bottom: 2em;
  }

  a i {
    border-color: #888;
  }

  .post pre {
    max-width: calc(100vw - 4em);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

}
