/* Photo portraits follow the portfolio's existing cool grey / blue palette. */
.crew .section-heading{margin-bottom:40px}
.crew-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;align-items:start}
.crew-grid .crew-card{display:block;position:relative;min-width:0;padding:0;text-align:left}
.crew-grid .crew-card:last-child{grid-column:auto;width:auto}
.crew-grid .crew-portrait{display:block;position:relative;aspect-ratio:3/4;overflow:hidden;background:#cfdae3;border-top:2px solid transparent}
.crew-grid .crew-card.crew-leader .crew-portrait{border-color:var(--accent)}
.crew-grid .crew-portrait img{display:block;width:100%;height:100%;object-fit:cover;filter:saturate(.72);transition:transform .65s cubic-bezier(.2,.8,.2,1),filter .4s}
.crew-grid .crew-card:hover img,.crew-grid .crew-card:focus-visible img{transform:scale(1.03);filter:saturate(1)}
.crew-grid .crew-card:hover .crew-portrait,.crew-grid .crew-card:focus-visible .crew-portrait{border-color:var(--accent)}
.photo-index{position:absolute;top:16px;left:16px;z-index:1;font:500 9px var(--body);letter-spacing:.08em;color:#526879}
.has-photo .photo-index,.member-photo:has(img) .photo-index{color:#25313b;background:#e9f0f4e6;padding:6px 8px;top:12px;left:12px}
.photo-placeholder{position:relative;display:flex;width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at 35% 20%,#e3ebf1 0,#d1dfe9 70%,#c1d2df 100%)}
.placeholder-number{font:500 clamp(72px,8vw,140px)/1 var(--heading);letter-spacing:-.06em;color:#adc0ce}
.placeholder-note{position:absolute;bottom:22px;left:20px;right:40px;text-align:left;font-size:9px;line-height:1.55;color:#576e80}
.crew-grid .crew-arrow{display:grid;place-items:center;position:absolute;right:12px;bottom:16px;width:28px;height:28px;border-radius:50%;font-size:19px;color:var(--ink);transition:background .25s,color .25s}
.crew-grid .has-photo .crew-arrow{background:#e5edf3eb}
.crew-grid .crew-card:hover .crew-arrow,.crew-grid .crew-card:focus-visible .crew-arrow{background:var(--ink);color:var(--paper)}
.crew-card-info{display:block;position:relative;padding:20px 16px 20px 0;border-bottom:1px solid var(--line)}
.crew-grid .crew-name{display:block;font:600 clamp(24px,2.2vw,33px)/.98 var(--heading);letter-spacing:-.025em;transition:color .2s}
.crew-grid .crew-card:hover .crew-name{color:var(--accent)}
.crew-grid .crew-card .role{display:block;font-size:9px;color:var(--muted);margin-top:11px;line-height:1.45}
.crew-grid .crew-chosen{position:absolute;right:0;top:25px;width:5px;height:5px;transition:background .2s}
.crew-grid .crew-card:not(.selected) .crew-chosen{background:transparent;box-shadow:inset 0 0 0 1px #728899}
.crew-bottom .muted{max-width:340px}

/* One photo panel for all members; the personal dossier stays readable while scrolling. */
#profile{width:min(1180px,calc(100vw - 44px));max-height:94svh;scrollbar-width:thin;scrollbar-color:#a5b7c6 #dbe5ed;overscroll-behavior:contain;background:#e8eef3}
#profile::backdrop{background:#25374680;backdrop-filter:blur(8px)}
#profile .dialog-close{position:sticky;display:block;left:calc(100% - 130px);right:auto;top:14px;margin:0 0 -38px;z-index:5;background:#e8eef3f0;border:1px solid #9dafbe66;backdrop-filter:blur(10px);font-size:10px;min-height:38px}
#profile .profile-layout{display:grid;grid-template-columns:43% 57%;align-items:start}
#profile .profile-photo-panel{margin:0;position:sticky;top:0;min-width:0;background:#d3e0e9;border-right:1px solid #b5c6d3}
#profile .member-photo{position:relative;display:block;height:clamp(420px,73svh,760px);overflow:hidden}
#profile .member-photo>img{display:block;width:100%;height:100%;object-fit:cover;filter:saturate(.82)}
#profile .member-photo .placeholder-number{font-size:140px}
#profile .profile-photo-panel figcaption{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0;padding:23px 25px;font-size:9px;letter-spacing:.04em}
#profile .profile-photo-panel figcaption strong{font-weight:600}
#profile .profile-photo-panel figcaption>span{color:#597284;font-size:8px;text-transform:uppercase;text-align:right}
#profile .profile-info{padding:64px 42px 46px;min-width:0}
.profile-kicker{display:flex;align-items:center;gap:8px;font-size:8px!important}
.profile-kicker>span:last-child{margin-left:auto;color:#687e8e;font-size:7px}
#profile .profile-info h2{font:600 clamp(50px,5.3vw,79px)/.86 var(--heading);letter-spacing:-.045em;margin:28px 0 21px}
.profile-specialty{font-size:8px!important;letter-spacing:.03em;color:#647b8c}
#profile .profile-data{grid-template-columns:1fr 1fr;gap:20px;padding:22px 0;margin:30px 0 0}
#profile .profile-data>div+div{border-left:1px solid var(--line);padding-left:24px}
#profile .profile-data strong{font:500 43px/.95 var(--heading);margin-bottom:13px}
#profile .profile-data span{font-size:8px;letter-spacing:.04em;display:block}
#profile .profile-data small{display:block;color:#687e8e;font-size:8px;margin-top:5px}
#profile .select-button{display:flex;align-items:center;justify-content:space-between;margin-top:17px;padding:15px 17px;font-size:9px;letter-spacing:.06em}
#profile .select-button span{font-size:8px;font-weight:400;letter-spacing:0;opacity:.7}

/* Skills, equipment and project archive retained from the personal dossier. */
.profile-section{margin-top:42px}
.profile-section-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:14px;gap:12px}
.profile-section-heading h3{margin:0!important;font-size:9px!important;letter-spacing:.08em}
.profile-section-heading>span{font-size:7px;color:#7c91a1;letter-spacing:.05em;text-align:right}
.draft-note{font-size:9px!important;color:#7c8e9c;line-height:1.65;margin:12px 0 18px}
.level-list{padding-top:8px}
.level-row{display:grid;grid-template-columns:1fr 100px 30px;gap:12px;align-items:center;min-height:36px;border-bottom:1px solid #c0ced833;font-size:11px}
.level-meter{display:flex;gap:4px}
.level-meter i{height:5px;flex:1;background:#cbd7e0}
.level-meter i.filled{background:#465f72}
.level-row b{font:500 16px var(--heading);text-align:right}
.level-row b small{font-size:9px;font-family:var(--body);color:#8b9ba8;font-weight:400;margin-left:2px}
.attributes-list .level-meter i.filled{background:#8a9ba6}
.equipment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:18px}
.equipment-card{--machine-fill:#adbfcb;--machine-light:#eaf1f5;--machine-dark:#758e9e;--machine-glass:#bcd3df;display:flex;flex-direction:column;min-width:0;text-align:left;background:linear-gradient(155deg,#e0eaf1,#d5e1ea);border:1px solid #b5c6d366;padding:12px 15px 16px;color:#405969;transition:background .2s,border-color .2s;cursor:pointer}
.equipment-card svg{width:100%;height:145px;display:block;margin-bottom:9px;flex:none}
.equipment-card[data-equipment=crane]{grid-column:1/-1}
.equipment-card[data-equipment=crane] svg{height:185px}
.equipment-label{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-top:auto;width:100%;padding-top:10px;border-top:1px solid #a9becd66}
.equipment-label b{font-size:13px;line-height:1.45;font-weight:650}
.equipment-label i{font-style:normal;font-size:16px;line-height:1.2;flex:none}
.equipment-card>small{display:block;font-size:10px;margin-top:6px;color:#536b7d}
.equipment-card:hover,.equipment-card[aria-pressed=true]{border-color:#b76243;background:#d1dfe9;--machine-fill:#a6becf}
.equipment-card:focus-visible{outline:2px solid #415e73;outline-offset:3px}
.equipment-card[aria-pressed=true] .equipment-label{border-color:#b7624380}
.equipment-detail{font-size:11px;color:#536b7d;border-left:2px solid #a9becd;padding:11px 12px;margin-top:14px;min-height:52px}
.equipment-detail strong{font-weight:600;color:#3d5668}
.equipment-detail p{margin:7px 0 0;line-height:1.6}
.legend-copy{font-size:12px!important;line-height:1.85;color:#596f80;margin-top:19px}
.legend-section blockquote{margin:25px 0 0;padding:0 0 0 16px;border-left:2px solid var(--accent);font:500 25px/1.18 var(--heading);max-width:280px}
/* Certificates: one row per document, validity on the right. */
.cert-list{margin:12px 0 0;padding:0;list-style:none}
.cert{display:flex;justify-content:space-between;align-items:baseline;gap:18px;padding:13px 0;border-bottom:1px solid #c0ced866}
.cert-name{display:grid;gap:4px;min-width:0}
.cert-name b{font-size:13px;font-weight:600;line-height:1.35;color:var(--ink)}
.cert-name small{font-size:10px;color:#536b7d}
.cert-date{font-size:11px;color:#3d5668;white-space:nowrap;font-variant-numeric:tabular-nums}
.cert.is-expired .cert-date{color:#9a4a2f}
/* Field photos: one compact row that scrolls sideways; each photo keeps its own ratio. */
.member-strip{margin-top:18px}
.member-strip-track{display:flex;gap:6px;margin:0;padding:0 0 8px;list-style:none;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#a5b7c6 transparent}
.member-strip-track li{flex:none;scroll-snap-align:start}
.member-shot{display:block;width:calc(var(--shot-h,128px) * var(--ratio));height:var(--shot-h,128px);padding:0;overflow:hidden;background:#cfdae3;cursor:zoom-in}
.member-shot img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .4s}
.member-shot:hover img{transform:scale(1.03)}
.member-shot:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.member-strip-controls{display:flex;justify-content:flex-end;gap:6px;margin-top:6px}
.member-strip-controls[hidden]{display:none}
.member-strip-controls button{display:grid;place-items:center;width:40px;height:40px;border:1px solid #a9becd;font-size:15px;color:var(--ink)}
.member-strip-controls button:hover:not(:disabled){background:var(--ink);border-color:var(--ink);color:var(--paper)}
.member-strip-controls button:disabled{opacity:.35;cursor:default}


@media(max-width:1100px){
 .crew-grid .crew-name{font-size:23px}
 #profile .profile-layout{grid-template-columns:40% 60%}
 #profile .profile-info{padding:64px 28px 36px}
 .level-row{grid-template-columns:1fr 75px 25px;font-size:10px;gap:8px}
}
@media(max-width:760px){
 .crew .section-heading{margin-bottom:28px}
 .crew-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 14px}
 .crew-grid .crew-card.crew-leader{grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:1fr 1fr;background:#d1dee7}
 .crew-grid .crew-leader .crew-card-info{align-self:end;padding:20px 18px;min-height:150px}
 .crew-grid .crew-leader .crew-name{font-size:clamp(23px,5vw,36px);max-width:180px}
 .crew-grid .crew-leader .crew-chosen{right:18px;top:auto;bottom:24px}
 .crew-grid .crew-card:last-child{grid-column:auto;width:auto}
 .crew-grid .crew-portrait{aspect-ratio:3/4}
 .crew-grid .crew-name{font-size:25px}
 .crew-bottom{flex-wrap:wrap;margin-top:26px;gap:15px}
 .crew-bottom .muted{margin-left:0;max-width:none;width:100%}
 #profile .profile-layout{display:block}
 #profile .profile-photo-panel{position:relative;border-right:0;border-bottom:1px solid var(--line)}
 #profile .member-photo{height:clamp(340px,65svh,540px);min-height:0}
 #profile .member-photo img{object-fit:cover}
 #profile .profile-photo-panel figcaption{padding:16px 22px}
 #profile .profile-info{padding:32px 24px 36px}
 #profile .profile-info h2{font-size:60px;margin-top:22px}
 #profile{width:calc(100vw - 18px);max-height:95svh}
 #profile .dialog-close{top:10px;left:calc(100% - 120px)}
 .profile-section{margin-top:34px}
 .level-row{grid-template-columns:1fr 85px 27px;font-size:10px;min-height:37px}
 .equipment-card{padding:8px 10px 13px}
 .equipment-card svg{height:110px;margin-bottom:5px}
 .equipment-card[data-equipment=crane] svg{height:155px}
 .equipment-label b{font-size:12px}
 .member-strip{--shot-h:112px}
 .cert{flex-direction:column;gap:5px}
}
@media(max-width:380px){
 .crew-grid{gap:22px 10px}
 .crew-grid .crew-leader .crew-card-info{padding:16px 12px;min-height:140px}
 .crew-grid .crew-card .role{font-size:8px}
 #profile .profile-info{padding-inline:18px}
 #profile .profile-info h2{font-size:52px}
 .profile-kicker{gap:5px}
 .profile-kicker>span:last-child{font-size:6px}
 .profile-section-heading>span{font-size:6px}
 #profile .select-button{padding:14px 10px;font-size:8px}
 #profile .select-button span{font-size:7px}
 .level-row{grid-template-columns:1fr 70px 25px;gap:6px}
}
@media(prefers-reduced-motion:reduce){
 .crew-grid .crew-portrait img,.crew-grid .crew-arrow,.crew-grid .crew-name,.equipment-card,.member-shot img{transition:none}
 .crew-grid .crew-card:hover img,.crew-grid .crew-card:focus-visible img{transform:none}
}

/* Names stay on one line: the size follows the card width (container query units), so the longest name fits. */
.crew-grid .crew-card{container-type:inline-size}
.crew-grid .crew-name{white-space:nowrap;overflow-wrap:normal;font-size:min(33px,max(15px,10.6cqi))}
@media(max-width:600px){.crew-grid .crew-card.crew-leader .crew-name{white-space:normal;font-size:clamp(23px,5vw,36px)}}

/* Facts under the leader's name: only the wide two-column card on phones has room for them. */
.crew-facts{display:none}
@media(max-width:600px){
 .crew-grid .crew-leader .crew-card-info{align-self:stretch;display:flex;flex-direction:column;justify-content:flex-end;gap:9px;padding-bottom:18px}
 .crew-grid .crew-leader .crew-chosen{top:16px;bottom:auto}
 .crew-facts{display:grid;gap:5px}
 .crew-facts>span{display:flex;align-items:baseline;gap:7px;padding-top:5px;border-top:1px solid #b3c5d2;font-size:8.5px;letter-spacing:.06em;text-transform:uppercase;color:#45596a}
 .crew-facts b{font:600 16px/1 var(--heading);letter-spacing:-.02em;color:var(--ink);font-variant-numeric:tabular-nums}
}
