/* Components shared with the original design (copied from style.css):
   Kukki, the aeroplane windows, project/case-study pieces, videos, globe,
   the Ask Jayraj modal. Their colour tokens are mapped to the new palette. */
:root {
  --surface: #241c18; --surface2: #2e241f; --text: #f8f1e5; --muted: #b9a999;
  --accent: #d2592a; --gold: #e9a23b; --on: #ffffff;
  --ar: 210,89,42; --gr: 233,162,59; --tr: 36,28,24;
  --line: rgba(255,255,255,.12);
  --font-head: "Gloock", Georgia, serif; --font-body: "Figtree", system-ui, sans-serif; --font-mono: ui-monospace, Menlo, monospace;
}

/* Career path: a row of aeroplane windows (js/core/route.js flies the plane
   and opens the blinds). Each window's sky is fixed art, not palette-tinted. */
.cabin { position: relative; margin-top: 64px; }
.cabin-track { position: absolute; height: 2px; margin-top: -1px; background: repeating-linear-gradient(90deg, rgba(var(--tr), .2) 0 6px, transparent 6px 14px); }
.cabin.vertical .cabin-track { width: 2px; margin: 0 0 0 -1px; background: repeating-linear-gradient(180deg, rgba(var(--tr), .2) 0 6px, transparent 6px 14px); }
.cabin-fill { width: 100%; height: 100%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.cabin.armed .cabin-fill { width: 0; }
.cabin.armed.vertical .cabin-fill { width: 100%; height: 0; }
.cabin-plane { position: absolute; left: 0; top: 0; width: 28px; height: 28px; fill: var(--text); filter: drop-shadow(0 0 8px var(--gold)); z-index: 2; transition: opacity .5s .3s; }
.cabin:not(.armed) .cabin-plane, .cabin.landed .cabin-plane { opacity: 0; }
.cabin-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 18px; }
.cabin-stop { display: flex; flex-direction: column; align-items: center; text-align: center; }

.porthole { position: relative; width: min(132px, 100%); aspect-ratio: 3 / 4; border-radius: 50% / 44%; overflow: hidden; margin: 10px 0 30px;
  box-shadow: 0 0 0 9px var(--surface2), 0 0 0 10px rgba(var(--tr), .1), 0 22px 40px -18px rgba(0,0,0,.7); background: var(--sky); transform: translateZ(0); }
