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

@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: var(--bg-primary);
  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: var(--archive-title-color);
  margin: 0 0 20px 0;
  text-shadow: 2px 2px 12px var(--archive-title-shadow);
  letter-spacing: 3px;
}

.archive-header p {
  font-family: 'Inter', sans-serif;
  font-size: 1.2em;
  color: var(--text-secondary);
  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: var(--archive-year-header-bg);
  margin: 0 -40px 40px -40px;
  padding: 20px 40px;
  border-left: 6px solid var(--archive-title-color);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.year-header:hover {
  border-left-width: 10px;
  box-shadow: 0 6px 30px var(--archive-title-shadow);
}

.year-header h2 {
  margin: 0;
  padding: 0;
  font-family: 'Crimson Pro', 'Noto Serif SC', serif;
  font-size: 3.5em;
  font-weight: 700;
  color: var(--archive-title-color);
  text-shadow: 2px 2px 8px var(--archive-title-shadow);
  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, var(--archive-title-color) 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: var(--archive-timeline-gradient);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--archive-title-shadow);
}

/* 文章项 */
.post-item {
  position: relative;
  margin-bottom: 24px;
  padding: 24px 28px;
  background: var(--archive-post-item-bg);
  border: 1px solid var(--border-color);
  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: var(--archive-title-color);
  border: 3px solid var(--archive-post-node-border);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--archive-accent-orange-20);
  transition: all 0.3s ease;
  z-index: 10;
}

.post-item:hover {
  background: var(--bg-hover);
  border-color: var(--archive-accent-orange-40);
  transform: translateX(8px);
  box-shadow: 
    var(--shadow-lg),
    0 0 0 1px var(--archive-accent-orange-10);
}

.post-item:hover::before {
  background: var(--archive-title-color);
  filter: brightness(1.1);
  transform: scale(1.3);
  box-shadow: 0 0 0 6px var(--archive-accent-orange-30);
}

/* 日期样式 */
.post-date {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.9em;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--archive-date-bg);
  padding: 6px 14px;
  border-radius: 6px;
  margin-right: 16px;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 1px solid var(--archive-date-border);
}

.post-item:hover .post-date {
  background: var(--archive-accent-orange-15);
  color: var(--archive-title-color);
  border-color: var(--archive-accent-orange-30);
}

/* 箭头符号 */
.post-item::after {
  content: '→';
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5em;
  color: var(--archive-title-color);
  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: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  line-height: 1.6;
  padding-right: 40px;
}

.post-item a:hover {
  color: var(--archive-title-color);
  text-shadow: 0 0 20px var(--archive-title-shadow);
}

/* 分类标签 */
.post-category {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.85em;
  color: var(--archive-accent-pink);
  background: var(--archive-accent-pink-10);
  padding: 4px 10px;
  border-radius: 4px;
  margin-left: 10px;
  border: 1px solid var(--archive-accent-pink-20);
  transition: all 0.3s ease;
}

.post-item:hover .post-category {
  background: var(--archive-accent-pink-20);
  border-color: var(--archive-accent-pink-40);
}

/* 动画定义 */
@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: var(--bg-secondary);
  border-radius: 4px;
}

.archive-container::-webkit-scrollbar-thumb {
  background: var(--archive-timeline-gradient);
  border-radius: 4px;
}

.archive-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--archive-title-color) 0%, var(--archive-accent-pink) 100%);
}

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

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