:root {
  --ink: #241c18;
  --ink-2: #5a4c43;
  --paper: #f8f1e5;
  --paper-2: #efe4d2;
  --accent: #d2592a;
  --accent-2: #e9a23b;
  --display: "Gloock", Georgia, serif;
  --body: "Figtree", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { width: min(1160px, 100% - 32px); margin: 0 auto; }
.h { font: 400 clamp(40px, 5vw, 72px)/1.02 var(--display); letter-spacing: -.01em; margin: 0 0 18px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--body); text-decoration: none; border: 2px solid var(--ink); transition: transform .25s, background .25s, color .25s, box-shadow .25s; box-shadow: 0 4px 0 rgba(36,28,24,.25); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(36,28,24,.25); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.ghost.light { background: transparent; color: var(--paper); }
.btn.ghost.light:hover { background: var(--paper); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }

/* nav */
.nav { position: fixed; z-index: 50; transition: background .4s, box-shadow .4s, padding .4s; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 4vw, 48px); }
.nav.scrolled { background: rgba(248, 241, 229, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(36, 28, 24, .1); padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 22px/1 var(--display); }
.brand svg { width: 34px; fill: var(--ink); }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 32px); font: 600 15px/1 var(--body); }
.nav nav a { text-decoration: none; }
.nav nav a:not(.nav-cta):hover { text-decoration: underline; text-underline-offset: 5px; }
.nav-cta { padding: 10px 16px; border: 2px solid var(--ink); border-radius: 6px; }
.nav-cta:hover { background: var(--ink); color: var(--paper); }

