:root {
  --shell-height: 4.9rem;
  --presentation-bg: #f5f5f3;
  --presentation-line: #c6c6c2;
}

:lang(zh-Hant) {
  --sans: "Avenir Next", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.shell-header {
  color: var(--ink);
  background: var(--presentation-bg);
  border-bottom: 1px solid var(--presentation-line);
}

.presentation-page .shell-header {
  position: sticky;
  top: 0;
  z-index: 5;
}

.shell-inner {
  min-height: var(--shell-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
}

.shell-header a { text-decoration: none; }
.shell-header a:hover { text-decoration: underline; }
.shell-name {
  width: fit-content;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.shell-name span { font-weight: 450; }
.shell-nav, .shell-languages { display: flex; align-items: center; }
.shell-nav { gap: clamp(1rem, 3vw, 2.75rem); }
.shell-nav a { font-size: .9rem; font-weight: 550; white-space: nowrap; }
.shell-nav a[aria-current="page"] { text-decoration: underline; }
.shell-languages {
  justify-self: end;
  border: 1px solid #969690;
  background: #fff2;
}

.shell-languages a {
  min-width: 2.55rem;
  padding: .3rem .45rem;
  font-size: .875rem;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.6;
}

.shell-languages a[aria-current] { background: var(--ink); color: #fff; }
.shell-languages a + a { border-left: 1px solid #969690; }
.shell-header + main:focus { outline: none; }
.archive-work { padding-bottom: clamp(3rem, 7vw, 6rem); }
.presentation-page .skip-link { z-index: 10; }

html:has(.presentation-page) { scroll-behavior: auto; }

.presentation { background: var(--presentation-bg); }
.chapter {
  min-height: min(47.5rem, calc(100svh - var(--shell-height)));
  display: grid;
  align-items: center;
  padding-block: clamp(3.5rem, 8vh, 7rem);
  scroll-margin-top: var(--shell-height);
}

.chapter + .chapter { border-top: 1px solid var(--presentation-line); }
.chapter-hero, .chapter-dark { color: #f8f8f6; background: #191919; }
.chapter-hero, .chapter-close { min-height: calc(100svh - var(--shell-height)); }
.chapter-dark + .chapter, .chapter + .chapter-dark { border-color: #51514f; }
.chapter-career, .chapter-events { background: #eeeee9; }

.hero-layout, .chapter-split, .close-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr);
  align-items: center;
  gap: clamp(2.25rem, 6vw, 7rem);
}

.deck-label {
  color: #53534e;
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.6;
}

:lang(zh-Hant) .deck-label { letter-spacing: .07em; }

.chapter-dark .deck-label, .chapter-hero .deck-label { color: #c6c6bf; }

.hero-identity h1 {
  margin: .18em 0 .2em -.065em;
  font-size: clamp(4.7rem, 10vw, 10.9rem);
  font-weight: 500;
  letter-spacing: -.08em;
  line-height: .88;
}

.hero-identity h1 span { font-weight: 350; color: #cfcfca; }
.hero-role { font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 550; }
.hero-statement {
  max-width: 31ch;
  margin-top: .9rem;
  color: #deded8;
  font-size: clamp(1rem, 1.4vw, 1.21rem);
}

.deck-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1.35rem; margin-top: 1.9rem; }
.deck-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  padding: .5rem .95rem;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.4;
  border: 1px solid currentColor;
  text-decoration: none;
}

.deck-button-light { background: #f6f6f3; color: #191919; }
.deck-button-light:hover { background: #dcdcd5; }
.deck-text-link { font-weight: 650; text-decoration-color: #92928c; }
.deck-text-link:hover { text-decoration-color: currentColor; }

.hero-picture figcaption, .chapter-picture figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .2rem 1rem;
  padding-top: .65rem;
  margin-top: .7rem;
  border-top: 1px solid #51514f;
  color: #c6c6bf;
  font-size: .875rem;
}

.chapter-picture figcaption { border-color: var(--presentation-line); color: #555550; }
.chapter-dark .chapter-picture figcaption { border-color: #51514f; color: #c6c6bf; }
.chapter-heading h2 {
  max-width: 15ch;
  margin: .25em 0 .4em -.05em;
  font-size: clamp(2.8rem, 6.35vw, 6.4rem);
  font-weight: 475;
  letter-spacing: -.07em;
  line-height: .99;
  text-wrap: balance;
}

:lang(zh-Hant) .chapter-heading h2 {
  max-width: 10em;
  margin-left: 0;
  font-size: clamp(2.3rem, 5.5vw, 5.25rem);
  letter-spacing: -.045em;
  line-height: 1.16;
}

.chapter-heading > p:not(.deck-label) { max-width: 45rem; color: #474743; font-size: clamp(1rem, 1.5vw, 1.23rem); }
.chapter-dark .chapter-heading > p:not(.deck-label) { color: #deded8; }
.chapter-heading > .deck-text-link { display: inline-block; margin-top: 1.35rem; }

.career-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(1.75rem, 6vw, 6rem);
  margin-top: clamp(2rem, 5vw, 4.4rem);
}

.career-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.7rem, 2vw, 1.6rem); }
.career-metrics div, .business-metrics div { display: flex; flex-direction: column-reverse; justify-content: start; gap: .35rem; padding-top: 1rem; border-top: 1px solid #84847f; }
.career-metrics dd, .business-metrics dd {
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.075em;
  line-height: .95;
}

.career-metrics dd span, .business-metrics dd span { font-size: .67em; letter-spacing: 0; }
.career-metrics dt, .business-metrics dt { color: #53534e; }
.career-line { margin: 0; padding: 0; list-style: none; }
.career-line li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  align-items: baseline;
  gap: .6rem 1rem;
  padding-block: .85rem;
  border-top: 1px solid var(--presentation-line);
}

.career-line li:last-child { border-bottom: 1px solid var(--presentation-line); }
.career-line li > span, .career-line p { color: #53534e; font-size: .9rem; }
.career-line h3 { margin-bottom: .25rem; font-size: clamp(1.05rem, 1.6vw, 1.32rem); line-height: 1.2; }
.chapter-product .chapter-split { grid-template-columns: minmax(0, .98fr) minmax(0, 1fr); }
.product-picture { max-width: 34rem; }
.product-picture img { background: #e7e7e4; }
.presentation-deck img { aspect-ratio: 16 / 9; object-fit: contain; background: #f8f8f5; }

.event-stories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(1.5rem, 4vw, 2.6rem);
}

.event-story img { aspect-ratio: 16 / 9; object-fit: cover; object-position: center 40%; }
.event-story > div { padding-block: 1rem .2rem; }
.event-story h3 { margin-bottom: .5rem; font-size: clamp(1.34rem, 2.8vw, 2.45rem); letter-spacing: -.04em; line-height: 1.15; }
.event-story p { color: #474743; max-width: 43ch; }
.event-story a { display: inline-block; margin-top: .65rem; }
.chapter-business .chapter-split { grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); }
.business-metrics { display: grid; gap: 1.8rem; }
.business-metrics div { border-color: var(--presentation-line); }
.business-metrics div:last-child dd { font-size: clamp(2.2rem, 5.2vw, 5.75rem); }
.close-layout { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
.close-details > div { border-top: 1px solid #62625b; padding: 1rem 0; }
.close-details dt { color: #c6c6bf; font-size: .875rem; }
.close-details dd { margin-top: .15rem; font-size: 1.15rem; }

.deck-controls {
  color: #fff;
  background: #191919;
}

.deck-progress { height: 2px; background: #5d5d56; }
.deck-progress span { display: block; width: 0; height: 100%; background: #f6f6f3; transition: width .22s ease; }
.deck-control-inner, .deck-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.deck-control-inner { justify-content: space-between; padding-block: .4rem; gap: .35rem .95rem; }
.deck-position { display: flex; flex-wrap: wrap; align-items: baseline; gap: .55rem; padding-inline: .2rem; font-size: .875rem; }
.deck-position [data-slide-count] { color: #c6c6bf; font-variant-numeric: tabular-nums; }
.deck-buttons button {
  padding: .3rem .6rem;
  min-height: 2.2rem;
  color: inherit;
  background: transparent;
  border: 1px solid #8b8b82;
  font: 600 .875rem/1.35 var(--sans);
  cursor: pointer;
}

.deck-buttons button:not(:disabled):hover { color: #191919; background: #fff; }
.deck-buttons button:disabled { opacity: .46; cursor: default; }
.deck-buttons [data-slide-exit] { border-color: transparent; text-decoration: underline; text-underline-offset: .2em; }

@media (prefers-reduced-motion: no-preference) {
  [data-reveal].reveal-pending {
    opacity: 0;
    transform: translateY(18px);
  }

  [data-reveal] { transition: opacity .6s ease-out, transform .6s cubic-bezier(.2,.65,.3,1); }

  [data-reveal].reveal-pending:focus-within {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .deck-progress span { transition: none; }
}

@media (max-width: 760px) {
  :root { --shell-height: 6.35rem; }

  .shell-inner { grid-template-columns: 1fr auto; gap: .1rem .65rem; padding-block: .65rem; }
  .shell-languages { grid-column: 2; grid-row: 1; }
  .shell-nav { grid-column: 1 / -1; gap: .9rem; flex-wrap: wrap; }
  .shell-nav a { font-size: .875rem; }

  .chapter { min-height: auto; padding-block: clamp(2.6rem, 10vw, 4.5rem); }
  .hero-layout, .chapter-split, .chapter-product .chapter-split, .chapter-business .chapter-split,
  .close-layout, .career-layout { grid-template-columns: 1fr; gap: 1.9rem; }
  .hero-layout { gap: 1.8rem; }
  .hero-identity h1 { font-size: clamp(4.5rem, 15vw, 7rem); }
  .chapter-product .chapter-heading { grid-row: 1; }
  .career-line li { grid-template-columns: 6.5rem 1fr; }
  .business-metrics { gap: 1.1rem; }
}

@media (min-width: 761px) and (max-height: 800px) {
  .chapter { padding-block: clamp(2rem, 5.3vh, 3.6rem); }
  .chapter-heading h2 { font-size: clamp(2.8rem, 5.7vw, 5.2rem); }
  :lang(zh-Hant) .chapter-heading h2 { font-size: clamp(2.5rem, 4.9vw, 4.5rem); }
  .event-story img { aspect-ratio: 2 / 1; }
}

.archive-film-link { display: inline-block; margin-top: .6rem; }

@media (max-width: 480px) {
  .event-stories { grid-template-columns: 1fr; }
}

@media print {
  .resume-page .shell-header { display: none; }
}

.is-presenting .chapter h1[tabindex="-1"]:focus,
.is-presenting .chapter h2[tabindex="-1"]:focus { outline: none; }
