 /* 作品集特定样式 */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.section-title {
  margin-bottom: 0;
}

.compact-search {
  position: relative;
  width: 250px;
}

.compact-search input {
  width: 100%;
  padding: 8px 15px 8px 35px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s;
  background-color: #f8f9fa;
}

.compact-search input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
  background-color: white;
}

.compact-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 0.9rem;
}

/* 作品集封面 */
.portfolio-cover {
  height: 160px;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .cover-img {
  transform: scale(1.05);
}

.gradient-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  transition: transform 0.5s ease;
}

.article-card:hover .gradient-cover {
  transform: scale(1.05);
}

/* 作品集卡片 */
.article-card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
}

.card-content {
  padding: 1.25rem;
}

.portfolio-stats {
  margin-bottom: 10px;
}

.article-count {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  color: #6c757d;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 3px 8px;
  border-radius: 12px;
}

.article-count i {
  margin-right: 4px;
  font-size: 0.8rem;
}

.portfolio-description {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 卡片动画 */
.article-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.article-card.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .portfolio-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title {
    margin-bottom: 1rem;
  }

  .compact-search {
    width: 100%;
  }
}

/* 添加卡片点击动画 */
@keyframes cardClick {
  0% { transform: scale(1); }
  50% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.card-clicked {
  animation: cardClick 0.3s ease;
}

/* 确保整个卡片可点击 */
.portfolio-item {
  cursor: pointer;
  position: relative;
}

/* 确保卡片内的链接不影响整体点击 */
.portfolio-item * {
  pointer-events: none;
}

/* 但允许链接本身可点击 */
.portfolio-item a {
  pointer-events: auto;
}