.project-carousel{position:relative;overflow:hidden;touch-action:pan-y}
.project-carousel .project-grid{display:block;position:relative;height:clamp(300px,39vw,475px);perspective:1100px}
.project-carousel .project-item,.project-carousel .project-item:first-child{position:absolute;top:20px;left:50%;width:52%;margin:0;transform:translateX(-50%);transition:transform .85s cubic-bezier(.22,.68,.2,1),opacity .85s,filter .85s;transform-origin:center;z-index:3}
.project-carousel .project-item[data-position="left"]{transform:translateX(-124%) scale(.73) rotateY(8deg);opacity:.58;filter:saturate(.7);z-index:1}
.project-carousel .project-item[data-position="right"]{transform:translateX(24%) scale(.73) rotateY(-8deg);opacity:.58;filter:saturate(.7);z-index:1}
.project-carousel .project-item[data-position="center"]{transform:translateX(-50%) scale(1);opacity:1;filter:none;z-index:3}
.project-carousel .project-image{box-shadow:0 16px 40px #03030114;border-radius:8px}
.project-carousel .project-caption{padding:20px 5px}.project-carousel .project-caption h3{font-size:21px}
.carousel-controls{display:flex;justify-content:center;align-items:center;gap:18px;padding:18px 0 4px}
.carousel-controls button{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--green);cursor:pointer;transition:background .2s,color .2s}
.carousel-controls button:hover{background:var(--wine);color:var(--paper)}
.carousel-dots{display:flex;gap:9px;align-items:center}.carousel-dots button{width:8px;height:8px;border:0;background:#8a8a8366;padding:0}.carousel-dots button[aria-pressed="true"]{background:var(--wine);transform:scale(1.35)}
.carousel-controls .carousel-pause{width:auto;border:0;border-radius:0;font-size:11px;padding:5px 8px;color:var(--muted)}
@media(max-width:800px){.project-carousel .project-grid{height:clamp(285px,58vw,410px)}.project-carousel .project-item,.project-carousel .project-item:first-child{width:75%}.project-carousel .project-item[data-position="left"]{transform:translateX(-137%) scale(.75)}.project-carousel .project-item[data-position="right"]{transform:translateX(37%) scale(.75)}.project-carousel .project-caption{display:block}.project-carousel .project-caption h3{font-size:18px}.project-carousel .project-caption span{font-size:10px}}
@media(prefers-reduced-motion:reduce){.project-carousel .project-item{transition:none}}

/* Each card moves continuously; wrapping happens outside the viewport. */
.project-carousel .project-item,.project-carousel .project-item:first-child{transition:none;will-change:transform;transform-origin:center}
/* Show complete project previews and reserve room for captions. */
.project-carousel .project-image{aspect-ratio:8/5;background:var(--paper);overflow:hidden}
.project-carousel .project-image img{display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:contain;object-position:center;transform:none}
.project-carousel .project-item:hover img{transform:none}
.project-carousel .project-grid{height:clamp(290px,39vw,475px);overflow:visible}
@media(max-width:800px){.project-carousel .project-grid{height:calc(42.2vw + 135px);min-height:290px;max-height:475px}.project-carousel .project-image img{aspect-ratio:auto;object-fit:contain}}
