/* Photo and Design pages: tiles, genre list, project layout, photo viewer. */

/* Tiles on the Photo and Design index pages */
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  color: var(--white);
  animation: rise-in 0.7s var(--ease) backwards;
}
.tile__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.tile:hover .tile__cover {
  transform: scale(1.05);
}
.more {
  flex: none;
  padding-bottom: 3px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease);
}
.tile:hover .more,
.tile:focus-visible .more,
.next-project:hover .more {
  background-position-x: 0;
  background-size: 100% 1px;
}
.tile:nth-child(2) {
  animation-delay: 0.06s;
}
.tile:nth-child(3) {
  animation-delay: 0.12s;
}
.tile:nth-child(4) {
  animation-delay: 0.18s;
}
.tile:nth-child(5) {
  animation-delay: 0.24s;
}
.tile:nth-child(6) {
  animation-delay: 0.3s;
}
.tile:nth-child(7) {
  animation-delay: 0.36s;
}
.tile:nth-child(8) {
  animation-delay: 0.42s;
}
.tile:nth-child(9) {
  animation-delay: 0.48s;
}
.tile:nth-child(10) {
  animation-delay: 0.54s;
}

/* Photo index: tall genre tiles */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 4px;
  padding-right: 4px;
}
.genre-tile {
  aspect-ratio: 4 / 5;
}
.genre-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 20, 20, 0.35) 0%,
    rgba(20, 20, 20, 0) 30%,
    rgba(20, 20, 20, 0) 55%,
    rgba(20, 20, 20, 0.75) 100%
  );
}
.genre-tile__num {
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 18px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
}
.genre-tile__foot {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.genre-tile__name {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}
@media (max-width: 700px) {
  /* Phones list every genre, two to a row, so they can all be seen with a short scroll. */
  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 16px 0 7px;
  }
  .genre-tile__num {
    top: 10px;
    left: 12px;
  }
  .genre-tile__foot {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .genre-tile__name {
    font-size: 16px;
  }
  .genre-tile .more {
    font-size: 11px;
  }
}

/* Design index: project cards */
.design-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 0 clamp(16px, 4vw, 56px) 28px 7px;
}
.design-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.design-filters button {
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--grey);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.design-filters button:hover {
  color: var(--fg); /* var(--white) vanished in light mode */
  border-color: var(--grey);
}
.design-filters button[aria-pressed='true'] {
  background: var(--white);
  color: var(--charcoal);
  border-color: var(--white);
}
.design-views {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
}
.design-views button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--grey);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.design-views button:last-child {
  border-right: 0;
}
.design-views button:hover,
.design-views button:focus-visible {
  color: var(--fg);
  outline: none;
}
.design-views button[aria-pressed='true'] {
  background: var(--fg);
  color: var(--bg);
}
.project-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 40px 16px;
  padding: 0 clamp(16px, 4vw, 56px) 0 7px;
}
.project-grid[data-view='large'] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 24px;
}
.project-grid[data-view='list'] {
  grid-template-columns: 1fr;
  gap: 24px;
}
.project-grid[data-view='list'] .project-card {
  flex-direction: row;
  align-items: stretch;
  gap: clamp(16px, 2.4vw, 28px);
}
.project-grid[data-view='list'] .project-card__image {
  width: clamp(160px, 24vw, 280px);
  flex: none;
  padding: clamp(18px, 3vw, 28px);
}
.project-grid[data-view='list'] .project-card__info {
  padding: 4px 4px 20px;
}
@media (max-width: 720px) {
  .project-grid[data-view='large'] {
    grid-template-columns: 1fr;
  }
  .project-grid[data-view='list'] .project-card {
    flex-direction: column;
    gap: 14px;
  }
  .project-grid[data-view='list'] .project-card__image {
    width: 100%;
  }
}
.project-row-line {
  position: absolute;
  height: 1px;
  background: var(--line);
  pointer-events: none;
  transform: scaleX(0) scaleY(0.5);
  transform-origin: left center;
  transition: transform 1.05s var(--ease) 0.18s;
}
.project-row-line.is-line-revealed {
  transform: scaleX(1) scaleY(0.5);
}
@media (prefers-reduced-motion: reduce) {
  .project-row-line {
    transform: scaleX(1) scaleY(0.5);
    transition: none;
  }
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: visible;
}
.project-card__image {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 688 / 540;
  background: #000;
  padding: clamp(28px, 10%, 48px);
}
.project-card__image img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  display: block;
}
.project-card__image--bleed {
  padding: 0;
}
.project-card__image--bleed img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}
.project-card__info {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 0 4px 16px;
}
.project-card__num {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--mid);
  padding-top: 4px;
}
.project-card__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.project-card__info {
  color: var(--fg); /* the card's words sit on the page, not on the picture, so follow light/dark mode */
}
.project-card__name {
  display: inline;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease);
}
.project-card:hover .project-card__name,
.project-card:focus-visible .project-card__name {
  background-position-x: 0;
  background-size: 100% 1px;
}
.project-card__site {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}
.project-card__site:hover {
  color: var(--fg);
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-card__tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  border: 1px solid var(--line);
  padding: 3px 8px;
}
.project-card__summary {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--grey);
  margin: 2px 0 0;
}
.project-card.has-more {
  cursor: pointer;
}
.project-card.has-more:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
.project-card__more {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.78;
  transition: opacity 0.25s;
}
.project-card.has-more:hover .project-card__more {
  opacity: 1;
}

