/* robertbulman.com: one column of text and photos, centred on the page. */

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.227), 1rem);
  line-height: 1.5;
  --gap-large: clamp(1.8rem, 1.8rem + ((1vw - 0.48rem) * 2.885), 3rem);
  padding: var(--gap-large) 0;
}

main {
  margin-top: clamp(2.5rem, 8vw, 4.5rem);
  padding: 0 clamp(1.5rem, 5vw, 2rem) calc(1.5rem + 2 * var(--gap-large));
}

/* Every block sits in a 1000px column with a 1.5rem gap above it. */
main > *,
.columns > div > * {
  max-width: 1000px;
  margin: 1.5rem auto 0;
}

main > :first-child,
.columns > div > :first-child {
  margin-top: 0;
}

h1, h2 {
  color: #0072b5;
  font-weight: 300;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.976rem, 1.976rem + ((1vw - 0.2rem) * 2.771), 3.5rem);
  text-align: center;
}

h2 {
  font-size: clamp(1.502rem, 1.502rem + ((1vw - 0.2rem) * 1.815), 2.5rem);
}

.center {
  text-align: center;
}

a {
  color: #345c00;
}

/* Photos keep their own size up to the column width, centred. */
figure {
  display: table;
  text-align: center;
}

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

figcaption {
  display: table-caption;
  caption-side: bottom;
  margin: 0.5em 0 1em;
  text-align: center;
}

hr {
  border: none;
  border-top: 2px solid;
}

/* Two columns side by side, one above the other on narrow screens. */
.columns {
  display: flex;
  gap: 1.5rem;
}

.columns > div {
  flex: 1;
  min-width: 0;
}

@media (max-width: 781px) {
  .columns {
    flex-wrap: wrap;
  }

  .columns > div {
    flex-basis: 100%;
  }
}
