.profile-page {
  --cv-black: #111;
  --cv-paper: var(--paper, #fff7ed);
  --cv-muted: #c8c0b7;
  --cv-rule: rgb(255 247 237 / 23%);
  --cv-inset: clamp(1.25rem, 4.25vw, 5.25rem);
  --cv-top: clamp(5rem, 6.35vw, 6.25rem);
  --cv-rail: var(--rail-size, 3.5625rem);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--cv-black);
  color: var(--cv-paper);
}

.profile-page > .contact-footer { margin-top: auto; flex-shrink: 0; }

.cv {
  flex-shrink: 0;
  margin-right: var(--cv-rail);
  font-family: "Work Sans Variable", var(--ui, "Work Sans", sans-serif);
  font-weight: 375;
  box-sizing: border-box;
  display: grid;
  grid-template-areas: "intro portrait" "details portrait";
  grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
  gap: clamp(2rem, 3.15vw, 3.5rem) clamp(2rem, 7.25vw, 8.5rem);
  padding: var(--cv-top) var(--cv-inset) clamp(3rem, 5.3vw, 6rem);
  scroll-margin-top: 1rem;
}

.cv :where(h1, h2, h3, p, ol) { margin: 0; }
.cv-intro, .cv-details { width: 100%; max-width: 44rem; }
.cv-intro { grid-area: intro; }
.cv-details { grid-area: details; min-width: 0; }

.cv-intro-lead {
  max-width: 33ch;
  font-weight: 300;
  font-size: clamp(1rem, 1.35vw, 1.4rem);
  letter-spacing: -.03em;
  line-height: 1.3;
}

.cv-intro-copy,
.cv-job-summary,
.cv-facts p {
  max-width: 50ch;
  font-size: clamp(.75rem, .8vw, .8125rem);
  letter-spacing: -.005em;
  line-height: 1.55;
  text-wrap: pretty;
}

.cv-intro-copy { margin-top: .75rem; }

.cv-portrait {
  grid-area: portrait;
  position: sticky;
  top: var(--cv-top);
  align-self: start;
  justify-self: end;
  width: min(100%, 44rem, calc(100svh - var(--cv-top) - 2rem));
}

.cv-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.cv h2 {
  font-size: clamp(.84375rem, .975vw, .9375rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.cv-jobs {
  margin-top: .75rem;
  padding: 0;
  list-style: none;
}

.cv-jobs li {
  position: relative;
  border-top: 1px solid var(--cv-rule);
  padding: .8125rem 0 .9375rem;
}

.cv-jobs h3 {
  padding-right: 8rem;
  font-size: .78125rem;
  font-weight: 475;
  line-height: 1.3;
  letter-spacing: -.015em;
}

.cv-job-role,
.cv-period,
.cv .cv-fact-note {
  color: var(--cv-muted);
  font-weight: 400;
  font-size: .71875rem;
  line-height: 1.5;
}

.cv-period {
  position: absolute;
  top: .8125rem;
  right: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cv-job-role { margin-top: .1875rem; }
.cv-job-summary { margin-top: .375rem; }

.cv-facts {
  border-top: 1px solid var(--cv-rule);
  display: grid;
  gap: 1.2rem 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 1.25rem;
}

.cv-facts p { margin-top: .5rem; }
.cv .cv-fact-note { margin-top: .1875rem; }

@media (min-width: 701px) and (max-width: 1000px), (max-width: 400px) {
  .cv-jobs h3 { padding-right: 0; }
  .cv-period { position: static; margin-top: .375rem; }
  .cv-facts { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .cv { margin-right: 0; }

  .cv {
    padding-top: calc(var(--rail-size, 3.125rem) + 1.375rem);
    grid-template-areas: "intro" "portrait" "details";
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.6875rem;
    scroll-margin-top: var(--cv-rail);
  }

  .cv-intro-copy,
  .cv-job-summary,
  .cv-facts p { font-size: .8125rem; }

  .cv .cv-fact-note { font-size: .71875rem; }
  .cv-intro-copy { max-width: 45ch; }
  .cv-portrait { position: static; width: 100%; }
}
