:root {
  --background: #fff;
  --text: #333;
  --nav_link: #17050f;
  --link: #03a9f4;
  --link_visited: #0070a0;

  --tag: #03a9f4;
  --border_dashed: #e0e0e0;
  --gray: #c0c0c0;
  --middlegray: #666;
  --blue: #0366d6;
  --prism_code: #efe6e0;

  --size_xxs: .5rem;
  --size_xs: .8rem;
  --size_s: 1rem;
  --size_m: 1.6rem;
  --size_l: 2.2rem;
  --size_xl: 2.8rem;
  --size_xxl: 3.4rem;
  --size_xxxl: 4.5rem;

  --max-width: 75ch;
  --max-text-width: 55ch;

  --side-space: 3vw;

  --font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,
  sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;

  --font-family-header: Futura,-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,
  sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: rgb(0, 0, 0);
    --text: rgb(196, 196, 196);
    --nav_link: rgb(230, 230, 230);
    --link: #0b9ee2;
    --link_visited: #0692d3;

    --tag: #0990ce;
    --border_dashed: #4f4f4f;
    --gray: #c0c0c0;
    --middlegray: #666;

    
    --blue: #0366d6;

    --prism_code: #e1ccb7;
  }
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html{ 
  scroll-behavior:smooth;
  color-scheme: light;
  accent-color: var(--link);
  font-size: 62.5%; /* =10px */
  line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
    accent-color: var(--link);
  }
}

html,
body {
  padding: 0;
  margin: 0;
  font-family: var(--font-family);
  color: var(--text);
}

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


.game-background {
  position: fixed;
  width: 100%;
  height: 100%;
  display: block;
  margin: 0;
  padding: 0;
  z-index: -1;
  background-color: var(--background);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-family-header);
}

h1 {
  font-size: var(--size_xxl);
}
h2 {
  font-size: var(--size_xl);
}
h4 {
  font-size: var(--size_l);
}
h5 {
  font-size: var(--size_m);
}

li,
p {
  font-size: var(--size_m);
  max-inline-size: 66ch;
  max-inline-size: var(--max-text-width);
}

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

a:visited {
  color: var(--link_visited);
}

a:is(:hover, :active) {
  text-decoration: underline;
}

/* alternatives 🎦 🎞️ 🍿 📺  🎬 🎥 ▶ 🖥️ ➡️ */
/* 
a[href*="youtube"]::before {
  content: "▶";
  border: 1px solid var(--text);
  border-radius: 0.25em;
  margin-right: 0.25em;
  width: 1.25em;
  display: inline-block;
  text-align: center;
  opacity: 0.5;
} */
/* alternatives 🎦 🎞️ 🍿 📺  🎬 🎥 ▶ 🖥️ ➡️ */
a[href*="youtube"]::before {
  content: "🎦";
  margin-right: 0.25em;
  opacity: 0.8;
}
a[href*="youtube"]:hover::before {
  opacity: 1;
}

a[href*="goodreads"]::before,
a[href*="ebookpoint"]::before {
  content: "📕";
  margin-right: 0.25em;
}

/* podcast: 🎙️ 📻 */
a[href*="npr"]::before,
a[href*="simplecast"]::before,
a[href*="overcast"]::before {
  content: "🎙️";
  margin-right: 0.25em;
}

main,
.markdown-body {
  padding: var(--side-space);
}
.recommended-things {
  margin-inline: var(--side-space);
}
@media (min-width: 767px) {
  main,
  .markdown-body {
    padding: var(--size_xxxl);
  }
}


main,
.markdown-body {
  box-sizing: border-box;
  min-width: 200px;
  margin: 0 auto;
  color: var(--text);
}

main {
  max-width: 980px;
}

main *:target {
  /* fixes scolling of #id links past them */
  scroll-snap-margin-top: 100px;
  scroll-margin-top: 100px;
}

.markdown-body {
  max-width: var(--max-width);
}

main :first-child {
  margin-top: 0;
}

p:last-child {
  margin-bottom: 0;
}

.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol {
  max-width: var(--max-text-width);
}

.markdown-body blockquote a {
  color: inherit;
}

img {
  margin: 0 auto;
  display: block;
}

/* Header */
.page-header {
  box-shadow: 2px 0 5px var(--gray);
  display: flex;
  flex-wrap: wrap;
  background-color: var(--background);
  position: sticky;
  top: 0;
  padding-bottom: var(--size_xxs);
  z-index: 1;
}

.page-header a {
  font-size: var(--size_l);
  color: var(--nav_link);
  font-variant: all-small-caps;
  padding: var(--size_xs) var(--side-space);
  text-decoration: none;
}

.page-header a:visited {
  color: var(--nav_link);
}
.page-header a:is(:hover, :active) {
  text-decoration: underline;
}

