/* ==========================================================================
   EXPERIENCE. Loads after css/site.css. Page-specific parts of the Type-is-the-stage system.
   Every figure and year is written once and held still: nothing counts through other values.
   The career needs no script: each year is a sticky numeral inside its own role block.
   ========================================================================== */

/* ---------- first screen: the headline with all six figures in one row under it (owner: one screen, no held scene) ---------- */
.xg { position: relative; }
.xg__stage {
  position: relative; overflow-x: clip; min-height: 100svh; display: flex; flex-direction: column;
  --nf: min(6.6vw, 12svh);
  /* the headline's height cap leaves room for the bar, the top row and the row of figures with their labels */
  --f: min(20.8vw, calc((97svh - 190px - .8 * var(--nf) - 96px) / 1.68));
}
.xg__screen {
  position: relative; z-index: 2; flex: 1 0 auto;
  display: grid; grid-template-columns: 1fr minmax(0, 24em); grid-template-rows: auto 1fr; column-gap: var(--s4); row-gap: 14px;
  padding: calc(var(--nav) + 4px) var(--m) 24px;
}
.xg__kicker { grid-area: 1 / 1; margin: 0; padding-top: .35em; animation: fade .9s ease .5s backwards; }
.xg__lede {
  grid-area: 1 / 2; justify-self: end; text-align: left; max-width: 21em;
  font-size: clamp(18px, 1.65vw, 26px); line-height: 1.2; font-weight: 600; font-stretch: 88%;
  animation: fade .9s ease .5s backwards;
}
.xg__screen .hl { grid-area: 2 / 1 / 3 / 3; align-self: start; margin-top: clamp(8px, 3svh, 40px); }
/* rest = letter width at rest; set so both lines run the full measure at every desktop width (the size is in vw) */
.xl1 { --rest: 62.4; --tight: 62.4; }
.xl2 { --rest: 85; --tight: 75; }
.xl2 .w { --i: 1; }

/* the figures: one row of six at the foot of the first screen */
.xg__nums { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 var(--s3); padding: var(--s3) var(--m) 24px; }
.xg__nums b { font-size: var(--nf); }
.xg__nums b small { display: inline-block; font-size: .3em; line-height: 1; font-weight: 900; margin-left: .1em; letter-spacing: 0; }
.xg__nums span { font-size: clamp(14px, 1.15vw, 18px); }

/* a short window (a phone held sideways): size by width alone and let the first screen flow */
@media (max-height: 520px) and (min-width: 821px) { .xg__stage { --f: 20.8vw; } }

/* ---------- career ---------- */
.xc .opener .display { max-width: 9em; }
.xc__list { display: block; }
.xc .trow {
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr); column-gap: calc(var(--m) * 2); row-gap: 0;
  padding: var(--s4) 0 var(--s6); min-height: 70svh;
}
.xc .trow--short { min-height: 0; padding-bottom: var(--s5); }
/* the year is generated from the role's start year, so it holds beside the role while its block passes */
.xc .trow__when {
  display: block; position: sticky; top: calc(var(--nav) + 14px); align-self: start;
  font-size: min(19vw, calc(38vw / 2.15)); line-height: .8; color: var(--dim);
  font-weight: 900; font-variation-settings: "wght" 900, "wdth" 62; font-variant-numeric: tabular-nums;
  transition: color .5s var(--ease);
}
.xc .trow__when::before { content: attr(data-y); }
@supports (content: "a" / "") { .xc .trow__when::before { content: attr(data-y) / ""; } }
.xc .trow.is-now .trow__when { color: var(--ink); }
.xc .trow h3 {
  font-size: clamp(34px, 5.5vw, 96px); line-height: .88; font-weight: 900; font-stretch: 100%;
  font-variation-settings: "wght" 900, "wdth" 62; text-transform: uppercase; text-wrap: balance;
}
.xc .trow__org { margin-top: 1em; font-size: clamp(16px, 1.3vw, 20px); font-weight: 650; line-height: 1.3; }
.xc .trow__note { margin-top: .25em; font-size: 14px; line-height: 1.4; }
.xc__body { margin-top: var(--s4); }
.xc__body .text { max-width: 34em; font-size: clamp(16px, 1.3vw, 19px); }
.xc__body .kicker { margin: var(--s4) 0 var(--s2); }
.xc__pts { max-width: 36em; }
.xc__pts li { padding: .5em 0; line-height: 1.4; }
.xc__pts li:first-child { padding-top: 0; }
.nums--role { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); padding: var(--s4) 0 0; }
.nums--role li { flex: 0 1 auto; }
.nums--role b { font-size: clamp(52px, 6vw, 104px); }
.nums--role span { margin-top: .6em; font-size: clamp(14px, 1.2vw, 18px); font-weight: 600; }
.xc__body > .nums--role:first-child { padding-top: 0; }

