/* A glass filter dock, with an indicator that follows the selected button. */
.filterbar {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px;
  margin-bottom: 30px;
  border: 1px solid #ffffff29;
  border-radius: 27px;
  background: radial-gradient(350px circle at var(--pointer-x, 5%) var(--pointer-y, 0%), #ffffff0c, transparent 70%), radial-gradient(ellipse at 5% 0, #6d001a28, transparent 65%), linear-gradient(135deg, #ffffff10, #ffffff03);
  box-shadow: inset 0 1px 0 #ffffff26, inset 0 -1px 0 #ffffff08, 0 18px 50px #0005;
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}
.filterbar::before {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 #ffffff1e;
}
.filter {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 47px;
  padding: 12px 15px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  font-size: 14px;
  color: #c2bdc2;
  transition: background .3s, color .3s, transform .35s var(--ease);
}
.filter:hover { color: #fff; background: #ffffff0d; transform: translateY(-1px); }
.filter[aria-current] {
  color: #fff;
  border-color: #f5dce466;
  background: linear-gradient(150deg, #a5415de0, #6d001adc 55%, #3f0819e8);
  box-shadow: inset 0 1px 2px #ffffff48, inset 0 -2px 3px #20000bcc, 0 5px 24px #6d001a66;
}
.filter-count { min-width: 23px; padding: 3px 5px; border: 1px solid #ffffff15; border-radius: 7px; background: #ffffff07; color: #e1d5db; font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }
.filter[aria-current] .filter-count { background: #ffffff15; border-color: #ffffff26; color: #fff; }

@keyframes filter-activate {
  from { box-shadow: inset 0 1px 3px #ffffff80, 0 4px 34px #9b3d59a3; }
}
@media (prefers-reduced-motion: no-preference) {
  .filter[aria-current] { animation: filter-activate .55s var(--ease); }
}

.work-document { scroll-behavior: auto; }
.work-library { padding-block: 154px 38px; }
.library-heading h1 { font-size: clamp(54px, 7.5vw, 112px); margin: 0; }
.library-count { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.work-more { display: flex; justify-content: center; margin-top: clamp(28px, 4vw, 52px); }
.browse-all { gap: 16px; box-shadow: inset 0 1px 0 #ffffff26, 0 12px 40px #6d001a28; }
.browse-all span { color: var(--accent); font-size: 13px; border-inline-start: 1px solid #ffffff26; padding-inline-start: 16px; }
.empty-collection { grid-column: 1 / -1; padding: clamp(22px, 4vw, 45px); border-radius: 26px; }
.empty-collection h2 { font-size: clamp(26px, 4vw, 44px); margin-bottom: 9px; }
.empty-collection p { color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; width: fit-content; max-width: 100%; margin: 38px auto 0; padding: 7px; border-radius: 21px; }
.page-link { display: grid; place-items: center; min-width: 40px; min-height: 44px; padding-inline: 9px; border: 1px solid transparent; border-radius: 14px; font-size: 14px; color: var(--muted); transition: background .3s, color .3s; }
.page-link:hover { background: #ffffff12; color: #fff; }
.page-link[aria-current] { border-color: #f5dce455; background: #6d001a99; color: #fff; }
.library-footer { margin-top: 65px; border-top: 1px solid var(--line); }

/* Separate the animated surface from the semantic link and reveal animation. */
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: start; perspective: 1400px; }
.works-featured { align-items: stretch; }
.works-featured .work-surface { height: 100%; }
.work { display: block; min-width: 0; padding: 0; border-radius: 28px; }
.work-surface {
  position: relative;
  isolation: isolate;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #ffffff15;
  border-radius: inherit;
  background: linear-gradient(155deg, #ffffff12, #ffffff04 45%, #6d001a10);
  box-shadow: inset 0 1px 0 #ffffff20, inset 0 -1px 0 #ffffff07, 0 20px 60px #0005;
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  transform: perspective(1100px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) translateY(0);
  transition: transform .65s var(--ease), box-shadow .5s, background-color .4s;
}
.work-surface::before {
  content: '';
  position: absolute;
  z-index: 5;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--pointer-x, 15%) var(--pointer-y, 0%), #ffffffe0, transparent 65%), linear-gradient(140deg, #ffffff55, #ffffff08 35%, #6d001a88 72%, #ffffff50);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .7;
  transition: opacity .4s;
}
.work-surface::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--pointer-x, 50%) var(--pointer-y, 0%), #ffffff13, transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s;
}
.work:is(:hover, :focus-visible) .work-surface { background-color: #ffffff05; box-shadow: inset 0 1px 0 #ffffff35, 0 25px 70px #0008, 0 10px 45px #6d001a16; }
.work:is(:hover, :focus-visible) .work-surface::before,
.work:is(:hover, :focus-visible) .work-surface::after { opacity: 1; }
.frame { position: relative; aspect-ratio: 16/9; border: 1px solid #ffffff22; border-radius: 18px; overflow: hidden; background: #050505; box-shadow: 0 1px 0 #ffffff15; }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s var(--ease), filter .8s; }
.work:hover .frame img { transform: scale(1.035); filter: brightness(1.04); }
.work[data-type="stage"] .frame img, .work[data-type="logo"] .frame img { object-fit: contain; }
.work[data-orientation="portrait"] .frame { aspect-ratio: 4/5; }
.work[data-orientation="portrait"] .frame img, .work[data-orientation="square"] .frame img { object-fit: contain; }
.frame .hover-preview {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: contain; pointer-events: none; background: #050505; opacity: 0;
  transition: opacity .24s ease;
}
.frame .hover-preview.is-playing { opacity: 1; }
.frame::after { content: ''; pointer-events: none; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, #0006); }
.duration { position: absolute; left: 15px; bottom: 15px; z-index: 3; padding: 7px 10px; border: 1px solid #ffffff40; border-radius: 10px; background: #17121565; backdrop-filter: blur(18px) saturate(130%); font-size: 12px; color: #fff; box-shadow: inset 0 1px 0 #ffffff20, 0 4px 18px #0003; }
.view { min-width: 46px; height: 46px; padding: 0 16px; border-radius: 50px; border: 1px solid #ffffff66; background: linear-gradient(145deg, #ffffff40, #ffffff10); backdrop-filter: blur(22px) saturate(150%); position: absolute; right: 15px; bottom: 15px; z-index: 4; display: inline-flex; align-items: center; justify-content: center; gap: 0; color: #fff; box-shadow: inset 0 1px 1px #ffffff55, inset 0 -2px 3px #0003, 0 8px 20px #0003; transition: background .4s, gap .4s, transform .4s var(--ease); }
.view-label { max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; font-size: 13px; transition: max-width .45s var(--ease), opacity .3s; }
.work:is(:hover, :focus-visible) .view { background: linear-gradient(145deg, #9b3d59cc, #6d001ab8); gap: 10px; transform: translateY(-2px); }
.work:is(:hover, :focus-visible) .view-label { max-width: 80px; opacity: 1; }
.work-meta { position: relative; z-index: 3; display: grid; gap: 7px; padding: 14px 9px 11px; }
.work .work-title { font-family: inherit; font-size: clamp(18px, 1.55vw, 23px); font-weight: 500; line-height: 1.3; letter-spacing: -.025em; text-transform: none; margin: 0; }
.work-category { color: #c7b0b7; font-size: 13px; line-height: 1.4; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .work:hover .work-surface { transform: perspective(1100px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) translateY(-5px); }
}
@media (prefers-reduced-motion: reduce), (hover: none) { .work-surface { transform: none !important; } }
@media (max-width: 1000px) {
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .work-document { scroll-padding-top: 95px; }
  .work-library { padding-block: 119px 26px; }
  .library-heading { gap: 14px; }
  .filterbar { padding: 9px; gap: 4px; border-radius: 23px; margin-bottom: 20px; }
  .filter { padding: 11px 12px; }
  .works { gap: 20px 15px; }
  .work-surface { padding: 9px; }
  .work-meta { padding: 12px 7px 9px; }
  .library-footer { margin-top: 45px; }
}
@media (max-width: 580px) {
  .works { grid-template-columns: 1fr; }
}

@media (max-width: 760px), (hover: none) and (max-height: 520px) {
  .frame img { object-fit: contain; }
  .work:hover .frame img { transform: none; }
  .work[data-orientation="square"] .frame { aspect-ratio: 1; }
  .work[data-orientation="portrait"] .frame { aspect-ratio: 9 / 16; max-height: min(65svh, 26rem); }
}
