.portfolio-page .top{min-height:72px}
.projects-hero{
 position:relative;overflow:hidden;isolation:isolate;margin-top:18px;
 display:grid;align-items:center;min-height:clamp(390px,49vw,600px);
 border:1px solid var(--line);border-radius:19px;background:#271923;
}
html[data-theme=light] .projects-hero{background:#fcf0e8}
.showreel{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.showreel-angle{position:absolute;top:50%;left:22%;width:max-content;transform:translateY(-50%) rotate(-15deg);transform-origin:28% 50%;display:grid;gap:15px}
.showreel-row{width:100%;overflow:hidden}
.showreel-strip,.showreel-strip>div{display:flex;width:max-content}
.showreel-strip figure{margin:0 14px 0 0;position:relative;overflow:hidden;width:clamp(158px,20vw,280px);aspect-ratio:16/10;border:1px solid #e9c5d653;border-radius:10px;background:#28212b}
.showreel-strip img{width:100%;height:100%;display:block;object-fit:cover}
.showreel-strip figcaption{position:absolute;inset:auto 0 0;padding:6px 9px 5px;background:#19131ee8;color:#fff4eb;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.showreel-row:nth-child(2){margin-left:-11%}
@media(prefers-reduced-motion:no-preference){
 .showreel-strip{animation:reel-travel 42s linear infinite}
 .showreel-row:nth-child(2) .showreel-strip{animation-direction:reverse;animation-duration:54s}
 [data-paused=true] .showreel-strip{animation-play-state:paused}
 .project-cover img{transition:transform .45s cubic-bezier(.2,.6,.2,1)}
 .catalog-card:hover .project-cover img,.catalog-card:focus-within .project-cover img{transform:scale(1.055)}
}
@keyframes reel-travel{to{transform:translateX(-50%)}}
.showreel-shade{position:absolute;inset:0;background:linear-gradient(90deg,#271923 3%,#271923fa 24%,#271923dc 41%,#27192334 74%,#2719230c 100%)}
html[data-theme=light] .showreel-shade{background:linear-gradient(90deg,#fcf0e8 3%,#fcf0e8fa 24%,#fcf0e8dc 41%,#fcf0e82a 76%,#fcf0e80b 100%)}
.work-intro{position:relative;z-index:1;padding:42px clamp(24px,5vw,75px);max-width:660px}
.work-intro h1{margin:0 0 14px;font-size:clamp(54px,7.6vw,115px);line-height:.97;letter-spacing:-.075em}
.work-intro h1 span{color:var(--accent)}
.work-intro h1+p{max-width:37ch;margin:0 0 22px;font-size:clamp(16px,2vw,20px);line-height:1.48}
.reel-toggle{position:absolute;z-index:2;right:14px;bottom:14px;border:1px solid var(--line);border-radius:100px;background:var(--paper);padding:6px 13px;min-height:44px;color:var(--ink);font-size:14px}
.portfolio-page #catalog{scroll-margin-top:12px}
.portfolio-page .catalog-card{display:block;overflow:hidden;padding:0}
.project-cover{position:relative;overflow:hidden;aspect-ratio:16/9;border-bottom:1px solid var(--line);background:var(--selected)}
.project-cover img{display:block;width:100%;height:100%;object-fit:cover}
.project-card-copy{padding:16px 17px 12px;display:grid;align-content:start;gap:8px}
.project-card-copy .project-card-meta{color:var(--accent);font-size:13px;font-weight:650}
.project-card-copy h3{font-size:clamp(21px,3.2vw,25px)}
.project-card-copy p:not(.project-card-meta){font-size:16px}
.project-card-copy .catalog-link{justify-self:start}
.work-bottom{display:flex;flex-wrap:wrap;gap:4px 26px;padding-top:15px;padding-bottom:42px}
.work-bottom a{min-height:44px;display:inline-flex;align-items:center;text-decoration:underline;text-underline-offset:4px}
@media(max-width:690px){
 .portfolio-page .top{min-height:60px}
 .projects-hero{min-height:505px;margin-top:12px;align-items:start}
 .showreel-angle{left:-8%;top:73%;transform-origin:17% 50%;gap:10px}
 .showreel-strip figure{width:148px;margin-right:10px;border-radius:8px}
 .showreel-shade{background:linear-gradient(180deg,#271923 11%,#271923f9 34%,#271923b0 57%,#27192315 82%)}
 html[data-theme=light] .showreel-shade{background:linear-gradient(180deg,#fcf0e8 11%,#fcf0e8f9 34%,#fcf0e8a0 57%,#fcf0e815 82%)}
 .work-intro{padding:31px 19px 18px}
 .work-intro h1{font-size:clamp(44px,10.7vw,67px)}
 .work-intro h1+p{max-width:32ch;margin-bottom:13px}
}
@media(prefers-reduced-motion:reduce){.reel-toggle{display:none}}

/* Full-bleed moving portfolio wall; the copy is over the wall on every viewport. */
.portfolio-page .top{position:absolute;z-index:4;top:0;left:0;right:0;border-color:transparent}
.portfolio-page .projects-hero.shell{width:100%;max-width:none;margin:0;border:0;border-radius:0;min-height:100vh;min-height:100svh;align-items:center;justify-items:center}
.showreel-angle{top:50%;left:-47vw;transform:translateY(-50%) rotate(-17deg);transform-origin:98vw center;gap:clamp(9px,1.2vw,17px)}
.showreel-strip figure{height:clamp(94px,17.8vh,226px);height:clamp(94px,17.8svh,226px);width:auto;aspect-ratio:16/10;margin-right:clamp(9px,1.2vw,17px)}
.showreel-strip img{filter:saturate(1.08) brightness(.87)}
.showreel-row:nth-child(2){margin-left:0}
.showreel-row:nth-child(even) .showreel-strip{animation-direction:reverse;animation-duration:54s}
.showreel-shade{background:radial-gradient(ellipse at center,#21141ee8 0%,#21141ecc 24%,#21141e65 51%,#21141e12 100%),linear-gradient(#21141edd 0%,#21141e00 20%,#21141e00 78%,#21141e85 100%)}
html[data-theme=light] .showreel-shade{background:radial-gradient(ellipse at center,#fcf0eaf5 0%,#fcf0eada 24%,#fcf0ea75 51%,#fcf0ea33 100%),linear-gradient(#fcf0eadd,transparent 20%,transparent 78%,#fcf0ea9e)}
.work-intro{padding:105px 19px 95px;text-align:center;max-width:660px}
.work-intro .eyebrow{justify-content:center;margin-inline:auto}
.work-intro h1+p{margin-inline:auto}
.work-intro .primary{display:inline-flex}
.reel-toggle{right:max(14px,env(safe-area-inset-right));bottom:calc(14px + env(safe-area-inset-bottom))}
.photo-cover{isolation:isolate;aspect-ratio:16/10}
.photo-cover>.cover-photo{position:absolute;inset:0;object-position:center;width:100%;height:100%;object-fit:cover;filter:saturate(1.12)}
.photo-cover .cover-tone{position:absolute;inset:0;background:linear-gradient(110deg,#100b1510 15%,#13091641 58%,#12101895 100%);pointer-events:none}
.cover-lee .cover-photo{object-position:center 47%}
.cover-thai .cover-photo{object-position:35% center}
.cover-dirahub .cover-photo{object-position:40% center}
.cover-comic{position:absolute;z-index:1;left:6%;bottom:7%;width:27%!important;height:auto!important;aspect-ratio:1;border:2px solid #eae0cd;border-radius:3px;transform:rotate(-7deg);object-fit:cover;box-shadow:0 8px 21px #100a177a}
.catalog-card:hover .cover-comic,.catalog-card:focus-within .cover-comic{transform:rotate(-7deg)}
.project-device{position:absolute;z-index:2;right:7%;top:50%;transform:translateY(-50%) rotate(-5deg);background:#20202a;border:2px solid #575761;border-radius:7%;box-shadow:0 16px 22px #11081990,0 2px 0 #101016;padding:1.5%;color:#17151e;pointer-events:none}
.project-device.is-phone{width:34%;aspect-ratio:5/9;right:12%;border-radius:13%/8%}
.project-device.is-tablet{width:59%;aspect-ratio:4/3}
.project-device.is-laptop{width:61%;aspect-ratio:16/11;border-radius:5%}
.project-device.is-laptop:after{content:"";position:absolute;width:114%;height:6%;left:-7%;bottom:-5%;border-radius:1px 1px 65% 65%;background:linear-gradient(#b6b6bb,#535361);box-shadow:0 4px 8px #14121b87}
.screen-surface{height:100%;padding:8%;border-radius:inherit;background:#fcf7ee;overflow:hidden;line-height:1.12}
.screen-surface .screen-top{display:flex;justify-content:space-between;align-items:center;gap:2px;font-size:clamp(4px,1.4vw,8px);color:#483a48;padding-bottom:6%;border-bottom:1px solid #d9ccd1}
.screen-top b{font-weight:850}.screen-top span{white-space:nowrap;font-size:.9em}
.screen-surface strong{display:block;margin-top:7%;font-size:clamp(8px,1.85vw,17px)}
.screen-surface small{display:block;margin-top:3%;color:#574750;font-size:clamp(6px,1.3vw,9px)}
.screen-surface .screen-image{display:block;width:100%;height:auto;aspect-ratio:2.3;object-fit:cover;object-position:center;margin-top:6%;border-radius:3px}
.screen-surface ul{display:grid;gap:3px;margin:6% 0 0;padding:0;list-style:none;font-size:clamp(5px,1.35vw,9px)}
.screen-surface li{display:flex;align-items:center;gap:3px;white-space:nowrap}
.screen-surface li i{width:.6em;height:.6em;border-radius:50%;background:var(--screen-accent);flex:none}
.screen-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4%;margin-top:8%;font-size:clamp(5px,1.25vw,8px)}
.screen-board div{border-radius:3px;padding:8% 5%;min-height:34px;background:#dcebea}
.screen-board span{display:block;margin-top:5px;padding:2px;background:#f8ffff}
.cover-orbita .screen-surface,.cover-lands .screen-surface{background:#211f36;color:#f4f0fc}
.cover-orbita .screen-top,.cover-lands .screen-top,.cover-orbita .screen-surface small,.cover-lands .screen-surface small{color:#f4f0fc}
.photo-credits{margin-top:0;font-size:13px;color:var(--muted)}
.photo-credits a{text-decoration:underline;text-underline-offset:3px}
@media(prefers-reduced-motion:no-preference){
 .project-device{transition:transform .42s cubic-bezier(.2,.65,.28,1)}
 .catalog-card:hover .project-device{transform:translateY(-53%) rotate(-1.5deg)}
 .catalog-card:hover .screen-image{transform:none}
}
@media(max-width:690px){
 .showreel-angle{top:50%;left:-62vw;transform-origin:112vw center}
 .work-intro h1+p{max-width:31ch}
 .screen-surface strong{font-size:clamp(10px,3vw,15px)}
 .screen-surface .screen-top,.screen-surface ul{font-size:clamp(6px,2vw,9px)}
}

/* The window clips the wall, not individual rows. Four matching periods prevent a bare edge. */
.showreel-angle{left:min(-46vw,-280px);transform-origin:97vw center}
.showreel-row{overflow:visible}
.showreel-row:nth-child(even){margin-left:-12vw}
.showreel-strip>div{flex:none}
@keyframes reel-travel{from{transform:translateX(0)}to{transform:translateX(-25%)}}
@media(max-width:690px){.showreel-angle{left:min(-59vw,-245px);transform-origin:120vw center}}
.cover-shelf .cover-photo{object-position:17% center;filter:none}
.cover-shelf .cover-tone{background:linear-gradient(90deg,#f0e8d40c,#2a202233 59%,#20192370)}
.cover-shelf .project-device{right:4%;width:57%;top:56%}
.cover-teampro .cover-photo{object-position:29% center}
.cover-dirahub .project-device{width:62%}
.cover-lands .project-device{width:61%}
.lands-box{position:absolute;z-index:1;width:29%!important;height:79%!important;left:8%;top:10%;object-fit:cover;border-radius:4px;transform:rotate(-8deg);box-shadow:0 8px 20px #150e20be}
.catalog-card:hover .lands-box{transform:rotate(-8deg)}
.screen-surface.is-dense,.screen-team,.screen-lands-game,.reading-lesson,.math-lesson,.shelf-editor{padding:5%;font-size:clamp(6px,1.15vw,10px)}
.screen-surface.is-dense{background:#163142;color:#f3fffb}
.dash-top,.mini-toolbar{display:flex;justify-content:space-between;gap:5px;align-items:center;border-bottom:1px solid #ffffff37;padding-bottom:4%;line-height:1.2}
.mini-toolbar b,.dash-top b{font-size:1em;white-space:nowrap}
.mini-toolbar span,.dash-top span{font-size:.7em;white-space:nowrap}
.dash-layout{display:grid;grid-template-columns:23% 1fr;gap:6%;margin-top:5%}
.dash-side{display:grid;align-content:start;gap:5px;color:#91c3cf;font-size:.69em;border-right:1px solid #8fced02b}
.dash-side b{color:#c1f2c6}
.dash-main>strong{font-size:1.1em;margin:0 0 6%;line-height:1.05}
.dash-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:4%}
.dash-metrics>b{border-radius:3px;padding:5px 3px;background:#295064;color:#f5fffe;font-size:1.1em}
.dash-metrics>b:nth-child(2){background:#1f6b65}.dash-metrics>b:nth-child(3){background:#725236}
.dash-metrics small{font-size:.58em;color:#fff!important;white-space:nowrap}
.dash-row{display:flex;gap:3px;align-items:center;font-size:.65em;margin-top:4%;padding:3px;background:#112735;border-radius:3px;white-space:nowrap}
.dash-row em{margin-left:auto;color:#a1e2c4;font-style:normal}.dash-row i{width:.6em;height:.6em;background:#72cdbb;border-radius:50%;flex:none}
.shelf-editor{background:#f6eee0;color:#3f3026}
.shelf-editor .mini-toolbar{border-color:#beaa8d}.shelf-editor-body{display:grid;grid-template-columns:37% 63%;margin-top:4%}
.shelf-fields{padding-right:7%;font-size:.85em}.shelf-fields label{display:grid;grid-template-columns:1fr auto;gap:3px;margin-top:6%;padding:2px;background:#eaddc9;border-radius:2px;white-space:nowrap}
.shelf-room{border-radius:4px;background:linear-gradient(100deg,#e4d1ba,#fcf7e9);overflow:hidden}.shelf-room svg{display:block;width:100%;height:auto}
.screen-team{background:#184141;color:#fff}.screen-team strong{font-size:1.4em;margin:7% 0}
.team-mini-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:3%}
.team-mini-grid b{background:#e3eae4;border-radius:3px;color:#204242;padding:5%;font-size:1.3em}.team-mini-grid span{display:block;font-size:.49em}
.team-quote{display:inline-block;margin-top:5%;background:#e9be82;color:#292119;border-radius:2px;padding:3px 5px;font-size:.69em;font-weight:750}
.screen-lands-game{background:#20172b!important;color:#fae5af!important}
.lands-frame{position:relative;overflow:hidden;border-radius:4px;margin-top:5%;height:80%}
.lands-frame img{width:100%;height:100%;object-fit:cover}.lands-frame i{position:absolute;left:53%;top:43%;width:7px;height:7px;border:1px solid white;background:#c46348;border-radius:50%}
.lands-action{position:absolute;right:4%;bottom:5%;display:grid;gap:3px;background:#2c2337;color:#f7df9b;border:1px solid #dcbf82;padding:4px 5px;border-radius:4px;font-size:.74em}
.lands-action span{color:#fff4de}
.reading-lesson{background:#f3f2ff;color:#263354}.reading-lesson .mini-toolbar{border-color:#b8bcdc}
.reading-card{display:grid;grid-template-columns:36% 1fr;gap:5%;padding:5% 0}.reading-card img{width:100%;height:auto;border-radius:3px}.reading-card p{margin:4% 0;color:#283e5f;font-size:.9em;line-height:1.45}.reading-card small{font-size:.69em;color:#486744}
.math-lesson{background:#f1efd8;color:#315642}.math-lesson .mini-toolbar{border-color:#abc5a2}.math-lesson strong{font-size:1.08em;margin-top:4%}
.math-garden{display:grid;grid-template-columns:repeat(3,12%);justify-content:center;gap:2px 8%;margin-top:4%}.math-garden img{width:100%;height:auto;aspect-ratio:1}
.math-answer{display:flex;justify-content:space-between;margin-top:5%;background:#dbe8bd;border-radius:3px;padding:3px 5px;font-size:.83em}

/* Mini showcases stay inside the bezel; the surrounding photograph does not move. */
.has-scenes{overflow:visible}
.mini-scenes{position:relative;width:100%;height:100%;border-radius:inherit;overflow:hidden;background:#22202b;isolation:isolate}
.mini-scene{position:absolute;inset:0;opacity:0;visibility:hidden;transform:translateY(16%);border-radius:inherit;pointer-events:none}
.mini-scene[data-active=true]{z-index:2;opacity:1;visibility:visible;transform:translateY(0)}
.mini-scene[data-leaving=true]{z-index:1;visibility:visible;opacity:0;transform:translateY(-16%)}
@media(prefers-reduced-motion:no-preference){
 .mini-scene[data-active=true],.mini-scene[data-leaving=true]{transition:opacity .37s ease,transform .48s cubic-bezier(.22,.67,.34,1)}
}
.scene-body{height:100%;min-height:0;padding:6%;overflow:hidden;background:#e4efe5;color:#20352d;display:flex;flex-direction:column;gap:5%;font-size:clamp(6px,1.45vw,12px);line-height:1.12}
.scene-title{font-size:1.35em;font-weight:850;letter-spacing:-.04em}
.scene-caption{font-size:.7em;opacity:.84;font-weight:650}
.tone-leaf{background:#f1efd8;color:#315642}.tone-sun{background:#f7e8cf;color:#5f3825}.tone-lilac{background:#ebe4f6;color:#362754}.tone-teal{background:#1d5350;color:#f9edd8}.tone-navy{background:#1b3448;color:#e7fff7}.tone-night{background:#252245;color:#efe7ff}.tone-rose{background:#f4d9e5;color:#532941}
.scene-picture{overflow:hidden;flex:1;min-height:25%;border-radius:5px}
.project-cover .scene-picture img{display:block;width:100%;height:100%;object-fit:cover;transform:none}
.scene-tiles{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:5%;flex:1;align-items:stretch}
.scene-tiles>div{background:#fffc;border-radius:4px;display:grid;place-content:center;text-align:center;padding:2px 1px;color:#252d34;overflow:hidden}
.scene-tiles b{font-size:1.35em}.scene-tiles small{font-size:.62em;font-weight:700}
.scene-bars{display:grid;gap:5%;flex:1;min-height:0}.scene-bars>div{display:flex;align-items:center;gap:6%;background:#fff2;border:1px solid #87808c55;border-radius:4px;padding:3% 5%;font-size:.78em;line-height:1.08}.scene-bars i{width:.55em;height:.55em;border-radius:50%;background:var(--screen-accent)}
.scene-pill{align-self:flex-start;padding:3% 6%;border-radius:4px;background:#fffc;color:#26392e;font-weight:800;font-size:.81em}
.scene-flowers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;width:43%;margin-inline:auto;min-height:0;overflow:hidden}
.project-cover .scene-flowers img{width:100%;height:auto;aspect-ratio:1;transform:none}
.scene-he{align-self:end;font-size:.9em}
.mini-toggle{border:0;background:transparent;cursor:pointer;padding:0;margin:0 0 7px}
@media(max-width:560px){.scene-body{font-size:clamp(8px,2.7vw,12px)}}