.porthole::after { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 22px rgba(0,0,0,.6); background: linear-gradient(125deg, rgba(255,255,255,.14), transparent 32%); }
.ph-sun { position: absolute; left: 58%; top: var(--sun-top); width: var(--sun-size, 34px); aspect-ratio: 1; border-radius: 50%; background: var(--sun); box-shadow: 0 0 26px 8px color-mix(in srgb, var(--sun) 45%, transparent); }
.ph-cloud { position: absolute; left: 100%; height: 14px; width: 60px; border-radius: 50%; background: rgba(255,255,255,.7); filter: blur(5px); animation: ph-cloud 9s linear infinite; }
.ph-cloud:nth-of-type(2) { top: 24%; width: 70px; animation-delay: -2s; }
.ph-cloud:nth-of-type(3) { top: 48%; width: 50px; animation-duration: 12s; animation-delay: -7s; }
.ph-cloud:nth-of-type(4) { top: 62%; width: 80px; animation-duration: 7s; animation-delay: -4s; opacity: .7; }
@keyframes ph-cloud { to { transform: translateX(-260px); } }
.ph-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; overflow: visible; }
.ph-kite { transform-box: fill-box; transform-origin: 50% 0; animation: ph-kite 3.2s ease-in-out infinite alternate; }
@keyframes ph-kite { from { transform: rotate(var(--tilt)) translateY(0); } to { transform: rotate(calc(var(--tilt) * -1)) translateY(-3px); } }
.ph-shimmer path { animation: ph-shimmer 2.4s ease-in-out infinite alternate; }
.ph-shimmer path:nth-child(even) { animation-delay: -1.2s; }
@keyframes ph-shimmer { from { transform: translateX(-3px); opacity: .4; } to { transform: translateX(3px); opacity: 1; } }
.ph-stars circle { animation: ph-twinkle 2s ease-in-out infinite alternate; }
.ph-stars circle:nth-child(odd) { animation-delay: -1s; }
@keyframes ph-twinkle { from { opacity: .25; } to { opacity: 1; } }
.ph-flame { filter: drop-shadow(0 0 4px #ffb347) drop-shadow(0 0 10px #ff8c1a); transform-box: fill-box; transform-origin: 50% 100%; animation: ph-flame .9s ease-in-out infinite alternate; }
@keyframes ph-flame { from { transform: scale(.85); opacity: .8; } to { transform: scale(1.1); opacity: 1; } }
.ph-blind { position: absolute; inset: 0; z-index: 3; background: repeating-linear-gradient(180deg, #262a3f 0 13px, #1e2133 13px 15px); transition: transform .55s cubic-bezier(.6,0,.3,1); }
.ph-blind::after { content: ''; position: absolute; left: 50%; bottom: 7px; width: 30px; height: 4px; margin-left: -15px; border-radius: 2px; background: #3d4260; }
.cabin-stop .ph-blind, .cabin-stop.open .ph-blind { transform: translateY(-101%); }
.cabin.armed .cabin-stop:not(.open) .ph-blind { transform: none; }
.sky-dawn { --sky: linear-gradient(180deg, #2b2a5e 0%, #c0587e 55%, #f6a55c 100%); --sun: #ffd59a; --sun-top: 50%; }
.sky-day { --sky: linear-gradient(180deg, #2f7fc4 0%, #8cc8e8 70%, #f3e2b0 100%); --sun: #fff4c2; --sun-top: 12%; }
.sky-cool { --sky: linear-gradient(180deg, #4a6fa8 0%, #a9c3df 75%, #dde6ee 100%); --sun: #fffbe8; --sun-top: 16%; }
.sky-dusk { --sky: linear-gradient(180deg, #3a2a5a 0%, #e0785a 60%, #f4c27a 100%); --sun: #ffcf86; --sun-top: 48%; }
.sky-night { --sky: linear-gradient(180deg, #070a1c 0%, #1b1f4a 60%, #3a2f5e 100%); --sun: #e9ecff; --sun-top: 12%; --sun-size: 16px; }
.sky-night .ph-cloud { opacity: .25; }

.cabin-text { transition: opacity .5s, transform .5s cubic-bezier(.2,.8,.2,1.15); }
.cabin.armed .cabin-stop:not(.open) .cabin-text { opacity: 0; transform: translateY(12px); }
.cabin-year { font: 500 12px var(--font-mono); letter-spacing: .08em; color: var(--muted); }
.cabin-country { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; font: 600 1.25rem var(--font-head); }
.cabin-country .flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(var(--tr), .14); flex: none; }
.cabin-city { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.cabin-co { margin-top: 12px; font-weight: 600; font-size: .95rem; }
.cabin-role { color: var(--muted); font-size: .82rem; margin-top: 3px; line-height: 1.4; }
.cabin-stop.now .cabin-year, .cabin-stop.now .cabin-co { color: var(--gold); }
.cabin-stop.now .porthole { box-shadow: 0 0 0 9px var(--surface2), 0 0 0 10px rgba(var(--gr), .7), 0 0 34px 6px rgba(var(--gr), .25); }
@media (max-width: 760px) {
  .cabin { margin-top: 32px; padding-left: 40px; }
  .cabin-row { grid-template-columns: 1fr; gap: 26px; }
  .cabin-stop { flex-direction: row; align-items: center; gap: 24px; text-align: left; }
  .porthole { width: 84px; flex: none; margin: 10px; }
  .cabin-country { justify-content: flex-start; font-size: 1.15rem; margin-top: 4px; }
  .cabin-co { margin-top: 8px; }
  .cabin.armed .cabin-stop:not(.open) .cabin-text { transform: translateX(12px); }
}
@media (prefers-reduced-motion: reduce) { .ph-cloud { animation: none; left: 20%; } .ph-kite, .ph-shimmer path, .ph-stars circle, .ph-flame { animation: none; } }

/* ---------- 10. Kukki — the cat -------------------------------------------- */
#kukki { position: fixed; left: 0; bottom: 0; width: 106px; height: 73px; z-index: 35; pointer-events: none; will-change: transform; }
/* A soft pool of palette-tinted light under her and a thin rim of the page's
   text colour keep a black cat readable on a dark page without the hard
   white halo. */
#kukki::before { content: ''; position: absolute; left: -22%; right: -22%; bottom: -10px; height: 40px; background: radial-gradient(ellipse at 50% 100%, rgba(var(--ar),.22), transparent 70%); pointer-events: none; }
#kukki-body { display: block; pointer-events: auto; overflow: visible; transform-origin: 50% 100%; touch-action: none; filter: drop-shadow(0 0 1.2px rgba(var(--tr),.4)) drop-shadow(0 0 10px rgba(var(--ar),.18)) drop-shadow(0 4px 6px rgba(0,0,0,.55)); }
#kukki-ground-shadow { position: fixed; bottom: -2px; left: 0; width: 90px; height: 10px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(0,0,0,.6), transparent 70%); z-index: 34; pointer-events: none; }

#kukki .bob { animation: kukki-bob .5s ease-in-out infinite alternate; transform-box: fill-box; }
@keyframes kukki-bob { to { transform: translateY(-2px); } }
#kukki .leg { transform-box: fill-box; transform-origin: 50% 0; animation: kukki-step .32s ease-in-out infinite alternate; }
#kukki .leg-2, #kukki .leg-3 { animation-delay: -.32s; }
#kukki[data-state=chase] .leg, #kukki[data-state=play] .leg { animation-duration: .18s; }
/* Legs and bob only animate while she's actually covering ground (kukki.js
   sets .moving), so she never glides along with frozen legs. */
#kukki:not(.moving) .bob, #kukki:not(.moving) .leg { animation: none; }
/* Stalking: low and slow. */
#kukki[data-state=stalk] .bob { animation: none; transform: translateY(6px); }
#kukki[data-state=stalk] .leg { animation-duration: .5s; }
#kukki[data-state=stalk] .head { translate: 2px 5px; }
@keyframes kukki-step { from { transform: rotate(-26deg); } to { transform: rotate(26deg); } }
#kukki .tail { transform-box: fill-box; transform-origin: 100% 100%; animation: kukki-wag 1.6s ease-in-out infinite alternate; }
#kukki[data-state=happy] .tail, #kukki[data-state=chase] .tail { animation-duration: .25s; }
@keyframes kukki-wag { from { transform: rotate(-8deg); } to { transform: rotate(14deg); } }
#kukki .head { transform-box: view-box; transform-origin: 100px 48px; transform: rotate(var(--head-tilt, 0deg)); transition: transform .2s; }
#kukki .pupil { translate: var(--pupil-x, 0) var(--pupil-y, 0); }
#kukki .eyes { transform-box: fill-box; transform-origin: center; animation: kukki-blink 4.5s infinite; }
@keyframes kukki-blink { 0%,94%,100% { transform: scaleY(1); } 96.5% { transform: scaleY(.08); } }
#kukki .ear { transform-box: fill-box; transform-origin: 50% 100%; animation: kukki-ear-twitch 6s infinite; }
#kukki .ear-2 { animation-delay: -3s; }
@keyframes kukki-ear-twitch { 0%,88%,100% { transform: none; } 91% { transform: rotate(-14deg); } 95% { transform: rotate(6deg); } }
#kukki .eyes-shut { opacity: 0; } #kukki .mouth { transform-box: fill-box; transform-origin: center; transform: scaleY(0); transition: transform .3s; }
#kukki[data-state=sleep] .eyes, #kukki[data-state=happy] .eyes, #kukki[data-state=yawn] .eyes { opacity: 0; }
#kukki[data-state=sleep] .eyes-shut, #kukki[data-state=happy] .eyes-shut, #kukki[data-state=yawn] .eyes-shut { opacity: 1; }
#kukki[data-state=yawn] .mouth { transform: scaleY(1); }
#kukki[data-state=yawn] .head { rotate: -14deg; }
#kukki[data-state=startle] .eyes { scale: 1.3; }
#kukki[data-state=startle] .tail { animation: none; scale: 1.4 1.4; }
#kukki[data-state=groom] .head { animation: kukki-lick .42s ease-in-out infinite alternate; }
@keyframes kukki-lick { from { translate: 0 0; } to { translate: -8px 14px; rotate: -24deg; } }
#kukki[data-state=stretch] #kukki-body { animation: kukki-stretch 2s ease-in-out; }
@keyframes kukki-stretch { 20%,75% { scale: 1.16 .86; } }
#kukki[data-state=stretch] .head { translate: 6px 8px; }
#kukki[data-state=sleep] .leg { opacity: 0; }
#kukki[data-state=sleep] .bob { transform: translateY(14px); }
#kukki[data-state=sleep] #kukki-body { animation: kukki-breathe 2.6s ease-in-out infinite; }
@keyframes kukki-breathe { 50% { scale: 1 1.035; } }
#kukki[data-state=sleep]::after { content: 'z z z'; position: absolute; right: -4px; top: -8px; font: 600 11px var(--font-head); color: var(--muted); letter-spacing: .2em; animation: kukki-zzz 1.4s ease-in-out infinite alternate; }
@keyframes kukki-zzz { from { opacity: .2; } to { opacity: 1; } }
#kukki[data-state=happy] #kukki-body { animation: kukki-happy .45s ease-in-out infinite alternate; }
@keyframes kukki-happy { to { translate: 0 -3px; rotate: 2deg; } }
#kukki[data-state=pounce] #kukki-body { animation: kukki-pounce .75s ease-in-out; }
@keyframes kukki-pounce { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(0) scale(1.1,.78); } 65% { transform: translateY(var(--pounce-height,-52px)) scale(.96,1.08); } 100% { transform: translateY(0) scale(1); } }
#kukki[data-state=startle] #kukki-body { animation: kukki-startle .7s ease-out; }
@keyframes kukki-startle { 18% { translate: 0 -36px; scale: .94 1.1; } 100% { translate: 0 0; } }
#kukki.swat .leg-3 { animation: kukki-swat .3s ease-out; }
@keyframes kukki-swat { 40% { transform: rotate(-70deg); } }
#kukki.hop #kukki-body { animation: kukki-hop .55s ease-out; }
@keyframes kukki-hop { 45% { translate: 0 -46px; scale: .96 1.06; } }

#kukki[data-state=sit] .bob { transform: rotate(-13deg) translateY(5px); transform-origin: 20% 100%; }
#kukki[data-state=sit] .leg-1, #kukki[data-state=sit] .leg-2 { opacity: 0; }
#kukki[data-state=sit] .head { translate: 0 -4px; }
#kukki[data-state=sniff] .bob { transform: rotate(-8deg) translateY(2px); transform-origin: 20% 100%; }
#kukki[data-state=sniff] .head { animation: kukki-sniff .35s ease-in-out infinite alternate; }
@keyframes kukki-sniff { from { translate: 4px 4px; } to { translate: 8px 8px; } }
#kukki[data-state=eat] .head { animation: kukki-munch .28s ease-in-out infinite alternate; }
@keyframes kukki-munch { from { translate: 8px 16px; } to { translate: 10px 21px; } }
#kukki[data-state=eat] .tail { rotate: -20deg; }

/* Making biscuits — the classic front-paw kneading motion. */
#kukki[data-state=knead] .bob { transform: rotate(-9deg) translateY(4px); transform-origin: 22% 100%; }
#kukki[data-state=knead] .leg-1, #kukki[data-state=knead] .leg-2 { opacity: 0; }
#kukki[data-state=knead] .paws-knead ellipse { opacity: 1; animation: kukki-knead 1s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 0; }
#kukki[data-state=knead] .paws-knead ellipse:last-child { animation-delay: .5s; }
@keyframes kukki-knead { from { transform: translateY(0) scaleY(1); } to { transform: translateY(-5px) scaleY(.7); } }

/* Watching / chattering at the birds — no hissing, just excited interest. */
#kukki[data-state=watch] .bob { transform: rotate(-11deg) translateY(4px); transform-origin: 20% 100%; }
#kukki[data-state=watch] .leg-1, #kukki[data-state=watch] .leg-2 { opacity: 0; }
#kukki[data-state=watch] .eyes { scale: 1.15; }
#kukki[data-state=watch] .tail { animation-duration: .8s; }
#kukki[data-state=chatter] .bob { transform: rotate(-11deg) translateY(4px); transform-origin: 20% 100%; }
#kukki[data-state=chatter] .leg-1, #kukki[data-state=chatter] .leg-2 { opacity: 0; }
#kukki[data-state=chatter] .mouth { animation: kukki-chatter .09s steps(2) infinite; }
@keyframes kukki-chatter { from { transform: scaleY(0); } to { transform: scaleY(1); } }
#kukki[data-state=chatter] .tail { animation-duration: .2s; }

/* Carrying a caught mouse proudly in her mouth. */
#kukki[data-state=carry] .head { translate: 2px 2px; }
#kukki[data-state=carry] #kukki-body { animation: kukki-proud-trot .5s ease-in-out infinite alternate; }
@keyframes kukki-proud-trot { to { translate: 0 -3px; } }

#kukki[data-state=freeze] * { animation-play-state: paused !important; }
#kukki[data-state=freeze] .eyes { scale: 1.35; }
#kukki[data-state=freeze] .ear { rotate: -12deg; }
#kukki[data-state=freeze] .tail { rotate: -2deg; scale: 1.5 1; }
#kukki-body.dread { animation: kukki-dread-shiver .12s ease-in-out infinite; }
@keyframes kukki-dread-shiver { 0%,100% { translate: 0 0; } 50% { translate: 1.5px 0; } }

#kukki[data-state=held] #kukki-body { rotate: var(--hold-rotate,-72deg); transform-origin: 78% 30%; }
#kukki[data-state=held] .leg, #kukki[data-state=fall] .leg { animation: kukki-dangle .45s ease-in-out infinite alternate; }
@keyframes kukki-dangle { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
#kukki[data-state=held] .eyes, #kukki[data-state=fall] .eyes { scale: 1.25; }
#kukki[data-state=held] .tail { animation-duration: .5s; }
#kukki.landed #kukki-body { animation: kukki-land-squash .3s ease-out; }
@keyframes kukki-land-squash { 0% { transform: scaleY(.75); } 100% { transform: scaleY(1); } }

#kukki-speech { position: absolute; left: 50%; top: -32px; transform: translateX(-50%) scale(.6); opacity: 0; background: var(--text); color: var(--bg); font: 500 12px var(--font-body); padding: 5px 11px; border-radius: 100px; white-space: nowrap; transition: .25s; }
#kukki-speech.on { opacity: 1; transform: translateX(-50%) scale(1); }
.kukki-heart { position: fixed; bottom: 74px; z-index: 36; pointer-events: none; color: var(--accent); font-size: 16px; animation: kukki-heart-rise 1.3s ease-out forwards; }
@keyframes kukki-heart-rise { from { transform: translateY(0) scale(.6); opacity: 1; } to { transform: translateY(-54px) scale(1.2); opacity: 0; } }

/* Toys */
#toy-ball { position: fixed; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9a6b, #e0392c 55%, #8f1f16); box-shadow: 0 4px 10px rgba(0,0,0,.5); z-index: 34; pointer-events: none; display: none; }
#toy-ball::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); border-left-color: transparent; border-bottom-color: transparent; }
#toy-laser-dot { position: fixed; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #ff2d2d; box-shadow: 0 0 10px 4px rgba(255,45,45,.65); z-index: 9998; pointer-events: none; display: none; }
#toy-bowl { position: fixed; bottom: 0; left: 0; width: 54px; height: 24px; border-radius: 0 0 30px 30px; background: linear-gradient(var(--surface2), var(--surface)); border: 1px solid var(--line); z-index: 33; display: none; }
#toy-bowl span { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); font-size: 20px; }
#toy-bowl.empty span { display: none; }
#toy-box { position: fixed; bottom: 0; left: 0; width: 84px; height: 56px; background: linear-gradient(#c19a6b, #a67c4e); border-radius: 4px; z-index: 36; display: none; box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); }
#toy-box::before { content: ''; position: absolute; left: 36px; top: 0; width: 12px; height: 100%; background: rgba(255,255,255,.18); }
#toy-box .ear-flick { position: absolute; top: -10px; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 14px solid #14161c; opacity: 0; transition: opacity .2s; }
#toy-box .ear-flick:nth-child(1) { left: 22px; } #toy-box .ear-flick:nth-child(2) { right: 22px; }
#toy-box.occupied { animation: box-wobble .6s ease-in-out infinite; } #toy-box.occupied .ear-flick { opacity: 1; }
@keyframes box-wobble { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
#toy-bed { position: fixed; bottom: 0; left: 0; width: 150px; height: 30px; border-radius: 50px 50px 10px 10px; background: linear-gradient(rgba(var(--ar),.9), rgba(var(--ar),.6)); z-index: 33; display: none; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
#toy-bed::after { content: ''; position: absolute; inset: 4px 12px; border-radius: 30px; border: 1px dashed rgba(255,255,255,.4); }
#toy-mouse { position: fixed; bottom: 0; left: 0; font-size: 24px; line-height: 1; z-index: 34; display: none; pointer-events: none; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
#toy-mouse.caught { filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
#toy-cucumber { position: fixed; bottom: 0; left: 0; font-size: 30px; line-height: 1; z-index: 33; display: none; pointer-events: none; transition: opacity .35s; }

/* Toy dock */
#toy-caption { position: fixed; right: 74px; bottom: 26px; max-width: 220px; font-size: .78rem; color: var(--text); background: var(--surface2); border: 1px solid var(--line); padding: 8px 12px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 60; }
#toy-caption.on { opacity: 1; }
#toy-dock { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#toy-dock-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line); font-size: 20px; padding: 0; transition: .2s; cursor: pointer; }
#toy-dock-toggle:hover, #toy-dock.open #toy-dock-toggle { border-color: var(--accent); transform: rotate(-12deg); }
#toy-dock-list { display: none; flex-direction: column; gap: 4px; max-height: 72vh; overflow: auto; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px; padding: 8px; }
#toy-dock.open #toy-dock-list { display: flex; }
#toy-dock-list button { width: 44px; height: 44px; border-radius: 12px; background: transparent; border: 1px solid transparent; font-size: 21px; padding: 0; cursor: pointer; }
#toy-dock-list button svg { display: block; margin: auto; }
#toy-dock-list button:hover { background: var(--surface2); }
#toy-dock-list button.on { background: rgba(var(--ar),.2); border-color: var(--accent); }

/* ---------- 11. Birds & tree scene ---------------------------------------- */
#bird-tree { position: fixed; top: 0; left: 0; z-index: 32; display: none; pointer-events: none; transition: transform .3s; }
.bird { position: fixed; top: 0; left: 0; z-index: 33; pointer-events: none; transform-origin: center; }
.bird .wing-l, .bird .wing-r { transform-box: fill-box; transform-origin: 50% 50%; animation: bird-flap .18s ease-in-out infinite alternate; }
.bird.perched .wing-l, .bird.perched .wing-r { animation: bird-flap-idle 3.4s ease-in-out infinite; }
@keyframes bird-flap { from { transform: scaleY(1); } to { transform: scaleY(.3) translateY(2px); } }
@keyframes bird-flap-idle { 0%,92%,100% { transform: none; } 95% { transform: scaleY(.5); } }

/* Sunbeam nap — rare, unprompted contentment */
#toy-sunbeam {
  position: fixed; bottom: -10px; left: 0; width: 120px; height: 60px;
  border-radius: 50%; z-index: 33; display: none; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 221, 150, .55), rgba(255, 221, 150, .12) 60%, transparent 75%);
  animation: sunbeam-glow 3.5s ease-in-out infinite;
}
@keyframes sunbeam-glow { 50% { opacity: .7; transform: scale(1.06); } }
#kukki[data-state=sunbeam-nap] .leg { opacity: 0; }
#kukki[data-state=sunbeam-nap] .bob { transform: rotate(-14deg) translateY(6px); transform-origin: 22% 100%; }
#kukki[data-state=sunbeam-nap] .eyes { opacity: 0; }
#kukki[data-state=sunbeam-nap] .eyes-shut { opacity: 1; }
#kukki[data-state=sunbeam-nap] #kukki-body { animation: kukki-breathe 3.2s ease-in-out infinite; }
#kukki[data-state=sunbeam-nap]::after {
  content: '\2600'; position: absolute; right: -6px; top: -14px;
  font-size: 13px; color: #ffcf6b; animation: kukki-zzz 2s ease-in-out infinite alternate;
}


/* Content inside <main> sits on paper: light values for the shared component
   variables. Dark bands (.work, .films) switch back below in site.css. */
main { --bg: #f8f1e5; --surface: #fffaf1; --surface2: #f1e7d6; --text: #241c18; --muted: #5a4c43;
  --line: rgba(36,28,24,.14); --tr: 36,28,24; --accent: #c4501f; --ar: 196,80,31; --gold: #a35a12; --gr: 163,90,18; --on: #fff; }

/* ---- base components (from style.css section 4) ---- */
/* ---------- 4. Buttons, cards, layout utilities ------------------------- */
/* Anchored sections (#projects, #certifications…) clear the sticky header. */
.eyebrow { font-size: .75rem; font-weight: 400; color: var(--muted); letter-spacing: .04em; margin-bottom: 10px; font-family: var(--font-head); }
.lede { color: var(--muted); font-size: 1.02rem; max-width: 56ch; line-height: 1.65; }


.card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; transition: transform .25s, background .25s; will-change: transform; }
.card:hover { background: var(--surface2); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid1 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
@media (max-width: 760px) { .grid2, .grid4 { grid-template-columns: 1fr 1fr; } }

.stat b { display: block; font-family: var(--font-head); font-size: 1.3rem; line-height: 1.25; color: var(--text); margin-bottom: 4px; }
.stat span { font-size: .8rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 760px) { .stats .stat { padding: 18px 16px; } .stat b { font-size: 1.05rem; } }

.tag { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 100px; display: inline-block; margin: 2px 4px 0 0; }

.role { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: baseline; }
.role h3 { font-size: 1.1rem; } .role .when { font: 500 .8rem var(--font-head); color: var(--gold); }
.role p { grid-column: 1/-1; color: var(--muted); font-size: .9rem; line-height: 1.6; margin: 4px 0 8px; }
.role .tags { grid-column: 1/-1; }
@media (max-width: 620px) { .role { grid-template-columns: 1fr; } }

.sgroup { display: grid; grid-template-columns: 150px 1fr; gap: 10px 20px; padding: 16px 0; border-top: 1px solid var(--line); align-items: baseline; }
.sgroup b { font: 500 .85rem var(--font-head); color: var(--muted); }
.tag-prod { color: var(--text); border-color: rgba(var(--tr), .2); }
.also-label { display: inline-block; margin: 6px 8px 0 6px; font: 500 .66rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .75; }
.tag-also { opacity: .6; border-style: dashed; }
@media (max-width: 620px) { .sgroup { grid-template-columns: 1fr; } }

.job { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.job .role { font-weight: 500; } .job .loc { color: var(--muted); font-size: .85rem; }
.job .yr { font-family: var(--font-head); color: var(--gold); font-size: .82rem; white-space: nowrap; }

.vgrid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
/* YouTube Shorts / reels: portrait cards and a portrait player */
.vgrid:has(.vcard.vertical) { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .vgrid:has(.vcard.vertical) { grid-template-columns: repeat(2, 1fr); } }
.vcard.vertical .vthumb { aspect-ratio: 9 / 16; }
.vcard.vertical .vmeta h3 { font-size: .95rem; }
#vmodal.vertical .vbox { width: min(420px, 92vw); }
#vmodal.vertical .frame { aspect-ratio: 9 / 16; width: min(100%, calc(78vh * 9 / 16)); margin: 0 auto; }
@media (max-width: 700px) { .vgrid { grid-template-columns: 1fr; } }
.vcard { padding: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; width: 100%; background: var(--surface); }
.vthumb { aspect-ratio: 16/9; position: relative; background: linear-gradient(135deg, rgba(var(--ar),.35), rgba(var(--gr),.25) 60%, var(--surface)); background-size: cover; background-position: center; display: grid; place-items: center; }
.vplay { width: 62px; height: 62px; border-radius: 50%; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.4); display: grid; place-items: center; transition: transform .25s; }
.vcard:hover .vplay { transform: scale(1.12); background: var(--accent); }
.vplay::before { content: ''; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 5px; }
.vmeta { padding: 18px 20px 22px; } .vmeta h3 { font-size: 1.1rem; margin-bottom: 6px; } .vmeta p { font-size: .85rem; color: var(--muted); }

#vmodal { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; padding: 4vw; backdrop-filter: blur(8px); }
#vmodal.open { display: flex; }
.vbox { width: min(1000px, 100%); }
.vbox .frame { aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; display: grid; place-items: center; color: #9aa; text-align: center; }
.vbox iframe, .vbox video { width: 100%; height: 100%; border: 0; }
.vinfo { color: #eee; margin-top: 16px; } .vinfo h3 { font-size: 1.3rem; margin-bottom: 6px; } .vinfo p { color: #a8adb8; font-size: .9rem; line-height: 1.6; }
#vclose { position: absolute; top: 18px; right: 22px; color: #fff; background: rgba(255,255,255,.12); border: 0; width: 42px; height: 42px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }

.topics { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 100px; background: transparent; cursor: pointer; }
.chip.on { background: var(--accent-fill, var(--accent)); color: var(--on); border-color: var(--accent-fill, var(--accent)); }


/* Home hero */

/* Section labels and titles */
.num { font: 500 .72rem var(--font-mono); color: var(--gold); letter-spacing: .08em; margin-right: 10px; }
.section-title { font-size: 1.7rem; margin-bottom: 22px; }
.text-link { display: inline-block; margin-top: 18px; color: var(--gold); font-size: .9rem; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Project cards (Selected work / Projects) */
.project { padding: 0; display: flex; flex-direction: column; }
.project .pv { height: 150px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--surface2), var(--surface)); }
.project .pv svg { display: block; width: 100%; height: 100%; }
.project .pb { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.project .eyebrow { font-size: .68rem; letter-spacing: .08em; margin-bottom: 6px; }
.project h3 { font-size: 1.05rem; line-height: 1.3; }
.project p { color: var(--muted); font-size: .86rem; line-height: 1.55; margin: 8px 0 14px; }
.project .pfoot { margin-top: auto; }
.project .metrics { display: flex; gap: 22px; margin: 0 0 12px; }
.project .metrics b { display: block; font: 600 1.2rem var(--font-head); color: var(--gold); }
.project .metrics span { font-size: .7rem; color: var(--muted); }
/* A tag for things designed but not built: outlined, dashed, muted. */
.tag.tag-proposed { border-style: dashed; border-color: rgba(var(--ar),.45); background: transparent; color: var(--muted); font-style: italic; }
.btn-sm { padding: 8px 16px; font-size: .8rem; }
.project .case-links { margin-top: 14px; }
.case-links { display: flex; flex-wrap: wrap; gap: 10px; }
.case-hero .case-links { margin-top: 20px; }
.project .pv { position: relative; }
.live-badge { position: absolute; top: 12px; right: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 100px; background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid rgba(34,197,94,.45); color: var(--text); font: 600 .7rem var(--font-body); }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.22); animation: live-pulse 2s ease-in-out infinite; }
.status-badge { border-color: rgba(var(--gr),.5); }
.note-badge { border-color: var(--line); color: var(--muted); font-weight: 500; white-space: nowrap; }
/* Project grids are a single column on phones (cards need the full width). */
@media (max-width: 760px) { .grid2.projects, .grid3.projects { grid-template-columns: 1fr; } }
.project p.pbody { margin-top: -6px; font-size: .82rem; }
.status-badge i { background: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gr),.2); animation: none; }
.live-badge.live-inline { position: static; margin: 2px 6px 0 0; vertical-align: middle; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 6px rgba(34,197,94,.06); } }
.pv-vectors circle { fill: var(--muted); opacity: .6; }

/* ---- case studies, diagrams, certifications ---- */
/* Case-study pages (pages/case_studies.py) */
.case-hero { padding: 56px 0 40px; }
.case-hero h1 { max-width: 22ch; }
.case-hero .lede { margin: 16px 0 18px; }
.case-back { margin: 0 0 22px; }
.case-sec { padding: 34px 0; }
.case-sec > p, .case-sec > .case-list, .case-sec > .case-cards, .case-sec > .tags, .case-sec > .tradeoff { max-width: 820px; }
.case-sec p { color: var(--muted); font-size: 1rem; line-height: 1.7; margin: 0 0 14px; }
.case-list { margin: 0; padding-left: 1.15em; color: var(--muted); line-height: 1.7; }
.case-list li { margin-bottom: 8px; }
.case-list li::marker { color: var(--gold); }
.case-list b { color: var(--text); font-weight: 600; }
.case-cards .card { padding: 20px 22px; }
@media (max-width: 620px) { .case-cards { grid-template-columns: 1fr; } }
.case-cards h3 { font-size: 1rem; margin-bottom: 6px; }
.case-cards p { font-size: .88rem; margin: 0; }
.proposed-banner { display: inline-block; margin: 0 0 16px; padding: 6px 14px; border-radius: 100px; border: 1px dashed rgba(var(--ar),.6); color: var(--muted); font-size: .8rem; }
.proposed-banner b { color: var(--accent); font-weight: 600; }
.tradeoff { margin-top: 20px; }
.steps { list-style: none; counter-reset: step; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; max-width: 820px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 2px 14px; align-items: baseline; }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font: 500 .8rem var(--font-mono); color: var(--gold); }
.steps b { font: 600 1rem var(--font-head); }
.steps span { color: var(--muted); line-height: 1.6; }
.steps-note { margin-top: 14px !important; padding-left: 14px; border-left: 2px solid rgba(var(--gr),.5); font-size: .92rem !important; }
.case-list.two-col { columns: 2; column-gap: 40px; max-width: none; }
.case-list.two-col li { break-inside: avoid; }
@media (max-width: 760px) { .case-list.two-col { columns: 1; } }
.live-frame { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg); }
.live-frame iframe { display: block; width: 100%; min-height: 700px; border: 0; }
.live-start { min-height: 300px; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 50% 40%, rgba(var(--ar), .14), transparent 65%), var(--surface); }
.live-start-inner p { margin: 14px 0 0; color: var(--muted); font-size: .88rem; }
.frame-fallback { margin-top: 10px; font-size: .88rem; }
.frame-fallback a { color: var(--gold); }
.tradeoff p { margin: 0; }

/* Diagrams: a wide layout, and a stacked one for phones. */
.diagram { margin: 18px 0 26px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram .dg-tall { display: none; max-width: 380px; margin: 0 auto; }
@media (max-width: 700px) { .diagram .dg-wide { display: none; } .diagram .dg-tall { display: block; } .diagram { padding: 10px; } }
.diagram figcaption { margin-top: 12px; font: 500 .72rem var(--font-mono); letter-spacing: .06em; color: var(--muted); text-align: center; }
.dg-zone { fill: rgba(var(--ar),.05); stroke: var(--line); stroke-dasharray: 4 6; }
.dg-zone-label { fill: var(--muted); font: 600 10.5px var(--font-mono); letter-spacing: .1em; }
.dg-box { fill: var(--surface2); stroke: var(--accent); stroke-width: 1.5; }
.dg-box-alt { stroke: var(--gold); }
.dg-chip { fill: var(--surface2); stroke: rgba(var(--ar),.55); stroke-width: 1.2; }
.dg-oic { fill: rgba(var(--ar),.07); stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 7 5; }
.dg-strip { fill: rgba(var(--gr),.1); stroke: rgba(var(--gr),.5); }
.dg-title { fill: var(--text); font: 600 14px var(--font-head); }
.dg-sub { fill: var(--muted); font: 500 11.5px var(--font-body); }
.dg-line { fill: none; stroke: var(--gold); stroke-width: 1.6; }
.dg-line-dash { stroke: var(--muted); stroke-dasharray: 5 5; }
.dg-ext { stroke: var(--muted); stroke-dasharray: 6 5; }
.dg-oracle { fill: rgba(var(--ar),.14); stroke: var(--accent); stroke-width: 1.8; }
.pv-node-oracle { fill: rgba(var(--ar),.16); }
.cert-line { margin: 14px 0 0 !important; font-size: .9rem !important; }
.cert-line a { color: var(--gold); }
/* Certifications strip (Work page); grows as more are added */
.cert-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cert { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.cert-badge { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; font: 700 .95rem var(--font-head); color: var(--on); background: linear-gradient(135deg, var(--accent), var(--gold)); }
.cert h3 { font-size: .98rem; line-height: 1.35; }
.cert p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.dg-plain { stroke: rgba(var(--tr),.28); }
.dg-packet { fill: var(--gold); filter: drop-shadow(0 0 5px var(--gold)); }
.dg-packet-alt { fill: var(--accent); filter: drop-shadow(0 0 5px var(--accent)); }
.dg-arrow { fill: var(--gold); }


/* ---- Ask Jayraj button + modal ---- */
body.modal-open { overflow: hidden; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }


/* ---- globe ---- */
/* Globe (Photography page) */
.globe-wrap { position: relative; width: 100%; max-width: 620px; margin: 20px auto 0; }
#globe { display: block; width: 100%; aspect-ratio: 1; touch-action: pan-y; user-select: none; }
#globe-tooltip { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--surface2); border: 1px solid var(--line); padding: 5px 11px; border-radius: 100px; font-size: .78rem; opacity: 0; transition: opacity .15s; white-space: nowrap; }
#globe-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 0; padding: 0; list-style: none; }
.country-chip { display: inline-flex; align-items: center; gap: 8px; }
.country-chip .flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(var(--tr), .14); }
