/*
 * Shared site styles for wjmallard.net.
 */

:root {
  color-scheme: light;
  /* Always reserve the scrollbar gutter. Without this, any filter that leaves a
     short enough page drops the scrollbar, widens the viewport, and shifts every
     centered .wrap a few px right -- so clicking a chip appears to nudge the
     whole page sideways. */
  scrollbar-gutter: stable;
}

body {
  font-family: ui-serif, Charter, "Bitstream Charter", Cambria, Georgia, "Times New Roman", serif;
  background: #fafafa;
  color: #444;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

a {
  color: #666;
  text-decoration: none;
}
a:hover {
  color: #222;
}

.wrap {
  max-width: 42em;
  margin: 0 auto;
  padding: 8vh 0 12vh;
}

.back {
  font-size: 0.85em;
  display: inline-block;
  margin-bottom: 3em;
}

/* Long-form prose */
article {
  line-height: 1.7;
  font-size: 0.95em;
}
article h1 {
  color: #222;
  font-weight: 600;
  font-size: 1.4em;
  line-height: 1.3;
  margin: 0 0 0.25em;
}
article h2 {
  color: #222;
  font-weight: 600;
  font-size: 1.1em;
  margin: 2em 0 0.5em;
}
article h3 {
  color: #222;
  font-weight: 600;
  font-size: 1em;
  margin: 1.75em 0 0.5em;
}
article p {
  margin: 0 0 1.25em;
}
article a {
  color: #444;
  border-bottom: 1px solid #ccc;
}
article a:hover {
  color: #222;
  border-bottom-color: #222;
}
article code {
  background: #f0f0f0;
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-size: 0.9em;
}
article pre {
  background: #f0f0f0;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.5;
}
article pre code {
  background: none;
  padding: 0;
}
article blockquote {
  margin: 0 0 1.25em;
  padding-left: 1em;
  border-left: 2px solid #ddd;
  color: #666;
}
article ul,
article ol {
  margin: 0 0 1.25em;
  padding-left: 1.5em;
}
article li {
  margin-bottom: 0.4em;
}
article hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2.5em 0;
}

/* Figures + tagline */
article figure {
  margin: 2em 0;
}
article figure img {
  width: 100%;
  display: block;
  border: 1px solid #eee;
  border-radius: 4px;
}
article figcaption {
  font-size: 0.8em;
  color: #999;
  margin-top: 0.6em;
  line-height: 1.5;
}
.tagline {
  color: #999;
  font-style: italic;
  font-size: 0.9em;
  margin: 0 0 2.5em;
}
