/* Modern publication cards grid */
.publication-section {
  padding: 40px 0;
  background: #f6f7fb;
}

.publication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  padding: 0 10px;
}

.publication-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.07);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 420px;
  /* consistent height for all cards */
}

.publication-card:hover {
  box-shadow: 0 14px 32px rgba(128,0,0,0.11);
  transform: translateY(-6px) scale(1.025);
}

.publication-img {
  width: 100%;
  height: 220px;
  max-height: 220px;
  object-fit: contain;
  cursor: pointer;
  transition: filter 0.2s;
  border-bottom: 1px solid #f2f2f2;
  background: #f9f9f9;
}
.publication-card:hover .publication-img {
  filter: brightness(0.95) blur(1px);
}

.publication-body {
  padding: 22px 22px 16px 22px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.publication-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #800000;
  margin-bottom: 8px;
}
.publication-author {
  color: #555;
  font-size: 0.96rem;
  margin-bottom: 2px;
}
.publication-year {
  color: #aaa;
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.publication-footer {
  padding: 12px 22px;
  background: #fafbfc;
  border-top: 1px solid #f2f2f2;
  font-size: 0.93rem;
  color: #666;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Popup (modal) styles */
.publication-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(20,20,30,0.85);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}
.publication-modal.active {
  display: flex;
}
.publication-modal-content {
  background: #fff;
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  max-width: 420px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  animation: fadeInUp 0.24s;
}
.publication-modal-img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 16px 16px 0 0;
}
.publication-modal-close {
  position: absolute;
  top: 10px;
  right: 16px;
  background: #800000;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.publication-modal-close:hover {
  background: #a00000;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px);} to { opacity: 1; transform: none;} }
