/* Site styles. Colours and fonts only via tokens (tokens.css). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-height) + var(--space-4));
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.55;
}

::selection {
  background: var(--color-selection);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -10rem;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  color: var(--color-ink);
  z-index: 30;
}

.skip-link:focus {
  top: var(--space-4);
}

.wrap {
  max-width: var(--width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- top bar: sticky, the current section gets a soft pill ------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-bg);
  border-bottom: var(--hairline) solid var(--color-line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: var(--width);
  height: var(--nav-height);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.topbar__home {
  color: var(--color-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.topbar__links {
  display: flex;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar__links a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: var(--step--1);
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
}

.topbar__links a:hover,
.topbar__links a[aria-current] {
  background: var(--color-soft);
  color: var(--color-ink);
}

@media (max-width: 34rem) {
  .topbar__home {
    display: none;
  }

  /* All five links fit on a phone, spread across the bar. */
  .topbar__links {
    flex: 1;
    justify-content: space-between;
    gap: 0;
  }

  .topbar__links a {
    padding-inline: calc(var(--space-1) * 1.5);
  }
}

/* ---- hero: hello, the line, the photo ------------------------------------ */

.hero__inner {
  display: grid;
  align-items: center;
  gap: var(--space-7);
  max-width: var(--width);
  min-height: min(calc(100svh - var(--nav-height)), 50rem);
  margin-inline: auto;
  padding: var(--space-8) var(--gutter);
}

