.publications__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px var(--gutter);
  margin-top: var(--section);
}

.cover {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
}

.cover__image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-alt);
}

.cover__image picture,
.cover__image img {
  width: 100%;
  height: 100%;
}

.cover__image img {
  object-fit: cover;
  transition: scale var(--slow) var(--ease);
}

.cover__title {
  margin-top: 16px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast) var(--ease);
}

.cover:hover .cover__image img,
.cover:focus-visible .cover__image img {
  scale: 1.048;
}

.cover:hover .cover__title,
.cover:focus-visible .cover__title {
  border-color: var(--text);
}

html:has(.reader[open]) {
  overflow: hidden;
}

.reader {
  width: min(var(--content), 100% - 2 * var(--pad));
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overscroll-behavior: contain;
}

.reader[open] {
  display: flex;
  flex-direction: column;
}

.reader::backdrop {
  background: var(--bg);
}

.reader__head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  min-height: 60px;
  margin-top: 20px;
}

.reader__head h2 {
  font-weight: 400;
}

.reader__close {
  display: flex;
  align-items: center;
}

.reader__body {
  display: flex;
  flex: 1;
  min-height: 0;
  padding-block: 20px;
}

.reader .carousel {
  --carousel-ratio: auto;
  --carousel-fit: contain;
  flex: 1;
  min-width: 0;
}

.reader .carousel__stage,
.reader .carousel__track {
  flex: 1;
  min-height: 0;
}

.reader .carousel__slide {
  min-height: 0;
}

.reader .carousel__slide picture {
  flex: 1;
  min-height: 0;
}

@media (max-width: 1023px) {
  .publications__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .publications__grid {
    grid-template-columns: 1fr;
  }
}