/* ---------- competencies: a typographic list in two columns, group names large ---------- */
.xk__groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) calc(var(--m) * 3); }
.xk__g h3 {
  margin-bottom: var(--s3); font-size: clamp(34px, 4.8vw, 80px); line-height: .88; font-weight: 900; font-stretch: 100%;
  font-variation-settings: "wght" 900, "wdth" 62; text-transform: uppercase; text-wrap: balance;
}
.xk__g .kicker { margin-bottom: .7em; }
.xk__list li { padding: .45em 0; font-size: clamp(16px, 1.4vw, 21px); line-height: 1.3; }
.xk__tools { margin-top: var(--s6); gap: .14em .7em; }
.xk__tools li {
  padding: 0; background: none; color: var(--ink);
  font-size: clamp(24px, 3.4vw, 58px); line-height: 1.02; font-weight: 900; font-variation-settings: "wght" 900, "wdth" 62; text-transform: uppercase;
  transition: color .25s;
}
.xk__tools li:nth-child(even) { color: var(--dim); }
.xk__tools li:hover { color: var(--y); }

/* ---------- credentials: the table row, full width ---------- */
.xe .row { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); column-gap: calc(var(--m) * 2); padding: var(--s2) 0; align-items: center; }
.xe .row__when { font-size: clamp(40px, 6.2vw, 108px); line-height: .85; }
.xe .row__what h3 { font-size: clamp(20px, 2.15vw, 34px); }
.xe .row__what p { margin-top: .2em; color: var(--dim); }
.xe__note {
  margin: var(--s6) 0 var(--s3); font-size: clamp(34px, 4.8vw, 80px); line-height: .88; font-weight: 900;
  font-variation-settings: "wght" 900, "wdth" 62; text-transform: uppercase;
}

/* ---------- the record ---------- */
.xo .display { font-size: clamp(30px, 7.2vw, 124px); }

/* ---------- phone and tablet ---------- */
@media (max-width: 820px) {
  .xg__stage { --f: 20vw; --nf: min(13vw, 7svh); min-height: 0; }
  .xg__screen { flex: none; grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 14px; padding-bottom: var(--s4); }
  .xg__kicker { grid-area: 1 / 1; }
  .xg__lede { grid-area: 3 / 1; justify-self: start; align-self: start; margin-top: 1svh; max-width: 17em; font-size: 18px; }
  .xg__screen .hl { grid-area: 2 / 1; align-self: start; margin-top: 3svh; gap: 8px; }
  .xg__screen .ln { justify-content: space-between; flex-wrap: wrap; animation: none; }
  .xg__nums { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3) var(--s2); padding: var(--s2) var(--m) 18px; }
  .xg__nums b { font-size: var(--nf); }
  .xg__nums span { margin-top: .35em; font-size: 14px; }

  .xc .trow { grid-template-columns: minmax(0, 1fr); row-gap: 6px; min-height: 0; padding: 0 0 var(--s5); }
  .xc .trow__when {
    top: var(--nav); z-index: 3; margin-inline: calc(-1 * var(--m)); padding: 6px var(--m) 10px; background: var(--bg);
    font-size: 25vw;
  }
  .xc .trow h3 { font-size: clamp(34px, 11vw, 66px); }
  .xk__groups { grid-template-columns: 1fr; gap: var(--s5); }
  .xe .row { grid-template-columns: 3.1em minmax(0, 1fr); column-gap: var(--s2); }
  .xe .row__when { font-size: clamp(34px, 12vw, 56px); }
  .nums--role { gap: var(--s3) var(--s4); }
  .nums--role b { font-size: clamp(48px, 17vw, 80px); }
}