/* ── scenes ───────────────────────────────── */
.scene { position: relative; overflow: hidden; isolation: isolate; }
.dawn { --sky1: #a9bfd0; --sky2: #f2cf98; --sky3: #f7e2bd; --sun: #fff3d6; --sun-glow: rgba(255, 226, 168, .85);
  --mtn: #8e9cba; --mtn-shade: #77839f; --snow: #f6f2ea; --haze: rgba(247, 226, 189, .9);
  --far: #8f977c; --plain: #d4a95c; --plain-2: #c39345; --mid: #5d5f3e; --herd: #5c4b43; --herd-2: #46372f; --fg: var(--ink); }
.dusk { --sky1: #231f3d; --sky2: #7a4a6e; --sky3: #e98a5d; --sun: #ffc58e; --sun-glow: rgba(255, 140, 90, .7);
  --mtn: #4a4466; --mtn-shade: #3c3756; --snow: #c7b6c9; --haze: rgba(233, 138, 93, .55);
  --far: #3e3249; --plain: #6b3f45; --plain-2: #5a343d; --mid: #2c2234; --herd: #2c2234; --herd-2: #1f1827; --fg: #15111a; }
.sky { position: absolute; inset: 0; z-index: -3; background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 58%, var(--sky3) 74%); }
.sun { position: absolute; z-index: -2; width: clamp(110px, 12vw, 190px); aspect-ratio: 1; border-radius: 50%; left: 64%; top: 46%; background: var(--sun); box-shadow: 0 0 80px 30px var(--sun-glow), 0 0 220px 120px var(--sun-glow); opacity: .95; }
.dawn .sun { animation: sunrise 3.2s cubic-bezier(.2,.7,.1,1) both; }
@keyframes sunrise { from { transform: translateY(120px); opacity: 0; } }
.dusk .sun { left: 30%; top: 46%; }
.layer { will-change: transform; }
.land { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 100%; pointer-events: none; }
.land svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* moving bits */
.dawn { --herd-ear: #4f3f37; --herd-rim: #8a7465; }
.dusk { --herd-ear: #251d2c; --herd-rim: #5a4a66; }
.el { fill: var(--herd); }
.el .sh { fill: var(--herd-2); }
.el .ear { fill: var(--herd-ear); transform-box: fill-box; transform-origin: 30% 20%; animation: ear 4.2s ease-in-out infinite; }
.el .belly { fill: var(--herd-2); opacity: .55; }
.el .rim { fill: none; stroke: var(--herd-rim); stroke-width: 1.6; stroke-linecap: round; opacity: .55; }
.el .wrinkle { fill: none; stroke: var(--herd-2); stroke-width: .9; opacity: .6; stroke-linecap: round; }
.el .eye { fill: #2b211c; }
.el .tail { fill: none; stroke: var(--herd); stroke-width: 2; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 0; animation: tail 2.6s ease-in-out infinite; }
.el .leg { transform-box: fill-box; }
@keyframes ear { 0%, 70%, 100% { transform: none; } 80% { transform: rotate(-7deg) scaleX(1.05); } 90% { transform: rotate(2deg); } }
@keyframes tail { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-10deg); } }
.herd-walk { position: absolute; inset: 0; width: 100%; height: 100%; }
.herd { fill: var(--herd); }
@keyframes herd { 0% { transform: translate3d(-34vw, 0, 0); opacity: 0; } 5% { opacity: 1; } 94% { opacity: 1; } 100% { transform: translate3d(40vw, 0, 0); opacity: 0; } }
.grass { transform-box: fill-box; transform-origin: 50% 100%; animation: wind 5s ease-in-out infinite; }
@keyframes wind { 0%, 100% { transform: skewX(0); } 40% { transform: skewX(-4deg); } 60% { transform: skewX(-2deg); } }
.cloud { position: absolute; z-index: -2; height: 34px; border-radius: 50%; background: rgba(255, 248, 236, .75); filter: blur(10px); animation: cloud linear infinite; pointer-events: none; }
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.cloud::before { width: 45%; height: 160%; left: 18%; top: -70%; } .cloud::after { width: 35%; height: 130%; left: 50%; top: -45%; }
.dusk .cloud { background: rgba(233, 138, 93, .35); }
@keyframes cloud { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }
.shooting { position: absolute; z-index: -1; top: 12%; left: 70%; width: 120px; height: 2px; background: linear-gradient(90deg, #fff, transparent); transform: rotate(-24deg); opacity: 0; animation: shoot 9s ease-in 3s infinite; }
@keyframes shoot { 0% { opacity: 0; transform: rotate(-24deg) translateX(0); } 2% { opacity: 1; } 8% { opacity: 0; transform: rotate(-24deg) translateX(-420px); } 100% { opacity: 0; transform: rotate(-24deg) translateX(-420px); } }
.sky-birds { position: absolute; inset: 0; z-index: 2; pointer-events: none; width: 100%; height: 100%; }
.stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .25; } }

.note { opacity: 0; animation: note-in 1.6s ease 2.6s forwards; }
.note path { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .3; }
.note text { font: 600 12px var(--body); fill: var(--ink); letter-spacing: .32em; opacity: .55; }
@keyframes note-in { to { opacity: 1; } }

/* hero */
.hero { height: 100svh; min-height: 660px; max-height: 1100px; }
.hero-copy { position: absolute; z-index: 4; left: clamp(16px, 6vw, 96px); right: 16px; top: clamp(104px, 15vh, 160px); max-width: 860px; }
.kicker { margin: 0 0 12px; font: 600 14px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.hero h1 { margin: 0; font: 400 clamp(40px, 5vw, 80px)/1.02 var(--display); letter-spacing: -.015em; color: var(--ink); }
.hero .sub { max-width: 540px; margin: 18px 0 0; font-size: 18px; color: #3d322b; }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .2em; margin-bottom: -.2em; }
.hero h1 .w > i { display: inline-block; font-style: normal; animation: word 1s cubic-bezier(.2,.7,.1,1) both; }
@keyframes word { from { transform: translateY(105%); } }
.hero-copy > :not(h1) { animation: up .9s cubic-bezier(.2,.7,.1,1) both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; } .hero-copy > :nth-child(3) { animation-delay: .2s; } .hero-copy > :nth-child(4) { animation-delay: .3s; }
@keyframes up { from { opacity: 0; transform: translateY(24px); } }
.eyebrow { margin: 0 0 12px; font: 600 13px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }

/* ── work: dark, continues the hero's foreground ─────────── */
.work { background: var(--ink); color: var(--paper); padding: 40px 0 120px; margin-top: -1px; position: relative; overflow-x: clip; }
.work::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 400px at var(--gx, 70%) var(--gy, 20%), rgba(233,162,59,.10), transparent 70%); transition: background .2s; }
.work .h { max-width: 18ch; margin-bottom: 70px; }
.case { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; margin-bottom: 110px; }
.case.flip .case-art { order: 2; }
.case-art { position: relative; background: #2d241f; border: 1px solid rgba(248,241,229,.14); border-radius: 14px; padding: 28px; transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2,.7,.1,1), box-shadow .5s, border-color .5s; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.case-art::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(300px 200px at var(--mx, 50%) var(--my, 50%), rgba(233,162,59,.16), transparent 70%); opacity: 0; transition: opacity .4s; }
.case-art:hover::before { opacity: 1; }
.case-art:hover { border-color: rgba(233,162,59,.6); box-shadow: 0 40px 80px -30px rgba(210,89,42,.45); }
.case-art svg { width: 100%; height: auto; display: block; position: relative; }
.case-text { position: relative; z-index: 0; }
.meta { margin: 0 0 10px; font: 600 13px/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.case h3 { margin: 0 0 14px; font: 400 clamp(30px, 3vw, 44px)/1.08 var(--display); letter-spacing: -.01em; }
.case-text p:not(.meta) { margin: 0; color: #d8cbb8; }
.more { display: inline-block; margin-top: 20px; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.more::after { content: " →"; transition: margin .3s; }
.more:hover::after { margin-left: 6px; }
.all { text-align: center; margin: 0; }

/* entrance: the diagram is drawn left to right, nodes pop in, text follows */
html:not(.still) .case .case-art svg { clip-path: inset(0 100% 0 0); transition: clip-path 1.3s cubic-bezier(.6,0,.2,1) .25s; }
html:not(.still) .case.in .case-art svg { clip-path: inset(0 0 0 0); }
html:not(.still) .case .case-art svg rect { transform-box: fill-box; transform-origin: center; transform: scale(.6); opacity: 0; transition: transform .6s cubic-bezier(.3,1.6,.5,1), opacity .4s; }
html:not(.still) .case.in .case-art svg rect { transform: none; opacity: 1; }
html:not(.still) .case.in .case-art svg rect:nth-of-type(2) { transition-delay: .45s; } html:not(.still) .case.in .case-art svg rect:nth-of-type(3) { transition-delay: .65s; }
html:not(.still) .case.in .case-art svg rect:nth-of-type(4) { transition-delay: .85s; } html:not(.still) .case.in .case-art svg rect:nth-of-type(n+5) { transition-delay: 1.05s; }
html:not(.still) .case .case-text > * { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s cubic-bezier(.2,.7,.1,1); }
html:not(.still) .case.in .case-text > * { opacity: 1; transform: none; }
html:not(.still) .case.in .case-text > :nth-child(2) { transition-delay: .3s; } html:not(.still) .case.in .case-text > :nth-child(3) { transition-delay: .4s; }
html:not(.still) .case.in .case-text > :nth-child(4) { transition-delay: .5s; } html:not(.still) .case.in .case-text > :nth-child(5) { transition-delay: .6s; }
html:not(.still) .case.in html:not(.still) .work [data-reveal].case { opacity: 1; transform: none; }

/* project diagrams on dark */
.pv-node, .pv-head, .pv-panel { fill: #241c18; stroke: #e9dccb; stroke-width: 1.3; }
.pv-node-good { fill: rgba(233,162,59,.16); stroke: var(--accent-2); }
.pv-node-oracle { fill: rgba(210,89,42,.2); stroke: var(--accent); }
.pv-text { font: 600 10.5px var(--body); fill: var(--paper); }
.pv-label { font: 500 9.5px var(--body); fill: #b9a999; }
.pv-ok { font: 600 9.5px var(--body); fill: var(--accent-2); }
.pv-big { font: 400 30px var(--display); fill: var(--accent-2); }
.pv-flow, .pv-axis { fill: none; stroke: #8a7a6a; stroke-width: 1.3; stroke-dasharray: 4 4; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -16; } }
.pv-packet { fill: var(--accent-2); filter: drop-shadow(0 0 4px var(--accent-2)); }
.pv-packet-alt { fill: var(--accent); }
.pv-vectors circle { fill: #8a7a6a; } .pv-vectors .pv-hit { fill: var(--accent-2); filter: drop-shadow(0 0 4px var(--accent-2)); }
.pv-bar { fill: #8a7a6a; } .pv-bar-good { fill: var(--accent-2); }

/* buttons: a light sweep on hover */
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); transition: left .6s; }
.btn:hover::after { left: 130%; }

/* what I do (light) */
.do { padding: 110px 0 100px; }
.do-list { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.do-list svg { width: 48px; height: 48px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.do-list h3 { font: 400 28px/1.1 var(--display); margin: 16px 0 10px; }
.do-list p { margin: 0; color: #3d322b; }
html:not(.still) .do-list svg * { stroke-dasharray: 160; stroke-dashoffset: 160; transition: stroke-dashoffset 1.4s cubic-bezier(.6,0,.2,1) .2s; }
html:not(.still) .do-list li.in svg * { stroke-dashoffset: 0; }
.do-list li:nth-child(2) { transition-delay: .12s; } .do-list li:nth-child(3) { transition-delay: .24s; }

/* journey: the aeroplane windows (CSS in v3-reuse.css), on a light cabin wall */
.journey { background: var(--paper-2); padding: 110px 0 100px;
  --text: var(--ink); --muted: var(--ink-2); --surface2: #dccfba; --tr: 36,28,24; }
.journey .cabin-country { font-weight: 400; }
.journey .cabin-plane { fill: var(--ink); }

/* off the clock */
.off { padding: 120px 0; }
.off-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.off-photo { margin: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 40px 70px -40px rgba(36,28,24,.55), 0 2px 6px rgba(36,28,24,.08); }
.off-photo img { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform 1.6s cubic-bezier(.2,.7,.1,1); }
html:not(.still) .off-photo[data-reveal] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1.2s cubic-bezier(.6,0,.2,1); }
html:not(.still) .off-photo[data-reveal] img { transform: scale(1.18); }
html:not(.still) .off-photo.in { clip-path: inset(0 0 0 0); }
html:not(.still) .off-photo.in img { transform: none; }
.off-photo:hover img { transform: scale(1.04); }
.off .big { font: 600 22px/1.4 var(--body); margin: 0 0 14px; }
.off p { color: #3d322b; }

/* contact */
.contact { min-height: 640px; height: 92vh; max-height: 900px; color: var(--paper); }
.contact-copy { position: absolute; z-index: 4; left: 0; right: 0; top: 16%; text-align: center; padding: 0 16px; }
.contact h2 { margin: 0; font: 400 clamp(42px, 5.4vw, 84px)/1.02 var(--display); letter-spacing: -.015em; }
.contact .sub { font-size: 19px; margin: 14px 0 0; color: #f0dcd0; }
.contact .actions { justify-content: center; }
.foot { background: #15111a; color: #b9a9b9; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 22px clamp(16px, 4vw, 48px); font-size: 14px; margin-top: -1px; }
.foot p { margin: 0; }

/* reveal */
html:not(.still) [data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2,.7,.1,1), transform .9s cubic-bezier(.2,.7,.1,1); }
html:not(.still) [data-reveal].in { opacity: 1; transform: none; }
.still *, .still *::before, .still *::after { animation: none !important; }

@media (max-width: 820px) {
  .note { display: none; }
  .hero-copy { top: 86px; }
  .hero .sub { font-size: 16px; }
  .do-list, .case, .off-grid { grid-template-columns: 1fr; }
  .case.flip .case-art { order: 0; }
  }

/* ── Selected work: live systems ─────────────────────────── */
.work-sub { margin: -6px 0 40px; color: #b9a999; }
.work .all { margin-top: 48px; }
.lab { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 28px; align-items: start; }
.lab-list { display: grid; gap: 6px; }
.lab-list button { position: relative; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 16px 18px 18px; color: #cdbfac; cursor: pointer; font: inherit; overflow: hidden; transition: background .3s, color .3s; }
.lab-list button:hover { background: rgba(248,241,229,.05); color: var(--paper); }
.lab-list button[aria-selected=true] { background: rgba(248,241,229,.08); color: var(--paper); }
.lab-t { display: block; font: 400 21px/1.15 var(--display); }
.lab-m { display: block; margin-top: 6px; font: 600 11.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); opacity: .8; }
.lab-bar { position: absolute; left: 18px; right: 18px; bottom: 8px; height: 2px; background: rgba(248,241,229,.1); border-radius: 2px; overflow: hidden; opacity: 0; }
.lab-list button[aria-selected=true] .lab-bar { opacity: 1; }
.lab-bar::after { content: ""; position: absolute; inset: 0; background: var(--accent-2); transform: scaleX(0); transform-origin: left; }
.lab-list button.run .lab-bar::after { animation: dwell var(--dwell) linear forwards; }
@keyframes dwell { to { transform: scaleX(1); } }
.lab-panel { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 0; background: #2b221d; border: 1px solid rgba(248,241,229,.1); border-radius: 18px; overflow: hidden; min-height: 440px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.8); }
.lab-stage { position: relative; padding: 26px; background: radial-gradient(120% 100% at 30% 0%, #352a23, #231b17); display: grid; align-items: center; }
.lab-stage::after { content: "Sample data · real outcomes"; position: absolute; right: 14px; bottom: 10px; padding: 5px 9px; border-radius: 99px; background: rgba(248,241,229,.08); font: 600 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: rgba(248,241,229,.7); }
.lab-copy { padding: 30px 30px 28px; border-left: 1px solid rgba(248,241,229,.08); }
.lab-copy.in > * { animation: up .6s cubic-bezier(.2,.7,.1,1) both; }
.lab-copy.in > :nth-child(2) { animation-delay: .06s; } .lab-copy.in > :nth-child(3) { animation-delay: .12s; } .lab-copy.in > :nth-child(4) { animation-delay: .18s; } .lab-copy.in > :nth-child(n+5) { animation-delay: .24s; }
.lab-meta { margin: 0 0 10px; font: 600 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.lab-copy h3 { margin: 0 0 12px; font: 400 clamp(24px, 2.1vw, 30px)/1.1 var(--display); }
.lab-copy p { margin: 0; color: #d8cbb8; font-size: 15.5px; }
.lab-result { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 18px !important; padding: 12px 14px; border-radius: 10px; background: rgba(233,162,59,.08); border: 1px solid rgba(233,162,59,.22); }
.lab-result span { color: #b9a999; text-decoration: line-through; text-decoration-color: rgba(210,89,42,.7); }
.lab-result i { font-style: normal; color: var(--accent-2); }
.lab-result b { font: 400 22px/1 var(--display); color: var(--paper); }
.lab-tags { margin-top: 14px !important; font: 500 12.5px/1.4 ui-monospace, Menlo, monospace !important; color: #a3957f !important; }
.lab-copy .more { margin-top: 16px; }

/* shared sim pieces */
.sim { width: 100%; color: var(--paper); font-size: 13px; }
.sim h4 { margin: 0 0 8px; font: 600 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: #b9a999; }
.sim .pill { display: inline-block; padding: 5px 10px; border-radius: 99px; background: rgba(248,241,229,.08); font-weight: 600; font-size: 12px; }

/* bank */
.sb-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sim .clock { color: #b9a999; font-variant-numeric: tabular-nums; } .clock b { color: var(--paper); }
.sb-cols { display: grid; grid-template-columns: 1fr 26px 1fr; }
.sb-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sim .row { display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; padding: 8px 10px; border-radius: 8px; background: rgba(248,241,229,.05); border: 1px solid transparent; font-variant-numeric: tabular-nums; transition: background .35s, border-color .35s, transform .35s, opacity .35s; }
.sim .row b { font-weight: 600; }
.sim .row.scan { border-color: rgba(233,162,59,.7); background: rgba(233,162,59,.12); transform: scale(1.02); }
.sim .row.ok { background: rgba(110,190,130,.14); border-color: rgba(110,190,130,.45); }
.sim .row.ok b::after { content: " ✓"; color: #8fd3a0; }
.sim .row.bad { background: rgba(210,89,42,.16); border-color: rgba(210,89,42,.55); }
.sb-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: #b9a999; }
.sb-foot b { color: var(--paper); font-variant-numeric: tabular-nums; }
.sb-foot .by-hand { margin-left: auto; text-decoration: line-through; opacity: .7; }
.sim-bank.done .sb-foot .tray { color: var(--accent-2); }

/* bridge */
.sim-bridge { display: grid; grid-template-columns: 1fr 90px 1fr; gap: 0; align-items: start; }
.br-sys { padding: 12px; border-radius: 12px; background: rgba(248,241,229,.05); border: 1px solid rgba(248,241,229,.1); min-height: 230px; }
.br-sys.mg { border-color: rgba(233,162,59,.4); }
.br-sys small { display: block; color: #8f826f; margin: -4px 0 10px; font-size: 11px; }
.br-sys ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.br-sys li { padding: 7px 9px; border-radius: 7px; background: rgba(248,241,229,.07); font-size: 12px; white-space: nowrap; align-items: center; transition: transform .5s, opacity .5s; display: flex; justify-content: space-between; gap: 6px; }
.sim-bridge .queue li.out { transform: translateX(40px); opacity: 0; }
.sim-bridge .br-landed li { opacity: 0; transform: translateX(-30px); } .sim-bridge .br-landed li.in { opacity: 1; transform: none; }
.sim-bridge .br-landed em { font-style: normal; color: #8fd3a0; font-size: 11px; }
.br-span { position: relative; height: 230px; display: grid; place-items: center; }
.br-line { position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed rgba(248,241,229,.25); }
.br-label { position: absolute; top: calc(50% - 30px); font-size: 10.5px; color: #8f826f; text-align: center; }
.sim .parcel { position: absolute; left: 0; top: calc(50% - 5px); width: 10px; height: 10px; border-radius: 3px; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); transition: left .6s cubic-bezier(.5,0,.3,1); }
.sim .parcel.go { left: calc(100% - 10px); }
.br-migrate { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-top: 16px; color: #b9a999; }
.sim .bar { height: 6px; border-radius: 6px; background: rgba(248,241,229,.08); overflow: hidden; }
.sim .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .09s linear; }
.sim .pct { color: var(--paper); font-variant-numeric: tabular-nums; }

/* ask */
.sim-ask { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: center; }
.ask-chat { display: grid; gap: 12px; }
.sim .msg { max-width: 92%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.sim .msg.me { justify-self: end; background: var(--paper); color: var(--ink); border-bottom-right-radius: 4px; min-height: 20px; }
.sim .caret { display: inline-block; width: 2px; height: 1em; background: var(--ink); vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
.sim-ask.asked .caret { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.sim .msg.bot { background: rgba(248,241,229,.08); border-bottom-left-radius: 4px; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; }
.sim-ask.asked .msg.bot { opacity: 1; transform: none; }
.sim .dots i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #b9a999; animation: bounce 1s infinite; }
.sim .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 40% { transform: translateY(-4px); opacity: .5; } }
.sim-ask.answered .dots { display: none; }
.sim .src { display: block; margin-top: 8px; font-size: 11px; color: var(--accent-2); opacity: 0; transition: opacity .4s; }
.sim-ask.done .src { opacity: 1; }
.ask-vec svg { width: 100%; height: auto; display: block; }
.ask-vec circle { fill: rgba(248,241,229,.25); transition: fill .4s, r .4s; }
.sim-ask.searched .ask-vec circle.hit { fill: var(--accent-2); r: 5; }
.ask-vec .probe { fill: none; stroke: var(--accent-2); stroke-width: 1; opacity: .7; }
.sim-ask.searched .probe { animation: probe 1.4s ease-out forwards; }
@keyframes probe { from { r: 0; opacity: .9; } to { r: 70; opacity: 0; } }
.ask-vec small { display: block; text-align: center; color: #8f826f; font-size: 11px; margin-top: 6px; }

/* fleet */
.sim-fleet { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: center; }
.sim .phone { position: relative; height: 340px; border-radius: 30px; background: #120e0c; border: 6px solid #3a2f28; padding: 30px 10px 10px; overflow: hidden; }
.sim .notch { position: absolute; top: 8px; left: 50%; width: 60px; height: 14px; margin-left: -30px; border-radius: 10px; background: #3a2f28; }
.sim .slack { height: 100%; border-radius: 16px; background: #f6f0e6; color: var(--ink); padding: 10px; }
.sim .chan { margin: 0 0 8px; font-weight: 700; font-size: 12px; color: #5a4c43; }
.sim .card { padding: 10px; border-radius: 10px; background: #fff; border: 1px solid #e6dccb; font-size: 12px; opacity: 0; transform: translateY(-14px) scale(.96); transition: opacity .45s, transform .45s cubic-bezier(.3,1.4,.5,1); }
.sim-fleet.notified .card { opacity: 1; transform: none; }
.sim .card p { margin: 6px 0 8px; color: #5a4c43; line-height: 1.4; }
.sim .btns { display: flex; gap: 6px; }
.sim .btns span { flex: 1; text-align: center; padding: 6px 0; border-radius: 6px; border: 1px solid #d9cdb8; font-weight: 600; transition: background .2s, color .2s, transform .2s; }
.sim .btns .approve { background: #1f7a4a; border-color: #1f7a4a; color: #fff; }
.sim-fleet.tapped .approve { transform: scale(.92); }
.sim .stamped { display: none; color: #1f7a4a !important; font-weight: 700; margin: 8px 0 0 !important; }
.sim-fleet.approved .btns { display: none; } .sim-fleet.approved .stamped { display: block; }
.sim .tap { position: absolute; left: 34%; top: 66%; width: 26px; height: 26px; border-radius: 50%; background: rgba(233,162,59,.55); opacity: 0; transform: scale(.4); }
.sim-fleet.tapped .tap { animation: tap .6s ease-out; }
@keyframes tap { 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }
.sim .board { padding: 14px; border-radius: 12px; background: rgba(248,241,229,.05); border: 1px solid rgba(248,241,229,.1); }
.sim .board ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.sim .board li { display: flex; justify-content: space-between; align-items: center; gap: 10px; white-space: nowrap; padding: 9px 10px; border-radius: 8px; background: rgba(248,241,229,.06); }
.sim .board em { flex: none; font-style: normal; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.sim .board em.p { background: rgba(233,162,59,.18); color: var(--accent-2); }
.sim .board em.g { background: rgba(110,190,130,.18); color: #8fd3a0; }
.sim .board li.pulse { animation: pulse 1s ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(110,190,130,.6); } 100% { box-shadow: 0 0 0 12px rgba(110,190,130,0); } }
.sim .board small { color: #8f826f; font-size: 11px; }

@media (max-width: 980px) {
  .lab { grid-template-columns: minmax(0, 1fr); }
  .lab-list { grid-auto-flow: column; grid-auto-columns: minmax(230px, 70%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .lab-list button { scroll-snap-align: start; }
  .lab-panel { grid-template-columns: minmax(0, 1fr); }
  .lab-copy { border-left: 0; border-top: 1px solid rgba(248,241,229,.08); }
}
@media (max-width: 560px) {
  .lab-stage { padding: 16px; }
  .sim-bridge { grid-template-columns: 1fr 44px 1fr; }
  .br-label { display: none; }
  .sim-ask { grid-template-columns: 1fr; }
  .ask-vec { display: none; }
  .sim-fleet { grid-template-columns: 1fr; }
  .phone { height: 300px; max-width: 220px; margin: 0 auto; }
  .row { font-size: 11px; padding: 6px 7px; gap: 4px; }
  .row span { overflow: hidden; text-overflow: ellipsis; }
  .sb-cols { grid-template-columns: minmax(0, 1fr) 8px minmax(0, 1fr); }
  .sb-foot .by-hand { display: none; }
  .lab-stage { overflow: hidden; }
}


/* ═══════════════════════ the rest of the site ═══════════════════════ */

/* dark bands use the dark values of the shared component variables */
.work, .films-head, .films-list, .travel {
  --bg: #241c18; --surface: #2b221d; --surface2: #352a23; --text: #f8f1e5; --muted: #b9a999;
  --line: rgba(248,241,229,.12); --tr: 248,241,229; --accent: #e9a23b; --ar: 233,162,59; --gold: #e9a23b; --gr: 233,162,59; --on: #241c18;
}
html, body { overflow-x: clip; }
body:not(.pg-index) main > :first-child:not(.scene):not(.photo-hero) { padding-top: 120px; }
section[id] { scroll-margin-top: 70px; }
.h.small { font-size: clamp(30px, 3vw, 42px); margin-bottom: 20px; }
.lede { color: #4a3f37; font-size: 17px; line-height: 1.6; max-width: 56ch; }
.eyebrow { font: 600 12px/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }

/* legacy buttons used inside case studies */
.btn-primary { }
.btn-outline { background: transparent; color: var(--ink); box-shadow: none; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.tag { font-size: 12.5px; }

/* motion for the legacy .reveal / .hero-in classes */
html:not(.still) .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.1,1), transform .8s cubic-bezier(.2,.7,.1,1); }
html:not(.still) .reveal.in { opacity: 1; transform: none; }
html:not(.still) .hero-in { animation: up .9s cubic-bezier(.2,.7,.1,1) both; }
html:not(.still) .hero-in:nth-child(2) { animation-delay: .08s; } html:not(.still) .hero-in:nth-child(3) { animation-delay: .16s; } html:not(.still) .hero-in:nth-child(n+4) { animation-delay: .24s; }

/* inner page heroes: the same scene, a little shorter */
.hero.page-hero { }   /* same height as Home, so the copy clears the landscape on short screens */
/* short screens: give the copy room above the landscape (the scene is anchored to the bottom) */
@media (max-height: 800px) and (min-width: 821px) { .hero { min-height: 760px; } }
@media (max-width: 420px) { .hero { min-height: 780px; } }

/* ── contact scene with the portrait (every page) ── */
.contact-copy { display: flex; align-items: center; justify-content: center; gap: clamp(22px, 4vw, 48px); text-align: left; max-width: 1100px; margin: 0 auto; }
.contact-photo { flex: none; margin: 0; width: clamp(130px, 14vw, 190px); }
.contact-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; border-radius: 16px; border: 3px solid rgba(248,241,229,.85); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); transform: rotate(-3deg); transition: transform .5s cubic-bezier(.2,.7,.1,1); }
.contact-photo:hover img { transform: rotate(0) scale(1.03); }
.contact-text .actions { justify-content: flex-start; }
.contact h2 { font-size: clamp(36px, 4.4vw, 68px); }
.contact .sub { max-width: 46ch; }

/* ── Work: projects ── */
.focus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 6px 0 60px; padding-bottom: 50px; border-bottom: 1px solid rgba(248,241,229,.1); }
.focus h3 { margin: 0 0 8px; font: 400 24px/1.15 var(--display); color: var(--accent-2); }
.focus p { margin: 0; color: #d8cbb8; font-size: 15px; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 46px 40px; }
.pcard .case-art { padding: 18px; }
.pcard .case-art .live-badge { top: 12px; right: 12px; }
.pc-text { padding-top: 18px; }
.pc-text h3 { margin: 0 0 10px; font: 400 clamp(24px, 2.2vw, 30px)/1.1 var(--display); }
.pc-text p { margin: 0 0 10px; color: #d8cbb8; font-size: 15.5px; }
.pc-text .pc-body { font-size: 14.5px; color: #b9a999; }
.pc-metric b { font: 400 26px/1 var(--display); color: var(--accent-2); }
.pc-tags { font: 500 12.5px/1.5 ui-monospace, Menlo, monospace !important; color: #a3957f !important; }
.pc-links { display: flex; gap: 22px; flex-wrap: wrap; }

/* ── Work: experience timeline ── */
.exp { padding: 120px 0 60px; }
.timeline { list-style: none; margin: 30px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 170px; top: 8px; bottom: 8px; border-left: 2px dashed rgba(36,28,24,.2); }
.timeline li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0 44px; padding: 0 0 40px; position: relative; }
.timeline li::after { content: ""; position: absolute; left: 164px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.timeline li:first-child::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px rgba(210,89,42,.18); }
.t-when { font: 600 13px/1.6 var(--body); letter-spacing: .04em; color: var(--ink-2); padding-right: 24px; }
.timeline h3 { margin: 0 0 2px; font: 400 26px/1.15 var(--display); }
.timeline p { margin: 0 0 8px; color: #3d322b; max-width: 70ch; }
.timeline .t-where { color: var(--accent); font-weight: 600; font-size: 14px; }
.t-tags { font: 500 12.5px/1.5 ui-monospace, Menlo, monospace; color: #7b6c58 !important; }

/* ── Work: stack, certifications, education ── */
.facts { padding: 40px 0 120px; }
.facts-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
.stack .sgroup { grid-template-columns: 170px 1fr; }
.stack .sgroup b { font: 600 13px/1.4 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.cert-list { margin-bottom: 44px; }
.card.cert { display: flex; gap: 16px; align-items: center; background: #fffaf1; border-radius: 14px; padding: 18px 20px; }
.card.cert h3 { margin: 0 0 4px; font: 600 16px/1.35 var(--body); }
.card.cert p { margin: 0; font-size: 14px; color: var(--ink-2); }
.cert-badge { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--ink); color: var(--paper); font: 700 14px var(--body); }
.edu { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.edu b { display: block; font: 400 22px/1.2 var(--display); }
.edu span { color: var(--ink-2); font-size: 14.5px; }

/* ── Photography ── */
.photo-hero { position: relative; height: 100svh; min-height: 620px; max-height: 1100px; overflow: hidden; color: #fff; }
.photo-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
html:not(.still) .photo-hero img { animation: settle 2.2s cubic-bezier(.2,.7,.1,1) both; }
@keyframes settle { from { transform: scale(1.1); filter: brightness(.7); } }
.photo-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 26%, transparent 38%, rgba(10,8,6,.82) 88%); }
.ph-copy { position: absolute; z-index: 2; left: clamp(16px, 6vw, 96px); right: 16px; bottom: clamp(40px, 9vh, 90px); max-width: 720px; }
.ph-copy .kicker { color: rgba(255,255,255,.8); }
.ph-copy h1 { margin: 0; font: 400 clamp(46px, 6vw, 96px)/1 var(--display); letter-spacing: -.015em; }
.ph-copy .sub { color: rgba(255,255,255,.85); font-size: 18px; max-width: 52ch; }
.ph-copy > * { animation: up .9s cubic-bezier(.2,.7,.1,1) both; } .ph-copy > :nth-child(2) { animation-delay: .1s; } .ph-copy > :nth-child(n+3) { animation-delay: .2s; }
.pg-photography .nav:not(.scrolled), .pg-videos .nav:not(.scrolled) { color: #fff; }
.pg-photography .nav:not(.scrolled) .brand svg, .pg-videos .nav:not(.scrolled) .brand svg { fill: #fff; }
.pg-photography .nav:not(.scrolled) .nav-cta, .pg-videos .nav:not(.scrolled) .nav-cta { border-color: #fff; }
.frames { padding: 120px 0 100px; }
.frame-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
.frame-grid figure { margin: 0; }
.frame-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; display: block; transition: transform 1.2s cubic-bezier(.2,.7,.1,1); }
.frame-grid figure > img { aspect-ratio: 3/2; }
.frame-wide { grid-column: span 8; } .frame-tall { grid-column: span 4; } .frame-tall img { aspect-ratio: 4/5.4 !important; }
.frame-std { grid-column: span 6; }
.frame-grid figure { overflow: hidden; border-radius: 14px; }
.frame-grid figure:hover img { transform: scale(1.04); }
.frame-grid figcaption { padding: 10px 2px 0; font-size: 13.5px; color: var(--ink-2); }
.more-ig { margin: 36px 0 0; text-align: right; } .more-ig a { font-weight: 600; color: var(--accent); text-decoration: none; }
.travel { background: var(--ink); color: var(--paper); padding: 110px 0; }
.travel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 70px); align-items: center; }
.travel .lede { color: #d8cbb8; }
.travel .globe-wrap { margin: 0; }
.country-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.country-chip { color: var(--paper); border-color: rgba(248,241,229,.2); font-size: 13.5px; padding: 7px 13px; }
.country-chip:hover, .country-chip.on { background: var(--accent-2); color: var(--ink); border-color: var(--accent-2); }
#globe-tooltip { background: var(--paper); color: var(--ink); }
.gear { padding: 100px 0 110px; }

/* ── Films ── */
.films-head { background: var(--ink); color: var(--paper); padding: 150px 0 50px; }
.films-head h1 { margin: 0; font: 400 clamp(46px, 6vw, 92px)/1 var(--display); }
.films-head .sub { color: #d8cbb8; font-size: 18px; max-width: 60ch; }
.films-head .kicker { color: var(--accent-2); }
.films-list { background: var(--ink); color: var(--paper); padding: 10px 0 120px; }
.films-list .chip { color: #d8cbb8; border-color: rgba(248,241,229,.2); font-size: 13px; padding: 7px 14px; }
.films-list .chip.on { background: var(--accent-2); color: var(--ink); border-color: var(--accent-2); }
.vcard { border-radius: 14px; overflow: hidden; border: 1px solid rgba(248,241,229,.1); background: #2b221d; transition: transform .4s cubic-bezier(.2,.7,.1,1), box-shadow .4s; }
.vcard:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -25px rgba(0,0,0,.8); }
.vmeta h3 { font: 400 20px/1.15 var(--display); color: var(--paper); }
.vcard:hover .vplay { background: var(--accent); }

/* ── case studies, blog, 404: text pages on paper ── */
.case-page, .page-text { max-width: 900px; }
.page-text { padding-bottom: 110px; }
.page-text h1, .case-page h1 { margin: 0; font: 400 clamp(40px, 5vw, 70px)/1.03 var(--display); letter-spacing: -.015em; max-width: 20ch; }
.page-text .sub, .case-hero .lede { font-size: 19px; color: #3d322b; max-width: 58ch; margin: 18px 0 0; }
.case-hero { padding: 0 0 30px; }
.case-hero .tags { margin-top: 18px; }
.case-back { margin: 0 0 26px; display: inline-block; }
.case-page .eyebrow { font: 600 12px/1.2 var(--body); letter-spacing: .14em; color: var(--accent); }
.case-sec { padding: 34px 0; border-top: 1px solid rgba(36,28,24,.1); }
.case-sec p, .case-list { color: #3d322b; font-size: 16.5px; }
.case-list b, .steps b { color: var(--ink); }
.steps b { font: 400 21px/1.2 var(--display); }
.case-page .card { background: #fffaf1; border-color: rgba(36,28,24,.12); }
.case-page .card h3 { font: 400 21px/1.2 var(--display); margin: 0 0 6px; }
.case-page .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.diagram { background: #fffaf1; }
.soon { display: grid; gap: 18px; margin-top: 44px; }
.soon article { padding: 30px; border-radius: 16px; background: #fffaf1; border: 1px solid rgba(36,28,24,.1); }
.soon h2 { margin: 12px 0 6px; font: 400 30px/1.1 var(--display); }
.soon p { margin: 0; color: var(--ink-2); }
.nf { min-height: 50vh; }

@media (max-width: 900px) {
  .focus, .pgrid, .facts-grid, .travel-grid { grid-template-columns: minmax(0, 1fr); }
  .timeline::before { left: 7px; } .timeline li { grid-template-columns: minmax(0, 1fr); padding-left: 34px; }
  .timeline li::after { left: 1px; } .t-when { padding: 0 0 4px; }
  .frame-wide, .frame-tall, .frame-std { grid-column: 1 / -1; }
  .contact-copy { flex-direction: column; text-align: center; }
  .contact { height: auto; min-height: 0; max-height: none; padding: 96px 0 400px; }
  .contact-copy { position: relative; top: auto; }
  .contact .land { top: auto; height: 500px; }
  .dusk .sun { top: auto; bottom: 250px; left: 18%; }
  .contact-text .actions { justify-content: center; }
  .contact-photo { width: 120px; }
  .stack .sgroup { grid-template-columns: 1fr; }
  .case-page .grid2 { grid-template-columns: 1fr; }
}

/* ── Ask my AI: chat widget, bottom left ── */
#ask-ai-btn { position: fixed; left: 18px; bottom: 18px; z-index: 70; display: inline-flex; align-items: center; gap: 9px; height: 50px; padding: 0 20px 0 16px;
  border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: 600 15px/1 var(--body); cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.55); transition: transform .25s, box-shadow .25s, padding .25s; }
#ask-ai-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(210,89,42,.6); }
#ask-ai-btn .i-chat { color: #fff; }
#ask-ai-btn .i-close { display: none; }
#ask-ai-btn.open .i-chat { display: none; } #ask-ai-btn.open .i-close { display: block; }
#ask-ai-btn:focus-visible, #ask-ai-panel :focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
#ask-ai-panel { position: fixed; left: 18px; bottom: 82px; z-index: 71; width: min(390px, calc(100vw - 36px)); height: min(620px, calc(100vh - 120px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: #241c18;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(36,28,24,.1);
  transform-origin: 30px calc(100% + 40px); transform: scale(.6) translateY(20px); opacity: 0; transition: transform .26s cubic-bezier(.2,.9,.3,1.1), opacity .2s; }
#ask-ai-panel.open { transform: none; opacity: 1; }
#ask-ai-panel[hidden] { display: none; }
.ask-ai-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--ink); color: var(--paper); }
.ask-ai-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-2); color: var(--ink); font: 700 14px var(--body); flex: none; }
.ask-ai-who { flex: 1; min-width: 0; }
.ask-ai-who h2 { margin: 0; font: 400 19px/1.1 var(--display); }
.ask-ai-who p { margin: 3px 0 0; font-size: 12.5px; color: #cdbfac; display: flex; align-items: center; gap: 6px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #5fd38a; box-shadow: 0 0 0 3px rgba(95,211,138,.22); }
.ask-ai-head a, .ask-ai-close { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--paper); background: rgba(248,241,229,.08); border: 0; cursor: pointer; text-decoration: none; }
.ask-ai-head a:hover, .ask-ai-close:hover { background: rgba(248,241,229,.18); }
.ask-ai-body { position: relative; flex: 1; background: #241c18; }
.ask-ai-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .3s; }
#ask-ai-panel.loaded iframe { opacity: 1; }
.ask-ai-loading { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ask-ai-loading i { width: 8px; height: 8px; border-radius: 50%; background: #b9a999; animation: bounce 1s infinite; }
.ask-ai-loading i:nth-child(2) { animation-delay: .15s; } .ask-ai-loading i:nth-child(3) { animation-delay: .3s; }
#ask-ai-panel.loaded .ask-ai-loading { display: none; }
@media (max-width: 600px) {
  #ask-ai-panel { left: 0; right: 0; top: 0; bottom: 0; width: auto; height: auto; border-radius: 0; transform-origin: 30px 100%; }
  body.chat-open #ask-ai-btn { display: none; }
}
/* keep the footer links clear of the launcher and the sleeping cat */
.foot.foot { padding: 26px clamp(16px, 4vw, 48px) 104px; }

/* ── phone menu ── */
.nav-toggle { display: none; }
@media (max-width: 820px) {
  .nav-toggle { display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: inherit; cursor: pointer; z-index: 2; }
  .nav-toggle span { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s; }
  .nav.menu-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav nav { position: fixed; inset: 0 0 auto; padding: 84px 22px 26px; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); color: var(--ink); box-shadow: 0 30px 50px -30px rgba(0,0,0,.45);
    transform: translateY(-105%); transition: transform .35s cubic-bezier(.2,.7,.1,1); }
  .nav.menu-open nav { transform: none; }
  .nav nav a { padding: 16px 4px; border-bottom: 1px solid rgba(36,28,24,.1); font: 400 26px/1.1 var(--display); }
  .nav nav a[aria-current] { color: var(--accent); }
  .nav nav .nav-cta { margin-top: 18px; border: 0; padding: 15px; text-align: center; background: var(--ink); color: var(--paper) !important; border-radius: 12px; font: 600 16px/1 var(--body); }
  .nav .brand { z-index: 2; }
  .nav.menu-open { color: var(--ink) !important; }
  .nav.menu-open .brand svg { fill: var(--ink) !important; }
  /* calmer phones: no cat, toy box or chat button */
  #kukki, #kukki-ground-shadow, #toy-dock, #toy-caption { display: none !important; }
  #ask-ai-btn, #ask-ai-panel { display: none !important; }
  .foot.foot { padding-bottom: 30px; }
}

/* homepage projects before the live demos load (and for crawlers / screen readers) */
.lab-fallback { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-column: 1 / -1; }
.lab-fallback a { display: block; padding: 18px 20px; border-radius: 14px; background: #2b221d; text-decoration: none; }
.lab-fallback b { display: block; font: 400 22px/1.2 var(--display); color: var(--paper); }
.lab-fallback span { color: #b9a999; font-size: 15px; }
.nav-ask { display: none; }
@media (max-width: 820px) { .nav nav .nav-ask { display: block; color: var(--accent); } }

/* Kukki's bird tree and birds: fixed colours that read on both cream and dark sections */
#bird-tree { --surface2: #7d8a52; --line: rgba(36,28,24,.25); --muted: #5a4535; }
.bird { --text: #d2592a; }
