@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #fcfbf8;
  --ink: #1d1c1a;
  --quiet: #6b6861;
  --line: #cfcbc2;
  --hover: #a23b1d;
  font: 400 clamp(1.09rem, 1rem + .35vw, 1.22rem)/1.62 "Source Serif 4", Charter, Georgia, serif;
  font-optical-sizing: auto;
  background: var(--paper);
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171614;
    --ink: #e9e6de;
    --quiet: #9d998f;
    --line: #4b4841;
    --hover: #eb9a7c;
  }
}

* { box-sizing: border-box; }
body, h1, h2, p, ul { margin: 0; }
::selection { background: var(--ink); color: var(--paper); }

main {
  display: grid;
  grid-template-columns: minmax(0, 33rem) minmax(10rem, 15rem);
  justify-content: center;
  align-items: start;
  gap: 0 clamp(2.5rem, 6vw, 5rem);
  padding: clamp(2.5rem, 11vh, 7rem) 1.4rem 5rem;
}

.side { grid-column: 2; grid-row: 2; margin-top: .35rem; }

.portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 3px;
}

header { grid-column: 1; grid-row: 1; margin-bottom: 1.3rem; }
.text { grid-column: 1; grid-row: 2; }

h1 {
  font-size: 1.9em;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.012em;
}

h2 {
  font-size: 1.28em;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.008em;
  text-wrap: balance;
  margin: 2.4rem 0 .7rem;
}
.text > section:first-child h2 { margin-top: 0; }

p { text-wrap: pretty; }
.fold > p:first-child { text-indent: 1.5em; }

.fold.folded {
  max-height: var(--cut, calc(4 * 1.62em));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 calc(100% - var(--line, 1.62em)), transparent);
  mask-image: linear-gradient(#000 calc(100% - var(--line, 1.62em)), transparent);
}

.more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .5rem;
  padding: .2rem 0;
  border: 0;
  background: none;
  color: var(--quiet);
  font: inherit;
  font-size: .88em;
  cursor: pointer;
}
.more[hidden] { display: none; }
.more:hover { color: var(--hover); }
.more:focus-visible { outline: 2px solid var(--hover); outline-offset: 3px; border-radius: 1px; }
.more svg { transition: transform .15s; }
.more[aria-expanded="true"] svg { transform: rotate(180deg); }
strong { font-weight: 600; }
p + p { margin-top: 1.05em; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: color .12s, text-decoration-color .12s;
}
a:hover { color: var(--hover); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--hover); outline-offset: 3px; border-radius: 1px; }

footer {
  grid-column: 1;
  grid-row: 3;
  margin-top: 3.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: .88em;
}

@media (max-width: 46rem) {
  main { grid-template-columns: minmax(0, 33rem); }
  .side { grid-column: 1; grid-row: 1; margin: 0 0 1.6rem; }
  .portrait { width: 7.5rem; aspect-ratio: 1; object-position: center 12%; }
  header { grid-row: 2; margin-bottom: 1.1rem; }
  .text { grid-row: 3; }
  footer { grid-row: 4; }
}
