* {
  box-sizing: border-box;
}

body {
  --color-canvas-subtle: #f0f0f0;
  --space: 2em;
  background: #fafafa;
  color: #333;
  display: grid;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  justify-content: center;
  margin: 0;
  padding: 1em;
}

/* Hide div injected by LastPass */
body > div {
  display: none;
}

header,
footer {
  display: grid;
  grid-template-columns: auto 1fr;
  justify-items: end;
}

header {
  padding-bottom: 1em;
}

footer {
  border-top: 1px solid lightgray;
  margin-top: var(--space);
  padding-top: var(--space);
}

main {
  min-width: 0;
}

article {
  border-top: 1px solid lightgray;
  margin-top: var(--space);
  padding-top: var(--space);
}

article:first-child {
  margin-top: 0;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

h2 {
  font-size: 22px;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

li {
  padding: 0.25em 0;
}

img {
  margin-top: 1em;
  margin-bottom: 1em;
  max-height: 80vh;
  max-width: 100%;
  object-fit: contain;
  object-position: left;
}

pre {
  padding: 16px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
}

pre,
code {
  font-family: "Consolas", "Menlo", "Courier New", "Courier", monospace;
}

/* Approximate more recent GitHub styling for inline code */
code:not(pre code) {
  background-color: var(--color-canvas-subtle);
  border-radius: 6px;
  font-size: 85%;
  margin: 0;
  padding: .2em .4em;
  white-space: break-spaces;
}

svg {
  height: inherit;
  max-width: 100%;
}

.yearHeader {
  font-size: 36px;
  margin-bottom: 0;
}

.postHeader {
  font-size: 28px;
  margin-bottom: 0.5em;
  margin-top: 0;
}

.postDate {
  color: #808080;
  margin-top: 0;
  margin-bottom: 2em;
}

.yearList {
  list-style: none;
  padding: 0;
}

.yearItem {
  margin-bottom: 0.5em;
}

.optional {
  display: none;
}

.sideBySide {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-auto-flow: column;
  justify-items: center;
  margin: 3em 0;
}

.video16x9 {
  aspect-ratio: 16 / 9;
  margin-top: 1em;
  margin-bottom: 1em;
  width: 100%;
}

.video4x3 {
  aspect-ratio: 4 / 3;
  margin-top: 1em;
  margin-bottom: 1em;
  width: 100%;
}

.screenshot {
  width: 66%;
}

@media (min-width: 600px) {
  .optional {
    display: initial;
  }
}

@media (min-width: 800px) {
  body {
    grid-template-columns: minmax(auto, 800px);
    padding: var(--space);
    --space: 4em;
  }
}
