/* Story: who Tariq is and how they got here. The portrait, the headline and a few lines, the roles along one line with
   a dot for each and a filled one for now, then the facts as figures. The line runs down the start side on narrow screens. */

/* The top line: the heading over a rule, as What I do's */
.st-top {
  display: flex;
  align-items: center;
  min-block-size: var(--tap);
  border-block-end: 1px solid var(--line);
}
.story :where(ol, ul) { margin: 0; padding: 0; list-style: none; }

/* The portrait over the headline on the start side and the lines on the end side */
.st-lede {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-7) var(--space-18);
  align-items: end;
  padding-block-start: var(--space-fluid-xl);
}
.st-lede h3 {
  margin: 0;
  max-inline-size: 18ch;
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
.st-lede > p {
  margin: 0;
  max-inline-size: 54ch;
  color: var(--muted);
  font-size: var(--text-lead);
}

/* The portrait: the photo in a thin teal ring, the name beside it. Its size is set before it loads; a photo that fails
   leaves the circle and its alt text. */
.st-pt { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--space-5); }
.st-ring {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: var(--portrait-ring);
  aspect-ratio: 1;
  border: 1px solid var(--accent);
  border-radius: var(--r-round);
}
.st-ph {
  display: block;
  overflow: hidden;
  inline-size: var(--portrait);
  aspect-ratio: 1;
  border-radius: var(--r-round);
  background: var(--sunk);
}
/* A photo that fails shows its alt text across the middle of the circle */
.st-ph img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--portrait);
  text-align: center;
}
.st-who { display: grid; gap: var(--space-1); margin: 0; }
.st-who b { margin-block-end: var(--space-1); font-size: var(--text-xl); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
.st-who span { font-family: var(--mono); font-size: var(--text-sm); letter-spacing: var(--tracking-wide); color: var(--muted); }

/* The rail: one column per role, the line through the centre of the dots:
   a 2px line from 4px down, a 10px dot from the top */
.st-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin-block-start: var(--space-fluid-l);
}
.st-rail li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1-5);
  padding-block-start: var(--space-8);
  padding-inline-end: var(--space-6);
}
.st-rail li::after {
  content: "";
  position: absolute;
  inset-block-start: var(--space-1);
  inset-inline: 0;
  block-size: var(--space-0-5);
  background: var(--line);
}
.st-rail li::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset-block-start: 0;
  inset-inline-start: 0;
  inline-size: var(--space-2-5);
  block-size: var(--space-2-5);
  border: var(--space-0-5) solid var(--muted);
  border-radius: var(--r-round);
  background: var(--bg);
}
.st-rail .st-now::before { border-color: var(--accent); background: var(--accent); }
.st-when {
  font-family: var(--mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-wide);
  color: var(--muted);
}
.st-now .st-when { color: var(--accent-text); }
.st-rail b { font-size: var(--text-xl); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }

/* The facts, as figures over a label */
.st-figs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
  margin-block-start: var(--space-fluid-l);
}
.st-figs li { display: flex; flex-direction: column; gap: var(--space-2); padding-block-start: var(--space-4); border-block-start: 1px solid var(--line); }
.st-figs b { font-size: var(--text-h3); font-weight: var(--weight-semibold); line-height: var(--leading-none); letter-spacing: var(--tracking-tight); }
.st-figs span { color: var(--muted); font-size: var(--text-md); line-height: var(--leading-snug); }

@media (width < 900px) {
  /* The rail runs down the start side: the line from the first dot on, each dot beside its date */
  .st-rail { grid-auto-flow: row; }
  .st-rail li { padding-block: 0 var(--space-6); padding-inline: var(--space-8) 0; }
  .st-rail li::after { inset-block: 0; inset-inline: var(--space-1) auto; block-size: auto; inline-size: var(--space-0-5); }
  .st-rail li::before { inset-block-start: var(--space-1); }
  .st-rail li:first-child::after { inset-block-start: var(--space-1); }
  .st-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (width < 760px) {
  .st-lede { grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--space-3-5); }
}
