/* Portfolio: TSM's established blue/white world, with an expanding image gallery.
   Interaction inspiration: SmoothUI Hover Expand on 21st.dev. Original implementation. */
.portfolio-page{background:#fff;overflow-x:clip}
.portfolio-page ::selection{background:var(--sky);color:var(--ink)}
.portfolio-page :focus-visible{outline:3px solid var(--accent);outline-offset:5px}
.portfolio-page main:focus{outline:none}
.work-opening,.work-archive,.work-contact{padding-inline:max(var(--pad),calc((100vw - var(--max))/2))}
.work-opening{padding-top:27px;padding-bottom:50px}
.work-breadcrumb{display:flex;gap:12px;align-items:center;font-size:12px;color:var(--ink-2)}
.work-breadcrumb a{color:var(--ink-2);text-decoration:none;padding-block:8px}.work-breadcrumb a:hover{text-decoration:underline;text-underline-offset:4px}.work-breadcrumb>span:last-child{color:var(--ink);font-weight:650}
.work-heading{display:grid;grid-template-columns:1.4fr 1fr;align-items:end;gap:55px;margin:28px 0 38px}
.work-heading h1{font-size:clamp(3.4rem,5.8vw,5.8rem);line-height:1.02;letter-spacing:-.035em;font-stretch:110%;font-weight:800}
.work-heading h1 em{color:var(--accent)}
.work-intro{max-width:39ch;justify-self:end;padding-bottom:4px}.work-intro p{font-size:16px;line-height:1.65;color:var(--ink-2)}.work-intro .text-link{margin-top:20px;font-size:13px;gap:12px}.work-intro .text-link:hover svg{transform:translateY(3px)}
.scope-gallery{display:flex;gap:12px;height:360px}
.scope-panel{position:relative;flex:1;min-width:0;overflow:hidden;border:0;border-radius:12px;padding:0;text-align:left;background:var(--ink);color:#fff;cursor:pointer;isolation:isolate;transition:flex .6s cubic-bezier(.16,1,.3,1)}
.scope-panel.is-active{flex:2.15}
.scope-panel img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:scale(1.04);transition:transform .75s cubic-bezier(.16,1,.3,1);z-index:-2}
.scope-panel.is-active img{transform:scale(1)}
.scope-panel::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgb(12 17 22/.45),transparent 35%,rgb(12 17 22/.2) 48%,rgb(12 17 22/.94));z-index:-1}
.scope-panel-top{position:absolute;top:20px;left:24px;right:22px;display:flex;justify-content:space-between;align-items:center;font:650 12px/1.4 var(--sans);gap:10px}
.scope-arrow{width:32px;height:32px;border:1px solid rgb(255 255 255/.5);border-radius:50%;display:grid;place-items:center;flex-shrink:0;transition:background-color .25s,color .25s}
.scope-arrow svg{width:15px;height:15px}.is-active .scope-arrow{background:#fff;color:var(--ink)}
.scope-panel-bottom{position:absolute;bottom:27px;left:26px;right:20px;display:flex;flex-direction:column;gap:0}
.scope-panel strong{font:650 clamp(1.3rem,2.4vw,2.1rem)/1.14 var(--sans);letter-spacing:-.025em}
.scope-description{display:grid;grid-template-rows:0fr;max-width:33ch;max-height:0;visibility:hidden;opacity:0;overflow:hidden;font:400 14px/1.55 var(--sans);transition:opacity .25s,max-height .4s,margin .4s}
.is-active .scope-description{display:block;max-height:90px;visibility:visible;opacity:1;margin-top:14px}
.scope-panel:focus-visible{outline-offset:4px}
.gallery-caption{display:flex;justify-content:space-between;gap:22px;margin-top:14px;font-size:11px;line-height:1.5;color:var(--ink-2)}
.gallery-caption p{margin:0}.gallery-hint{display:flex;align-items:center;gap:12px;flex-shrink:0}.gallery-hint svg{width:16px;height:16px}
.work-archive{padding-top:54px;padding-bottom:64px;background:var(--paper);scroll-margin-top:100px}
.archive-heading{display:flex;justify-content:space-between;gap:30px;align-items:baseline;margin-bottom:28px}
.archive-heading h2{font-size:clamp(1.9rem,3vw,2.8rem);letter-spacing:-.03em;line-height:1.1}.archive-heading>p{font-size:13px;color:var(--ink-2)}
.archive-empty{display:grid;grid-template-columns:94px 1fr;gap:28px;align-items:start;padding-top:30px;border-top:1px solid var(--rule)}
.archive-symbol{color:var(--accent);padding:7px 18px 7px 0}.archive-symbol svg{width:64px;height:64px}
.archive-empty h3{font-size:21px;line-height:1.3;letter-spacing:-.02em;font-weight:650}.archive-empty p{font-size:15px;line-height:1.7;color:var(--ink-2);max-width:65ch;margin-top:12px}.archive-empty .text-link{margin-top:19px;font-size:13px;gap:12px}
.project-record-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding-top:28px;border-top:1px solid var(--rule)}
.project-record-card{overflow:hidden;border-radius:10px;background:#fff;border:1px solid #e0e5e8}
.project-record-media{width:100%;aspect-ratio:16/9;max-height:280px;overflow:hidden;background:#dce8ee}
.project-record-image{display:block;width:100%;height:100%;object-fit:cover}
.project-record-placeholder{display:block;width:100%;height:230px;background:#dce8ee}
.project-record-placeholder{display:grid;place-items:center;color:#086d9f;font:700 40px/1 var(--sans);letter-spacing:-.06em;background:linear-gradient(135deg,#e6f3fa,#cadce6)}
.project-record-copy{padding:20px}
.project-record-meta{margin:0 0 9px;color:var(--accent);font-size:11px;font-weight:650;letter-spacing:.04em;text-transform:uppercase}
.project-record-copy h3{font-size:21px;line-height:1.2;letter-spacing:-.025em;font-weight:650}
.project-record-copy>p:last-child:not(.project-record-meta){margin:12px 0 0;color:var(--ink-2);font-size:14px;line-height:1.65}
.work-contact{background:var(--ink);color:#fff;display:grid;grid-template-columns:1.3fr 1fr;gap:45px;padding-block:66px;align-items:center}
.work-contact h2{font-size:clamp(2.5rem,4vw,3.7rem);line-height:1.06;letter-spacing:-.03em;font-weight:650}.work-contact h2 em{color:var(--sky)}
.work-contact p{font-size:14px;line-height:1.7;color:#c2cbd2;margin-top:22px}.work-contact-actions{justify-self:end;display:flex;flex-direction:column;align-items:flex-start;gap:22px}.work-contact .btn{padding-inline:23px;min-height:54px}.work-email{font-size:13px;text-decoration:none;color:#dbe8ee;text-underline-offset:5px}.work-email:hover{text-decoration:underline}
.portfolio-page .foot{background:var(--ink);border-color:#29333b;color:#dbe8ee}.portfolio-page .foot img{background:#fff;border-radius:50%;padding:3px}.portfolio-page .foot a{color:#dbe8ee}
@media(max-width:1100px){.work-heading{grid-template-columns:1.3fr 1fr;gap:30px}.work-heading h1{font-size:clamp(3rem,5.6vw,4.5rem)}.scope-gallery{height:340px}.scope-panel-bottom{left:21px}.scope-panel-top{left:21px;right:16px}.scope-panel strong{font-size:clamp(1.25rem,2.5vw,1.7rem)}.work-archive{scroll-margin-top:140px}}
@media(max-width:700px){
 .work-opening,.work-archive,.work-contact{padding-inline:24px}
 .work-opening{padding-top:19px;padding-bottom:32px}.work-breadcrumb{font-size:12px}
 .work-heading{display:block;margin:23px 0 27px}.work-heading h1{font-size:clamp(2.7rem,10.5vw,4rem);line-height:1.04}.work-intro{max-width:43ch;padding:0;margin-top:24px}.work-intro p{font-size:15px}.work-intro .text-link{margin-top:16px}
 .scope-gallery{height:auto;flex-direction:column;gap:10px}.scope-panel,.scope-panel.is-active{flex:none;height:86px;transition:height .5s cubic-bezier(.16,1,.3,1)}.scope-panel.is-active{height:280px}
 .scope-panel-top{top:18px;left:20px;right:18px}.scope-panel:not(.is-active) .scope-panel-top>span:first-child{visibility:hidden}.scope-panel:not(.is-active) .scope-arrow{margin-top:8px}
 .scope-panel-bottom{left:20px;bottom:24px;right:60px}.scope-panel strong{font-size:20px}.scope-panel strong br{display:none}.scope-panel strong br::after{content:' '}.scope-panel.is-active strong{font-size:29px}.scope-panel.is-active strong br{display:initial}.scope-description{font-size:13px}.is-active .scope-description{margin-top:12px}
 .scope-panel:not(.is-active)::after{background:rgb(12 17 22/.68)}
 .gallery-caption{display:block;font-size:11px;margin-top:13px}.gallery-hint{display:none}
 .work-archive{padding-block:36px 42px}.archive-heading{display:block;margin-bottom:25px}.archive-heading h2{font-size:29px}.archive-heading>p{margin-top:9px;font-size:12px}
 .archive-empty{grid-template-columns:1fr;gap:13px;padding-top:23px}.archive-symbol{padding:0}.archive-symbol svg{width:39px;height:39px}.archive-empty h3{font-size:19px}.archive-empty p{font-size:14px;margin-top:10px}.archive-empty .text-link{font-size:12px;line-height:1.6;align-items:center}.archive-empty .text-link svg{flex-shrink:0}
 .project-record-grid{grid-template-columns:1fr;gap:13px;padding-top:22px}.project-record-media{height:210px;aspect-ratio:auto}.project-record-placeholder{height:210px}.project-record-copy{padding:17px}.project-record-copy h3{font-size:19px}
 .work-contact{display:block;padding-block:43px}.work-contact h2{font-size:32px}.work-contact p{font-size:13px;margin-top:18px}.work-contact-actions{margin-top:27px;gap:19px}.work-contact .btn{min-height:50px;font-size:13px}.work-email{font-size:12px}
}
@media(min-width:701px) and (max-width:1000px){.project-record-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.scope-panel,.scope-panel img,.scope-description{transition:none}}

.scope-panel-top>span:first-child{background:#0c1116;padding:6px 9px;border-radius:3px}
.portfolio-page .foot img{mix-blend-mode:normal}
