/* ============================================================
   publications.css — Publications listing page
   Depends on: global.css, doc.css (breadcrumb, empty state),
               main.css (post-meta, post-tags, post-external-badge,
                         post-lang-select, post-lang-btn)
   ============================================================ */

/* ── Page ──────────────────────────────────────────────────── */
.pub-page {
  min-height: calc(100vh - var(--nav-height));
  background: var(--footer-light, #f7f7f7);
  padding-bottom: 80px;
}

.pub-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 80px 0;
}

/* ── Header ────────────────────────────────────────────────── */
.pub-page-header {
  margin-bottom: 36px;
}

.pub-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-black);
  margin: 0;
}

/* ── Grid — 3 columns ──────────────────────────────────────── */
.pub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

/* ── Card ──────────────────────────────────────────────────── */
.pub-card {
  background: var(--color-white);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* ── Thumbnail ─────────────────────────────────────────────── */
.pub-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: var(--color-blue-pale); /* was #dde8f4 */
  flex-shrink: 0;
}

.pub-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

a.pub-card:hover .pub-card-thumb img {
  transform: scale(1.04);
}

/* ── Body ──────────────────────────────────────────────────── */
.pub-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pub-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-black);
  margin: 0;
}

/* ── Pagination ────────────────────────────────────────────── */
.pub-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding-bottom: 16px;
}

.pub-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-black);
  background: var(--color-white);
  border: 1px solid rgba(0,0,0,0.1);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pub-page-btn:hover {
  background: var(--color-border-light); /* was #f0f0f0 */
  border-color: rgba(0,0,0,0.18);
}

.pub-page-btn.active {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
  pointer-events: none;
}

.pub-page-ellipsis {
  font-size: 0.85rem;
  color: var(--color-gray-500); /* was #bbb — decorative separator */
  padding: 0 4px;
  user-select: none;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .pub-container {
    padding: 40px 40px 0;
  }
}

@media (max-width: 768px) {
  .pub-container {
    padding: 24px 20px 0;
  }

  .pub-page-title {
    font-size: 1.35rem;
  }

  .pub-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .pub-card-title {
    font-size: 0.88rem;
  }
}

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