/* 
 * 文章归档页面 - 现代杂志编辑风格
 * 设计理念：深色学术风格 + 时间轴视觉 + 流畅动效
 */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;600;700&family=Noto+Serif+SC:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

/* 归档页面容器 */
.archive-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
  background: linear-gradient(135deg, #1a1d29 0%, #2d3142 100%);
  min-height: 100vh;
  position: relative;
}

/* 页面标题 */
.archive-header {
  text-align: center;
  margin-bottom: 80px;
  animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.archive-header h1 {
  font-family: 'Crimson Pro', 'Noto Serif SC', serif;
  font-size: 4em;
  font-weight: 700;
  color: #f59e0b;
  margin: 0 0 20px 0;
  text-shadow: 2px 2px 12px rgba(245, 158, 11, 0.4);
  letter-spacing: 3px;
}

.archive-header p {
  font-family: 'Inter', sans-serif;
  font-size: 1.2em;
  color: #94a3b8;
  margin: 0;
}

/* 年份分组容器 */
.year-group {
  margin-bottom: 80px;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.year-group:nth-child(1) { animation-delay: 0.1s; }
.year-group:nth-child(2) { animation-delay: 0.2s; }
.year-group:nth-child(3) { animation-delay: 0.3s; }
.year-group:nth-child(n+4) { animation-delay: 0.4s; }

/* 年份标题 */
.year-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #2d4263 0%, #1f2937 100%);
  margin: 0 -40px 40px -40px;
  padding: 20px 40px;
  border-left: 6px solid #f59e0b;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.year-header:hover {
  border-left-width: 10px;
  box-shadow: 0 6px 30px rgba(245, 158, 11, 0.3);
}

.year-header h2 {
  margin: 0;
  padding: 0;
  font-family: 'Crimson Pro', 'Noto Serif SC', serif;
  font-size: 3.5em;
  font-weight: 700;
  color: #f59e0b;
  text-shadow: 2px 2px 8px rgba(245, 158, 11, 0.3);
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
}

.year-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b 0%, transparent 100%);
  border-radius: 2px;
}

/* 文章列表容器 */
.posts-timeline {
  position: relative;
  padding-left: 60px;
}

/* 时间轴线 */
.posts-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #f59e0b 0%, #ec4899 50%, #8b5cf6 100%);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* 文章项 */
.post-item {
  position: relative;
  margin-bottom: 24px;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.post-item:nth-child(1) { animation-delay: 0.05s; }
.post-item:nth-child(2) { animation-delay: 0.1s; }
.post-item:nth-child(3) { animation-delay: 0.15s; }
.post-item:nth-child(4) { animation-delay: 0.2s; }
.post-item:nth-child(5) { animation-delay: 0.25s; }
.post-item:nth-child(n+6) { animation-delay: 0.3s; }

/* 时间轴节点 */
.post-item::before {
  content: '';
  position: absolute;
  left: -48px;
  top: 32px;
  width: 14px;
  height: 14px;
  background: #f59e0b;
  border: 3px solid #1a1d29;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
  transition: all 0.3s ease;
  z-index: 10;
}

.post-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateX(8px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(245, 158, 11, 0.1);
}

.post-item:hover::before {
  background: #fbbf24;
  transform: scale(1.3);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.3);
}

/* 日期样式 */
.post-date {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.9em;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  padding: 6px 14px;
  border-radius: 6px;
  margin-right: 16px;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.post-item:hover .post-date {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

/* 箭头符号 */
.post-item::after {
  content: '→';
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5em;
  color: #f59e0b;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-item:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(4px);
}

/* 文章标题链接 */
.post-item a {
  font-family: 'Noto Serif SC', 'Crimson Pro', serif;
  font-size: 1.15em;
  font-weight: 600;
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  line-height: 1.6;
  padding-right: 40px;
}

.post-item a:hover {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

/* 分类标签 */
.post-category {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.85em;
  color: #ec4899;
  background: rgba(236, 72, 153, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
  margin-left: 10px;
  border: 1px solid rgba(236, 72, 153, 0.2);
  transition: all 0.3s ease;
}

.post-item:hover .post-category {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.4);
}

/* 动画定义 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .archive-container {
    padding: 40px 20px;
  }

  .archive-header h1 {
    font-size: 2.5em;
  }

  .year-header {
    margin: 0 -20px 30px -20px;
    padding: 16px 20px;
  }

  .year-header h2 {
    font-size: 2.5em;
  }

  .posts-timeline {
    padding-left: 40px;
  }

  .posts-timeline::before {
    left: 12px;
  }

  .post-item {
    padding: 18px 20px;
    margin-bottom: 18px;
  }

  .post-item::before {
    left: -36px;
    width: 12px;
    height: 12px;
  }

  .post-date {
    display: block;
    margin-bottom: 10px;
    margin-right: 0;
  }

  .post-item a {
    font-size: 1.05em;
    padding-right: 0;
  }

  .post-item::after {
    display: none;
  }

  .post-category {
    display: block;
    margin-left: 0;
    margin-top: 8px;
    width: fit-content;
  }
}

@media (max-width: 480px) {
  .archive-header h1 {
    font-size: 2em;
  }

  .year-header h2 {
    font-size: 2em;
  }

  .posts-timeline {
    padding-left: 30px;
  }

  .post-item {
    padding: 14px 16px;
  }

  .post-item a {
    font-size: 1em;
  }
}

/* 滚动条美化 */
.archive-container::-webkit-scrollbar {
  width: 8px;
}

.archive-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.archive-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f59e0b 0%, #ec4899 100%);
  border-radius: 4px;
}

.archive-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fbbf24 0%, #f472b6 100%);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
}

.empty-state p {
  font-size: 1.2em;
  margin: 0;
}
