:root {
  color-scheme: dark;
  --bg: #101727;
  --ink: #f5f3ea;
  --muted: #b8c2d2;
  --lime: #dcfa8b;
  --line: #34425a;
  --panel: #172238;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sans: "Avenir Next", Avenir, system-ui, sans-serif;
  --display: "Avenir Next", "Arial Black", var(--sans);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.6 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .35; cursor: default; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--bg); }
.frame { margin-inline: auto; }
.skip { position: fixed; top: 10px; left: 10px; transform: translateY(-170%); z-index: 10; padding: 8px 14px; background: var(--lime); color: var(--bg); border-radius: 5px; }
.skip:focus { transform: none; }
h1 > span, .section h2 > span { color: var(--lime); }
.hero { display: grid; }
.intro { min-width: 0; }
.kicker { font: 650 .82rem/1.5 var(--mono); letter-spacing: .105em; color: var(--lime); margin: 0; }
.intro .kicker { display: flex; align-items: center; gap: 10px; }
.accent-rule { width: 27px; height: 1px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 20px 0 26px; font: 820 clamp(5.1rem, 9.6vw, 9.4rem)/.82 var(--display); letter-spacing: -.064em; }
.headline { font-size: clamp(1.12rem, 2.3vw, 1.62rem); line-height: 1.2; font-weight: 700; letter-spacing: -.035em; min-height: 2.45em; margin-bottom: 1px; }
.intro-copy { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.12rem); line-height: 1.55; max-width: 28rem; margin: 0 0 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 17px; border: 1px solid transparent; border-radius: 7px; font-weight: 700; font-size: .94rem; white-space: nowrap; transition: background .18s, color .18s; }
.primary { background: var(--lime); color: #151d0c; }
.primary:hover { background: #ecffbd; }
.outline { border-color: var(--line); color: var(--ink); background: transparent; }
.outline:hover { background: var(--panel); }
.portrait { position: relative; isolation: isolate; overflow: hidden; min-height: 500px; border: 1px solid #42577c; border-radius: 22px; background: radial-gradient(ellipse at 54% 45%, #3d5f96 0, #253b61 50%, #182944 100%); }
.portrait-grid, .portrait-orbit, .portrait-art { position: absolute; pointer-events: none; }
.portrait-grid { inset: 0; background-image: linear-gradient(#aac6fb19 1px, transparent 1px), linear-gradient(90deg, #aac6fb19 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(150deg, #000 3%, #0005 66%, transparent 90%); }
.portrait-orbit { width: 74%; aspect-ratio: 1; border: 1px solid #b1c5ee58; border-radius: 50%; top: 11%; left: 13%; box-shadow: 0 0 0 12px #adcbfb15, inset 0 0 62px #a7c4f11e; }
.cross { position: absolute; color: #bed1ff; font: 1.1rem var(--mono); }
.cross-a { top: 16px; left: 19px; }
.cross-b { top: 16px; right: 19px; }
.portrait-art { width: min(98%, 530px); aspect-ratio: 1; bottom: -16%; left: 50%; margin-left: max(-49%, -265px); transform-origin: 50% 77%; transform: perspective(700px) translate(var(--head-x, 0), var(--head-y, 0)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) rotateZ(var(--tilt-z, 0deg)); transition: transform 230ms cubic-bezier(.18,.73,.33,1); filter: drop-shadow(0 18px 30px #08152f55); }
.portrait-art img, .portrait-art canvas { position: absolute; display: block; width: 100%; height: 100%; inset: 0; object-fit: contain; }
.picker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 13px 0 16px; border-block: 1px solid var(--line); }
.picker h2 { font-size: .95rem; margin: 0; }
.questions { display: flex; gap: 8px; flex-wrap: wrap; }
.questions button { min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); background: transparent; border-radius: 30px; color: var(--muted); font-size: .875rem; }
.questions button:hover, .questions button[aria-pressed="true"] { background: var(--panel); color: var(--lime); border-color: #698052; }
.answer p { margin: 0 0 10px; }
.answer a { display: inline-block; color: var(--lime); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.section { padding: 64px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 12px; }
.section-top { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
.section h2 { font: 820 clamp(2.4rem, 5.4vw, 5rem)/.95 var(--display); letter-spacing: -.059em; margin: 0; }
.slide-controls { display: flex; gap: 8px; align-items: center; }
.slide-controls > button { flex: none; border: 1px solid var(--line); background: var(--panel); border-radius: 50%; width: 44px; height: 44px; font: 1.45rem/1 var(--sans); }
.slide-controls > button:hover { border-color: var(--lime); }
.work-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 5px 0 15px; }
.work-browser { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.work-jumps { display: flex; justify-content: center; }
.work-jumps button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4d3122;
}
.work-jumps button::before {
  content: "";
  width: 17px;
  height: 2px;
  border-radius: 3px;
  background: currentColor;
  opacity: .63;
  transition: opacity 150ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1);
}
.work-jumps button span {
  position: absolute;
  bottom: calc(100% - 3px);
  z-index: 3;
  width: max-content;
  max-width: 184px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff3e6;
  color: #39251a;
  font-size: .8rem;
  font-weight: 750;
  line-height: 1.25;
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px) scale(.95);
  transition: opacity 140ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1);
}
.work-jumps button:focus-visible::before { opacity: 1; transform: scaleX(1.45); }
.work-jumps button:focus-visible span { opacity: 1; transform: none; }
@media (max-width: 1020px) {
  .work-jumps button:first-child span { left: 0; }
  .work-jumps button:last-child span { right: 0; }
}
@media (hover: hover) {
  .work-jumps button:hover::before { opacity: 1; transform: scaleX(1.45); }
  .work-jumps button:hover span { opacity: 1; transform: none; }
}
@media (min-width: 1021px) {
  .work-browser { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 9px; }
  .work-jumps { position: relative; z-index: 2; flex-direction: column; }
  .work-jumps button { width: 36px; justify-items: end; }
  .work-jumps button::before { width: 24px; transform-origin: right center; }
  .work-jumps button span {
    right: calc(100% + 9px);
    bottom: auto;
    transform: translateX(7px) scale(.95);
    transform-origin: right center;
  }
  .work-jumps button:focus-visible span { transform: none; }
}
@media (min-width: 1021px) and (hover: hover) and (pointer: fine) {
  .work-jumps button { height: 17px; }
  .work-jumps button:hover span { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .work-jumps button::before, .work-jumps button span { transition: none; }
}
.project { min-width: 0; scroll-snap-align: start; }
.project button { display: block; width: 100%; height: 100%; text-align: left; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.project button:hover { border-color: var(--lime); }
.project button:focus-visible { outline-offset: -3px; }
.project-label { display: flex; gap: 14px; justify-content: space-between; align-items: center; min-height: 99px; padding: 14px 16px; }
.project-label p { margin: 0 0 5px; color: var(--muted); font: 600 .72rem var(--mono); letter-spacing: .06em; }
.project-label h3 { margin: 0; line-height: 1.15; letter-spacing: -.035em; font-size: clamp(1.06rem, 1.8vw, 1.35rem); }
.project-label > span { color: var(--lime); font-size: 1.3rem; }
.slideshow { border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: var(--panel); }
.slide { display: grid; grid-template-columns: 104px 1fr; min-height: 148px; gap: 16px; }
.slide-visual { display: grid; align-items: center; justify-items: center; font: 3rem/1 var(--mono); color: #112039; border-radius: 8px; background: #c0d7fb; }
.slide-visual[data-chapter="snackpass"] { background: #f2c297; }
.slide-visual[data-chapter="profit"] { background: #d9ee9b; }
.slide-visual[data-chapter="salesforce"] { background: #d2baf2; }
.slide-visual[data-chapter="personal"] { background: #b7dfd7; }
.slide-copy { align-self: center; }
.slide-copy h3 { margin: 3px 0 5px; font-size: 1.4rem; line-height: 1.15; letter-spacing: -.04em; }
.slide-copy > p:last-child { color: var(--muted); margin: 0; }
.slide-controls { margin-top: 11px; justify-content: space-between; }
#chapter-dots { display: flex; }
#chapter-dots button { display: grid; place-items: center; width: 37px; height: 44px; background: transparent; border: 0; padding: 0; }
#chapter-dots button::after { content: ""; width: 9px; height: 9px; border: 1px solid var(--muted); border-radius: 50%; }
#chapter-dots button[aria-current="true"]::after { background: var(--lime); border-color: var(--lime); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 81px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 0 0 15px 15px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  left: -4px;
  top: 6px;
  border-radius: 50%;
  background: var(--lime);
}
.timeline time { color: var(--lime); font: .8rem/1.45 var(--mono); padding-top: 1px; }
.timeline h4, .timeline p { margin: 0; line-height: 1.35; }
.timeline h4 { font-size: 1rem; }
.timeline p { margin-top: 1px; color: var(--muted); font-size: .89rem; }
dialog {
  --panel-pad: clamp(18px, 4vw, 38px);
  color: var(--ink);
  background: var(--panel);
  width: min(740px, calc(100% - 28px));
  max-height: min(88dvh, 850px);
  padding: 0;
  border: 1px solid #60718b;
  border-radius: 18px;
  overscroll-behavior: contain;
}
dialog::backdrop { background: #090e1acb; backdrop-filter: blur(4px); }
.dialog-top {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: min(var(--panel-pad), 22px) var(--panel-pad) 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.dialog-top .button { gap: 8px; }
.dialog-top h2 {
  font: 810 clamp(1.65rem, 4vw, 2.5rem)/1.08 var(--display);
  letter-spacing: -.055em;
  margin: 7px 0 0;
  overflow-wrap: anywhere;
}
.dialog-top h2 span { color: var(--lime); }
.panel-body { padding: 14px var(--panel-pad) min(var(--panel-pad), 22px); }
.case-summary {
  border-left: 3px solid var(--lime);
  border-radius: 0 6px 6px 0;
  background: #222f3c;
  margin: 0 0 14px;
  padding: 11px 14px;
  font-size: 1.1rem;
  color: var(--ink);
  font-weight: 700;
}
.case-content section { border-top: 1px solid var(--line); padding-block: 12px; }
.case-content section h3 { margin: 0 0 5px; font-size: 1.1rem; }
.case-content p { max-width: 72ch; margin: 0; color: var(--muted); line-height: 1.5; }

.case-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 10px;
  margin-top: 12px;
}
.case-photos img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 8px;
  background: #f2f2f2;
}

@media (min-width: 721px) {
  #case-dialog {
    width: min(820px, calc(100% - 28px));
    max-height: min(94dvh, 900px);
  }
}

@media (max-width: 720px) {
  h1 { font-size: clamp(4.45rem, 15vw, 6.6rem); margin: 21px 0 22px; }
  .section { padding-block: 42px; }
}
@media (max-width: 365px) {
  #chapter-dots button { width: 29px; }
  .slide { grid-template-columns: 71px 1fr; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .portrait-art { transform: none !important; }
}

/* The opening stage keeps the portrait, prompts, and work in view together. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.picker { display: grid; position: relative; align-items: start; gap: 7px; }
.prompt-menu { position: relative; z-index: 3; }
.prompt-menu > summary {
  list-style: none;
  min-height: 46px;
  padding: 9px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #60718b;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}
.prompt-menu > summary::-webkit-details-marker { display: none; }
.prompt-menu > summary:hover, .prompt-menu[open] > summary { border-color: var(--lime); }
.prompt-menu > summary span { color: var(--lime); font-size: 1.2rem; line-height: 1; }
.prompt-menu[open] > summary .prompt-chevron { transform: rotate(180deg); }
.answer { max-width: none; padding: 10px 16px 17px; border: 1px solid #60718b; border-radius: 8px; background: var(--panel); }
#answer-copy { max-width: 72ch; }
#about { width: min(660px, calc(100% - 28px)); }
#about .slideshow { padding: 12px; background: #101b30; }
#about .slide { grid-template-columns: clamp(68px, 20%, 104px) minmax(0, 1fr); align-items: stretch; min-height: 104px; }
#about .slide-visual { min-height: 104px; }
#about .slide-copy { padding-block: 3px; }
#about .about-career { margin-top: 25px; }
#about .about-career > h3 { font-size: 1.1rem; margin: 0 0 13px; }
#about .timeline { margin-top: 0; }
@media (max-width: 720px) {
  dialog, #about {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 17px 17px 0 0;
    border-bottom: 0;
  }
  .panel-body { padding-bottom: max(var(--panel-pad), env(safe-area-inset-bottom)); }

}
@media (max-width: 365px) {
  dialog { --panel-pad: 14px; }
  .dialog-top { gap: 6px; }
  .dialog-top .button { padding-inline: 10px; }
}
