.pub-section { padding-top: 8px; }

.pub-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.pub-search { flex: 1 1 340px; max-width: 440px; }

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  align-items: start;
  gap: 20px;
}

.pub-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  align-self: start;
  gap: 18px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--cream3);
  border-radius: var(--r-lg);
  padding: 18px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(13,27,42,0.06);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.pub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(26,42,58,0.16);
  border-color: rgba(3,70,148,0.25);
}

.pub-card-cover {
  position: relative;
  display: block;
  flex: 0 0 84px;
  width: 84px;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--cream2);
  box-shadow:
    0 2px 4px rgba(13,27,42,0.12),
    0 8px 18px rgba(13,27,42,0.16);
  transition: box-shadow 0.3s ease;
}

.pub-card:hover .pub-card-cover {
  box-shadow:
    0 4px 8px rgba(13,27,42,0.16),
    0 14px 28px rgba(26,42,58,0.26);
}

.pub-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.pub-card:hover .pub-card-cover img { transform: scale(1.06); }

.pub-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--mid);
}

.pub-card-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(240,230,210,0.35) 0%, rgba(240,230,210,0) 30%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.pub-card:hover .pub-card-shine { opacity: 1; }

.pub-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.pub-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  
}

.pub-card-author {
  font-size: 14px;
  color: var(--blue);
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-card-excerpt {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mid);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-card-year {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--cream2);
  display: inline-block;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  margin-top: 6px;
  align-self: flex-start;
}


.pub-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.pub-modal.active { visibility: visible; opacity: 1; }

.pub-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,27,42,0.74);
}

.pub-modal-panel {
  position: relative;
  display: flex;
  gap: 36px;
  max-width: 740px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--cream);
  border-radius: var(--r-lg);
  padding: 40px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pub-modal.active .pub-modal-panel { transform: translateY(0) scale(1); }

.pub-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: none;
  border-radius: 50%;
  color: var(--dark);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: background 0.15s, color 0.15s;
}

.pub-modal-close:hover { background: var(--blue); color: var(--ivory); }

.pub-modal-cover {
  flex: 0 0 190px;
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--cream2);
  border: 1px solid rgba(13,27,42,0.08);
  box-shadow: 0 16px 36px rgba(13,27,42,0.22);
  padding: 6px;
  cursor: zoom-in;
  appearance: none;
  font: inherit;
  transition: box-shadow 0.25s ease;
}

.pub-modal-cover:hover {
  box-shadow: 0 20px 42px rgba(13,27,42,0.3);
}

.pub-modal-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: var(--r-md);
  display: block;
}

.pub-modal-cover-zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,27,42,0.72);
  color: var(--ivory);
  border-radius: 50%;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.pub-modal-cover:hover .pub-modal-cover-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.pub-modal-cover-placeholder {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  color: var(--mid);
}

.pub-modal-body { flex: 1 1 auto; min-width: 0; }

.pub-modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.3;
  margin: 0 0 6px;
}

.pub-modal-author {
  font-size: 13.5px;
  color: var(--mid);
  margin: 0 0 18px;
}

.pub-modal-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  background: rgba(3,70,148,0.04);
  border-radius: var(--r-md);
}

.pub-modal-meta-item { display: flex; flex-direction: column; gap: 2px; }
.pub-modal-meta-item span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mid); }
.pub-modal-meta-item strong { font-size: 13px; color: var(--dark); }

.pub-modal-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--dark);
  margin: 0 0 24px;
  max-height: 160px;
  overflow-y: auto;
}

.pub-modal-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ivory);
  background: var(--blue);
  text-decoration: none;
  padding: 13px 26px;
  border-radius: var(--r-md);
  box-shadow: 0 10px 24px rgba(26,42,58,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.pub-modal-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(26,42,58,0.4); }

.pub-modal-cta--opac {
  background: linear-gradient(135deg, #6b6146 0%, #4a4230 100%);
  box-shadow: 0 10px 24px rgba(74,66,48,0.3);
}

.pub-modal-cta--opac:hover { box-shadow: 0 14px 30px rgba(74,66,48,0.4); }

@media (max-width: 640px) {
  .pub-grid { grid-template-columns: 1fr; gap: 14px; }
  .pub-card { padding: 12px; gap: 12px; }
  .pub-card-cover { flex: 0 0 68px; width: 68px; }
  .pub-card-title { font-size: 14px; }
  .pub-card:hover { transform: translateY(-3px); }
  .pub-modal-panel { flex-direction: column; padding: 28px 24px; max-height: 90vh; }
  .pub-modal-cover { flex: 0 0 auto; width: 130px; margin: 0 auto; }
  .pub-modal-title { font-size: 20px; }
}