.design-modal[hidden] {
  display: none;
}
.design-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 36px);
  background: rgba(12, 12, 12, 0.9);
  backdrop-filter: blur(8px);
}
.design-modal__card {
  width: min(960px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
}
.design-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.design-modal__title {
  margin: 0;
  font-family: var(--heading);
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 400;
  color: var(--fg);
}
.design-modal__meta {
  margin: 4px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}
.design-modal__close {
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.design-modal__close:hover {
  background: var(--fg);
  color: var(--bg);
}
.design-modal__stage {
  flex: 1 1 auto;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #141414;
  overflow: hidden;
}
.design-modal__img {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.design-modal__video {
  max-width: 100%;
  max-height: 60vh;
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}
.design-modal__img[hidden],
.design-modal__video[hidden] {
  display: none;
}
.design-modal__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.design-modal__summary {
  margin: 0;
  flex: 1 1 320px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--grey);
}
.design-modal__controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.design-modal__controls[hidden] {
  display: none;
}
.design-modal__nav {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.design-modal__nav:hover {
  background: var(--fg);
  color: var(--bg);
}
.design-modal__count {
  min-width: 54px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}
.load-more {
  display: none;
  padding: 32px 16px 0 7px;
}
.load-more .btn {
  width: 100%;
  min-height: 52px;
}
@media (max-width: 700px) {
  /* Phones show 4 projects until "Load more" is pressed. */
  .project-grid:not(.show-all) .project-card:nth-child(n + 5) {
    display: none;
  }
  .project-grid:not(.show-all) + .load-more {
    display: flex;
  }
}

/* Genre page: joined list of genres with a liquid highlight block that flows across items */
.genre-list-wrap {
  padding: 0 clamp(16px, 4vw, 56px) 24px 7px;
}
.genre-list {
  overflow-x: auto;
  scrollbar-width: none;
}
.genre-list__row {
  position: relative;
  display: inline-flex;
  min-width: 100%;
  border-bottom: 1px solid var(--fg);
}
.genre-list__block {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  opacity: 0;
  background: var(--fg);
  pointer-events: none;
  will-change: transform, width;
  transition: opacity 0.25s ease;
}
.genre-list a {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.genre-list:not(.is-ready) a[aria-current='page'] {
  background: var(--fg);
  color: var(--bg);
}
.genre-list a.is-lit {
  color: var(--bg);
}
@media (max-width: 700px) {
  .genre-list {
    display: none;
  }
}

.prev-next {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-right: 12px;
}
@media (max-width: 700px) {
  .prev-next a {
    white-space: normal;
  }
}

/* Genre page: masonry of photos */
.photo-grid {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0 clamp(8px, 1vw, 10px);
}
/* One column of the photo wall (public/js/pages/photo-genre.js shares the photos out between them). */
.photo-grid__col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.photo-grid button {
  display: flex;
  align-items: flex-end;
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: zoom-in;
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  animation: rise-in-blur 0.8s var(--ease) backwards;
}
/* Hover: the other photos dim (a dark layer on top that fades in); the one under the pointer stays
   bright. Dimming waits for the pointer to be on a photo (:has), so crossing the gap between two
   photos does not flash the whole grid.
   Why no zoom: the photos here are large (1440px wide). Scaling one on hover, or giving every photo
   its own GPU layer, made Chrome throw away and redraw them, so tiles went blank and then came back
   blurry. A plain fading layer is cheap to draw and never does that. */
.photo-grid button img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-grid button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.photo-grid:has(button:hover) button:not(:hover)::after {
  opacity: 0.5;
}
@media (prefers-reduced-motion: reduce) {
  .photo-grid button::after {
    transition: none;
  }
}

/* Genre page: hairline pagination */
.photo-pagination[hidden] {
  display: none;
}
.photo-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 32px clamp(8px, 1vw, 10px) 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.photo-pagination__info {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
}
.photo-pagination__controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  border: 1px solid var(--line);
}
.photo-pagination__btn,
.photo-pagination__gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.photo-pagination__controls > :last-child {
  border-right: 0;
}
.photo-pagination__btn {
  cursor: pointer;
  transition:
    background-color 0.35s var(--ease),
    color 0.35s var(--ease);
}
.photo-pagination__btn:hover:not(:disabled),
.photo-pagination__btn:focus-visible:not(:disabled) {
  background: var(--fg);
  color: var(--bg);
  outline: none;
}
.photo-pagination__btn[aria-current='page'] {
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
}
.photo-pagination__btn:disabled {
  color: var(--mid);
  opacity: 0.45;
  cursor: default;
}
.photo-pagination__gap {
  color: var(--mid);
  min-width: 36px;
  padding: 0 8px;
}
@media (max-width: 560px) {
  .photo-pagination {
    justify-content: center;
  }
  .photo-pagination__info {
    width: 100%;
    text-align: center;
  }
}

/* Design project page */
.project-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-right: 4px;
}
.project-hero__logo {
  flex: 2 1 520px;
  position: relative;
  aspect-ratio: 688 / 540;
  max-height: 76vh;
  overflow: hidden;
}
.project-hero__logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brief {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 3vw, 40px) clamp(16px, 2.4vw, 32px);
  background: var(--panel);
}
.brief__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
}
.brief__text {
  font-size: 18px;
  line-height: 1.6;
}
.brief__roles {
  border-top: 1px solid var(--line);
}
.brief__roles div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.brief__roles span:first-child {
  color: var(--mid);
}
.brief [data-ul] {
  align-self: flex-start;
}
.brief .push-down {
  margin-top: auto;
}
.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.role-tags span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.prev-next--box {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-right: 0;
  border: 1px solid var(--line);
}
.prev-next--box a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  border-right: 1px solid var(--line);
}
.prev-next--box a:last-child {
  border-right: 0;
}
.project-images[hidden] {
  display: none;
}
.project-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 320px));
  gap: 12px;
  padding: 16px clamp(16px, 4vw, 56px) 0 7px;
}
.project-images > * {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  font-size: 14px;
  font-weight: 400;
  background: var(--panel);
  position: relative;
  overflow: hidden;
}
.project-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.project-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  margin: 16px 4px 0 0;
  border: 1px solid var(--line);
  background: var(--bg);
}
.project-pager__item,
.project-pager__all {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: clamp(16px, 2.4vw, 28px) clamp(16px, 2.4vw, 32px);
  min-width: 0;
  transition: background-color 0.25s var(--ease);
}
.project-pager__item--next {
  text-align: right;
  align-items: flex-end;
  border-left: 1px solid var(--line);
}
.project-pager__all {
  align-items: center;
  border-left: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  white-space: nowrap;
}
.project-pager__item:hover,
.project-pager__all:hover {
  background: var(--panel);
}
.project-pager__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
}
.project-pager__name {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--fg);
}
@media (max-width: 700px) {
  .project-pager {
    grid-template-columns: 1fr 1fr;
  }
  .project-pager__all {
    grid-column: 1 / -1;
    order: -1;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
  }
}

