/* Publications Page Styling */

.publications-container {
  /* Use theme default layout with minimal constraints */
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 1rem 0;
}

/* Tag Filter Section */
.tag-filters {
  margin: 0 0 1rem 0;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  width: 100%;
  box-sizing: border-box;
}

.tag-filters h3 {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: #343a40;
  font-weight: 600;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

.filter-btn {
  padding: 0.3rem 0.7rem;
  border: 1px solid #007bff;
  background: white;
  color: #007bff;
  border-radius: 15px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-transform: capitalize;
}

.filter-btn:hover {
  background: #007bff;
  color: white;
  transform: translateY(-1px);
}

.filter-btn.active {
  background: #007bff;
  color: white;
}

/* Publications Grid */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.publication-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  max-width: 400px;
}

.publication-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-thumbnail {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  max-width: 100%;
  max-height: 100%;
}

.publication-card:hover .card-thumbnail img {
  transform: scale(1.05);
}

.card-content {
  padding: 1rem;
}

.card-title {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  line-height: 1.3;
}

.card-title a {
  color: #212529;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.card-title a:hover {
  color: #007bff;
}

.card-authors {
  margin: 0 0 0.4rem 0;
  font-size: 0.75rem;
  color: #6c757d;
  font-style: italic;
  line-height: 1.3;
}

.card-venue {
  margin: 0 0 0.75rem 0;
  font-size: 0.7rem;
  color: #495057;
  line-height: 1.2;
}

.card-year {
  font-weight: 600;
  color: #007bff;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.tag {
  padding: 0.2rem 0.5rem;
  background: #e9ecef;
  color: #495057;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: lowercase;
}

/* No results message */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
  font-style: italic;
}

.no-publications {
  text-align: center;
  padding: 3rem 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  color: #6c757d;
}

/* Dark mode support */
[data-theme="dark"] .tag-filters {
  background: #2d3748;
  border-color: #4a5568;
}

[data-theme="dark"] .tag-filters h3 {
  color: #e2e8f0;
}

[data-theme="dark"] .filter-btn {
  background: #2d3748;
  color: #63b3ed;
  border-color: #63b3ed;
}

[data-theme="dark"] .filter-btn:hover,
[data-theme="dark"] .filter-btn.active {
  background: #63b3ed;
  color: #1a202c;
}

[data-theme="dark"] .publication-card {
  background: #2d3748;
  border-color: #4a5568;
}

[data-theme="dark"] .card-thumbnail {
  background: #1a202c;
}

[data-theme="dark"] .card-title a {
  color: #e2e8f0;
}

[data-theme="dark"] .card-title a:hover {
  color: #63b3ed;
}

[data-theme="dark"] .card-authors {
  color: #a0aec0;
}

[data-theme="dark"] .card-venue {
  color: #cbd5e0;
}

[data-theme="dark"] .card-year {
  color: #63b3ed;
}

[data-theme="dark"] .tag {
  background: #4a5568;
  color: #e2e8f0;
}

[data-theme="dark"] .no-results,
[data-theme="dark"] .no-publications {
  background: #2d3748;
  color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .publications-container {
    padding: 0.5rem;
  }
  
  .publications-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .tag-filters {
    padding: 1rem;
  }
  
  .filter-buttons {
    gap: 0.3rem;
  }
  
  .filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
  
  .card-content {
    padding: 1rem;
  }
  
  .card-title {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .card-thumbnail {
    height: 150px;
  }
  
  .filter-buttons {
    justify-content: center;
  }
}