/* portfolio.css */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.filter-btn { padding: 0.55rem 1.1rem; border-radius: 100px; font-weight: 600; font-size: 0.92rem; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; }
.filter-btn:hover { background: color-mix(in srgb, var(--sage) 24%, var(--paper)); }
.filter-btn.is-active { background: var(--ink); color: var(--paper); box-shadow: none; }

.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.8rem, 1.6vw, 1.3rem); }
.work-item { transition: opacity 0.4s ease; }
.work-item .video-frame { aspect-ratio: 3/4; transition: transform 0.6s var(--ease-out); }
.work-item:hover .video-frame { transform: scale(1.015); }
.work-item .video-frame video, .work-item .video-frame img { transition: transform 0.8s var(--ease-out); }
.work-item:hover .video-frame video { transform: scale(1.06); }
.work-item.is-hidden { display: none; }
@media (max-width: 1000px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }

/* Before / after */
.ba { position: relative; width: 100%; max-width: 920px; margin-inline: auto; aspect-ratio: 16/10; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 60px -28px rgba(7,30,34,0.6); user-select: none; touch-action: pan-y; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; width: 50%; overflow: hidden; border-right: 2px solid var(--paper); }
.ba-before .ba-img { width: auto; min-width: 100%; }
.ba-tag { position: absolute; bottom: 1rem; padding: 0.35rem 0.8rem; border-radius: 100px; font-size: 0.78rem; font-weight: 600; background: color-mix(in srgb, var(--ink) 70%, transparent); color: var(--paper); backdrop-filter: blur(4px); }
.ba-tag-l { left: 1rem; } .ba-tag-r { right: 1rem; }
.ba-handle { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--paper); transform: translateX(-1px); pointer-events: none; }
.ba-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,0.3); }
.ba-handle span::before, .ba-handle span::after { content: ""; position: absolute; width: 0; height: 0; border-block: 5px solid transparent; }
.ba-handle span::before { border-right: 7px solid var(--ink); left: 9px; }
.ba-handle span::after { border-left: 7px solid var(--ink); right: 9px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
