/* =====================================================================
   Work carousel.
   Re-styles the existing project links (.proj) inside .wc; every rule is
   scoped to .wc / .wc-*.
   ===================================================================== */

/* cover width: small enough that header + cover + title + description fit in one screen */
.wc{--wc-w:clamp(280px,min(40vw,(100svh - 480px) * 1.6),760px);--wc-gap:clamp(16px,2.4vw,40px);--wc-ease:cubic-bezier(.22,.61,.36,1);position:relative}

/* header: counter + arrows sit where "5 projects" was */
.wc-head{align-items:center}
.wc-ctrl{display:flex;align-items:center;gap:clamp(14px,2vw,24px)}
.wc-count{display:inline-flex;align-items:baseline;gap:.35em;font:400 15px/1 var(--f-body);color:var(--muted);font-variant-numeric:tabular-nums}
.wc-count b{display:inline-flex;font-weight:500;color:var(--ink)}
.wc-dig{display:inline-block;height:1em;overflow:hidden;line-height:1}
.wc-dig span{display:flex;flex-direction:column;transition:transform .55s cubic-bezier(.22,1.2,.36,1)}
.wc-dig i{font-style:normal;height:1em}

/* full-bleed viewport; the track is moved with a transform by work-carousel.js (no native scrolling,
   so nothing here can scroll vertically or jump) */