/* Full-screen photo viewer */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.92);
}
.viewer[hidden] {
  display: none;
}
.viewer__photo {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  font-size: 14px;
  font-weight: 500;
  transition:
    height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.viewer__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Magnifier: the circle follows the pointer and replaces the cursor over the photo. */
.viewer__photo.is-zoomable {
  cursor: none;
  touch-action: none;
}
.viewer__photo img {
  transition: none;
}
.viewer__stage {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 100%;
}
/* Camera settings: a narrow column down the right side of the photo that expands in and pushes the image left. */
.viewer__exif {
  flex: none;
  width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--white);
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
  opacity: 0;
  transition:
    width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    margin-left 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}
.viewer__exif.is-open {
  width: 150px;
  margin-left: 18px;
  opacity: 1;
  pointer-events: auto; /* the credit names are links */
}
/* The people behind the photo, under the camera settings, set apart by a thin line. */
.viewer__exif-credits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
/* Shared underline animation (data-ul), but sized for this small panel and in plain lower case, as
   Instagram names are. */
.viewer__exif-credits a[data-ul] {
  min-height: 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--white);
  padding-bottom: 2px;
  background-position: 100% 100%;
}
.viewer__exif-credits a[data-ul]:hover,
.viewer__exif-credits a[data-ul]:focus-visible {
  background-position-x: 0;
}
.viewer__exif-inner {
  width: 150px;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(16px);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.viewer__exif.is-open .viewer__exif-inner {
  transform: translateX(0);
}
.viewer__exif dt {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.viewer__exif dd {
  margin: 1px 0 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .viewer__exif,
  .viewer__exif.is-open {
    position: absolute;
    top: 8px;
    right: 8px;
    width: auto;
    max-width: 45%;
    margin-left: 0;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translateX(14px);
    transition:
      opacity 0.28s ease,
      transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .viewer__exif.is-open {
    transform: translateX(0);
  }
  .viewer__exif-inner {
    width: auto;
    padding: 0;
    gap: 6px;
    transform: none;
  }
}
.viewer__tools {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  gap: 8px;
  transition: opacity 0.25s;
}
.viewer__tools button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
  color: var(--white);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.viewer__tools button svg {
  width: 16px;
  height: 16px;
}
.viewer__tools button:hover {
  background: rgba(0, 0, 0, 0.55);
}
.viewer__tools button[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.6);
  color: var(--charcoal);
  border-color: transparent;
}
.viewer__tools button[hidden] {
  display: none;
}
.viewer__tools button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}
/* On a mouse the tools show only while the pointer is over the photo (or a tool has keyboard focus). */
@media (hover: hover) {
  .viewer__tools {
    opacity: 0;
  }
  .viewer__stage:hover .viewer__tools,
  .viewer__tools:has(:focus-visible) {
    opacity: 1;
  }
}
.viewer__lens {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  pointer-events: none;
  background-repeat: no-repeat;
  background-color: #000;
  border: 2px solid var(--white);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 8px 28px rgba(0, 0, 0, 0.55);
}
.viewer__lens[hidden] {
  display: none;
}
@media (hover: none) {
  .viewer__photo.is-zoomable {
    cursor: default;
  }
}
.viewer__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 400;
}
.viewer__controls button {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--white);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.viewer__controls .viewer__close {
  background: var(--white);
  color: var(--charcoal);
}
.viewer__position {
  min-width: 150px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
}