.page-header:after {
  content: "";
  display: table;
  clear: both;
}


/* Nav */
.home,
.nav {
  float: left;
  margin: 0;
  margin-block: var(--size_xxs);
  font-size: var(--size_l);
  padding: 0;
  font-family: var(--font-family-header);
}

.home {
  font-size: var(--size_l);
}

.home a {
  padding-inline: var(--side-space);
}

.home :link:not(:hover) {
  text-decoration: none;
}

.nav {
  list-style: none;

}
.nav-item {
  display: inline-block;
  margin-right: var(--size_xs);
}
header .nav {
  text-align: right;
  flex: 1;
}
header .nav-item {
  display: none;
  
}
@media (min-width: 30rem) {
  header .nav-item {
    display: inline-block;
  }
}

header .nav-item__more {
  display: inline-block;
}

.nav-item:last-child {
  margin-right: 0;
}



.nav-item a[href]:hover {
  text-decoration: underline;
}
.nav-item-active {
  font-weight: 700;
  text-decoration: underline;
}

@media screen and (min-width: 500px) {
  .home {
    margin-block: var(--size_xs);
  }
  .page-header .nav {
    margin-block: var(--size_xs);
  }
}

@media screen and (min-width: 680px) {
  .home {
    margin-block: var(--size_s);
  }
  .page-header .nav {
    margin: var(--size_s);
  }

  .page-header .nav-item {
    margin-right: var(--size_s);
  }
}


footer {
  font-size: var(--size_m);
}
footer:after {
  content: "";
  display: table;
  clear: both;
}

.footer-content {
  display: flex;
  flex-direction: column;
  padding: var(--size_xs);
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  margin-bottom: var(--size_xxxl);
}

.footer-content-links {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: var(--side-space);
}

.footer-vertical-wrapper {
  display: flex;
  max-width: var(--max-width);
}

.footer-vertical-wrapper .nav,
.horizontal-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

footer .nav-item {
  margin-bottom: var(--size_s);
}

@media screen and (min-width: 700px) {
  .footer-content-links {
    flex-direction: row;
  }

  .footer-vertical-wrapper,
  .horizontal-wrapper {
    flex-grow: 1;
    min-width: 13rem;
  }

}

.game-toggle {
  display: none;
}

@media (update: fast) and (prefers-reduced-motion: no-preference) {
  .game-toggle {
      display: block;
      font-size: var(--size_m);
      padding: 0 var(--size_s);
      color: var(--text);
      background-color: var(--background);
      width: 100%;
      cursor: pointer;
      border: 1px solid;
      padding: var(--size_m) 0;
      text-align: center;
      max-width: 300px;
      margin: 0 auto;
    }
  
    .game-toggle:hover {
      color: var(--link);
    }
  
    .game-toggle:hover,
    .game-toggle:active {
      box-shadow: 0px 0px var(--size_m) 0px var(--link);
    }
}



.newsletter-form {
  font-size: var(--size_m);
  max-width: 600px;
}

.newsletter-form #mc_embed_signup .button {
  font-size: var(--size_l);
  height: var(--size_xxxl);
  padding: 0 var(--size_xxl);
  margin: var(--size_l) 0;
}

.newsletter-form #mc_embed_signup .button:hover {
  background-color: var(--link);
}

/* Posts list */
.postlist {
  list-style: none;
  padding: 0;
}
.postlist-item {
  margin-bottom: var(--size_xxl)
}

.postlist-date {
  font-size: var(--size_m);
  display: inline-block;
  word-spacing: -0.5px;
  color: var(--text);
}
.postlist-link {
  font-size: var(--size_xl);
  display: inline-block;
  padding: 0; /* 4px 3px */
  text-decoration: none;
}

.postlist-link:hover {
  text-decoration: underline;
}

.postlist-item-active .postlist-link {
  font-weight: bold;
}
.postlist-description {
  font-size: var(--size_m);
  color: var(--text);
  margin: 0.1rem 0 0.5rem;
}

.tmpl-home img {
  float: right;
  width: 120px;
  border-radius: 50%;
}
.tmpl-home .postlist-link {
  font-weight: 700;
  display: inline;
}

/* Tags */
.tags {
  margin: 0var(--size_s);
  display: inline-block;
}
.tags .tag {
  display: inline-block;
  text-transform: uppercase;
  font-size: var(--size_m);
  padding: 2px 4px;
  margin-left: 0.8em; /* 8px /10 */
  background-color: var(--tag);
  color: var(--background);
  border-radius: 0.25em; /* 3px /12 */
  text-decoration: none;
}
.tags-list .tag {
  font-size: var(--size_m);
  margin: var(--size_s);
  padding: var(--size_xs) var(--size_m);
}
.tags a[href].tag,
.tags a[href].tag:visited {
  color: var(--background);
}
.tags a[href].tag:is(:hover, :active) {
  text-decoration: underline;
}

