/* The "Why I built Cairn" page: a personal story, set for reading. */

/* The story, then (on a phone) the side cards below it. On a wider screen the
   story keeps a reading width at the left, lined up with the page title, and
   the side cards stay in view at the right edge, like the answers and
   questions screens; the space between them takes up any extra width. */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

/* About 45 to 80 characters a line at every width (checked with Playwright). */
.story {
  max-width: 45rem;
  container-type: inline-size;
}

.about-aside {
  display: grid;
  gap: 1rem;
  align-content: start;
}

/* Jump links only help beside the story, not after it. */
.about-toc {
  display: none;
}

@media (min-width: 900px) {
  .about-layout {
    grid-template-columns: minmax(0, 45rem) 21rem;
    justify-content: space-between;
    column-gap: 3.5rem;
    align-items: start;
  }

  .about-aside {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }

  .about-toc {
    display: block;
  }
}

.about-aside .list-card .eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.76rem;
  font-weight: 500;
}

.about-toc ol {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-toc a {
  display: block;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  color: var(--heading);
  text-decoration: none;
}

.about-toc li:first-child a {
  border-top: 0;
}

.about-toc a:hover {
  text-decoration: underline;
}

.about-inspiration p {
  margin: 0;
  line-height: 1.65;
}

/* --- The story ------------------------------------------------------------ */

.story h2 {
  margin: 2.75rem 0 0.9rem;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
}

.story h2:first-child {
  margin-top: 0;
}

.story p {
  margin: 0 0 1.15rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

@media (min-width: 760px) {
  .story p {
    font-size: 1.1875rem;
  }
}

/* His words, set apart. */
.story blockquote {
  margin: 1.75rem 0;
  padding: 0.35rem 0 0.35rem 1.4rem;
  border-left: 3px solid var(--accent);
}

.story blockquote p {
  margin: 0;
  color: var(--heading);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 300;
  line-height: 1.5;
}

.story .signature {
  margin-top: 2.25rem;
  color: var(--heading);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.story .signature::before {
  content: "— " / "";
}

/* Family photos. The small one sits beside the text once the story is wide
   enough to leave a comfortable column next to it; otherwise it sits above. */
.story-photo {
  margin: 2rem 0;
}

.story-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.story-photo figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.story-photo-side {
  max-width: 237px;
  margin: 0.5rem auto 2rem;
}

@container (min-width: 38rem) {
  .story-photo-side {
    float: right;
    width: 237px;
    margin: 0.4rem 0 1.25rem 2rem;
  }

  /* Headings and quotes start below the photo rather than beside it. */
  .story h2,
  .story blockquote {
    clear: both;
  }
}
