/* legends.charlessieg.com: page layouts. Serif headings and a narrow reading column carry the design. */

.eyebrow { font: 600 0.75rem/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.6rem; }

/* Plain pages (About, 404) */
.page-head { padding-top: clamp(1.75rem, 5vw, 3rem); padding-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(2.6rem, 8.5vw, 5rem); line-height: 1; padding-bottom: 0.08em; max-width: 16ch; }
.lead { font-size: 1.25rem; line-height: 1.5; color: var(--ink-soft); max-width: var(--measure); margin: 0.9rem 0 0; }
.prose { max-width: var(--measure); }
.prose--about { margin: 0; }
.prose--about section { margin-top: 2.25rem; }
.prose--about h2 { font-size: 1.6rem; margin-bottom: 0.7rem; }
.missing { list-style: none; margin-top: 1.5rem; display: grid; gap: 0.3rem; font-size: 1.15rem; }

/* Home */
.hero { padding-top: clamp(2.5rem, 8vw, 6rem); padding-bottom: clamp(1.5rem, 4vw, 3rem); }
/* line-height 0.9 makes the line box shorter than the letters: the tail of the "g" hangs below it, and the fixed margin under it
   did not scale with the type. The padding is in em of the title's own size, so the room under the tail holds at every width. */
.hero__title { font-size: clamp(4.2rem, 20vw, 11rem); line-height: 0.9; padding-bottom: 0.1em; letter-spacing: -0.02em; color: var(--ink); }
.hero__line { font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.4; max-width: 34rem; margin: 1.25rem 0 0.5rem; }
.hero__note { font: 400 0.95rem/1.5 var(--sans); color: var(--ink-soft); max-width: 34rem; margin: 0; }
.people { padding-top: 1.5rem; }
.people__heading { font-size: clamp(1.6rem, 4vw, 2.2rem); border-bottom: 2px solid var(--ink); padding-bottom: 0.6rem; margin-bottom: 1.75rem; }
.cards { list-style: none; display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { position: relative; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); }
.card__media { aspect-ratio: 4 / 5; background: var(--rule); overflow: hidden; }
.card__img, .monogram { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.monogram { display: grid; place-items: center; font: 700 6rem/1 var(--serif); color: var(--ink-soft); }
.card__text { padding: 1.1rem 1.2rem 1.4rem; }
.card__name { font-size: 1.6rem; }
.card__link { text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; }
.card__link:hover { text-decoration: underline; }
.card__dates { font: 600 0.85rem/1.3 var(--sans); letter-spacing: 0.04em; color: var(--ink-soft); margin: 0.35rem 0 0.7rem; font-variant-numeric: lining-nums; }
.card__summary { font-size: 0.95rem; line-height: 1.5; margin: 0; }

/* A person */
.person__head { padding-block: clamp(1.75rem, 5vw, 3rem) 1.5rem; }
.person__grid { display: grid; gap: 1.5rem 3rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 48rem) { .person__grid { grid-template-columns: 18rem minmax(0, 1fr); } }
.person__portrait { margin: 0; }
.portrait__img { display: block; width: 100%; height: auto; max-width: 18rem; border: 1px solid var(--rule); background: var(--rule); }
.person__portrait figcaption { font: 400 0.8rem/1.45 var(--sans); color: var(--ink-soft); margin-top: 0.5rem; max-width: 18rem; }
.person__intro h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); line-height: 1; padding-bottom: 0.08em; }
.person__aka { font: italic 400 1rem/1.4 var(--serif); color: var(--ink-soft); margin: 0.6rem 0 0; }
.person__vitals { display: grid; gap: 0.2rem; margin: 1rem 0 0; font: 400 0.95rem/1.45 var(--sans); }
.vital__label { font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.72rem; color: var(--ink-soft); margin-right: 0.4rem; }
.person__summary { font-size: 1.2rem; line-height: 1.5; max-width: var(--measure); margin: 1.1rem 0 1.2rem; }
.person__links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font: 400 0.9rem/1.4 var(--sans); }
.person__links .kind, .meta { font: 600 0.68rem/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-left: 0.4rem; }

.toc { border-block: 1px solid var(--rule); background: var(--sheet); }
.toc ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.toc a { display: inline-block; font: 600 0.78rem/1.4 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; padding-block: 0.75rem; border-bottom: 2px solid transparent; }
.toc a:hover { border-bottom-color: var(--accent); }

.person__body { padding-top: 1rem; }
.block { margin-top: 3.25rem; }
.block > h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); border-bottom: 2px solid var(--ink); padding-bottom: 0.5rem; margin-bottom: 1.5rem; }
.block > :not(h2):not(.gallery) { max-width: 52rem; }
.block--overview .prose { font-size: 1.12rem; }
.block p:last-child { margin-bottom: 0; }

