/* www.danmoore.org
   Hand-written replacement for the Jekyll minima theme. Colours, type and
   measure are carried over from the old theme so the site still looks like
   itself; the layout underneath is flexbox rather than floats. */

:root {
  --text: #111;
  --muted: #828282;
  --heading: #424242;
  --rule: #e8e8e8;
  --bg: #fdfdfd;
  --link: #2a7ae2;
  --link-visited: #1756a9;
  --wrapper: 800px;
  --gutter: 30px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  color: var(--text);
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
  font-kerning: normal;
}

.wrapper {
  width: 100%;
  max-width: var(--wrapper);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:visited {
  color: var(--link-visited);
}

a:hover,
a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-weight: 400;
  color: var(--heading);
  margin: 0 0 15px;
  line-height: 1.2;
}

h1 {
  font-size: 36px;
  letter-spacing: -1px;
}

h2 {
  font-size: 26px;
}

p {
  margin: 0 0 15px;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  border-top: 5px solid var(--heading);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
  flex-wrap: wrap;
}

.site-title {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -1px;
  color: var(--heading);
}

.site-title:visited {
  color: var(--heading);
}

/* Only two destinations, so the nav stays inline at every width - no
   hamburger, no JavaScript. */
.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a,
.site-nav a:visited {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Content ----------------------------------------------------------------- */

.page-content {
  flex: 1;
  padding: 30px 0;
}

.lede {
  color: var(--muted);
  font-size: 18px;
  max-width: 34em;
}

/* Images ------------------------------------------------------------------ */

.hero {
  display: block;
  width: 100%;
  height: auto;
}

figure {
  margin: 0 0 30px;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
}

figure.narrow {
  max-width: 60%;
  margin-inline: auto;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 30px 0;
  color: var(--muted);
  font-size: 15px;
}

.site-footer p {
  margin: 0 0 4px;
}

/* 404 --------------------------------------------------------------------- */

.notfound {
  text-align: center;
  padding: 60px 0;
}

.notfound h1 {
  font-size: 4em;
  line-height: 1;
  margin-bottom: 20px;
}

/* Narrow ------------------------------------------------------------------ */

@media (max-width: 600px) {
  :root {
    --gutter: 15px;
  }

  h1 {
    font-size: 30px;
  }

  figure.narrow {
    max-width: 100%;
  }
}
