#work, .project-carousel {
  --gallery-ink: #251d29;
  --gallery-plum: #412239;
  --gallery-ivory: #f8f5ec;
  --gallery-orange: #f49a58;
  --gallery-line: #cbc1b8;
}
#filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .48rem;
  margin: 0 0 clamp(24px, 2.5vw, 45px);
}
#filters button {
  min-height: 2.55rem;
  padding: .53rem 1.05rem;
  border: 1px solid var(--gallery-line);
  border-radius: 2rem;
  color: var(--gallery-ink);
  background: transparent;
  font: 550 .83rem/1.1 var(--sans,Arial,sans-serif);
}
#filters button:hover {border-color: var(--gallery-plum)}
#filters button[aria-pressed=true] {color: var(--gallery-ivory);background: var(--gallery-plum);border-color: var(--gallery-plum)}
#gallery {
  --wall-gap: clamp(15px, 1.85vw, 32px);
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  grid-auto-rows: 4px;
  grid-auto-flow: row dense;
  column-gap: var(--wall-gap);
  row-gap: 0;
  align-items: start;
}
.wall-tile {min-width:0;margin:0}
.wall-preview, .project-screen {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: transparent;
}
.wall-preview {color:var(--gallery-plum);overflow:hidden;border-radius: 4px}
.wall-preview img {display:block;width:100%;height:auto}
.preview-icon {
  position:absolute;bottom:12px;right:12px;display:grid;place-items:center;
  width:37px;height:37px;border-radius:50%;color:var(--gallery-ink);background:var(--gallery-orange);
  font: 500 1rem/1 var(--sans,Arial,sans-serif);opacity:0;transform:translateY(4px);
  transition:opacity .2s ease,transform .2s ease;
}
.wall-preview:hover .preview-icon,.wall-preview:focus-visible .preview-icon {opacity:1;transform:none}
.wall-caption {
  padding: .76rem .08rem .55rem .08rem;
  color: var(--gallery-ink);
}
.wall-category {display:block;margin-bottom:.35rem;color:#6d5966;font:650 .62rem/1.35 var(--sans,Arial,sans-serif);text-transform:uppercase;letter-spacing:.095em}
.wall-caption h3 {margin:0;color:inherit;font:550 clamp(1.02rem,1.33vw,1.45rem)/1.15 var(--sans,Arial,sans-serif);letter-spacing:-.04em}
.wall-controls {display:flex;justify-content:center;padding:clamp(20px,3vw,44px) 0 5px}
.wall-more {
  display:inline-flex;align-items:center;gap:1.25rem;
  border:0;border-radius:3rem;background:var(--gallery-plum);color:var(--gallery-ivory);
  padding:.86rem 1.05rem .86rem 1.4rem;font:600 .88rem/1 var(--sans,Arial,sans-serif);
}
.wall-more::after {content:'+';display:grid;place-items:center;border-radius:50%;width:1.55rem;height:1.55rem;background:var(--gallery-orange);color:var(--gallery-ink);font-size:1.05rem}
.wall-more[aria-expanded=true]::after {content:'−'}
.wall-more:hover {background:var(--gallery-ink)}
@media(prefers-reduced-motion:no-preference) {
  .wall-tile.tile-entered>button,.wall-tile.tile-entered>figcaption {animation:wall-enter .45s ease-out both}
  @keyframes wall-enter {from{opacity:.22;transform:translateY(9px)}to{opacity:1;transform:none}}
}
.project-carousel {width:100%;margin:clamp(15px,2vw,30px) 0 0;color:var(--gallery-ink)}
.project-top,.project-index,.project-controls,.project-meta {display:flex;align-items:center}
.project-top {justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:clamp(15px,2.1vw,31px)}
.project-index {gap:clamp(12px,2.4vw,38px);flex-wrap:wrap}
.project-index button {
  position:relative;min-height:40px;color:#735e6c;background:none;border:0;
  padding:.4rem 0;font:550 clamp(.78rem,1.08vw,.98rem)/1.2 var(--sans,Arial,sans-serif);
}
.project-index button::after {content:'';position:absolute;left:0;right:100%;bottom:0;height:2px;background:var(--gallery-plum);transition:right .2s ease}
.project-index button:hover,.project-index button[aria-pressed=true] {color:var(--gallery-plum)}
.project-index button[aria-pressed=true]::after,.project-index button:hover::after {right:0}
.project-controls {gap:.68rem}
.project-controls button {
  display:grid;place-items:center;width:2.55rem;height:2.55rem;border:1px solid var(--gallery-line);
  border-radius:50%;background:transparent;color:var(--gallery-ink);font-size:1.1rem;line-height:1;
}
.project-controls button:disabled {opacity:.36;cursor:default}
.project-controls button:not(:disabled):hover {background:var(--gallery-plum);border-color:var(--gallery-plum);color:var(--gallery-ivory)}
.project-position {white-space:nowrap;font:600 .71rem/1 var(--sans,Arial,sans-serif);font-variant-numeric:tabular-nums}
.project-track {
  display:flex;position:relative;gap:18px;overflow-x:auto;
  overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;
}
.project-track::-webkit-scrollbar {display:none}
.project-slide {min-width:0;flex:0 0 100%;scroll-snap-align:start;margin:0}
.project-pair {
  --stage:#e9c9c6;
  display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);
  align-items:center;gap:clamp(10px,2vw,32px);
  padding:clamp(20px,4vw,67px);
  min-height:clamp(250px,34vw,570px);
  background:var(--stage);border-radius:4px;
}
[data-project="shoegr"] .project-pair {--stage:#423544}
[data-project="venture x"] .project-pair {--stage:#c7d5ca}
[data-project="prepclinic"] .project-pair {--stage:#e7c8b4}
[data-project="domov’s casa vida"] .project-pair {--stage:#d3b79d}
[data-project="zeoveda"] .project-pair {--stage:#c9b5bf}
.project-screen {
  padding:clamp(3px,.45vw,7px);background:#fffaf5;
  box-shadow:0 9px 24px -13px #28152f70;border-radius:3px;
}
.project-screen:first-child {align-self:start}
.project-screen:nth-child(2) {align-self:end}
.project-screen img {display:block;width:100%;height:auto}
.project-meta {
  justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;
  padding:clamp(13px,1.65vw,23px) 0;
}
.project-meta h3 {margin:0;font:600 clamp(1.3rem,2.65vw,2.8rem)/1.12 var(--sans,Arial,sans-serif);letter-spacing:-.06em}
.project-meta a {padding:.18rem 0;color:var(--gallery-plum);font:600 .87rem/1.3 var(--sans,Arial,sans-serif);text-decoration:underline;text-underline-offset:.28em}
.project-meta a:hover {text-decoration-thickness:2px}
@media(max-width:930px) {#gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px) {
  #gallery{grid-template-columns:minmax(0,1fr);--wall-gap:17px}
  .wall-caption{padding-top:.6rem}
  .wall-caption h3{font-size:1.16rem}
  #filters{gap:.4rem}
  #filters button{padding:.52rem .82rem}
  .project-index{gap:14px}
  .project-top{row-gap:6px}
  .project-controls{gap:.38rem}
  .project-controls button{width:2.25rem;height:2.25rem}
  .project-pair {grid-template-columns:1fr;gap:8px;padding:14px 5%}
  .project-screen {width:81%}
  .project-screen:nth-child(2) {justify-self:end}
  .project-meta {gap:.6rem 1rem}
}
