.portrait-stage { min-width: 0; perspective: 1000px; }
.hero-layout .portrait-stage #portrait { margin-inline: auto; transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); }
.portrait-hint { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: 1rem 0 0; color: var(--muted); font-size: .875rem; }
.portrait-indicator { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.portrait-stage:has([aria-pressed="true"]) .portrait-indicator { background: #b32642; }
.gallery-hint { margin: .9rem 0 0; font-size: .875rem; color: var(--muted); }
.gallery-controls { display: flex; align-items: center; gap: .7rem; }
.gallery-count { font-size: .875rem; font-variant-numeric: tabular-nums; min-width: 4.3rem; }
.gallery-arrow { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); font: inherit; font-size: 1.4rem; cursor: pointer; }
.gallery-arrow:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.gallery-arrow:disabled { opacity: .3; cursor: default; }
#work .section-heading { align-items: center; }
#work .work-gallery { display: flex; gap: clamp(1.25rem, 3vw, 3rem); overflow-x: auto; padding: 1rem .25rem 2rem; scroll-snap-type: x mandatory; scroll-padding-inline: .25rem; scrollbar-width: thin; scrollbar-color: var(--ink) var(--line); overscroll-behavior-x: contain; cursor: grab; }
.work-gallery:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
#work .work-gallery .project { flex: 0 0 67%; scroll-snap-align: start; }
.work-gallery .project-image { aspect-ratio: 4 / 3; border-radius: 20px; }
.work-gallery .project:hover .project-image, .work-gallery .project:focus-visible .project-image { border-radius: 20px; }
.work-gallery .project img { transform: scale(1.035) translate(var(--image-x, 0px), var(--image-y, 0px)); transition: transform .35s ease-out; user-select: none; -webkit-user-drag: none; }
.work-gallery .project:hover img { transform: scale(1.065) translate(var(--image-x, 0px), var(--image-y, 0px)); }
.work-gallery[data-dragging="true"] { cursor: grabbing; scroll-snap-type: none !important; user-select: none; }
.work-gallery[data-dragging="true"] a { cursor: grabbing; }
@media (max-width: 800px) { .portrait-stage { width: min(100%, 420px); justify-self: center; } #work .work-gallery .project { flex-basis: 85%; } }
@media (max-width: 480px) { #work .section-heading { align-items: flex-start; flex-direction: column; gap: 1.2rem; } #work .work-gallery .project { flex-basis: 94%; } .work-gallery .project-image { aspect-ratio: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-layout .portrait-stage #portrait { transform: none; } .work-gallery .project img, .work-gallery .project:hover img { transform: none; transition: none; } }
