/*==================== PUBLICATIONS: DECK VIEW ====================*/
.pub-view[hidden] { display: none !important; }
.pub-deck { display: flex; flex-direction: column; align-items: center; }
.pub-deck[hidden] { display: none; }

.pub-deck__desc {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 36rem;
  height: 152px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  padding-inline: var(--space-2);
  text-align: center;
}

.pub-deck__venue {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
}

.pub-deck__award {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: rgb(160, 88, 0);
  background: rgba(250, 137, 0, .12);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.5rem;
}
body.dark-theme .pub-deck__award { color: rgb(255, 185, 80); background: rgba(250, 137, 0, .2); }

.pub-deck__title {
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.4;
  color: var(--heading);
  text-wrap: balance;
}
.pub-deck__title a { color: inherit; }
.pub-deck__title a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.pub-deck__authors { font-size: var(--fs-sm); color: var(--text-muted); }

.pub-deck__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  padding-top: 0.35rem;
}

/* Fan */
.pub-deck__fan {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: -152px;
  overflow-x: clip;
  overflow-y: visible;
  pointer-events: none;   /* only the cards are interactive, so the description above stays clickable */
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.pub-deck__fan:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius-md); }

.pub-deck__card {
  position: absolute;
  left: 50%;
  transform-origin: 50% 50%;
  perspective: 1600px;
  touch-action: pan-y;
  cursor: pointer;
  will-change: transform;
  transition: opacity .35s;
}
.pub-deck__fan.is-grab .pub-deck__card { cursor: grab; }
.pub-deck__fan.is-dragging .pub-deck__card { cursor: grabbing; }
.pub-deck__card.is-flipped { cursor: default; }

.pub-deck__year {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 6px;
  padding-left: 5px;
  border-left: 1px solid var(--text-muted);
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-muted);
}

.pub-deck__inner { position: absolute; inset: 0; transform-style: preserve-3d; }

.pub-deck__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 3px;
  overflow: hidden;
}
.pub-deck__front { background: #fff; }
.pub-deck__back { transform: rotateY(180deg); background: var(--surface); }

.pub-deck__img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: top center;
  pointer-events: none;
}

/* Typeset fallback cover when no thumbnail exists */
.pub-deck__cover {
  width: 100%;
  height: 100%;
  padding: 16% 12% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6em;
  text-align: center;
  line-height: 1.3;
  color: rgb(42, 32, 24);
}
.pub-deck__cover-venue { font-size: .75em; letter-spacing: .08em; text-transform: uppercase; color: rgb(125, 104, 86); }
.pub-deck__cover-title { font-family: var(--font-display); font-weight: 600; font-size: 1.25em; text-wrap: balance; }
.pub-deck__cover-authors { font-size: .8em; font-style: italic; }

/* Back face (abstract) — laid out at enlarged size, scaled down to card size */
.pub-deck__backin {
  transform-origin: 0 0;
  padding: 1.1rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--border);
  cursor: default;
}
.pub-deck__backhead { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.pub-deck__backin .pub-deck__venue { justify-content: flex-start; font-size: .8rem; padding-top: .15rem; }
.pub-deck__backin .pub-deck__title { font-size: var(--fs-base); line-height: 1.35; text-wrap: pretty; }
.pub-deck__backin .pub-deck__authors { font-size: .8rem; font-style: italic; }

.pub-deck__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pub-deck__close:hover { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }

.pub-deck__abstract {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: .35rem;
  padding-right: .25rem;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5rem), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5rem), transparent);
}
.pub-deck__abstract p { font-size: .82rem; line-height: 1.6; text-wrap: pretty; hyphens: auto; padding-bottom: 1.25rem; }

.pub-deck__backfoot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding-top: .6rem;
  border-top: 1px solid var(--border);
}
.pub-deck__spacer { flex: 1; }

/* Pile of filtered-out cards */
.pub-deck__pile {
  position: absolute;
  z-index: 60;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  font-family: var(--font-body);
  color: var(--text-muted);
  transition: opacity .3s;
}
.pub-deck__pile:hover { color: var(--accent); }
.pub-deck__pile span { font-size: .7rem; line-height: 1.2; white-space: nowrap; }
.pub-deck__pile-count { font-weight: 600; letter-spacing: .04em; }
.pub-deck__pile-all { text-decoration: underline; text-underline-offset: 2px; }

/* Position track in the scroll nav (deck only) */
.pub-deck-track { display: none; }
.pub-scroll-nav--deck { align-items: center; }
.pub-scroll-nav--deck .pub-deck-track {
  display: block;
  position: relative;
  width: clamp(80px, 22vw, 160px);
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--border);
}
.pub-deck-track__thumb {
  position: absolute;
  top: -1px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}
.pub-scroll-nav--deck.is-static { display: none !important; }
