body {
  font-family: monospace;
  font-size: 100%;
  background-color: white;
  color: #111;
  width: 80%;
  min-width: 300px;
  max-width: 800px;
  min-height: 200px;
  padding: 1em;
  margin: 5% auto;
  border: thin solid gray;
  border-radius: 5px;
  display: block;
}

a:link    { color: blue; text-decoration: none;      }
a:hover   { color: blue; text-decoration: underline; }
a:visited { color: blue;                             }

h1 a { color: inherit !important }
h2 a { color: inherit !important }
h3 a { color: inherit !important }
h4 a { color: inherit !important }
h5 a { color: inherit !important }
h6 a { color: inherit !important }

/* Explicit heading sizes so a post's title always outranks the headings
   inside it. Post titles are <h2>, but a "# Heading" in Markdown becomes an
   <h1>, which the browser defaults would render larger than the title. */
body > header h1 { font-size: 2.5em; }
article > header h2 { font-size: 2em; }
article h1 { font-size: 1.5em; }
article h2 { font-size: 1.3em; }
article h3 { font-size: 1.15em; }
article h4, article h5, article h6 { font-size: 1em; }

#menu li {
    display: inline;
}

#post-list {
    margin-bottom: 1em;
    margin-top: 1em;
}

pre {
    margin: 2em 1em 2em 4em;
    white-space: pre-wrap;
}

address {
    display: none;
}

article {
    padding-top: 1em;
}

/* Cap the height so portrait photos fit on screen instead of running
   ~1000px tall. The vertical margin collapses with a wrapping <p>'s own
   margin, so the gap is the same whether a Markdown image sits on its own
   line or directly against a line of text. */
img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    margin: 2em auto;
    border-radius: 5px;
}

figure {
    margin: 2em 0;
}

figure img {
    margin-bottom: 0.5em;
}

figcaption {
    text-align: center;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    body {
        font-family: monospace;
        font-size: 100%;
        background-color: white;
        color: #111;
        width: 95%;
        min-height: 200px;
        padding: 1em;
        margin: 0 auto;
        border: none;
        display: block;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #111;
        color: #eee;
        border: thin solid #444;
    }
    a:link    { color: #66f; text-decoration: none;      }
    a:hover   { color: #66f; text-decoration: underline; }
    a:visited { color: #88f;                             }
}