:root {
  --background-color: #ffffff;
  --text-color: #444444;
  --accent-color: #ff5500;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #dddddd;
    --background-color: #000000;
  }
}

body {
  margin: 40px auto;
  max-width: 650px;
  line-height: 1.6;
  font-size: 18px;
  color: var(--text-color);
  background: var(--background-color);
  padding: 0 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

header .header-container {
  text-align: center;
}

#theme-toggle {
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

img:not(#theme-toggle) {
  max-width: 100%;
  height: auto;
}

.io {
  font-style: italic;
  font-size: 0.6em;
}

article {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #dddddd;
}

article:last-of-type {
  border-bottom: none;
}

a {
  color: var(--accent-color);
}

a:focus,
button:focus,
#theme-toggle:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.thumb {
  width: 150px;
  height: auto;
  display: block;
  margin-bottom: 0.5rem;
}

.meta {
  font-size: 0.9em;
  color: #666666;
}

.site-title {
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

/* Limit image and video width inside articles */
article img,
article video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-top: 56.25%;
  margin: 1.5rem auto;
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

pre {
  overflow-x: auto;
  max-width: 100%;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 4px;
}

code {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9em;
  font-family: Menlo, Consolas, "Liberation Mono", monospace;
}

article ul,
article ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

article li {
  margin-bottom: 0.5rem;
}
