/* Image-led work index; detailed narratives live on the project pages. */
#work.visual-work{padding-bottom:85px}
#work .portfolio-gallery{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:58px 40px;margin:32px 0 65px}
#work .gallery-project{min-width:0;margin:0;padding:0;border:0}
#work .gallery-project:first-child{grid-column:1/-1}
#work .gallery-visual{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;padding:28px 18px;background:transparent}
#work .gallery-project:first-child .gallery-visual{padding:35px 6%}
#work .gallery-visual figure,#work .gallery-visual .concept-visual{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;position:relative;overflow:visible!important}
#work .gallery-visual img,#work .gallery-visual video{display:block;width:100%;max-width:100%;height:auto;object-fit:contain}
#work .gallery-visual figcaption{display:none}
#work .gallery-label{display:flex;align-items:baseline;gap:18px;padding-top:17px;border-top:1px solid var(--line)}
#work .gallery-label .index{font-size:.75rem;color:var(--muted)}
#work .gallery-label h3{font-size:1.125rem;line-height:1.4;font-weight:400;letter-spacing:-.02em;margin:0}
#work .gallery-project-link{display:flex;justify-content:space-between;align-items:center;gap:20px;flex:1;text-decoration:none}
#work .gallery-project-link>span{font-family:Arial,sans-serif;color:var(--accent);transition:translate .2s}
#work .gallery-project-link:hover{color:var(--accent)}#work .gallery-project-link:hover>span{translate:3px -3px}
#work .concepts-label{margin-top:20px;margin-bottom:0}
#work .gallery-visual .tara-screen{width:100%;max-width:100%;margin:0;transform:none}
#work .gallery-visual .roomies-upload{transform:none!important}
#work .gallery-visual .video-visual{border-radius:5px;overflow:hidden!important}
@media(max-width:700px){#work .portfolio-gallery{grid-template-columns:minmax(0,1fr);gap:35px;margin:22px 0 42px}#work .gallery-project:first-child{grid-column:auto}#work .gallery-visual,#work .gallery-project:first-child .gallery-visual{padding:18px 0}#work .gallery-label{gap:12px;padding-top:12px}#work .gallery-label h3{font-size:1.05rem}#work.visual-work{padding-bottom:45px}}
@media(prefers-reduced-motion:reduce){#work .gallery-project-link>span{transition:none}}
#work .gallery-project{display:flex;flex-direction:column}
#work .gallery-project:not(:first-child){grid-column:auto!important}
#work .gallery-project>.gallery-visual{flex:1}
#work .gallery-label{flex-shrink:0}
.gallery-image-link{display:block;width:100%;min-width:0}
.gallery-image-link:focus-visible{outline:2px solid var(--accent);outline-offset:8px}

/* Keep the concept projects paired after removing the video project. */
#work .concepts-label+.portfolio-gallery>.gallery-project{grid-column:auto!important}
#work .concepts-label+.portfolio-gallery>.gallery-project:first-child .gallery-visual{padding:28px 18px}
#work .concepts-label+.portfolio-gallery .gallery-visual{aspect-ratio:1.55;flex:none}
#work .concepts-label+.portfolio-gallery .concept-visual{max-height:100%!important;display:flex!important;align-items:center;justify-content:center}
#work .concepts-label+.portfolio-gallery .concept-visual img{max-height:100%;object-fit:contain}
@media(max-width:700px){#work .concepts-label+.portfolio-gallery>.gallery-project:first-child .gallery-visual{padding:18px 0}#work .concepts-label+.portfolio-gallery .gallery-visual{aspect-ratio:auto}}

#work #schools .schools-supplied-showcase{display:block;width:100%;max-width:760px;height:auto;margin:0 auto;transform:none!important;clip-path:none!important;border-radius:0}

#work #wordless .wordless-supplied-showcase{display:block;width:100%;height:auto;margin:0 auto;transform:none!important;clip-path:none!important;border-radius:0}
/* Retain the original one-plus-two-plus-two composition at a smaller scale. */
#work .portfolio-gallery{gap:32px 40px;margin:24px 0 40px}
#work .gallery-project>.gallery-visual,#work .gallery-project:first-child>.gallery-visual,#work .concepts-label+.portfolio-gallery .gallery-visual,#work .concepts-label+.portfolio-gallery>.gallery-project:first-child .gallery-visual{height:330px;aspect-ratio:auto;padding:0 12px;flex:none;overflow:hidden}
#work .gallery-image-link{height:100%;display:flex;align-items:center;justify-content:center}
#work .gallery-visual figure,#work .gallery-visual .concept-visual{height:100%!important;max-height:100%!important;display:flex!important;align-items:center;justify-content:center}
#work #schools .schools-supplied-showcase,#work #wordless .wordless-supplied-showcase{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain}
#work .gallery-visual .portfolio-laptop{width:min(100%,480px)}
#work .gallery-visual .tara-screen{width:min(100%,480px);max-height:100%}
#work .gallery-visual .roomies-upload>img{width:auto;max-width:100%;max-height:100%;height:auto}
#work .gallery-label{padding-top:12px;margin-top:8px}
#work.visual-work{padding-bottom:45px}
@media(max-width:700px){#work .portfolio-gallery{gap:24px;margin:18px 0 28px}#work .gallery-project>.gallery-visual,#work .gallery-project:first-child>.gallery-visual,#work .concepts-label+.portfolio-gallery .gallery-visual,#work .concepts-label+.portfolio-gallery>.gallery-project:first-child .gallery-visual{height:clamp(220px,70vw,320px);padding:0}}
/* Increase mock-up presence without changing the restored grid. */
@media(min-width:701px){#work .gallery-project>.gallery-visual,#work .gallery-project:first-child>.gallery-visual,#work .concepts-label+.portfolio-gallery .gallery-visual,#work .concepts-label+.portfolio-gallery>.gallery-project:first-child .gallery-visual{height:440px}#work .gallery-visual .portfolio-laptop,#work .gallery-visual .tara-screen{width:min(100%,540px)}}

/* Fit the device artwork, rather than its empty outer image margins. */
#work .supplied-device-crop{position:relative;width:100%;max-width:540px;aspect-ratio:768 / 800;overflow:hidden;flex:none}
#work #schools .supplied-device-crop>img,#work #wordless .supplied-device-crop>img{position:absolute;top:-18.75%;left:0;width:100%!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0;transform:none!important}
@media(min-width:701px){#work #schools>.gallery-visual,#work #wordless>.gallery-visual,#work #coaching>.gallery-visual{height:560px}}
@media(max-width:700px){#work .supplied-device-crop{width:min(100%,300px)}#work #schools>.gallery-visual,#work #wordless>.gallery-visual{height:auto;min-height:260px}}

/* Recent showcase changes flow naturally on phones and smaller tablets. */
@media(max-width:900px){
 #work .portfolio-gallery{grid-template-columns:minmax(0,1fr);gap:28px}
 #work .gallery-project,#work .gallery-project:first-child{grid-column:1!important;min-width:0}
 #work .gallery-project>.gallery-visual,#work .gallery-project:first-child>.gallery-visual,#work .concepts-label+.portfolio-gallery .gallery-visual,#work .concepts-label+.portfolio-gallery>.gallery-project:first-child .gallery-visual,#work #schools>.gallery-visual,#work #wordless>.gallery-visual,#work #coaching>.gallery-visual{height:auto;min-height:0;aspect-ratio:auto;overflow:visible;padding:8px 0}
 #work .gallery-image-link{height:auto;min-width:0}
 #work .gallery-visual figure,#work .gallery-visual .concept-visual{height:auto!important;max-height:none!important;min-width:0}
 #work .supplied-device-crop{width:100%;max-width:440px;margin-inline:auto}
 #work .gallery-visual .portfolio-laptop,#work .gallery-visual .tara-screen{width:100%;max-width:540px}
 #work .gallery-visual .roomies-upload>img{width:100%;height:auto;max-height:none}
 #work .gallery-label{margin-top:8px;gap:12px;align-items:baseline}
 #work .gallery-label h3{font-size:1.05rem;overflow-wrap:normal}
 #work .gallery-project-link{min-height:44px;min-width:0;gap:12px}
}
@media(max-width:900px){#work .gallery-visual .roomies-upload{aspect-ratio:1666 / 944;width:100%}#work .gallery-visual .roomies-upload>img{aspect-ratio:1666 / 944;object-fit:contain}}
/* Conceal the laptop-base sliver protruding beyond the foreground phone. */
#work #schools .supplied-device-crop>img{clip-path:polygon(0 0,100% 0,100% 65%,96.9% 65%,96.9% 70%,100% 70%,100% 100%,0 100%)!important}

/* bench/x experiment, using the real product interface. */
#work .experiments-gallery{grid-template-columns:minmax(0,1fr)}
#work #benchx>.gallery-visual{height:auto;max-height:none;padding:24px 6%}
#work #benchx .gallery-image-link{height:auto}
#work #benchx .gallery-visual img{width:min(100%,740px);height:auto;margin:auto}
#work .experiment-description{margin:12px 0 0 34px;max-width:600px;color:var(--muted);font-size:.95rem;line-height:1.65}
@media(max-width:700px){#work #benchx>.gallery-visual{padding:12px 0}#work .experiment-description{margin-left:28px}}