.see-more {
  font-size: var(--size_m);
}

/* Direct Links / Markdown Headers */
.direct-link {
  font-family: sans-serif;
  text-decoration: none;
  font-style: normal;
  margin-left: 0.1rem;
}
a[href].direct-link,
a[href].direct-link:visited {
  color: transparent;
}
a[href].direct-link:focus,
a[href].direct-link:focus:visited,
:hover > a[href].direct-link,
:hover > a[href].direct-link:visited {
  color: #aaa;
}

pre:has(code) {
  filter: contrast(1.2);
}

code,
.markdown-body pre,
.markdown-body pre code {
  background: var(--prism_code);
  border-radius: 3px;
  font-size: 85%;
  margin: 0;
  padding: .2em .4em;
  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  font-size: 0.9em;

  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

pre[class*="language-"] {
  margin: 2em 0;
  font-size: 85%;
  padding: 16px;
}

.post-header {
  margin-bottom: 2em;
  border-bottom: none;
}

.post-author,
.post-date {
  margin-right: var(--size_s);
  display: inline-block;
  word-spacing: -0.5px;
  color: var(--middlegray);
  font-size: var(--size_m);
}

.post-description {
  color: var(--middlegray);
  margin-left: 0;
  margin-bottom: 1em;
}

.footnote-ref a {
  font-size: var(--size_m);
  letter-spacing: 0.2rem;
}

.recommended-things {
  display: flex;
  flex-direction: column;
  border: 1px dashed var(--border_dashed);
  padding: 0 var(--size_m);
  margin-block: auto;
}

.recommended-things--hidden {
  display: none;
}

.recommended-things__title {
  color: var(--text);
}

.recommended-things__list {
  display: flex;
  justify-content: space-between;
  padding: 0;
  overflow: hidden;
  max-width: none !important;
}

.recommended-things__item {
  max-width: 200px;
  margin: 0 auto;
  list-style-type: none;
  display: none;
}

.recommended-things__item:first-child {
  display: block;
}

.recommended-things__link {
  text-decoration: none;
}

.recommended-things__link:hover,
.recommended-things__link:active {
  text-decoration: underline;
}

img.recommended-things__image {
  max-width: 120px;
  max-height: 200px;
  float: none;
  border-radius: 0;
}

.recommended-things__name {
  font-size: var(--size_m);
  text-align: center;
}

@media screen and (min-width: 400px) {
  .recommended-things__item:nth-child(2) {
    display: block;
  }
}

@media screen and (min-width: 700px) {
  .recommended-things__item:nth-child(3) {
    display: block;
  }
}

@media screen and (min-width: 900px) {
  .recommended-things__item:nth-child(4) {
    display: block;
  }
}


/* sharing */

.resp-sharing-button__link,
.resp-sharing-button__icon {
  display: inline-block;
  font-size: var(--size_m);
}

a.resp-sharing-button__link,
a.resp-sharing-button__link:visited {
  text-decoration: none;
  color: #fff;
  margin: 0.5em
}

.resp-sharing-button {
  border-radius: 5px;
  transition: 25ms ease-out;
  padding: 0.5em 0.75em;
}

.resp-sharing-button__icon svg {
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: initial;
}

.resp-sharing-button--small svg {
  margin: 0;
  vertical-align: middle
}

/* Non solid icons get a stroke */
.resp-sharing-button__icon {
  stroke: #fff;
  fill: none;
  vertical-align: middle;
}

/* Solid icons get a fill */
.resp-sharing-button__icon--solid,
.resp-sharing-button__icon--solidcircle {
  fill: #fff;
  stroke: none
}

.resp-sharing-button--twitter {
  background-color: #55acee
}

.resp-sharing-button--twitter:hover {
  background-color: #2795e9
}


.resp-sharing-button--facebook {
  background-color: #3b5998
}

.resp-sharing-button--facebook:hover {
  background-color: #2d4373
}


.resp-sharing-button--linkedin {
  background-color: #0077b5
}

.resp-sharing-button--linkedin:hover {
  background-color: #046293
}

.resp-sharing-button--email {
  background-color: #777
}

.resp-sharing-button--email:hover {
  background-color: #5e5e5e
}


.resp-sharing-button--hackernews {
background-color: #FF6600
}
.resp-sharing-button--hackernews:hover,
.resp-sharing-button--hackernews:focus {   
  background-color: #FB6200 
}

#menu:target {
  outline: 1px dotted var(--blue);
}

@media (update: fast) and (prefers-reduced-motion: no-preference) {
  @keyframes highlight {
    from {
      background-color: var(--blue);
      opacity: 0.5;
    }

    to {
      background-color: transparent;
      opacity: 1;
    }
  }

  #menu:target {
    animation: 2s ease-out 0.2s highlight;
  }
}