/* Figures and captions (pandoc renders ![caption](img) as figure/figcaption) */

figure {
  margin: 1.5em 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
}

figcaption {
  margin-top: 0.5em;
  text-align: center;
  font-size: 0.85em;
  line-height: 1.4;
  color: #767676;
}

/* Lift images slightly off the page.
   Overrides the theme's `.image, figure img, img` rule in styles-light.css,
   which sets `box-shadow: 0 3px 3px #bbbbbb`. Same specificity, loaded later. */

article img {
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 5px 14px rgba(0, 0, 0, 0.16);
}

@media (prefers-color-scheme: dark) {
  figcaption {
    color: #a3a3a3;
  }

  /* Shadows read as much weaker against the dark background */
  article img {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.55);
  }
}
