/* About (pages/about/index.md, css: about): the strapline, the company, and
   the two of them — each picture a circle that hangs out past the text, the
   first to the left and the second to the right. */

main {
  width: 50%;
  margin: auto;
  padding: 70px 0 40px;
  font-size: 15px;
  line-height: 1.8em;
}

.strapline {
  margin: 0 0 80px;
  font-size: 16px;
  font-style: italic;
  text-align: center;
}

section {
  margin-bottom: 80px;
  text-align: justify;
}

section p {
  margin: 0;
}

h2 {
  margin: 0;
  font: bold 18px/1.8em var(--font-body);
  letter-spacing: normal;
}

.history img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 200px;
  margin: 0 auto 40px;
  opacity: 0.8;
}

/* The picture takes the first column (the second, on the right), and the name
   and words sit in the middle of the other, beside it. */
.profile {
  display: grid;
  grid-template-columns: 250px 1fr;
  grid-template-rows: 1fr auto auto 1fr;
  min-height: 300px;
}

.profile > p:first-child { grid-area: 1 / 1 / -1 / 2; align-self: center; }
.profile > h2 { grid-area: 2 / 2; }
.profile > p:last-child { grid-area: 3 / 2; }

.profile img {
  display: block;
  width: 300px;
  max-width: none;
  height: 300px;
  margin-left: -150px;
  border-radius: 50%;
  object-fit: cover;
}

.profile.right { grid-template-columns: 1fr 250px; }
.profile.right > p:first-child { grid-area: 1 / 2 / -1 / 3; }
.profile.right > h2 { grid-area: 2 / 1; }
.profile.right > p:last-child { grid-area: 3 / 1; }
.profile.right img { margin-left: 100px; }

/* A narrow screen: the text the width of it, each picture above its words. */
@media (max-width: 56rem) {
  main {
    width: auto;
    padding: 40px 20px;
  }

  .profile,
  .profile.right {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: 0;
  }

  .profile > p:first-child,
  .profile > h2,
  .profile > p:last-child,
  .profile.right > p:first-child,
  .profile.right > h2,
  .profile.right > p:last-child {
    grid-area: auto;
  }

  .profile img,
  .profile.right img {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
  }
}