@media (min-width: 64rem) {
  .hero__inner {
    grid-template-columns: var(--col-num) repeat(3, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }

  .hero__copy {
    grid-column: 1 / 4;
  }

  .hero__art {
    grid-column: 4;
  }
}

.hero__eyebrow {
  margin: 0 0 var(--space-4);
  color: var(--color-copper);
  font-size: var(--step--1);
  font-weight: 600;
}

.hero__title {
  margin: 0;
  font-size: var(--step-4);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero__tagline {
  max-width: 22ch;
  margin: var(--space-4) 0 var(--space-6);
  color: var(--color-muted);
  font-size: var(--step-2);
  font-weight: 450;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero__text {
  max-width: 52ch;
}

.hero__text p {
  margin: 0 0 var(--space-4);
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
}

.button {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-bg);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
}

.button--quiet {
  background: transparent;
  color: var(--color-ink);
  box-shadow: inset 0 0 0 var(--hairline) var(--color-line);
}

.button:hover {
  text-decoration: none;
  opacity: 0.88;
}

.hero__art {
  display: grid;
  justify-items: center;
}

@media (min-width: 64rem) {
  .hero__art {
    justify-items: stretch;
  }

  .portrait {
    max-width: none;
  }
}

.portrait {
  width: 100%;
  max-width: 22rem;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-soft);
  box-shadow: var(--shadow);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- sections + index rows (1/1-style) ----------------------------------- */

.section {
  max-width: var(--width);
  margin-inline: auto;
  padding: var(--space-8) var(--gutter) var(--space-7);
}

.section__head {
  display: grid;
  grid-template-columns: var(--col-num) minmax(0, 1fr);
  align-items: baseline;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: var(--hairline) solid var(--color-line);
}

.section__num,
.index__num,
.index__meta {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}

.section__num {
  color: var(--color-copper);
  font-weight: 600;
}

.section__intro {
  grid-column: 2;
  max-width: var(--measure);
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
}

.section__title {
  margin: 0;
  font-size: var(--step-3);
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.025em;
}

.index {
  margin: 0;
  padding: 0;
  list-style: none;
}

.index__row {
  position: relative;
  display: grid;
  grid-template-columns: var(--col-num) minmax(0, 1fr);
  gap: var(--space-1) var(--space-4);
  padding-block: var(--space-5);
  border-bottom: var(--hairline) solid var(--color-line);
}

.index__row > :not(.index__num) {
  grid-column: 2;
}

.index__num {
  grid-row: 1 / span 4;
  padding-top: 0.3em;
}

.index__name {
  margin: 0;
  text-wrap: balance;
  font-size: var(--step-2);
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.index__name abbr {
  text-decoration: none;
}

.index__link {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* A long title shows its short form only when the full one would wrap
   (site.js measures it and sets .is-short on the link). */
.title-short {
  display: none;
  text-decoration: none;
}

.index__link.is-short .title-long {
  display: none;
}

.index__link.is-short .title-short {
  display: inline;
}

.index__link:hover {
  color: var(--color-accent);
}

.index__role {
  margin: 0;
  font-weight: 560;
}

.index__desc {
  max-width: var(--measure);
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
}

/* Tablet and narrow windows: dates and places keep their own right-aligned
   column, so they end on the same vertical line as on desktop. */
@media (min-width: 40rem) {
  .section__head {
    column-gap: var(--col-gap);
  }
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .index__row {
    grid-template-columns: var(--col-num) minmax(0, 1fr) auto;
    column-gap: var(--col-gap);
  }

  .index__row > .index__name {
    grid-column: 2;
    grid-row: 1;
  }

  .index__row > .index__meta {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
  }

  .index__row > .index__role {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .index__row > .index__desc {
    grid-column: 2 / -1;
  }
}

@media (min-width: 64rem) {
  .index__row {
    grid-template-columns: var(--col-num) repeat(3, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: baseline;
  }

  .index__row > :not(.index__num) {
    grid-column: auto;
  }

  .index__num {
    grid-row: auto;
  }

  .index__meta {
    text-align: right;
  }

  .index__row > .index__desc {
    grid-column: 3 / span 2;
  }

  .index--compact .index__name {
    font-size: var(--step-1);
  }
}

.index__row:has(.index__link)::after {
  content: "→";
  position: absolute;
  bottom: var(--space-5);
  right: var(--space-1);
  color: var(--color-accent);
  opacity: 0;
}

.index__row:has(.index__link):hover {
  background: linear-gradient(to right, var(--color-soft), transparent);
}

.index__row:has(.index__link):hover .index__num {
  color: var(--color-accent);
}

.index__row:has(.index__link):hover::after {
  opacity: 1;
}

@media (min-width: 64rem) {
  .index__row:has(.index__link):hover::after {
    opacity: 0;
  }
}

/* ---- rugby --------------------------------------------------------------- */

.rugby {
  display: grid;
  gap: var(--space-7);
  padding-top: var(--space-6);
}

@media (min-width: 64rem) {
  .rugby {
    grid-template-columns: var(--col-num) repeat(3, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: start;
  }

  .rugby__text {
    grid-column: 1 / 3;
  }

  .photo {
    grid-column: 3 / 5;
  }
}

.rugby__text {
  max-width: var(--measure);
}

.rugby__text p {
  margin: 0 0 var(--space-4);
}

.photo {
  margin: 0;
}

.photo__frame {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.photo__frame img {
  width: 100%;
}

.photo figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
  margin-top: var(--space-3);
  color: var(--color-muted);
  font-size: var(--step--1);
}


/* ---- writing --------------------------------------------------------------- */

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list li {
  padding-block: var(--space-5);
  border-bottom: var(--hairline) solid var(--color-line);
}

.post-list a {
  font-size: var(--step-1);
  font-weight: 620;
}

.post-list time {
  display: block;
  color: var(--color-muted);
  font-size: var(--step--1);
}

.post-list p {
  max-width: var(--measure);
  margin: var(--space-2) 0 0;
}

.empty-note {
  max-width: var(--measure);
  padding-top: var(--space-5);
  color: var(--color-muted);
}

.article {
  padding-block: var(--space-8);
}

.article__header {
  margin-bottom: var(--space-6);
}

.eyebrow {
  margin: 0 0 var(--space-4);
  font-size: var(--step--1);
  font-weight: 600;
}

.article__title {
  max-width: 22ch;
  margin: 0 0 var(--space-3);
  font-size: var(--step-3);
  font-weight: 620;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.article__date {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--step--1);
}

.prose {
  max-width: var(--measure);
}

.prose p {
  margin: 0 0 var(--space-4);
}

.prose h2 {
  margin: var(--space-7) 0 var(--space-3);
  font-size: var(--step-2);
  font-weight: 620;
  line-height: 1.15;
}

.prose blockquote {
  margin: var(--space-5) 0;
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-accent);
  color: var(--color-muted);
}

.prose pre {
  overflow-x: auto;
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--hairline) solid var(--color-line);
  font-size: var(--step--1);
}

/* ---- footer ------------------------------------------------------------------ */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(var(--width) - 2 * var(--gutter));
  margin: var(--space-8) auto 0;
  padding: var(--space-5) 0;
  border-top: var(--hairline) solid var(--color-line);
  color: var(--color-muted);
  font-size: var(--step--1);
}

.site-footer__contact {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-footer__contact p {
  color: var(--color-ink);
  font-weight: 600;
}

.site-footer p {
  margin: 0;
}

/* ---- social icons ---------------------------------------------------------- */

.social {
  display: flex;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.social__link {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-pill);
  color: var(--color-muted);
}

.social__link:hover {
  background: var(--color-soft);
  color: var(--color-ink);
}

.hero__links {
  align-items: center;
}

/* ---- motion: only for people who haven't asked for less ----------------------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .topbar__links a,
  .index__row,
  .index__row:has(.index__link)::after,
  .index__num {
    transition:
      background-color 180ms ease,
      color 180ms ease,
      opacity 180ms ease,
      transform 180ms ease;
  }

  .index__row:has(.index__link):hover::after {
    transform: translateX(var(--space-1));
  }

  .reveal-load {
    animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero__title {
    animation-delay: 60ms;
  }

  .hero__tagline {
    animation-delay: 120ms;
  }

  .hero__text {
    animation-delay: 200ms;
  }

  .hero__links {
    animation-delay: 260ms;
  }

  .hero__art {
    animation-delay: 160ms;
  }

  .button,
  .social__link {
    transition:
      opacity 160ms ease,
      background-color 160ms ease,
      color 160ms ease;
  }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }

    /* Slight parallax on the record photo. */
    .photo__frame img {
      scale: 1.12;
      animation: drift linear both;
      animation-timeline: view();
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drift {
  from {
    translate: 0 -5%;
  }

  to {
    translate: 0 5%;
  }
}

/* ---- food map ---------------------------------------------------------------- */

.food {
  padding-top: var(--space-6);
}

.food__intro {
  max-width: var(--measure);
  margin: 0 0 var(--space-5);
  color: var(--color-muted);
}

.food__layout {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 64rem) {
  .food__layout {
    grid-template-columns: var(--col-num) repeat(3, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: stretch;
  }

  .food__side {
    grid-column: 1 / 3;
    order: -1;
  }

  /* Split view: the map matches the recommendations column's height, but
     never exceeds the viewport, and stays pinned while a long list scrolls
     (the Airbnb / Google Maps pattern). */
  .food__map {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-4));
    grid-column: 3 / 5;
    aspect-ratio: auto;
    min-height: 22rem;
    max-height: calc(100svh - var(--nav-height) - var(--space-6));
  }

  /* Overview ("All cities"): a 16:9 frame, like the rugby photo, so the
     cities aren't lost in a tall map. A picked city grows it to the list. */
  .food__map:has(.food-map:not(.is-zoomed)) {
    align-self: start;
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}

.food__map {
  order: -1;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

@media (min-width: 64rem) {
  .food__map {
    order: 0;
  }
}

.food-map {
  display: block;
  width: 100%;
  height: 100%;
}

.food-map__pin {
  cursor: pointer;
}

.food__hint {
  margin: var(--space-4) 0 0;
  color: var(--color-muted);
}

.food-map__land {
  fill: var(--color-muted);
  opacity: 0.32;
}

.food-map__arc {
  fill: none;
  stroke: var(--color-copper);
  stroke-width: 1.25;
  stroke-dasharray: 3 5;
  opacity: 0.6;
}

.food-map__halo {
  fill: var(--color-accent);
  opacity: 0;
}

.food-map__point {
  fill: var(--color-accent);
  stroke: var(--color-surface);
  stroke-width: 2;
}

.food-map__label {
  fill: var(--color-ink);
  font-size: 22px;
  font-weight: 650;
  paint-order: stroke;
  stroke: var(--color-surface);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.food-map__pin:hover .food-map__halo,
.food-map__pin:focus-visible .food-map__halo,
.food-map__pin.is-active .food-map__halo {
  opacity: 0.18;
}

.food-map__pin.is-active .food-map__point {
  fill: var(--color-copper);
}

.food__controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.food__label {
  color: var(--color-muted);
  font-size: var(--step--1);
  font-weight: 600;
}

/* Our own chevron (the native one sits hard against the edge): drawn with
   borders in the text colour, so it follows the theme and needs no image. */
.food__select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.food__select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--space-5);
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid var(--color-muted);
  border-bottom: 1.5px solid var(--color-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.food__select {
  appearance: none;
  min-width: 12rem;
  min-height: 2.75rem;
  padding: var(--space-2) calc(var(--space-5) + var(--space-6)) var(--space-2) var(--space-5);
  border: var(--hairline) solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
  font-size: var(--step--1);
}

.food__panels {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.food__city {
  margin: 0 0 var(--space-2);
  font-size: var(--step-1);
  font-weight: 620;
}

.food__empty {
  margin: 0;
  color: var(--color-muted);
}

@media (prefers-reduced-motion: no-preference) {
  .food-map__halo,
  .food-map__point {
    transition:
      opacity 200ms ease,
      fill 200ms ease;
  }
}

.food__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.food__list li {
  padding-block: var(--space-3);
  border-bottom: var(--hairline) solid var(--color-line);
  color: var(--color-muted);
}

.food__place {
  display: block;
  font-weight: 600;
}

.food__address {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--step--1);
}

/* ---- work as a scroll story: roles on the left, newest first; a quiet
   pinned column on the right follows along as you scroll (site.js). It sits
   on the page itself (no card), on the same hairlines as the rows. -------- */

.story__steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.story__panel {
  display: none;
}

@media (min-width: 64rem) {
  /* The Work heading stays in view while the roles move under it. */
  #work .section__head {
    position: sticky;
    top: var(--nav-height);
    z-index: 2;
    margin-top: calc(-1 * var(--space-4));
    padding-top: var(--space-4);
    background: var(--color-bg);
  }

  /* A soft edge under the pinned heading, so roles slip beneath it. */
  #work .section__head::after {
    content: "";
    position: absolute;
    inset: calc(100% + var(--hairline)) 0 auto;
    height: var(--space-6);
    background: linear-gradient(var(--color-bg), transparent);
    pointer-events: none;
  }

  .story {
    --story-head: 6rem;
    display: grid;
    grid-template-columns: var(--col-num) repeat(3, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: start;
  }

  /* Room after the last role, so the panel stays pinned while it is read. */
  .story__steps {
    grid-column: 1 / 4;
    padding-bottom: calc(var(--space-9) * 1.5);
  }

  .story__step.index__row {
    grid-template-columns: var(--col-num) minmax(0, 1fr) auto;
    min-height: 30vh;
    align-content: start;
    padding-block: var(--space-6);
  }

  .story__step > .index__name {
    grid-column: 2;
    grid-row: 1;
  }

  .story__step > .index__meta {
    grid-column: 3;
    grid-row: 1;
  }

  .story__step > .index__role {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .story__step > .index__desc {
    grid-column: 2 / -1;
    grid-row: 3;
  }

  /* Inactive roles recede to the muted colour (still ≥ 4.5:1 contrast). */
  .story.is-live .story__step:not(.is-active) :is(.index__name, .index__role) {
    color: var(--color-muted);
  }

  .story.is-live .story__step.is-active .index__num {
    color: var(--color-copper);
  }

  .story__panel {
    /* Pins right under the pinned heading. */
    position: sticky;
    top: calc(var(--nav-height) + var(--story-head));
    grid-column: 4;
    display: grid;
    gap: var(--space-4);
    padding-top: var(--space-6);
  }
}

.story__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* A small dated tag, like a timestamp on a dashboard. */
.story__year {
  margin: 0;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-bg);
  font-size: var(--step-0);
  font-weight: 650;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.story__where {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--step--1);
  font-weight: 560;
}

/* Timeline from the first role to now; the dot glides with the scroll. */
.story__track {
  --at: 100%;
  position: relative;
  height: 0.75rem;
}

.story__track::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: var(--hairline) solid var(--color-line);
}

.story__tick {
  position: absolute;
  top: 50%;
  left: var(--at);
  width: 1px;
  height: 0.5rem;
  translate: 0 -50%;
  background: var(--color-muted);
}

.story__dot {
  position: absolute;
  top: 50%;
  left: var(--at);
  z-index: 1;
  width: 0.75rem;
  height: 0.75rem;
  translate: -50% -50%;
  border: 2px solid var(--color-bg);
  border-radius: 50%;
  background: var(--color-copper);
}

.story__ends {
  display: flex;
  justify-content: space-between;
  margin: var(--space-1) 0 0;
  color: var(--color-muted);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}

.career-map {
  display: block;
  width: 100%;
  height: auto;
}

.career-map__land {
  fill: var(--color-muted);
  opacity: 0.32;
}

.career-map__trail {
  fill: none;
  stroke: var(--color-copper);
  stroke-width: 3;
  stroke-dasharray: 6 8;
  opacity: 0.8;
}

.career-map__halo {
  fill: var(--color-copper);
  opacity: 0.2;
}

.career-map__point {
  fill: var(--color-copper);
  stroke: var(--color-bg);
  stroke-width: 4;
}

.story__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding-top: var(--space-4);
  border-top: var(--hairline) solid var(--color-line);
}

.story__stats dt {
  color: var(--color-muted);
  font-size: var(--step--1);
}

.story__stats dd {
  margin: 0;
  font-size: var(--step-2);
  font-weight: 650;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.story__skills {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-4) 0 0;
  border-top: var(--hairline) solid var(--color-line);
  list-style: none;
  font-size: var(--step--1);
}

.story__skill {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-muted);
}

.story__skill::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border: var(--hairline) solid var(--color-muted);
  border-radius: 2px;
}

.story__skill.is-on {
  color: var(--color-ink);
}

.story__skill.is-on::before {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.story__skill.is-new::before {
  border-color: var(--color-copper);
  background: var(--color-copper);
}

@media (prefers-reduced-motion: no-preference) {
  .story__step :is(.index__name, .index__role, .index__num),
  .story__skill,
  .story__skill::before {
    transition:
      color 450ms ease,
      background-color 450ms ease,
      border-color 450ms ease;
  }

  .career-map__marker {
    transition: transform 900ms cubic-bezier(0.22, 0.8, 0.25, 1);
  }
}

/* Short desktop windows: the panel would not fit pinned, so the heading and
   panel scroll with the page and the roles still drive the panel. */
@media (min-width: 64rem) and (max-height: 43.99rem) {
  #work .section__head {
    position: static;
  }

  .story__panel {
    display: none;
  }

  .story__steps {
    grid-column: 1 / -1;
    padding-bottom: 0;
  }

  #work .section__head::after {
    display: none;
  }
}

/* Windows high contrast: keep the panel's states distinguishable. */
@media (forced-colors: active) {
  .story__skill.is-on::before {
    background: CanvasText;
  }

  .story__skill.is-new::before {
    background: Highlight;
  }

  .story__year {
    border: var(--hairline) solid CanvasText;
  }

  .story.is-live .story__step.is-active .index__num {
    color: Highlight;
  }
}

/* Print: everything visible, nothing pinned. */
@media print {
  .reveal,
  .reveal-load,
  .photo__frame img {
    animation: none;
    opacity: 1;
    transform: none;
    scale: none;
  }

  .topbar,
  #work .section__head,
  .story__panel {
    position: static;
  }

  #work .section__head::after {
    display: none;
  }

  .hero__inner {
    min-height: 0;
  }

  .food__panel[hidden] {
    display: block;
  }

  .topbar__links,
  .food__controls,
  .food__hint,
  .food__map,
  .story__panel {
    display: none;
  }
}