.wc{width:100vw;margin-left:calc(50% - 50vw);overflow:hidden;overflow:clip;overflow-clip-margin:24px;padding:4px 0 8px}
.wc .wc-track{display:flex;gap:var(--wc-gap);width:max-content;padding:0;will-change:transform;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.wc.is-dragging .proj{pointer-events:none}

/* a project */
.wc .wc-track .proj,.wc .wc-track .proj.grid{display:block;flex:0 0 var(--wc-w);width:var(--wc-w);margin:0;min-width:0}
/* 3D: the projects sit on a flattened half-oval (work-carousel.js places each one every frame and
   sets --ad, its distance from the centre in projects). Side covers fade with distance. */
.wc{perspective:2000px}
.wc .wc-track{transform-style:preserve-3d}
.wc .wc-track .proj{transform-style:preserve-3d;backface-visibility:hidden;will-change:transform}
.wc .wc-track .vis{aspect-ratio:16/10;border-radius:6px;opacity:calc(1 - min(var(--ad,1),1.6) * .32);
  box-shadow:0 30px 60px -30px rgba(29,18,51,calc(.28 - min(var(--ad,1),1) * .2))}
.wc .wc-track .proj:not(.is-active):hover .vis{opacity:calc(1 - min(var(--ad,1),1.6) * .2)}
.wc .wc-track .proj:not(.is-active):hover .vis img{transform:none}
.wc .wc-track .proj.is-active:hover .vis img{transform:scale(1.03)}
.wc .proj img{-webkit-user-drag:none;user-select:none}

/* only the centred project shows its title and details; side projects never do (not even on hover) */
.wc .wc-track .info{margin:clamp(16px,1.6vw,24px) 0 0;transition:opacity .4s var(--wc-ease)}
.wc .wc-track .proj:not(.is-active) .info{opacity:0;pointer-events:none}
.wc .wc-track .info h3{font-size:clamp(22px,2vw,34px);text-wrap:balance}
.wc .wc-track .more{grid-template-rows:1fr;opacity:0;translate:0 10px;transition:opacity .35s var(--wc-ease),translate .5s var(--wc-ease)}
.wc .wc-track .more-in{padding-top:12px}
.wc .wc-track .proj.is-active .more{opacity:1;translate:0 0;transition-delay:.12s}
/* the details fade out while the centred card turns away, and back in as it lands */
.wc .wc-track .proj.is-active .info{opacity:clamp(0,1 - var(--ad,0) * 3.5,1);transition:none}
/* no underline animation on project titles */
.wc .wc-track .proj h3 .u::after{content:none}

/* project facts, always visible on the centred project: company and role, then verified outcomes */
.wc-meta{display:flex;flex-wrap:wrap;gap:4px 24px;margin:2px 0 0;font-size:14px;line-height:1.4}
.wc-meta div{display:flex;gap:.4em}
.wc-meta dt{font-weight:500;color:var(--ink)}
.wc-meta dd{margin:0;color:var(--muted)}
.wc-out{display:flex;flex-wrap:wrap;gap:12px clamp(24px,2.6vw,40px);margin:8px 0 0;padding:14px 0 0;list-style:none;border-top:1px solid var(--line)}
.wc-out li{display:grid;align-content:start;gap:4px;max-width:14em;font-size:14px;line-height:1.3;color:var(--muted)}
.wc-out b{font:400 clamp(24px,2vw,32px)/1 var(--f-display);letter-spacing:-.035em;color:var(--accent)}
.wc-lock{display:flex;align-items:center;gap:7px;margin:6px 0 0;font-size:14px;color:var(--muted)}
.wc-lock svg{width:13px;height:13px;color:var(--accent)}

/* the cursor is the navigation (fine pointers): a blinking eye on the centred project,
   an arrow sliding in the direction of travel everywhere else */
.wc-cursor{position:fixed;left:0;top:0;z-index:30;width:92px;height:92px;margin:-46px 0 0 -46px;border-radius:50%;overflow:hidden;
  display:grid;place-items:center;background:var(--plum);color:var(--ivory);font:500 15px/1 var(--f-body);pointer-events:none;
  opacity:0;scale:.3;transition:opacity .25s var(--wc-ease),scale .45s cubic-bezier(.22,1.2,.36,1),background-color .3s var(--wc-ease)}
.wc-cursor.on{opacity:1;scale:1}
.wc-cursor>span{grid-area:1/1;display:grid;place-items:center;transition:opacity .2s var(--wc-ease),scale .35s var(--wc-ease)}
.wc-cur-a,.wc-cur-e{opacity:0;scale:.6}
.wc-cursor.is-view .wc-cur-e{opacity:1;scale:1}
/* "View" is a blinking eye */
.wc-cur-e svg{width:40px;height:40px;overflow:visible}
.wc-cur-e .lid{transform-box:fill-box;transform-origin:50% 50%;animation:wc-blink 3.2s infinite}
.wc-cursor.is-view .wc-cur-e .pupil{animation:wc-look 3.2s infinite}
@keyframes wc-blink{0%,6%,100%{scale:1 1}2.5%{scale:1 .08}46%{scale:1 1}48.5%{scale:1 .08}51%{scale:1 1}}
@keyframes wc-look{0%,20%{translate:0 0}28%,40%{translate:1.6px 0}48%,70%{translate:0 0}78%,90%{translate:-1.6px 0}}
.wc-cursor.is-prev .wc-cur-a,.wc-cursor.is-next .wc-cur-a{opacity:1;scale:1}
.wc-cur-a svg{width:30px;height:30px}
.wc-cursor.is-next .wc-cur-a svg{animation:wc-slide 1.15s cubic-bezier(.45,0,.2,1) infinite}
.wc-cursor.is-prev .wc-cur-a{rotate:180deg}
.wc-cursor.is-prev .wc-cur-a svg{animation:wc-slide 1.15s cubic-bezier(.45,0,.2,1) infinite}
@keyframes wc-slide{0%{translate:-46px 0;opacity:0}30%{translate:0 0;opacity:1}70%{translate:0 0;opacity:1}100%{translate:46px 0;opacity:0}}
/* no system cursor over the carousel: the circle (eye or arrow) replaces it everywhere */
@media (hover:hover) and (pointer:fine){.wc,.wc *{cursor:none!important}}
@media (prefers-reduced-motion:reduce){.wc-cur-a svg,.wc-cur-e .lid,.wc-cur-e .pupil{animation:none!important}}

.wc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

@media (max-width:700px){.wc{--wc-w:70vw}.wc-count{display:none}}
@media (prefers-reduced-motion:reduce){.wc .wc-track .vis,.wc .wc-track .info,.wc .wc-track .more,.wc-dig span{transition:none!important}}
