/* Product-led portfolio. The work provides the color; the typography provides the structure. */
:root { --sans: "Helvetica Neue", Helvetica, Arial, sans-serif; --mono: ui-monospace, SFMono-Regular, Consolas, monospace; --g: clamp(20px, 4.5vw, 80px); --r: 4px; --bg: #131313; --fg: #f3f0e9; --mut: #aaa8a3; --line: #383836; --acc: #ff795b; --plate: #252525; color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: #131313; color: #f3f0e9; font: 400 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #ff795b; outline-offset: 5px; }
.skip { position: absolute; top: -80px; left: 20px; z-index: 50; background: white; color: black; padding: 12px 20px; }
.skip:focus { top: 10px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px; margin: 0 var(--g); border-bottom: 1px solid #383836; }
.mark { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: -.03em; }
.mark svg { width: 28px; height: 28px; }
.bar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.bar nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 14px; }
.bar nav a:hover { text-decoration: underline; }
.ctl { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; background: none; color: #aaa8a3; border: 1px solid #383836; border-radius: 4px; cursor: pointer; font-size: 13px; }
.ctl[aria-pressed="true"] { color: #f3f0e9; }
.led { width: 5px; height: 5px; border-radius: 50%; background: #777; }
.ctl[aria-pressed="true"] .led { background: #ff795b; }
.nojs .ctl { display: none; }
.portfolio { max-width: 1800px; margin: auto; padding: 0 var(--g); }
.intro { padding: clamp(48px, 6vw, 96px) 0 clamp(48px, 6vw, 88px); }
.intro-credit { margin: 0 0 24px; color: #bbb9b3; font-size: clamp(14px, 1.2vw, 18px); }
.intro h1 { margin: 0 0 32px; font-size: clamp(62px, 11.7vw, 196px); font-weight: 500; letter-spacing: -.075em; line-height: .98; }
.intro h1 em { font-style: normal; color: #ff795b; }
.intro-bottom { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.intro-bottom p { margin: 0; max-width: 36ch; color: #bbb9b3; font-size: clamp(16px, 1.5vw, 21px); }
.intro-bottom a { display: inline-flex; align-items: center; gap: 28px; min-height: 44px; font-size: 14px; text-decoration: none; white-space: nowrap; }
.intro-bottom a:hover { text-decoration: underline; }
.section-label { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #55534f; padding: 20px 0 30px; color: #aaa8a3; font-size: 13px; }
.section-label h2 { margin: 0; font-size: inherit; font-weight: 400; }
.work-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(52px, 7vw, 108px) clamp(20px, 2.5vw, 44px); }
.work-card { grid-column: span 6; min-width: 0; }
.work-ramon, .work-pocket-circuit { grid-column: span 5; }
.work-situation-watch, .work-drone-hangar { grid-column: span 7; }
.work-nightmare-circuit-2, .work-ella-and-lola { grid-column: 1 / -1; }
.work-link { display: block; text-decoration: none; }
.work-media, .capture-frame { --surface: #303030; display: flex; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 28px); background: var(--surface); overflow: hidden; padding: clamp(18px, 3.5vw, 56px); }
.work-media { height: clamp(360px, 42vw, 680px); }
.work-nightmare-circuit-2 .work-media { height: auto; aspect-ratio: 1.8; padding: clamp(20px, 5vw, 80px); }
.work-ella-and-lola .work-media { height: auto; aspect-ratio: 1.85; padding: clamp(18px, 3vw, 48px); }
.work-media[data-world="ramon"], [data-world="ramon"] .capture-frame { --surface: #e77860; }
.work-media[data-world="situation-watch"], [data-world="situation-watch"] .capture-frame { --surface: #8092b6; }
.work-media[data-world="nightmare-circuit-2"], [data-world="nightmare-circuit-2"] .capture-frame { --surface: #8d272b; }
.work-media[data-world="big-booty-bass"], [data-world="big-booty-bass"] .capture-frame { --surface: #e9a0ba; }
.work-media[data-world="pocket-circuit"], [data-world="pocket-circuit"] .capture-frame { --surface: #dbe387; }
.work-media[data-world="drone-hangar"], [data-world="drone-hangar"] .capture-frame { --surface: #d0d3d5; }
.work-media[data-world="vision-lab"], [data-world="vision-lab"] .capture-frame { --surface: #b8c8b4; }
.work-media[data-world="ella-and-lola"], [data-world="ella-and-lola"] .capture-frame { --surface: #afd6e6; }
.product-capture { display: block; width: 100%; height: 100%; min-width: 0; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0,0,0,.18)); }
.work-media:has(.product-capture + .product-capture) .product-capture { width: calc(50% - 14px); }
.capture-link { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.work-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 22px; }
.work-heading h2 { margin: 0; font-size: clamp(25px, 2.5vw, 42px); line-height: 1.15; letter-spacing: -.045em; font-weight: 500; }
.work-heading > span { font-size: 26px; transition: transform .2s; }
.work-link:hover .work-heading > span { transform: translate(3px, -3px); }
.work-link:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
.work-description { margin: 10px 0 0; max-width: 48ch; color: #bbb9b3; font-size: clamp(15px, 1.4vw, 19px); }
.work-status { margin: 16px 0 0; font-size: 12px; color: #e4b4a5; }
.capture-note { margin: 4px 0 0; font-size: 12px; color: #aaa8a3; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-top: 1px solid #55534f; padding: clamp(48px, 8vw, 120px) 0; margin-top: clamp(72px, 9vw, 140px); }
.about h2 { margin: 0; font-size: clamp(32px, 4.3vw, 68px); font-weight: 400; letter-spacing: -.05em; line-height: 1.08; }
.about p { max-width: 38ch; margin: 0 0 24px; color: #bbb9b3; font-size: clamp(18px, 1.8vw, 25px); }
.enter { display: inline-flex; align-items: center; gap: 24px; min-height: 44px; text-decoration: none; border-bottom: 1px solid currentColor; font-size: 15px; }
.foot { padding: 24px var(--g) 40px; border-top: 1px solid #383836; color: #aaa8a3; font-size: 13px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.pg { padding: 0 var(--g); max-width: 1800px; margin: auto; }
.pg-hero { display: grid; gap: 24px; padding: clamp(36px, 6vw, 96px) 0 48px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #aaa8a3; }
.room-n { margin: 8px 0 0; font-size: 13px; color: #aaa8a3; }
.pg-name { margin: 0; max-width: 15ch; font-size: clamp(48px, 8vw, 136px); font-weight: 500; letter-spacing: -.06em; line-height: 1; overflow-wrap: anywhere; }
.room-pitch { margin: 0; max-width: 55ch; font-size: clamp(19px, 2vw, 29px); color: #bbb9b3; line-height: 1.4; }
.room-state { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0; font-size: 13px; color: #aaa8a3; }
.state { color: #e4b4a5; font-size: 13px; }
.product-proof { margin: 0; }
.capture-frame { height: clamp(420px, 65vw, 900px); text-decoration: none; }
.product-proof figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 16px; font-size: 12px; color: #aaa8a3; }
.sketch { margin-top: 28px; border-top: 1px solid #383836; }
.sketch summary { padding: 16px 0; min-height: 44px; cursor: pointer; color: #aaa8a3; font-size: 13px; }
.sketch[open] { padding-bottom: 28px; }
.sketch .ex { padding: 24px; background: var(--bg); color: var(--fg); }
.pg-body { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(32px, 7vw, 120px); padding: clamp(56px, 8vw, 112px) 0; }
.facts { position: sticky; top: 24px; margin: 0; }
.facts div { padding: 16px 0; border-top: 1px solid #383836; }
.facts dt { color: #aaa8a3; font-size: 12px; margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 15px; }
.pg-story { max-width: 68ch; }
.pg-story section + section { margin-top: 48px; }
.pg-story h2 { font-size: clamp(26px, 3vw, 42px); font-weight: 400; letter-spacing: -.04em; line-height: 1.1; margin: 0 0 24px; }
.pg-story p { color: #c4c1ba; font-size: 18px; line-height: 1.65; margin: 0 0 18px; }
.decisions { list-style: none; margin: 0; padding: 0; }
.decisions li { display: grid; gap: 10px; padding: 24px 0; border-top: 1px solid #383836; }
.decisions b { font-size: 19px; font-weight: 500; }
.decisions span { color: #bbb9b3; line-height: 1.65; }
.links { display: flex; flex-wrap: wrap; gap: 24px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #55534f; margin: 0 0 72px; }
.pager a { display: grid; gap: 12px; padding: 28px 0; text-decoration: none; }
.pager a + a { text-align: right; padding-left: 20px; }
.pager span { font-size: 13px; color: #aaa8a3; }
.pager strong { font-weight: 400; font-size: clamp(25px, 3.5vw, 52px); line-height: 1.1; letter-spacing: -.04em; }
.pager a:hover strong { text-decoration: underline; text-decoration-thickness: 1px; }
.ex { margin: 0; }
.stage { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg); touch-action: pan-y; }
.stage > .still, .stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.stage.live canvas { display: block; }
.chip { min-height: 44px; padding: 10px 16px; border: 1px solid currentColor; background: transparent; color: var(--fg); border-radius: 4px; cursor: pointer; font-size: 14px; }
.chip:hover, .chip[aria-pressed="true"]:not(.mute) { background: var(--fg); color: var(--bg); }
.chip:disabled, .chip[aria-pressed="false"].mute { opacity: .5; }
.num { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .bar { min-height: 76px; flex-wrap: wrap; gap: 0 16px; padding: 12px 0; }
  .bar nav { gap: 4px 14px; }
  .bar .hide-s { display: none; }
  .intro h1 { max-width: 8ch; font-size: clamp(64px, 16vw, 120px); line-height: 1; }
  .intro-bottom { align-items: flex-start; flex-direction: column; gap: 12px; }
  .work-card { grid-column: 1 / -1; }
  .work-media { height: clamp(360px, 90vw, 600px); }
  .work-nightmare-circuit-2 .work-media, .work-ella-and-lola .work-media { aspect-ratio: 1.5; }
  .about, .pg-body { grid-template-columns: 1fr; gap: 32px; }
  .facts { position: static; }
  .sketch .ex { padding: 12px 0; }
  .pager { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .work-link:hover .work-heading > span { transform: none; } .diorama .splat.on { opacity: 1; } }
.paused *, .paused *::before, .paused *::after { animation: none !important; transition: none !important; }
.paused .diorama .splat.on { opacity: 1; }

/* Retained project colors and optional sketch behavior. */
[data-world="ramon"]               { --bg: #f2f1ec; --fg: #111; --mut: #55534d; --line: #cfccc2; --acc: #e5480f; --plate: #e5480f; color-scheme: light; }
[data-world="situation-watch"]     { --bg: #060a12; --fg: #e6edf7; --mut: #8d9bb0; --line: #1c2a40; --acc: #7fb2ff; --plate: #1b3a6b; }
[data-world="nightmare-circuit-2"] { --bg: #000; --fg: #f2f2f2; --mut: #8f8f8f; --line: #262626; --acc: #ff3b30; --plate: #5c0d0a; }
[data-world="big-booty-bass"]      { --bg: #1d0816; --fg: #ffeef7; --mut: #c89bb4; --line: #43203a; --acc: #ff4fa3; --plate: #ff4fa3; }
[data-world="pocket-circuit"]      { --bg: #c4cc9f; --fg: #1d2610; --mut: #4a5631; --line: #9ea67a; --acc: #2f3d17; --plate: #306230; color-scheme: light; }
[data-world="drone-hangar"]        { --bg: #e3e6e9; --fg: #14181c; --mut: #56606a; --line: #c3c9cf; --acc: #1f5fe0; --plate: #1f5fe0; color-scheme: light; }
[data-world="vision-lab"]          { --bg: #0d1011; --fg: #e8eceb; --mut: #8e9896; --line: #232a2b; --acc: #ff8a2a; --plate: #ff8a2a; }
[data-world="ella-and-lola"]       { --bg: #dcebf7; --fg: #0b2340; --mut: #3f5a78; --line: #b6cde2; --acc: #2d7fd0; --plate: #ffffff; color-scheme: light; }
[data-world="archive"]             { --bg: #0a0a0a; --fg: #ededed; --mut: #9a9a9a; --line: #2a2a2a; --acc: #ededed; --plate: #1d1d1d; }

.stage.live:not(.overlay) > .still { visibility: hidden; }
.ex-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 26px; }
.ex-cap, .ex-live { margin: 14px 0 0; font-size: 15px; color: var(--mut); max-width: 62ch; }
.ex-ctl .ex-cap, .ex-ctl .ex-live { margin: 0; flex: 1 1 260px; }
.nojs .ex-ctl, .nojs .ex-cap { display: none; }
.ex-approve .n { font-variant-numeric: tabular-nums; display: inline-block; min-width: 1ch; }
.ex-ctl label { font-weight: 600; }
.ex-ctl input[type=range] { flex: 1 1 200px; accent-color: var(--acc); min-height: 44px; }
[data-ex="ghost"] .stage { cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
[data-ex="globe"] .stage { cursor: grab; } [data-ex="globe"] .stage:active { cursor: grabbing; }

/* bass: the pad is a big velvet key; cones punch and throw a ring of air */
.bass-pad { flex: 1 1 100%; min-height: 104px; border-radius: var(--r); border: 1.5px solid var(--acc); color: var(--fg); cursor: pointer; display: grid; place-items: center; gap: 8px; padding: 16px; touch-action: manipulation;
  font: 800 clamp(24px, 2.8vw, 38px)/1 var(--sans); letter-spacing: -.03em;
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 24%, var(--bg)), var(--bg)); box-shadow: 0 6px 0 color-mix(in srgb, var(--acc) 55%, #000), 0 20px 40px -20px var(--acc); transition: transform .08s, box-shadow .08s; }
.bass-pad small { font: 500 14px/1 var(--sans); color: var(--mut); letter-spacing: 0; }
.bass-pad:active { transform: translateY(6px); box-shadow: 0 0 0 color-mix(in srgb, var(--acc) 55%, #000), 0 8px 30px -10px var(--acc); }
.stage .cone, .stage .ring { transform-box: fill-box; transform-origin: center; }
.stage.thump .cone { animation: thump .5s cubic-bezier(.1,.9,.2,1); animation-delay: var(--d, 0s); }
.stage.thump .ring { animation: ring .75s cubic-bezier(.2,.7,.3,1); animation-delay: var(--d, 0s); }
@keyframes thump { 12% { transform: scale(calc(1 + .06 * var(--vel, 1))); } 100% { transform: none; } }
@keyframes ring { 0% { opacity: calc(.4 * var(--vel, 1)); transform: scale(1); } 100% { opacity: 0; transform: scale(1.32); } }

/* pocket: the lanes become the handheld's LCD */
.lcd { position: absolute; inset: 0; z-index: 2; display: none; grid-template-rows: auto 1fr; gap: 10px; padding: clamp(12px, 2.2vw, 28px); background: linear-gradient(160deg, #3a4430, #232a1b); }
.js .lcd { display: grid; }
.js [data-ex="pocket"] .stage { min-height: 320px; }
.js [data-ex="pocket"] .still { visibility: hidden; }
.lcd-head { margin: 0; display: flex; justify-content: space-between; gap: 12px; font: 700 12px/1 var(--mono); letter-spacing: .14em; color: #c4cc9f; }
.lcd-head .lcd-pos { color: #8bac0f; }
.lanes { display: grid; grid-template-rows: repeat(4, minmax(48px, 1fr)); gap: 6px; padding: clamp(8px, 1.4vw, 16px); border-radius: 4px; background: linear-gradient(180deg, #9bbc0f, #8bac0f);
  box-shadow: inset 0 0 0 3px rgba(15,56,15,.25), inset 0 8px 22px rgba(15,56,15,.35); }
.lane { display: grid; grid-template-columns: minmax(84px, 118px) 1fr; gap: 10px; align-items: stretch; }
.lane .chip { --fg: #0f380f; --bg: #9bbc0f; --plate: #306230; font: 800 12px/1 var(--mono); letter-spacing: .06em; padding: 6px; min-height: 44px; }
.cells { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.cells i { position: relative; border: 1px solid rgba(15,56,15,.16); border-radius: 1px; }
.cells i.on::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: 8%; height: var(--h, 50%); background: #306230; }
[data-voice="noise"] .cells i.on::after { background: repeating-conic-gradient(#0f380f 0 25%, transparent 0 50%) 0 0 / 4px 4px; }
.cells i.now { background: rgba(15,56,15,.14); }
.cells i.hit::after { background: #0f380f; }
.lane.off .cells i.on::after { background: transparent; border: 1px dashed #306230; }

/* vision: one interlocked stage at a time; poses cross-fade, the belt advances one slat */
[data-ex="vision"] svg g { transition: opacity .35s; }
[data-ex="vision"] :is(.vl-at-convey, .vl-at-inspect, .vl-at-sort, .vl-pose-rest, .vl-pose-pick, .vl-pose-sort, .vl-detect) { opacity: 0; }
[data-ex="vision"] .vl-frust { opacity: .22; }
[data-ex="vision"] .vl-lamp { opacity: .18; }
[data-stage="convey"] :is(.vl-at-convey, .vl-pose-rest, .vl-lamp-belt) { opacity: 1; }
[data-stage="inspect"] :is(.vl-at-inspect, .vl-pose-rest, .vl-frust, .vl-detect) { opacity: 1; }
[data-stage="pick"] :is(.vl-pose-pick, .vl-lamp-arm) { opacity: 1; }
[data-stage="sort"] :is(.vl-at-sort, .vl-pose-sort, .vl-lamp-arm) { opacity: 1; }
[data-stage="convey"] .vl-slats { animation: belt .8s cubic-bezier(.3,.7,.2,1); }
[data-stage="convey"] .vl-at-convey, [data-stage="inspect"] .vl-at-inspect { animation: slide .8s cubic-bezier(.3,.7,.2,1); }
@keyframes belt { from { transform: translate(-12px, -7px); } }
@keyframes slide { from { transform: translate(-48px, -28px); } }
.vl-stages { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; counter-reset: s; }
.vl-stages li { counter-increment: s; font: 600 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 10px 11px; border: 1px solid var(--line); border-radius: var(--r); color: var(--mut); }
.vl-stages li::before { content: counter(s) " "; }
.vl-stages li[aria-current="step"] { color: #111; background: var(--acc); border-color: var(--acc); }

/* drone: the sweep reads on the protractor; the corridor fades in as covers clear */
[data-ex="drone"] .corridor { transition: opacity .2s; }

/* ella: a layered diorama — background, sprites and the throw share one coordinate space */
[data-ex="ella"] .stage { cursor: crosshair; touch-action: pan-y; }
.diorama .splat { opacity: 0; pointer-events: none; }
.diorama .ella-throw { opacity: 0; }
.stage.throwing .diorama .ella-throw { opacity: 1; }
.stage.throwing .diorama .ella-hold { opacity: 0; }
.diorama .arc { opacity: .7; }
.nojs .diorama .ball, .diorama .splat, .diorama .ball-shadow { opacity: 0; }
.js .diorama .ball-shadow { opacity: 1; }
.diorama .snowman, .diorama .chunks { transform-box: fill-box; transform-origin: 50% 100%; }
.diorama .chunks { transform-origin: center; }
.diorama .splat.on { animation: splat .8s ease-out forwards; }
.diorama .splat.on .chunks { animation: burst .7s cubic-bezier(.2,.7,.3,1) forwards; }
.diorama .snowman.hit { animation: wobble .7s cubic-bezier(.3,.7,.3,1); }
@keyframes splat { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }
@keyframes burst { from { transform: scale(.3); } to { transform: scale(1.4); } }
@keyframes wobble { 25% { transform: rotate(-4deg); } 55% { transform: rotate(2.5deg); } 80% { transform: rotate(-1deg); } }
.paused .diorama .splat.on { opacity: 1; }

