@font-face {
  font-family: Outfit;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/outfit-latin.woff2) format("woff2");
}
:root {
  --ink: #052a0d;
  --paper: #fcf5e8;
  --lime: #d0f923;
  --accent: #88bc00;
  font: 430 100%/1.2 Outfit, "Century Gothic", sans-serif;
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}
* { box-sizing: border-box }
body,h1,h2,h3,p { margin: 0 }
button,input,textarea { font: inherit; color: inherit }
button,a { color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent }
button { border: 0; background: none; padding: 0 }
a { text-decoration: none }
button,a,i { display: inline-flex; align-items: center; justify-content: center }
button,a { gap: .2em; transition: transform .18s ease, background-color .18s ease }
:focus-visible { outline: 3px solid #2078ec; outline-offset: 4px }
img,picture { display: block; width: 100%; height: auto }
[hidden] { display: none !important }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }
i { flex: none; width: 1em; height: 1em; background: currentColor; mask: var(--icon) center / contain no-repeat }
.mail { --icon: url(../images/portfolio/icons/Mail.svg); width: 1.23em; height: 1.23em }
.down { --icon: url(../images/portfolio/icons/ArrowDown.svg) }
.up { --icon: url(../images/portfolio/icons/ArrowUp.svg) }
.external { --icon: url(../images/portfolio/icons/ArrowUpRight.svg) }
.right { --icon: url(../images/portfolio/icons/ArrowRight.svg) }
.previous { --icon: url(../images/portfolio/icons/ChevronLeft.svg) }
.following { --icon: url(../images/portfolio/icons/ChevronRight.svg) }
.dark { background: #082410; color: var(--paper); --accent: var(--lime) }
section { overflow: clip }
.layout {
  position: relative;
  margin-inline: auto;
  width: min(100% - 96px, 1160px);
  min-height: 100vh;
  min-height: max(100dvh, var(--scene-min, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  container-type: inline-size;
}
h1,h2 { font-size: clamp(3.25rem, 7cqw, 5rem); line-height: .99; font-weight: 860; letter-spacing: -.045em }
h1 span,h2 span { color: var(--accent) }
.pill,.switch { border-radius: 100vw; font-weight: 780; letter-spacing: -.027em }
.pill { background: var(--lime); color: var(--ink); padding: .5em .9em; min-height: 44px; line-height: 1.1 }
.contact-button { font-size: 1.375rem; min-height: 64px; padding: .65em 1.35em; gap: .5em; box-shadow: 0 5px 0 #0004 }
.pill:hover,.car-button:hover { transform: translateY(-3px) }
.pill:active,.car-button:active { transform: translateY(2px) }
a:not(.pill):hover { text-decoration: underline; text-underline-offset: .16em }

/* Introduction */
.hello { background: #092410 }
.hello .layout { --scene-min: clamp(530px, 51vw, 680px) }
.hello-copy { width: 50%; position: relative; z-index: 1; padding-block: 42px }
h1 { font-size: clamp(3.5rem, 7.6cqw, 5.5rem) }
.logo {
  position: relative;
  width: clamp(132px, 14cqw, 164px);
  aspect-ratio: 250/69;
  margin-bottom: clamp(36px, 5cqw, 58px);
}
/* Mockup 1 has 278px of lettering inside a 304 × 102 image. */
.logo-art {
  position: absolute;
  left: 50%; top: 50%; translate: -50% -50%;
  width: 109.35%; aspect-ratio: 304/102;
  background: url(../images/portfolio/don-ph.webp) center / contain no-repeat;
}
.eye {
  position: absolute;
  left: 13.49%; top: 51.7%; translate: -50% -50%;
  width: 7.6%; aspect-ratio: 1;
  border-radius: 50%; background: var(--paper);
  display: grid; place-items: center; overflow: hidden;
}
.eye + .eye { left: 29.11% }
.eye::after { content: ""; width: 56%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); transform: var(--gaze, none); transition: transform .11s ease-out }
.hello-copy p { font-size: clamp(1.25rem, 2.35cqw, 1.625rem); letter-spacing: -.012em; margin: 22px 0 30px; line-height: 1.38 }
.next,.facebook { display: flex; width: fit-content; min-height: 44px; margin-top: 18px; font-size: 1.1875rem; font-weight: 560 }
.portrait { position: absolute; right: 0; bottom: 0; height: var(--scene-min); aspect-ratio: 786/992; max-width: 49%; display: block }
.portrait-crop { display: block; height: 100%; overflow: hidden }
.portrait .actor { height: 100%; aspect-ratio: 786/992 }
.portrait:focus-visible { outline-offset: -5px }
.glint,.spark { position: absolute; width: 10%; left: 76.5%; top: 48.3%; opacity: 0; clip-path: circle(46%); mix-blend-mode: screen; pointer-events: none }
.glint { animation: flash .8s .45s ease-in-out }
.hello .layout::after { content: ""; position: absolute; left: calc(100% - 2px); top: 0; bottom: 0; width: 50vw; background: #d0f926 }
@media (min-width: 761px) {
  /* Continue the illustrated panel edge above the portrait without stretching Don. */
  .portrait::before {
    content: "";
    position: absolute;
    inset: -100vh 0 0;
    pointer-events: none;
    --edge: calc(var(--scene-min) * .055);
    background: linear-gradient(to right, #092410 calc(var(--edge) - 4px), #b9cebf var(--edge), #090c04 calc(var(--edge) + 2px) calc(var(--edge) + 6px), #d0f926 calc(var(--edge) + 7px));
  }
  .portrait picture { clip-path: polygon(0 4%, 10% 4%, 10% 0, 100% 0, 100% 100%, 0 100%) }
}
@keyframes flash {
  0%,100% { opacity: 0; transform: scale(.3) rotate(-30deg) }
  48% { opacity: 1; transform: scale(1.45) rotate(13deg); filter: brightness(1.7) }
}

/* Switches and vehicle configurator */
.switch { display: flex; width: min(100%, 320px); border: 2px solid var(--ink); font-size: clamp(1rem, 1.75cqw, 1.25rem) }
.switch button { flex: 1; font-weight: inherit; letter-spacing: inherit; border-radius: inherit; min-height: 48px; margin: -1px; white-space: nowrap }
.switch button[aria-pressed=true] { background: var(--ink); color: var(--paper) }
.switch button[aria-pressed=false]:hover { background: #ddecbb }
.build .layout,.keeper .layout { padding-block: clamp(52px, 5vw, 80px) }
.build-copy { width: 45% }
.build-copy p { font-size: clamp(1.125rem,2.15cqw,1.55rem); font-weight: 580; letter-spacing: -.02em; line-height: 1.28; max-width: 21em; margin: 22px 0 34px; text-wrap: balance }
.demo { width: 51%; max-width: 548px; position: relative; margin-right: 1.5%; container-type: inline-size }
.dialogue { position: absolute; right: 83%; bottom: 72%; width: 71%; z-index: 1; pointer-events: none }
.speech {
  background: var(--lime);
  color: var(--ink);
  font-size: clamp(1.15rem, 5.6cqw, 1.95rem);
  font-weight: 790;
  line-height: 1.14;
  letter-spacing: -.035em;
  text-wrap: balance;
  position: relative;
  padding: .64em .86em;
  border-radius: 1.12em;
  transform-origin: 95% 100%;
}
.speech::after {
  content: "";
  position: absolute;
  inset: calc(100% - .55em) -1.1em auto auto;
  width: 4em;
  height: 2.1em;
  background: inherit;
  clip-path: polygon(0 0, 49% 0, 100% 100%);
}
.laptop { position: relative }
.don-face {
  position: absolute;
  left: 27.05%; top: 0;
  width: 47.6%; height: 42.44%;
  border-radius: 40% 40% 15% 15%;
}
/* Register the face against the bezel, leaving the original hands in front. */
.don-face > img { height: 100%; clip-path: polygon(0 0,96% 0,96% 25%,100% 25%,100% 88%,87% 92%,83% 100%,17% 100%,13% 92%,0 88%) }
/* Isolate the mouth on the 250 × 238 face. Keep the lower lip at the bezel. */
.don-mouth {
  position: absolute;
  inset: 0;
  background: #ffd0a2;
  clip-path: polygon(34% 88.5%, 36% 87%, 44% 88%, 56% 88%, 62% 87%, 66% 89%, 61% 98%, 39% 98%);
}
/* The wink has a higher right corner and a lower nose. */
[data-expression="wink"]:not([hidden]) ~ .don-mouth {
  clip-path: polygon(35% 90%, 39% 89%, 46% 91%, 53% 90%, 63% 87.4%, 67% 89%, 63% 98.3%, 40% 98.3%);
}
.don-mouth img { height: 100%; clip-path: inherit; transform-origin: 50% 98.3% }
.frame { clip-path: polygon(7.5% 0,100% 0,100% 100%,0 100%,0 86%,7.5% 82%) }
.screen { position: absolute; left: 18.74%; top: 45.66%; width: 64.11%; height: 40.73%; border-radius: 3.8% / 5%; container-type: inline-size }
.configurator { background: #e5f8c9; color: #062912 }
.garage { display: flex; height: 52%; align-items: center; justify-content: space-between; padding: 3% 2.7% 0 }
.car-button { width: 12%; border-radius: 100%; background: var(--ink); color: var(--paper); aspect-ratio: 1; flex: none; position: relative; font-size: 8cqw }
.car-button::after { content: ""; position: absolute; width: max(100%,44px); height: max(100%,44px) }
.car { position: relative; width: 72%; align-self: end; filter: drop-shadow(0 1cqw .3cqw #3657033b) }
.car[data-model=suv] { width: 66% }
.rim { width: var(--diameter); aspect-ratio: 1; position: absolute; top: var(--hub); left: var(--rear); translate: -50% -50%; border-radius: 50% }
.rim:last-child { left: var(--front) }
.position { height: 10%; display: flex; align-items: center; justify-content: center; gap: 2.2cqw }
.position b { background: #91b07c; width: 1.6cqw; aspect-ratio: 1; border-radius: 100% }
.position .current { width: 2.3cqw; background: currentColor }
.choices { display: flex; justify-content: space-evenly; align-items: center; height: 37%; padding-bottom: 2% }
.choices button,.match { position: relative; width: 23.5%; aspect-ratio: 1; padding: .7%; border: 1.2cqw solid transparent; border-radius: 50% }
.choices button:hover { transform: scale(1.06) }
.choices button[aria-pressed=true],.match.chosen { border-color: #a6d80c }
.choices button[aria-pressed=true]::after,.match.chosen::after {
  content: ""; position: absolute; width: 32%; aspect-ratio: 1; border: .4cqw solid var(--ink);
  border-radius: 100%; background: var(--lime) url(../images/portfolio/icons/Check.svg) center / 90% no-repeat; top: -10%; right: -9%;
}
.diagram { background: #00340b }
.diagram > img,.matches { position: absolute }
.input-car { width: 31%; top: 40.4%; left: 3.7%; transform: translateY(-50%) }
.lookup { left: 35%; width: 5.2%; top: 37.5%; animation: light .5s both }
.engine { left: 40%; width: 18.6%; top: 26.75%; border-radius: 50%; animation: rotate 1.65s .2s both }
.database { width: 14.8%; left: 42%; top: 55%; animation: light .82s .6s both }
.branch { width: 17.3%; height: 64.3%; left: 59.15%; top: 17.9%; animation: appear .45s 1.25s both }
.matches { width: 18%; left: 77%; height: 85%; top: 7.5%; display: flex; flex-direction: column; justify-content: space-between }
.match { width: 100%; border-width: .9cqw; padding: 5%; animation: pop .4s 1.6s both }
.match:nth-child(2) { animation-delay: 1.78s }
.match:nth-child(3) { animation-delay: 1.96s }
.match.chosen { animation: pop .4s var(--timing) both, highlight .35s 2.3s backwards }
.match.chosen::after { animation: pop .35s 2.3s both }
@keyframes highlight { from { border-color: transparent } }
@keyframes rotate { from { transform: rotate(0) } to { transform: rotate(360deg) } }
@keyframes light { 0% { opacity: .35 } 50% { filter: brightness(1.5) sepia(1) saturate(5) hue-rotate(20deg) } 100% { opacity: 1 } }
@keyframes appear { from { opacity: 0 } }
@keyframes pop { 0% { scale: .5; opacity: 0 } 70% { scale: 1.07 } 100% { scale: 1; opacity: 1 } }

/* Envy */
.keeper { background: #03240f }
.keeper-copy { width: 42% }
.keeper p { max-width: 19em; font-size: clamp(1.125rem, 2cqw, 1.375rem); line-height: 1.48; margin: 24px 0 30px; text-wrap: balance }
.keeper .pill,.details .pill { font-size: 1.1875rem; min-height: 52px; padding: .7em 1.15em }
.road { width: 48%; max-width: 504px; margin-right: 3% }
.road .actor { clip-path: polygon(12% 0,100% 0,100% 100%,0 100%,0 48%,12% 39%) }
.spark { width: 6.5%; translate: -50% -50%; left: 28.9%; top: 68% }
.in-view .spark { animation: drive 3s .25s ease-in-out both }
@keyframes drive {
  0% { left: 60%; top: 51%; opacity: 0 }
  9% { left: 32%; top: 36%; opacity: 1 }
  16% { left: 21%; top: 24% }
  23% { left: 29%; top: 13% }
  31% { left: 52%; top: 7% }
  39% { left: 68%; top: 12% }
  47% { left: 65%; top: 26% }
  61% { left: 30%; top: 42% }
  72% { left: 11%; top: 58% }
  77% { left: 12%; top: 69%; opacity: 1 }
  84% { left: 20%; top: 77%; opacity: 0 }
  87% { left: 29%; top: 68%; opacity: 0 }
  94% { filter: brightness(2); opacity: 1; scale: 1.6 }
  100% { left: 29%; top: 68%; opacity: 0 }
}

/* Projects */
.work .layout { flex-direction: column; align-items: start; justify-content: center; --scene-min: clamp(540px, 51vw, 700px); padding-block: 64px }
.work h2 { font-size: clamp(2.85rem, 6.5cqw, 4.75rem); margin-bottom: 26px }
.work .switch { width: min(40%, 320px) }
#projects { width: 39%; margin-top: 26px }
article + article { border-top: 1px solid #08270f38 }
article[hidden] + article { border-top: 0 }
h3 { font-size: clamp(1.4rem, 2.55cqw, 1.875rem); letter-spacing: -.025em; font-weight: 720 }
h3 button { width: 100%; justify-content: space-between; min-height: 48px; padding: .48em 0; line-height: 1.2; letter-spacing: inherit }
h3 button:hover { color: #396900 }
h3 i { --icon: url(../images/portfolio/icons/ChevronRight.svg); width: .8em }
h3 button[aria-expanded=true] { text-decoration: underline; text-decoration-color: #bbe715; text-decoration-thickness: .15em; text-underline-offset: .16em }
h3 button[aria-expanded=true] i { --icon: url(../images/portfolio/icons/ArrowRight.svg); width: 1.1em }
.details p { font-size: 1.125rem; line-height: 1.42; padding: 0 0 1em }
.project-preview { position: absolute; right: 1%; top: 50%; translate: 0 -50%; width: 50%; max-width: 510px; display: grid; justify-items: center; gap: 18px }
.project-art { position: relative; width: 100%; animation: appear .24s ease }
.site { position: absolute; left: 13.9%; top: 41.93%; width: 71.77%; height: 43.41%; object-fit: cover; border-radius: 1.5% / 2.5% }
.details .pill { background: var(--ink); color: var(--paper); padding-inline: 1.45em }

/* Contact */
.contact { background: #04200e }
.contact .layout { padding-block: 56px }
.wave { width: 48%; max-width: 450px }
.contact-copy { width: 41% }
.contact-copy h2 { margin-bottom: 30px }
.facebook { font-size: 1.25rem }
.top { position: absolute; bottom: 32px; right: 0; font-size: 1.0625rem; min-height: 44px }
dialog { width: min(92%, 500px); max-height: 92dvh; border: 0; border-radius: 26px; padding: clamp(20px,5vw,40px); color: var(--ink); background: var(--paper); overscroll-behavior: contain }
dialog::backdrop { background: #011607bb }
body:has(dialog[open]) { overflow: hidden }
form { display: grid; gap: 1rem }
form h2 { font-size: clamp(2.1rem,7vw,3rem); margin-bottom: .25em }
.close { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; font-size: 24px }
.close i { --icon: url(../images/portfolio/icons/X.svg) }
label { font-weight: 700 }
input,textarea { width: 100%; display: block; border-radius: 10px; border: 1.5px solid var(--ink); padding: .77em; background: #fffdf6; color: var(--ink); font-weight: 450; margin-top: .25rem }
textarea { resize: vertical }
form .pill { font-size: 1.3rem; justify-self: start }
form [role=status]:empty { display: none }
form [role=status] a { display: block; margin-top: .65em; text-decoration: underline; font-weight: 700 }
form .pill:disabled { opacity: .6; cursor: wait }

@media (min-width: 761px) and (max-width: 1239px) {
  .build-copy { padding-top: 90px }
  .dialogue { bottom: 77%; width: 68% }
  .speech { font-size: clamp(1.0625rem, 5cqw, 1.5rem) }
}
@media (max-width: 980px) and (min-width: 761px) {
  .layout { width: calc(100% - 64px) }
  .hello .layout { --scene-min: 485px }
  .portrait { max-width: 52% }
  .hello-copy { padding-block: 32px }
  .logo { margin-bottom: 30px }
  .next { margin-top: 12px }
  .build-copy { width: 42% }
  .demo { width: 55%; margin: 0 }
  .details p { font-size: 1rem }
}
@media (max-width: 760px) {
  .layout { flex-direction: column; justify-content: center; width: min(100% - 48px, 440px) }
  h2,.work h2 { font-size: clamp(2.375rem, 13cqw, 2.875rem) }
  .hello { background: #0e250e }
  .hello .layout { flex-direction: column-reverse; --scene-min: 0px; padding-top: 60px }
  .hello .layout::after { display: none }
  .hello-copy { position: static; width: 100%; padding: 30px 0 38px; text-align: center }
  .logo { position: absolute; left: 0; top: 19px; margin: 0; width: 108px }
  /* Use the original dark mark at (32, 28) in the 853 × 914 mobile artwork. */
  .logo-art { background: url(../images/portfolio/hello-small.webp) 5.83% 3.45% / 280.59% auto no-repeat }
  .eye { left: 12.66%; top: 53.2%; width: 8.1%; background: var(--lime) }
  .eye + .eye { left: 27.8% }
  h1 { font-size: clamp(2.625rem, 15cqw, 3.25rem) }
  .hello-copy p { font-size: 1.125rem; margin: 16px auto 23px; line-height: 1.4 }
  .contact-button { min-height: 54px; font-size: 1.1875rem; padding-inline: 1.55em }
  .next { font-size: 1.0625rem; margin: 12px auto 0 }
  .portrait { position: relative; width: min(91%, 328px); height: auto; aspect-ratio: auto; max-width: none; isolation: isolate }
  .portrait::before { content: ""; position: absolute; inset: -100vh -50vw 4.8%; background: #c9ef26; z-index: -1; pointer-events: none }
  /* Crop the printed logo out of the mobile art so only the live one appears. */
  .portrait .actor { height: auto; aspect-ratio: 853/914; margin-top: -15% }
  .portrait picture img { aspect-ratio: 853/914 }
  .glint { width: 8.4%; left: 81.5%; top: 55.5% }
  .keeper .layout { padding: 54px 0 }
  .build .layout { padding: 28px 0; --drift: 20px }
  .build-copy { width: 100%; text-align: center }
  .build br { display: none }
  .build-copy p { max-width: 17em; font-size: 1.125rem; margin: 15px auto 18px }
  .work h2 { margin-bottom: 14px }
  .switch,.work .switch { font-size: 1.0625rem; width: min(100%, 282px); margin-inline: auto }
  .switch button { min-height: 44px }
  .demo { width: min(100% + 12px, 360px); margin: 16px 0 0; flex: none }
  /* Reserve three lines so a longer reply never moves the controls. */
  .dialogue { position: relative; inset: auto; width: 83%; min-height: max(5.6rem, 26.1cqw); display: grid; align-items: center; margin: 0 auto 22px }
  .speech { font-size: clamp(1.025rem,5.55cqw,1.25rem); text-align: center; transform-origin: center bottom }
  .speech::after { inset: calc(100% - 1px) auto auto 50%; translate: -50%; width: 1.96em; height: 1.22em; clip-path: polygon(0 0,100% 0,50% 100%) }
  .don-face { left: 23.36%; top: .46%; width: 53.87%; height: 40.28% }
  .frame { clip-path: none; aspect-ratio: 852/1090 }
  .screen { width: 71.83%; height: 43.22%; left: 14.2%; top: 43.94% }
  .garage { padding-top: 5% }
  .car-button { width: 12.8%; font-size: 9cqw }
  .car[data-model=suv] { width: 69% }
  .choices button { width: 26% }
  .engine { top: 28.1%; left: 39.45% }
  .input-car { top: 39.7% }
  .database { top: 52.5%; width: 16.9%; left: 40.2% }
  .branch { width: 17.3%; height: 65%; left: 58.25%; top: 17.5% }
  .matches { width: 19%; top: 8.5%; height: 83%; left: 76.7% }
  .keeper .layout { flex-direction: column-reverse; gap: 26px }
  .road { width: min(87%, 300px); margin: 0 }
  .keeper-copy { width: 100% }
  .keeper br { display: none }
  .keeper p { font-size: 1.125rem; margin: 18px 0 24px }
  .keeper .pill,.details .pill { font-size: 1.0625rem; min-height: 48px }
  .work .layout { align-items: center; --scene-min: 0px; padding-block: 24px }
  #projects { width: 100%; margin-top: 14px }
  h3 { font-size: 1.4375rem }
  h3 i { --icon: url(../images/portfolio/icons/Plus.svg) }
  h3 button[aria-expanded=true] i { --icon: url(../images/portfolio/icons/Minus.svg); width: .8em }
  h3 button { padding-block: .4em }
  .details p { font-size: 1.0625rem; padding-bottom: 14px }
  .project-preview { position: static; width: min(100%, 330px); margin: 0 auto 16px; translate: none; gap: 10px }
  [data-group="apps"] .project-preview { max-width: clamp(240px, 100svh - 520px, 330px) }
  .contact .layout { padding: 46px 0 26px }
  .wave { width: min(88%, 292px); align-self: center }
  .contact-copy { width: 100%; margin-top: 24px; padding: 0; text-align: center }
  .contact-copy h2 { margin-bottom: 24px }
  .facebook { font-size: 1.125rem; margin: 15px auto 0 }
  .top { position: static; margin: 24px auto 0; font-size: 1rem }
}
@media (max-width: 760px) and (max-height: 830px) {
  .build .layout { padding-block: 14px }
  .build-copy p { font-size: 1.0625rem; margin-block: 10px 12px }
  .demo { margin-top: 10px; max-width: clamp(264px, 78svh - 264px, 360px) }
}
@media (max-width: 760px) and (max-height: 680px) {
  .keeper .layout { padding-block: 46px 14px; gap: 16px }
  .keeper p { margin-block: 12px 16px }
  .road { max-width: clamp(200px, 100svh - 370px, 300px) }
  .portrait { width: min(86%, 260px) }
  .hello-copy { padding-block: 20px 24px }
  .hello-copy p { margin-block: 12px 18px }
  .next { margin-top: 8px }
}
/* Character replies float above the illustration without changing section height. */
:where([data-character]), .actor { position: relative; display: block }
[data-character] { text-align: left }
.actor { transition: scale .2s ease }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  [data-character]:not(.portrait):hover .actor { scale: 1.012 }
}
.quip {
  position: absolute;
  z-index: 2;
  isolation: isolate;
  background: var(--lime);
  color: var(--ink);
  border-radius: 1.12em;
  padding: .68em .92em;
  font-size: clamp(1.0625rem, 2.15cqw, 1.55rem);
  font-weight: 770;
  letter-spacing: -.025em;
  line-height: 1.16;
  text-wrap: balance;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s;
}
.quip.visible { opacity: 1; transition-duration: .1s }
.quip:not(.visible) { visibility: hidden; transition: opacity .22s, visibility 0s .22s }
.quip::after {
  content: "";
  position: absolute;
  background: inherit;
  z-index: -1;
  width: 2.9em; height: 1.62em;
  top: calc(100% - .5em); right: -.35em;
  clip-path: polygon(0 0, 60% 0, 100% 100%);
}
.portrait .quip {
  right: 54%; top: clamp(-82px, var(--scene-min) - 100dvh + 16px, 16px);
  width: 64%; background: var(--paper); transform-origin: bottom right;
}
.road .quip { right: 66%; bottom: 75%; width: 62%; transform-origin: bottom right }
.road .quip::after { width: 3.6em; height: 2em; right: -.85em }
.project-art .quip { right: 69%; bottom: 80%; width: 60%; transform-origin: bottom right }
.wave .quip { left: 74%; bottom: 76%; width: 65%; transform-origin: bottom left }
.wave .quip::after { right: auto; left: -.4em; scale: -1 1 }
.project-art .glint,.wave .glint { animation: none; width: 9%; translate: -50% -50% }
.project-art .glint { left: 63.4%; top: 24.5% }
.wave .glint { left: 76%; top: 51% }
@media (max-width: 1000px) and (min-width: 761px) {
  .portrait .quip { right: 41%; width: 66% }
  .road .quip { right: 62%; bottom: 80%; width: 62% }
  .project-art .quip { right: 68%; width: 56%; bottom: 82% }
}
@media (max-width: 760px) {
  .quip { font-size: 1.0625rem; text-align: center }
  .portrait .quip {
    top: auto; bottom: 94%; right: -6%;
    width: min(75%, 100vw - 160px);
    transform-origin: bottom left;
  }
  .portrait .quip::after { left: 15%; scale: -1 1 }
  .road .quip { right: 15%; bottom: 91%; width: 88% }
  .road .quip::after { right: 19%; width: 2em; height: 1.6em }
  .wave .quip { width: 83%; left: 10%; bottom: 88%; transform-origin: bottom center }
  .project-art .quip { width: 80%; left: 10%; bottom: auto; top: 42%; transform-origin: top center }
  .wave .quip::after,.project-art .quip::after { left: 50%; translate: -50%; width: 1.9em; clip-path: polygon(0 0, 100% 0, 50% 100%) }
  .project-art .quip::after { top: auto; bottom: calc(100% - .5em); scale: 1 -1 }
}
@media (max-width: 380px), (max-width: 760px) and (max-height: 795px) {
  .portrait .quip { top: 0; right: -3%; bottom: auto; width: 86%; font-size: 1rem }
  .road .quip { bottom: 82%; width: 94%; right: 10%; font-size: 1rem }
}

/* Each mask is registered to the original illustration, including its tilt. */
.feature { position: absolute; inset: 0; background: var(--skin); pointer-events: none }
.feature img { clip-path: inherit; transform-origin: inherit }
.portrait .lips {
  --skin: #fece94; --tilt: 19deg;
  transform-origin: 41.35% 69.35%;
  clip-path: polygon(24.3% 64.1%,25% 62%,28% 60.9%,31% 62.6%,35.5% 65.2%,43.6% 67.6%,50.5% 68.75%,54.45% 67.64%,57.1% 70%,55.7% 72.7%,50.6% 75.2%,43.9% 76.1%,35.75% 75.2%,28.5% 71%);
}
.road .lips {
  --skin: #fdc78a; --tilt: 20deg;
  transform-origin: 62.8% 59.3%;
  clip-path: polygon(57.5% 57.7%,57.8% 56.3%,59.3% 56.2%,60.8% 57.7%,63.2% 58.7%,65.8% 59.3%,67.3% 59%,68.5% 60.5%,66% 62.3%,62.8% 62.5%,59.4% 61.2%);
}
.project-art .lips {
  --skin: #fece9f; --tilt: 5deg;
  transform-origin: 49.6% 33.4%;
  clip-path: polygon(44% 32.2%,44.7% 30.8%,46% 31.1%,48.7% 32%,51.6% 32.1%,53.9% 31.7%,55.3% 32.5%,53% 35.3%,50.4% 36%,47% 35.6%,45.4% 34.5%);
}
.wave .lips {
  --skin: #fdcc96; --tilt: 16deg;
  transform-origin: 55.3% 63.4%;
  clip-path: polygon(45.4% 59.4%,46% 57.3%,48.4% 56.3%,52% 59.3%,56% 61%,61% 62%,64% 60.9%,66.3% 62.6%,65.4% 64.9%,61.3% 67.9%,55.9% 68.5%,50% 66.4%);
}
.portrait .brow { --skin: #ffcf95; clip-path: polygon(24% 36%,30% 31%,49% 37%,48% 43%,38% 40%,28% 37.7%) }
.portrait .wink { --skin: #ffd19a; --tilt: 21deg; transform-origin: 64% 57%; clip-path: polygon(55% 52%,63% 52%,75% 58%,72% 64%,56% 62%) }
.wave .hand {
  --skin: radial-gradient(circle at 50% 50%, #d0f923 54%, #04200e 54.5%);
  transform-origin: 20% 76%;
  clip-path: polygon(6% 51%,14% 45%,28% 44%,32% 49%,31% 60%,39.5% 62%,39.5% 68%,25% 77%,14% 76%,9% 64%);
}
.project-art .look { --skin: #ffce9e; clip-path: polygon(40% 23%,45% 22.6%,47.5% 25%,46% 28.5%,42% 28%,40% 26%,40% 23%,53% 24%,58% 24%,61% 27%,60% 29%,53% 29%,53% 24%) }
@media (max-width: 760px) {
  .portrait .lips {
    --skin: #fdd491; --tilt: 0deg;
    transform-origin: 50.6% 91.25%;
    clip-path: polygon(33.3% 91.25%,33.2% 88.5%,35.6% 87.4%,41.2% 89.4%,46% 90.4%,54.6% 90.4%,60% 89.5%,65% 87.4%,67.6% 88%,67.9% 91.25%);
  }
  .portrait .brow { --skin: #fdd491; clip-path: polygon(22% 63.5%,24% 56%,46% 56%,46% 63.3%,36% 62.6%) }
  .portrait .wink { --skin: #fdd491; --tilt: 0deg; transform-origin: 68% 74%; clip-path: ellipse(10.6% 5.9% at 68% 74.5%) }
}

/* The page still scrolls normally. The next panel moves over the outgoing one. */
@media (prefers-reduced-motion: no-preference) {
  :root { --ease-out: cubic-bezier(.2,.75,.22,1) }
  .portrait { animation: peek .82s var(--ease-out) backwards }
  .hello-copy > :is(h1,p,button,a) { animation: lift .58s var(--ease-out) backwards }
  .hello-copy p { animation-delay: .09s }
  .hello-copy button { animation-delay: .17s }
  .hello-copy .next { animation-delay: .24s }
  .next i { animation: nudge .8s 1.1s ease-in-out 2 }
  .eye::after { animation: glance 1.85s .45s, blink 6.8s 1.35s infinite }
  @keyframes peek { from { translate: min(14vw, 170px) 0 } }
  @keyframes lift { from { opacity: 0; translate: 0 26px } }
  @keyframes nudge { 50% { translate: 0 .32em } }
  @keyframes blink {
    0%, 3.5%, 100% { scale: 1 }
    1.4%, 2.1% { scale: 1 .16 }
  }
  @keyframes glance {
    20%, 40% { transform: var(--gaze, translate(34%, 8%)) }
    65%, 80% { transform: var(--gaze, translate(-32%, 12%)) }
  }
  @media (min-width: 761px) {
    .portrait { z-index: 1 }
  }
  @media (max-width: 760px) {
    .portrait { animation-name: peek-down }
    @keyframes peek-down { from { translate: 0 -46px } }
  }

  @supports not (animation-timeline: view()) {
    .reveal.in-view { animation: lift .52s var(--ease-out) }
  }
  @supports (animation-timeline: view()) {
    section { position: relative; view-timeline-name: --scene }
    .build { --corner-left: #092410; --corner-right: #d0f926 }
    .work { --corner-left: #03240f }
    @media (max-width: 760px) {
      .build { --corner-left: #0e250e; --corner-right: #0e250e }
    }
    /* Only the two corners overlap visually, so sections still measure one screen. */
    section + section::before {
      content: "";
      position: absolute;
      inset: 0 0 auto;
      height: clamp(34px, 5vw, 84px);
      pointer-events: none;
      background:
        radial-gradient(circle at bottom right, transparent 70%, var(--corner-left, var(--paper)) 71%) left,
        radial-gradient(circle at bottom left, transparent 70%, var(--corner-right, var(--corner-left, var(--paper))) 71%) right;
      background-size: clamp(34px, 5vw, 84px) 100%;
      background-repeat: no-repeat;
      transform-origin: top;
      animation: flatten linear both;
      animation-timeline: --scene;
      animation-range: entry 58% entry 100%;
    }
    /* Keep project rows fixed to the scroll position as the list changes height.
       In other sections limit the drift to the space below the controls. */
    .hello { --drift: 24dvh }
    :is(.hello,.build,.keeper) .layout:not(:has(:focus-visible)) {
      animation: recede linear both;
      animation-timeline: --scene;
      animation-range: exit 0% exit 100%;
    }
    section :is(h2, .switch, .reveal, .project-preview) {
      animation: arrive var(--ease-out) backwards;
      animation-timeline: --scene;
      animation-range: entry 0% entry 58%;
    }
    section .switch { animation-range: entry 10% entry 67% }
    section :is(.reveal, .project-preview) {
      animation-name: unpack;
      animation-range: entry 6% entry 86%;
    }
    .road { --tilt: -6deg }
    .wave { --tilt: -9deg }
    @keyframes flatten { to { transform: scaleY(0) } }
    @keyframes recede { to { transform: translateY(var(--drift, 48px)) } }
    @keyframes arrive { from { opacity: .45; transform: translateY(3rem) } }
    @keyframes unpack {
      from { opacity: .55; transform: translateY(9dvh) rotate(var(--tilt, 4deg)) scale(.89) }
      72% { opacity: 1 }
      to { transform: none }
    }
  }

  /* Short character beats finish independently, even if the visitor stops scrolling. */
  .demo.in-view .car { animation: roll-in .64s var(--ease-out) backwards }
  .demo.in-view .rim { animation: spin-in .64s var(--ease-out) backwards }
  .wave.in-view .actor { transform-origin: 50% 84%; animation: hello-wave .9s ease-out }
  .work.in-view .site { animation: open-screen .5s var(--ease-out) }
  dialog[open] { animation: lift .26s var(--ease-out) }
  dialog[open]::backdrop { animation: appear .22s ease-out }
  @keyframes roll-in { from { translate: -14% 0; opacity: .2 } }
  @keyframes spin-in { from { rotate: -155deg } }
  @keyframes hello-wave {
    30% { rotate: 6deg }
    55% { rotate: -4deg }
    78% { rotate: 2deg }
  }
  @keyframes open-screen { from { clip-path: inset(0 0 100%) } to { clip-path: inset(0) } }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto }
  *,*::before,*::after { animation: none !important; transition: none !important }
}