/* Footnote calls and notes */
.fn { font: 600 0.7rem/1 var(--sans); vertical-align: super; margin-left: 0.1em; }
.fn a { color: var(--accent); text-decoration: none; padding: 0.15rem 0.1rem; }
.fn a:hover { text-decoration: underline; }
.notes { font: 400 0.88rem/1.5 var(--sans); padding-left: 1.6rem; }
.notes li { padding: 0.3rem 0.4rem; margin-bottom: 0.25rem; overflow-wrap: anywhere; }
.notes li:target { background: color-mix(in srgb, var(--accent) 14%, var(--paper)); }
.note__back { margin-left: 0.25rem; }  /* never nowrap: a note cited 19 times has 19 arrows, and they must wrap */
.note__back a { display: inline-block; color: var(--accent); text-decoration: none; padding: 0.2rem 0.25rem; }
.notes a { color: var(--ink); }
:target { scroll-margin-top: 1rem; }

/* Life: a timeline of stages */
.timeline { list-style: none; position: relative; padding-left: 1.5rem; border-left: 2px solid var(--rule); display: grid; gap: 2.2rem; }
.stage { position: relative; display: grid; gap: 0.3rem 2rem; }
.stage::before { content: ""; position: absolute; left: calc(-1.5rem - 7px); top: 0.55rem; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.stage__years { font: 700 0.85rem/1.4 var(--sans); letter-spacing: 0.08em; color: var(--accent); margin: 0.25rem 0 0; font-variant-numeric: lining-nums tabular-nums; }
.stage h3 { font-size: 1.45rem; margin-bottom: 0.6rem; }
@media (min-width: 48rem) { .stage { grid-template-columns: 8.5rem minmax(0, 1fr); } }

/* Habits and rituals */
.habits { list-style: none; display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) { .habits { grid-template-columns: repeat(2, minmax(0, 1fr)); } .block:has(.habits) > :not(h2) { max-width: none; } }
.habit { background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--accent); padding: 1.1rem 1.25rem 1.3rem; }
.habit h3 { font-size: 1.3rem; }
.habit__period { font: 600 0.72rem/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 0.3rem 0 0.8rem; }
.habit h3 + p { margin-top: 0.7rem; }

/* Setbacks and comebacks */
.setbacks { list-style: none; display: grid; gap: 2.5rem; }
.setback { border-top: 1px solid var(--rule); padding-top: 1.2rem; }
.setback > h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.when { font: 600 0.85rem/1.3 var(--sans); letter-spacing: 0.08em; color: var(--accent); margin-left: 0.5rem; white-space: nowrap; }
.setback__part { padding-left: 1rem; border-left: 3px solid var(--rule); margin-bottom: 1.1rem; }
.setback__part h4 { font: 700 0.72rem/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.4rem; }
.setback__part--cause { border-left-color: var(--ink-soft); }
.setback__part--comeback { border-left-color: var(--accent); }

/* In their own words */
.quotes { list-style: none; display: grid; gap: 2rem; }
.quote figure { margin: 0; }
.quote blockquote { margin: 0; padding-left: 1.1rem; border-left: 3px solid var(--accent); font: italic 400 1.2rem/1.5 var(--serif); }
.quote blockquote p { margin-bottom: 0.6em; }
.quote figcaption { font: 400 0.85rem/1.4 var(--sans); color: var(--ink-soft); margin: 0.5rem 0 0 1.1rem; }
.quote cite { font-style: normal; font-weight: 600; color: var(--ink); }

/* Pictures */
.gallery { list-style: none; display: grid; gap: 2rem 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shot figure { margin: 0; }
.shot__img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: var(--rule); }
.shot figcaption { font: 400 0.85rem/1.45 var(--sans); margin-top: 0.55rem; }
.shot__caption { display: block; color: var(--ink); }
.shot__date { color: var(--ink-soft); font-size: 0.78rem; }
.credit { display: block; margin-top: 0.3rem; font-size: 0.78rem; line-height: 1.45; color: var(--ink-soft); overflow-wrap: anywhere; }
.credit a { color: var(--ink-soft); }
.person__portrait .credit { display: block; }

/* Watch, listen, read */
.media-list { list-style: none; display: grid; gap: 0.6rem; font-size: 1rem; }
.media-list .meta { display: block; margin-left: 0; margin-top: 0.1rem; }
.read { display: grid; gap: 1.5rem 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) { .read { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.read h3 { font: 700 0.75rem/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.7rem; }
.block--wide > h2 { max-width: none; }

/* A source narrower than the 1x file is shown at its own size (never stretched), centered on its well. */
.is-small { width: auto; max-width: 100%; height: auto; }
.card__media:has(.is-small), .person__portrait:has(.is-small) { display: grid; place-items: center; }
.card__img.is-small { max-height: 100%; object-fit: contain; }
.shot__img.is-small, .portrait__img.is-small { width: auto; }
