:root {
  color-scheme: light dark;
  --background: #fff;
  --navigation: #fff;
  --text: #595959;
  --heading: #171717;
  --muted: #686868;
  --link: #000;
  --underline: #dedede;
  --hover: #efefef;
  --rule: #e7e7e7;
  --accent: #97520e;
}

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

html {
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

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

p a,
.masthead a {
  font-weight: 500;
  box-shadow: inset 0 -2px 0 var(--underline);
  transition: all 0.35s cubic-bezier(0.7, 0, 0.3, 1);
}

p a:hover,
.masthead a:hover {
  box-shadow: inset 0 -25px 0 var(--hover);
}

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

.masthead {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 14px 25px;
  background: var(--navigation);
  font-size: 13px;
  line-height: 1.4;
}

.identity {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
}

.identity > a,
.identity > a:hover {
  box-shadow: none;
}

.avatar {
  display: block;
  width: 26px;
  height: 26px;
  padding: 2px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

.site-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.masthead nav {
  margin-left: auto;
}

.masthead nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.masthead a {
  font-weight: 500;
  text-decoration: none;
}

.layout {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 34px 25px 25px;
}

.archives {
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
}

.archives h2 {
  margin: 0 0 1rem;
  font-size: 20px;
  font-weight: 600;
}

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

.archives li {
  display: flex;
  align-items: baseline;
  gap: 0.45em;
}

.archives li::before {
  content: "\2192" / "";
  flex: none;
  color: var(--muted);
}

.archives li + li {
  margin-top: 0.9rem;
}

.archives a {
  min-width: 0;
  text-decoration: none;
}

[id] {
  scroll-margin-top: 2rem;
}

h2,
h3 {
  color: var(--heading);
  line-height: 1.35;
  text-wrap: balance;
}

h2 {
  font-size: 25px;
  font-weight: 600;
}

h3 {
  margin: 1.6em 0 0;
  font-size: 20px;
  font-weight: 600;
}

.post-title {
  margin: 0;
}

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

p {
  margin: 1em 0 0;
}

.deck {
  margin-top: 0.65em;
  font-size: 1.08em;
  color: var(--muted);
}

strong,
b {
  color: var(--heading);
  font-weight: 600;
}

blockquote {
  margin: 1em 0 0;
  padding-left: 15px;
  border-left: 2px solid var(--rule);
  font-style: italic;
}

.e-content ul,
.e-content ol {
  margin: 1em 0 0;
  padding-left: 1.4em;
}

.e-content li + li {
  margin-top: 0.45em;
}

.e-content img,
.e-content video {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 1em;
  border-radius: 5px;
}

.post-meta {
  margin-top: 1.4rem;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
}

.post-meta a,
.post-meta a:hover {
  color: #bbb;
  text-decoration: none;
  box-shadow: none;
  transition: none;
}

.page-content {
  min-width: 0;
}

@media (min-width: 1100px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    align-items: start;
    gap: 3.5rem;
    max-width: 76rem;
  }

  #posts {
    min-width: 0;
  }

  .e-content {
    max-width: 40rem;
  }

  .post-title,
  .archives a {
    white-space: nowrap;
    text-wrap: nowrap;
  }

  .archives {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .archives h2 {
    font-size: 15px;
    line-height: 1.7;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #151414;
    --navigation: #2a2828;
    --text: #e5e9ec;
    --heading: #e5e9ec;
    --muted: #aeb7c1;
    --link: #b8c3cc;
    --underline: #738296;
    --hover: #303237;
    --rule: #343b42;
    --accent: #a1b9e4;
  }

  .masthead {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  p a,
  p a:hover,
  .masthead a,
  .masthead a:hover,
  .post-title a,
  .archives a {
    box-shadow: none;
    transition: none;
  }

  .masthead a {
    color: #90a3ca;
  }

  .masthead a:hover {
    color: #b8c3cc;
  }

  .post-meta a {
    color: #90a3ca;
  }

  .post-meta a:hover {
    color: #e5e9ec;
  }

  .archives a {
    color: #fff;
  }

  .e-content p a {
    text-decoration: underline;
  }
}

@media (max-width: 760px) {
  .masthead {
    gap: 0.8rem 1rem;
  }

  .masthead nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  html {
    scroll-padding-top: 8rem;
  }
}

@media (max-width: 600px) {
  html {
    scroll-padding-top: 1rem;
  }

  .masthead {
    position: static;
    padding: 17px 22px;
  }

  .layout {
    padding: 28px 22px 20px;
  }

  h2 {
    font-size: 23px;
  }

  h3 {
    font-size: 19px;
  }
}
