/* Layout */

body {
  font-family: 'IBM Plex Sans', sans-serif;
  display: flex;
  flex-flow: row;
}

body>header {
  text-align: center;
}

body>header h1 {
  width: 5em;
  font-size: 2em;
  margin: 0 auto;
  font-family: 'IBM Plex Mono';
  font-style: italic;
}

body>header p {
  color: #636363;
}

#main {
  flex: auto;
  min-height: 100vh;
  max-width: 820px;
  overflow: hidden;

  display: flex;
  flex-flow: column;
}

#main>nav,
#main>main,
#main>footer {
  padding: 15px;
}


#main a {
  text-decoration-style: dotted;
}

#main p {
  font-family: 'IBM Plex Serif';
}

#main>nav {
  text-align: center;
  font-family: 'IBM Plex Sans';
}

#main>nav a {
  text-decoration: none;
}

#main>main {
  flex: 1;
  margin-right: 25px;
}

#main>footer {
  padding-top: 50px;
}

footer {
  font-family: 'IBM Plex Sans';
}

@media (max-width: 640px) {
  body {
    flex-direction: column;
  }

  body>header h1 {
    width: auto;
    font-size: 2em;
  }

  #main {
    display: block;
    min-height: 0;
  }

  #main>main {
    margin-right: 0;
  }
}

hr {
  border: none;
  border-top: 1px solid #3a3a3a;
  max-width: 25px;
  margin: 35px auto;
}

.muted {
  color: #636363;
}

html {
  background-color: #f3f3f3;
  color: #3c3c3c;
}

article img:not([src$=".jpg"]):not([src$=".jpeg"]):not(.opaque) {
  /* prevent transparent images from showing the black background */
  background-color: white;
  border: 5px solid white;
  box-sizing: border-box;
}

::selection {
  background-color: #3c3c3c;
  color: #f3f3f3;
}


/* Homepage */

#intro {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'IBM Plex Sans';
}

#intro h1 {
  font-size: 7em;
  font-family: 'IBM Plex Mono';
  font-style: italic;
  margin: 0;
  margin-bottom: 0.2em;
}

#intro a {
  text-decoration: none;
}

@media (max-width: 640px) {
  #intro h1 {
    font-size: 4em;
  }
}

/* Typography */

article>header {
  margin-bottom: 2em;
}

article>header time {
  color: #636363;
  white-space: nowrap;
}

article img,
article video {
  max-width: 100%;
}

article .footnotes {
  font-size: 0.75em;
}

pre {
  font-family: 'IBM Plex Mono', monospace;
  background-color: #eaeaea;
  color: #3c3c3c;
  padding: 15px;
  overflow: auto;

  tab-size: 2;
  -moz-tab-size: 2;
}

a,
a:visited {
  color: inherit;
}

kbd {
  display: inline-block;
  padding: 3px 5px;
  font-size: 0.8em;
  line-height: normal;
  line-height: 10px;
  vertical-align: middle;
  border: 1px solid black;
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 black;
  background-color: rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: dark) {
  kbd {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 -1px 0 white;
  }
}

iframe[src*="youtube-nocookie.com"],
iframe.video {
  border: none;
  width: 100%;
  height: 460px;
}

@media (max-width: 640px) {

  iframe[src*="youtube-nocookie.com"],
  iframe.video {
    height: 260px;
  }
}

/* Article list */

.article-list article>header {
  display: flex;
  flex-flow: row;
  align-items: center;
  margin-bottom: 0;
}

.article-list a {
  text-decoration: none;
}

.article-list article h3 {
  display: inline-block;
  margin: 0.5em;
}

.article-list article small {
  font-weight: normal;
  color: #636363;
}

.alt-links {
  float: right;
  color: #636363;
  font-family: 'IBM Plex Sans';
  margin: 30px 0;
}

/* Dark Mode */

@media (prefers-color-scheme: dark) {
  html {
    background-color: #141414;
    color: #d7d7d7;
  }

  article img:not([src$=".jpg"]):not([src$=".jpeg"]):not(.opaque) {
    /* prevent transparent images from showing the black background */
    background-color: white;
    border: 5px solid white;
    box-sizing: border-box;
  }

  ::selection {
    background-color: #d7d7d7;
    color: #141414;
  }

  body>header p {
    color: #acacac;
  }

  .muted {
    color: #acacac;
  }

  hr {
    border-top: 1px solid #acacac;
  }

  .alt-links {
    color: #acacac;
  }

  article>header time {
    color: #acacac;
  }

  pre {
    background-color: #282828;
    color: #d7d7d7;
  }
}
