/* Projects hero: neon "build" scene (code window -> cubes -> live app) */
.page-hero.has-pj .page-hero-canvas{display:none!important}
.page-hero.has-pj{isolation:isolate;
  background:radial-gradient(55% 130% at 8% 60%,rgba(30,110,255,.34),transparent 70%),radial-gradient(55% 130% at 92% 60%,rgba(255,150,40,.26),transparent 70%),linear-gradient(180deg,#030c26,#061a4a)!important}
.page-hero.has-pj::after{z-index:0;opacity:.3}
.page-hero.has-pj>*:not(.pj){position:relative;z-index:2}
.page-hero.has-pj>.pj{position:absolute!important;inset:0!important;z-index:0!important;overflow:hidden;pointer-events:none}

/* blueprint grid + build-progress scan */
.pj-grid{position:absolute;inset:0;opacity:.9;background-image:linear-gradient(rgba(120,170,255,.09) 1px,transparent 1px),linear-gradient(90deg,rgba(120,170,255,.09) 1px,transparent 1px);background-size:38px 38px;
  -webkit-mask-image:radial-gradient(80% 120% at 50% 50%,#000 30%,transparent 90%);mask-image:radial-gradient(80% 120% at 50% 50%,#000 30%,transparent 90%)}
.pj-scan{position:absolute;top:0;bottom:0;left:0;width:90px;background:linear-gradient(90deg,transparent,rgba(120,190,255,.22),rgba(255,190,100,.28),transparent);filter:blur(6px);animation:pjScan 9s linear infinite;will-change:transform}
@keyframes pjScan{from{transform:translateX(-120px)}to{transform:translateX(100vw)}}

/* glowing windows */
.pj-win{position:absolute;top:22px;width:250px;height:176px;border-radius:12px;overflow:hidden;background:rgba(8,30,95,.55);backdrop-filter:blur(2px)}
.pj-win.code{left:2.2%;border:1.5px solid #4aa8ff;box-shadow:0 0 22px rgba(60,150,255,.55),inset 0 0 22px rgba(60,150,255,.18);animation:pjFloat 8s ease-in-out infinite}
.pj-win.live{right:2.2%;border:1.5px solid #ffc15a;box-shadow:0 0 22px rgba(255,170,50,.5),inset 0 0 22px rgba(255,170,50,.14);animation:pjFloat 9s ease-in-out -4s infinite}
@keyframes pjFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
.pj-bar{display:flex;align-items:center;gap:5px;height:26px;padding:0 10px;border-bottom:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06)}
.pj-bar b{width:8px;height:8px;border-radius:50%;background:#ff7a7a}.pj-bar b:nth-child(2){background:#ffd166}.pj-bar b:nth-child(3){background:#5eead4}
.pj-bar span{margin-left:8px;font:600 11px Inter,system-ui,sans-serif;letter-spacing:.06em;color:rgba(255,255,255,.8)}
.pj-bar .dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#4ade80;box-shadow:0 0 8px #4ade80;margin-right:4px;animation:pjBlink 1.4s ease-in-out infinite}
@keyframes pjBlink{50%{opacity:.3}}

/* typing code */
.pj-code{padding:12px 14px;font:500 12.5px/1.75 ui-monospace,Consolas,monospace;color:#dff1ff}
.pj-ln{display:block;overflow:hidden;white-space:pre;width:0;animation:pjType 9s steps(var(--n),end) infinite;animation-delay:var(--d);text-shadow:0 0 8px rgba(120,190,255,.55)}
@keyframes pjType{0%{width:0}22%,88%{width:calc(var(--n) * 1ch)}96%,100%{width:0}}
.pj-ln i{font-style:normal}.pj-ln .k{color:#ff9eb5}.pj-ln .f{color:#8fe0ff}.pj-ln .s{color:#b6f5c0}
.pj-ln .cur{display:inline-block;width:7px;height:14px;margin-left:3px;vertical-align:-2px;background:#fff;animation:pjBlink 1s steps(1) infinite}

/* live dashboard */
.pj-dash{position:relative;height:calc(100% - 26px);padding:14px}
.pj-chart{display:flex;align-items:flex-end;gap:9px;height:62%}
.pj-chart i{flex:1;border-radius:3px 3px 0 0;background:linear-gradient(180deg,#ffd98a,#ff9a2e);box-shadow:0 0 10px rgba(255,170,50,.7);transform-origin:bottom;animation:pjBar 3.2s ease-in-out infinite}
@keyframes pjBar{0%,100%{transform:scaleY(.4)}50%{transform:scaleY(1)}}
.pj-line{position:absolute;left:14px;right:14px;top:14px;width:calc(100% - 28px);height:62%;overflow:visible}
.pj-line path{fill:none;stroke:#fff5d6;stroke-width:1.6;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:100;stroke-dashoffset:100;animation:pjDraw 5s ease-in-out infinite;filter:drop-shadow(0 0 4px #ffb347)}
@keyframes pjDraw{0%{stroke-dashoffset:100}45%,85%{stroke-dashoffset:0}100%{stroke-dashoffset:100}}
.pj-stats{display:flex;gap:10px;margin-top:10px}
.pj-stats span{flex:1;height:22px;border-radius:6px;border:1px solid rgba(255,193,90,.5);background:linear-gradient(100deg,rgba(255,190,70,.08) 30%,rgba(255,220,150,.35) 50%,rgba(255,190,70,.08) 70%);background-size:220% 100%;animation:pjShimmer 2.6s linear infinite}
.pj-stats span:nth-child(2){animation-delay:-1.3s}
@keyframes pjShimmer{from{background-position:120% 0}to{background-position:-120% 0}}

/* cubes: change from blue wireframe to amber solid as they cross */
.pj-cube{position:absolute;left:14vw;width:30px;height:32px;opacity:0;animation:pjTravel 9s linear infinite}
.pj-bob{display:block;animation:pjBob 2.6s ease-in-out infinite}
.pj-cube svg{width:30px;height:32px;overflow:visible;animation:pjHue 9s linear infinite;animation-delay:inherit}
.pj-cube svg path{stroke:currentColor;stroke-width:1.3;stroke-linejoin:round;fill:currentColor;fill-opacity:.1;filter:drop-shadow(0 0 5px currentColor)}
.pj-cube svg .t{fill-opacity:.35}.pj-cube svg .r{fill-opacity:.2}
@keyframes pjTravel{0%{transform:translateX(0);opacity:0}8%{opacity:1}92%{opacity:1}100%{transform:translateX(66vw);opacity:0}}
@keyframes pjBob{0%,100%{transform:translateY(-7px) rotate(-4deg)}50%{transform:translateY(7px) rotate(4deg)}}
@keyframes pjHue{0%{color:#5db4ff}45%{color:#9fd3ff}60%{color:#ffd28a}100%{color:#ffb347}}

@media (max-width:1250px){.pj-win{transform-origin:top left;width:200px;height:150px}.pj-win.live{transform-origin:top right}.pj-code{font-size:10.5px;padding:8px 10px}}
@media (max-width:900px){.pj-win{display:none}.pj-cube{left:6vw}@keyframes pjTravel{0%{transform:translateX(0);opacity:0}8%{opacity:.9}92%{opacity:.9}100%{transform:translateX(84vw);opacity:0}}}
@media (prefers-reduced-motion:reduce){.pj *{animation:none!important}.pj-ln{width:calc(var(--n) * 1ch)}.pj-line path{stroke-dashoffset:0}.pj-cube{opacity:.8}}

/* ===== phone: code window + live app side by side above the heading, cubes travel between ===== */
@media (max-width:820px){
  .page-hero.has-pj{padding-top:152px!important}
  .pj-win{display:block;top:14px;width:calc(50% - 18px);height:118px}
  .pj-win.code{left:10px}.pj-win.live{right:10px}
  .pj-bar{height:20px;padding:0 8px}.pj-bar span{font-size:9px}
  .pj-code{font-size:9px;padding:6px 8px;line-height:1.7}
  .pj-dash{padding:8px}.pj-chart{height:58%}.pj-line{left:8px;right:8px;top:8px;width:calc(100% - 16px)}
  .pj-stats{margin-top:6px}.pj-stats span{height:14px}
  .pj-cube:nth-child(4){top:38px!important}.pj-cube:nth-child(5){top:88px!important}
  .pj-cube:nth-child(6){top:56px!important}.pj-cube:nth-child(7){top:100px!important}
  .pj-cube{transform-origin:center;scale:.8}
}
