.project-detail{padding:4.5rem 0 7rem}.back-link{display:inline-block;margin-bottom:3.5rem;color:var(--muted);font-size:.75rem}.back-link:hover{color:var(--text)}.project-detail h1{max-width:56rem;margin-bottom:1.3rem}.project-lead{max-width:46rem;margin-bottom:3rem;color:var(--muted);font-size:1.05rem;line-height:1.8}.detail-panel{display:grid;grid-template-columns:1.5fr .8fr;gap:3rem;padding:clamp(1.5rem,4vw,3rem);border:1px solid rgba(255,255,255,.3);border-radius:2rem;background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.055) 48%,rgba(151,178,255,.1));backdrop-filter:blur(34px) saturate(175%);-webkit-backdrop-filter:blur(34px) saturate(175%);box-shadow:inset 0 1px rgba(255,255,255,.45),0 1.5rem 4rem rgba(5,8,25,.24)}.detail-main h2{font-size:clamp(1.8rem,4vw,3rem)}.detail-main>p:last-child{max-width:42rem;color:var(--muted);font-size:.9rem;line-height:1.8}.detail-side{display:grid;align-content:start;gap:1.2rem;padding-left:2rem;border-left:1px solid rgba(255,255,255,.18)}.detail-side>div{display:grid;gap:.4rem;color:var(--text);font-size:.8rem}.detail-label{color:var(--subtle);font-family:'DM Mono',monospace;font-size:.62rem;text-transform:uppercase;letter-spacing:.06em}.detail-side ul{display:flex;flex-wrap:wrap;gap:.45rem;margin:0;padding:0;list-style:none}.detail-side li{padding:.35rem .55rem;border:1px solid rgba(255,255,255,.22);border-radius:2rem;background:rgba(255,255,255,.08);font-size:.68rem}.detail-links{display:flex!important;flex-wrap:wrap;gap:.8rem!important;margin-top:.5rem}.detail-links a{color:var(--violet)}
@media(max-width:700px){.project-detail{padding:3.5rem 0 5rem}.back-link{margin-bottom:2.5rem}.detail-panel{grid-template-columns:1fr;gap:2rem}.detail-side{padding:1.5rem 0 0;border-left:0;border-top:1px solid rgba(255,255,255,.18)}}
.gallery-frame img{cursor:zoom-in}.image-lightbox{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:4rem 5rem;border:0;background:rgba(12,14,26,.9);color:var(--text);backdrop-filter:blur(24px)}.image-lightbox:not([open]){display:none}.image-lightbox[open]{display:grid;grid-template-columns:3rem minmax(0,1fr) 3rem;align-items:center;justify-items:center;gap:1rem}.image-lightbox::backdrop{background:transparent}.lightbox-figure{display:grid;justify-items:center;gap:.8rem;width:100%;height:100%;margin:0;min-height:0}.lightbox-figure img{display:block;width:100%;height:100%;max-height:calc(100vh - 8rem);object-fit:contain;border:1px solid rgba(255,255,255,.28);border-radius:1rem;box-shadow:0 1rem 4rem #0008}.lightbox-figure figcaption{color:var(--muted);font:.72rem 'DM Mono',monospace}.image-lightbox button{border:1px solid #ffffff55;border-radius:50%;color:white;background:#ffffff1c;cursor:pointer;backdrop-filter:blur(16px)}.lightbox-close{position:absolute;top:1.2rem;right:1.4rem;width:2.8rem;height:2.8rem;font-size:1.8rem}.lightbox-nav{width:2.8rem;height:2.8rem;font-size:2rem}.image-lightbox button:hover{background:#ffffff35}@media(max-width:700px){.image-lightbox{padding:4.5rem .4rem 2rem}.image-lightbox[open]{grid-template-columns:2.1rem minmax(0,1fr) 2.1rem;gap:.2rem}.lightbox-nav{width:2rem;height:2rem}.lightbox-figure img{max-height:calc(100vh - 8rem);border-radius:.5rem}}
.project-gallery{width:100%;max-width:68rem;margin:0 auto 3rem}.gallery-viewport{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start}.gallery-viewport.is-carousel{display:block}.gallery-frame{min-width:0;margin:0;padding:.45rem;overflow:hidden;border:1px solid rgba(255,255,255,.32);border-radius:1.4rem;background:linear-gradient(135deg,rgba(255,255,255,.16),rgba(255,255,255,.045),rgba(151,178,255,.1));backdrop-filter:blur(24px) saturate(160%);box-shadow:inset 0 1px rgba(255,255,255,.38),0 1rem 2.5rem rgba(5,8,25,.22)}.gallery-frame img{display:block;width:100%;height:auto;max-height:65vh;object-fit:contain;border-radius:1rem}.gallery-frame[hidden],.gallery-controls[hidden]{display:none}.gallery-controls{display:flex;justify-content:center;align-items:center;gap:1rem;margin-top:.8rem;color:var(--muted);font-family:'DM Mono',monospace;font-size:.72rem}.gallery-controls button{width:2.5rem;height:2.5rem;border:1px solid rgba(255,255,255,.28);border-radius:50%;background:rgba(255,255,255,.1);color:var(--text);cursor:pointer;backdrop-filter:blur(16px)}
.lightbox-figure img{width:auto;max-width:min(78vw,72rem);height:auto;max-height:76vh;object-fit:contain}.image-lightbox[open] .lightbox-figure img{animation:bubble-expand .42s cubic-bezier(.2,.75,.25,1) both;transform-origin:center}@keyframes bubble-expand{from{opacity:.45;transform:scale(.86);border-radius:2rem;filter:blur(3px)}to{opacity:1;transform:scale(1);border-radius:1rem;filter:blur(0)}}@media(max-width:700px){.lightbox-figure img{max-width:78vw;max-height:72vh}}@media(prefers-reduced-motion:reduce){.image-lightbox[open] .lightbox-figure img{animation:none}}
.image-lightbox[open]{position:fixed;inset:0;display:grid;place-items:center;padding:3rem;background:rgba(12,14,26,.88)}.lightbox-figure{width:min(78vw,72rem);height:min(76vh,50rem);display:grid;place-items:center;position:relative}.lightbox-figure img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;border:1px solid rgba(255,255,255,.4);border-radius:1.6rem;background:linear-gradient(145deg,rgba(255,255,255,.2),rgba(255,255,255,.06));box-shadow:inset 0 1px rgba(255,255,255,.5),0 2rem 6rem #0008;animation:bubble-grow .62s cubic-bezier(.18,.8,.22,1) both}.lightbox-figure figcaption{position:absolute;bottom:-2rem}.image-lightbox .lightbox-close,.image-lightbox .lightbox-nav{opacity:0;animation:controls-appear .22s ease-out .62s forwards}.image-lightbox .lightbox-nav{position:fixed;top:50%;transform:translateY(-50%)}.image-lightbox .lightbox-prev{left:2rem}.image-lightbox .lightbox-next{right:2rem}.image-lightbox .lightbox-close{position:fixed;right:1.5rem;top:1.5rem}@keyframes bubble-grow{from{opacity:.55;transform:scale(.34);border-radius:50%;filter:blur(5px)}to{opacity:1;transform:scale(1);border-radius:1.6rem;filter:blur(0)}}@keyframes controls-appear{to{opacity:1}}@media(max-width:700px){.image-lightbox[open]{padding:3rem .5rem}.lightbox-figure{width:84vw;height:68vh}.image-lightbox .lightbox-prev{left:.45rem}.image-lightbox .lightbox-next{right:.45rem}}
.image-lightbox[open] .lightbox-nav,.image-lightbox[open] .lightbox-close{opacity:0;pointer-events:none;animation:none}.image-lightbox.is-expanded .lightbox-nav,.image-lightbox.is-expanded .lightbox-close{animation:controls-appear .22s ease-out forwards;pointer-events:auto}
.image-lightbox[open]{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);justify-items:center;align-items:center}.lightbox-figure{grid-column:1;grid-row:1;margin-inline:auto;justify-self:center;align-self:center}.image-lightbox .lightbox-prev{left:2rem}.image-lightbox .lightbox-next{right:2rem}@media(max-width:700px){.image-lightbox[open]{grid-template-columns:minmax(0,1fr)}.image-lightbox .lightbox-prev{left:.45rem}.image-lightbox .lightbox-next{right:.45rem}}
.image-lightbox[open] .lightbox-figure{box-sizing:border-box;padding:.7rem;border:1px solid rgba(255,255,255,.36);border-radius:1.6rem;background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.055) 48%,rgba(151,178,255,.12));backdrop-filter:blur(34px) saturate(175%);-webkit-backdrop-filter:blur(34px) saturate(175%);box-shadow:inset 0 1px rgba(255,255,255,.48),inset 0 -1px rgba(255,255,255,.08),0 1.5rem 4rem rgba(5,8,25,.3)}.lightbox-figure img{border:0!important;border-radius:1rem!important;background:transparent!important;box-shadow:none!important}.lightbox-figure figcaption{bottom:-2.2rem}
.image-lightbox[open] .lightbox-figure{width:auto;height:auto;max-width:84vw;max-height:82vh;display:inline-grid;grid-template-rows:auto auto;align-content:center;padding:.45rem}.lightbox-figure img{display:block;width:auto;height:auto;max-width:calc(84vw - .9rem);max-height:calc(82vh - 1.8rem);object-fit:contain}.lightbox-figure figcaption{position:static;margin-top:.6rem}.image-lightbox[open]{display:flex;align-items:center;justify-content:center}.image-lightbox .lightbox-prev{left:2rem}.image-lightbox .lightbox-next{right:2rem}@media(max-width:700px){.image-lightbox[open] .lightbox-figure{max-width:88vw;max-height:78vh}.lightbox-figure img{max-width:calc(88vw - .9rem);max-height:calc(78vh - 1.8rem)}}
.image-lightbox[open] .lightbox-figure{height:auto!important;width:max-content;max-width:88vw;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;justify-self:center;align-self:center;margin:auto}.image-lightbox[open] .lightbox-figure img{display:block;width:auto;height:auto;max-width:calc(88vw - 1.4rem);max-height:calc(82vh - 2.8rem);flex:none}.image-lightbox[open] .lightbox-figure figcaption{position:static;margin:.55rem 0 0;line-height:1}
.image-lightbox[open] .lightbox-figure{box-sizing:border-box!important;display:inline-flex!important;width:fit-content!important;height:fit-content!important;max-width:fit-content!important;max-height:fit-content!important;min-height:0!important;flex:0 0 auto!important;align-items:center!important;justify-content:center!important;gap:.55rem!important;margin:auto!important;padding:.55rem!important}.image-lightbox[open] .lightbox-figure img{box-sizing:border-box!important;width:auto!important;height:auto!important;max-width:84vw!important;max-height:78vh!important;margin:0!important;flex:none!important;object-fit:contain!important}.image-lightbox[open] .lightbox-figure figcaption{position:static!important;inset:auto!important;margin:0!important;line-height:1!important}
.lightbox-count{position:fixed;left:50%;bottom:1.5rem;transform:translateX(-50%);color:var(--muted);font: .72rem 'DM Mono',monospace;pointer-events:none}.image-lightbox[open] .lightbox-figure figcaption{display:none}
.detail-panel{padding-top:clamp(2rem,4vw,3.5rem);padding-bottom:clamp(1.25rem,2vw,2rem)}.detail-side{align-self:center}
.detail-side{align-self:stretch;align-content:center}
.detail-links{flex-direction:column;align-items:flex-start}
.gallery-viewport.is-carousel{display:block;overflow:hidden}.gallery-track{display:flex;gap:1rem;transition:transform .65s cubic-bezier(.22,.75,.25,1);will-change:transform}.gallery-track .gallery-frame{flex:0 0 calc((100% - 1rem)/2);min-width:0}.gallery-track .gallery-frame img{width:100%;height:auto;max-height:42vh;object-fit:cover}@media(max-width:700px){.gallery-track .gallery-frame{flex-basis:calc((100% - .6rem)/2)}.gallery-track{gap:.6rem}}
.gallery-viewport.is-carousel{position:relative}.gallery-viewport.is-carousel .gallery-controls{position:absolute;inset:0;display:block;margin:0;pointer-events:none}.gallery-controls button{position:absolute;top:50%;z-index:3;transform:translateY(-50%);width:2.6rem;height:2.6rem;border:1px solid rgba(255,255,255,.46);border-radius:50%;background:rgba(28,32,54,.38);color:#fff;font-size:1.3rem;backdrop-filter:blur(18px) saturate(150%);box-shadow:inset 0 1px rgba(255,255,255,.34),0 .5rem 1.2rem rgba(0,0,0,.2);pointer-events:auto;transition:background .2s,transform .2s}.gallery-controls button:hover{background:rgba(28,32,54,.68);transform:translateY(-50%) scale(1.06)}#gallery-prev{left:.75rem}#gallery-next{right:.75rem}#gallery-position{display:none}
.gallery-viewport.is-carousel>.gallery-controls{position:absolute;inset:0;display:block!important;margin:0!important;padding:0!important;pointer-events:none}.gallery-viewport.is-carousel .gallery-controls button{position:absolute;top:50%;z-index:5;width:2.25rem;height:2.25rem;padding:0;display:grid;place-items:center;border:1px solid rgba(255,255,255,.38);border-radius:50%;background:rgba(28,32,54,.3);color:#fff;font-size:1.1rem;line-height:1;backdrop-filter:blur(14px) saturate(145%);box-shadow:inset 0 1px rgba(255,255,255,.28);pointer-events:auto;transform:translateY(-50%)}.gallery-viewport.is-carousel .gallery-controls button:hover{background:rgba(28,32,54,.58);transform:translateY(-50%) scale(1.04)}.gallery-viewport.is-carousel #gallery-prev{left:1.1rem;right:auto}.gallery-viewport.is-carousel #gallery-next{right:1.1rem;left:auto}
.gallery-viewport.is-carousel #gallery-prev{left:8px}.gallery-viewport.is-carousel #gallery-next{right:8px}
.project-detail .back-link,.project-detail .eyebrow,.project-lead,.detail-main>p:last-child,.detail-side>div,.detail-label,.detail-side li,.detail-links a,.gallery-controls,.lightbox-count{font-size:calc(1em + 1px)}
.detail-side>div{font-size:.9rem}.detail-label{font-size:.7rem!important}.detail-side li{font-size:.78rem!important}.detail-links a{font-size:.9rem!important}
.project-catalog{padding:4.5rem 0 7rem}.project-catalog>h1{margin:0 0 3.5rem;font-size:clamp(3.2rem,7vw,6rem)}.project-catalog section{margin-top:3.5rem}.project-catalog .catalog-heading{margin-bottom:1.5rem}.project-catalog .catalog-heading h2{font-size:clamp(2rem,4vw,3.4rem)}.catalog-secondary{grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.project-card--compact{grid-template-columns:1fr;grid-template-rows:auto 1fr;min-height:0}.project-card--compact .project-preview--image{aspect-ratio:16/10;min-height:0}.project-card--compact .project-preview--image>.home-project-image.is-visible{inset:.45rem;width:calc(100% - .9rem);height:calc(100% - .9rem);border-radius:1rem}.project-card--compact .project-info{min-height:12rem;padding:1.3rem;border-left:0;border-top:1px solid rgba(255,255,255,.2)}.project-card--compact .project-info h3{margin:.2rem 0 .6rem;font-size:1.65rem}.project-card--compact .project-description{font-size:.84rem}.project-card--compact .project-meta{font-size:.68rem}
@media(max-width:700px){.project-catalog{padding:3.5rem 0 5rem}.project-catalog>h1{margin-bottom:2.5rem}.project-catalog section{margin-top:2.5rem}.catalog-secondary{grid-template-columns:repeat(2,minmax(0,1fr))}.project-card--compact .project-info{padding:1rem}.project-card--compact .project-info h3{font-size:1.35rem}}
@media(max-width:480px){.catalog-secondary{grid-template-columns:1fr}}
.project-detail .back-link{font-size:.72rem!important}.site-footer{font-size:.62rem!important}
.project-detail .back-link{font-size:.82rem!important}.site-footer{font-size:.72rem!important}
.site-footer{font-size:.72rem!important}
@media(max-width:480px){.project-detail{padding:2.7rem 0 4rem}.project-detail h1{font-size:clamp(2.8rem,13vw,4rem);overflow-wrap:anywhere}.project-lead{margin-bottom:2rem;font-size:1rem;line-height:1.65}.back-link{margin-bottom:2rem}.detail-panel{gap:1.4rem;padding:1.1rem;border-radius:1.35rem}.detail-main h2{font-size:clamp(1.75rem,8vw,2.3rem)}.detail-main>p:last-child{font-size:.95rem;line-height:1.7}.detail-side{gap:1rem}.detail-side>div{font-size:.9rem}.detail-links{gap:.65rem!important}.gallery-controls button{width:2rem;height:2rem}.gallery-viewport.is-carousel #gallery-prev{left:4px}.gallery-viewport.is-carousel #gallery-next{right:4px}.project-catalog>h1{font-size:clamp(2.8rem,13vw,4rem)}.project-card--compact .project-meta{gap:.45rem;font-size:.64rem}}
@media(max-width:340px){.detail-panel{padding:.85rem;border-radius:1.15rem}.gallery-track{gap:.4rem}.gallery-track .gallery-frame{flex-basis:calc((100% - .4rem)/2)}.gallery-viewport.is-carousel .gallery-controls button{width:1.8rem;height:1.8rem;font-size:1rem}.project-catalog .catalog-heading h2{font-size:1.8rem}}
.catalog-secondary{grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.project-card--home.project-card--compact{display:grid;grid-template-columns:minmax(7rem,.62fr) minmax(0,1fr);grid-template-rows:1fr;min-height:12rem}
.project-card--compact .project-preview--image{min-height:0;aspect-ratio:auto}
.project-card--compact .project-info{min-height:0;padding:1.1rem;border-top:0;border-left:1px solid rgba(255,255,255,.2)}
.project-card--compact .project-info h3{margin:.1rem 0 .5rem;font-size:clamp(1.25rem,2vw,1.65rem)}
.project-card--compact .project-description{font-size:.86rem;line-height:1.55}
.project-card--compact .project-meta{gap:.45rem;font-size:.64rem}
@media(max-width:700px){.catalog-secondary{grid-template-columns:1fr}.project-card--home.project-card--compact{min-height:10rem}}
@media(max-width:380px){.project-card--home.project-card--compact{grid-template-columns:minmax(5.5rem,.55fr) minmax(0,1fr);min-height:9rem}.project-card--compact .project-info{padding:.75rem}.project-card--compact .project-info h3{font-size:1.15rem}.project-card--compact .project-description{font-size:.78rem}.project-card--compact .project-meta{font-size:.58rem}}

/* Keep secondary cards horizontal; swap screenshots for their logos on compact screens. */
@media(max-width:1024px){
  .project-card--home.project-card--compact{display:grid;grid-template-columns:clamp(5.5rem,16vw,8rem) minmax(0,1fr);grid-template-rows:minmax(9rem,auto);min-height:9rem}
  .project-card--compact .project-preview--image{height:auto;min-height:0;aspect-ratio:auto;padding:.45rem}
  .project-card--compact .project-preview--image>.home-project-image.is-visible{inset:.45rem;width:calc(100% - .9rem);height:calc(100% - .9rem);object-fit:contain;object-position:center;border:0;border-radius:1rem;background:transparent;box-shadow:none}
  .project-card--compact .project-info{min-height:0;padding:.85rem;border-top:0;border-left:1px solid rgba(255,255,255,.16)}
  .project-card--compact .project-info h3{margin:0 0 .35rem;font-size:clamp(1.05rem,2vw,1.3rem)}
  .project-card--compact .project-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font-size:.78rem;line-height:1.42}
  .project-card--compact .project-meta{gap:.35rem;font-size:.58rem}
}
@media(max-width:700px){
  .catalog-secondary{grid-template-columns:1fr;gap:.8rem}
  .project-card--home.project-card--compact{grid-template-columns:5.75rem minmax(0,1fr);grid-template-rows:minmax(8.5rem,auto);min-height:8.5rem}
  .project-card--compact .project-info{padding:.7rem .8rem}
  .project-card--compact .project-info h3{font-size:1.08rem}
  .project-card--compact .project-description{font-size:.78rem}
}
@media(max-width:400px){
  .project-card--home.project-card--compact{grid-template-rows:minmax(7.25rem,auto);min-height:7.25rem}
  .project-card--compact .project-description{display:none}
  .project-card--compact .project-info h3{font-size:1.22rem}
  .project-card--compact .project-meta{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:.35rem;row-gap:.12rem;font-size:.66rem;line-height:1.3}
  .project-card--compact .project-meta span:first-child{grid-column:1;grid-row:1}
  .project-card--compact .project-meta span:nth-child(2){grid-column:1;grid-row:2}
  .project-card--compact .project-meta .project-arrow{grid-column:2;grid-row:1 / span 2;align-self:center}
}
/* Reserve a stable screenshot frame before gallery images finish loading. */
.gallery-frame{aspect-ratio:16/10;display:grid;place-items:center}
.gallery-frame img{width:100%;height:100%;max-height:none;object-fit:contain}
.gallery-track .gallery-frame img{height:100%;max-height:none;object-fit:contain}
@media(prefers-reduced-motion:reduce){
  .gallery-track,.gallery-controls button,.image-lightbox[open] .lightbox-figure img,.image-lightbox .lightbox-close,.image-lightbox .lightbox-nav{transition:none!important;animation:none!important}
  .gallery-track{will-change:auto}
}
