/**
 * site.css
 * 用途：内页（工作、关于我）共用样式
 * 核心功能：水墨文人风格布局、导航、作品卡片、时间轴
 * 作者：AI Assistant
 * 创建日期：2026-05-22
 */

/* =============================================
   设计令牌：与首页 home.css 保持同一配色体系
   ============================================= */
:root {
  --sky-top:       #c8dde8;
  --sky-bottom:    #e8d8c0;
  --paper-bg:      #f4efe6;
  --paper-light:   rgba(255, 255, 255, 0.72);
  --text-primary:  #2c3e4a;
  --text-muted:    rgba(44, 62, 74, 0.62);
  --text-faint:    rgba(44, 62, 74, 0.42);
  --accent:        #8b6f4e;
  --accent-light:  rgba(139, 111, 78, 0.35);
  --border-soft:   rgba(139, 111, 78, 0.18);
  --shadow-soft:   0 8px 32px rgba(44, 62, 74, 0.08);
  --font-serif:    'STSong', 'Songti SC', 'SimSun', Georgia, serif;
  --font-sans:     -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --content-max:   960px;
  --header-h:      72px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text-primary);
  /* 宣纸质感：暖色底 + 极淡网格纹理 */
  background-color: var(--paper-bg);
  background-image:
    linear-gradient(180deg, var(--sky-top) 0%, rgba(244, 239, 230, 0.6) 180px, var(--paper-bg) 320px),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(180, 160, 130, 0.025) 3px, rgba(180, 160, 130, 0.025) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(180, 160, 130, 0.025) 3px, rgba(180, 160, 130, 0.025) 4px);
}

a {
  color: inherit;
  text-decoration: none;
}

/* =============================================
   顶栏：诗句 + 社交链接
   ============================================= */
.site-topbar {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 14px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-quote {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--text-faint);
  line-height: 1.6;
}

.site-social {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.site-social-link:hover {
  color: var(--accent);
  border-color: var(--accent-light);
  transform: translateY(-1px);
}

.site-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* =============================================
   主导航：头像 + 链接，与首页风格一致
   ============================================= */
.site-header {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.site-logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 12px rgba(44, 62, 74, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-logo:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 18px rgba(44, 62, 74, 0.16);
}

.site-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav-link {
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding-bottom: 3px;
  position: relative;
  transition: color 0.25s ease;
}

.site-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.site-nav-link:hover,
.site-nav-link.active {
  color: var(--text-primary);
}

.site-nav-link:hover::after,
.site-nav-link.active::after {
  width: 100%;
}

.site-nav-sep {
  color: var(--accent-light);
  font-size: 10px;
  user-select: none;
}

/* =============================================
   主内容区
   ============================================= */
.site-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 36px 24px 100px;
}

.page-heading {
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease-out 0.1s forwards;
}

.page-heading h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.page-heading p {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 1px;
  flex-shrink: 0;
}

/* =============================================
   工作页：侧边分类 + 作品卡片网格
   ============================================= */
.work-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
}

.work-sidebar {
  position: sticky;
  top: 24px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease-out 0.2s forwards;
}

.work-tabs {
  list-style: none;
  border-right: 1px solid var(--border-soft);
}

.work-tab {
  display: block;
  width: 100%;
  padding: 12px 16px 12px 0;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: none;
  border: none;
  border-right: 2px solid transparent;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, padding-left 0.25s ease;
}

.work-tab:hover {
  color: var(--text-primary);
  padding-left: 4px;
}

.work-tab.active {
  color: var(--accent);
  border-right-color: var(--accent);
  font-weight: 600;
}

.work-panels {
  min-height: 320px;
}

.work-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.work-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--paper-light);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  opacity: 0;
  animation: fadeUp 0.5s ease-out forwards;
}

.work-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-light);
  box-shadow: 0 12px 36px rgba(44, 62, 74, 0.12);
}

.work-card-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.work-card-sub {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}

.work-card-arrow {
  margin-top: auto;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.work-card:hover .work-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.work-empty {
  padding: 48px 24px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-faint);
}

/* 卡片入场动画：按序号错开 delay */
.work-card:nth-child(1)  { animation-delay: 0.05s; }
.work-card:nth-child(2)  { animation-delay: 0.10s; }
.work-card:nth-child(3)  { animation-delay: 0.15s; }
.work-card:nth-child(4)  { animation-delay: 0.20s; }
.work-card:nth-child(5)  { animation-delay: 0.25s; }
.work-card:nth-child(6)  { animation-delay: 0.30s; }
.work-card:nth-child(7)  { animation-delay: 0.35s; }
.work-card:nth-child(8)  { animation-delay: 0.40s; }
.work-card:nth-child(9)  { animation-delay: 0.45s; }
.work-card:nth-child(10) { animation-delay: 0.50s; }
.work-card:nth-child(11) { animation-delay: 0.55s; }
.work-card:nth-child(12) { animation-delay: 0.60s; }
.work-card:nth-child(13) { animation-delay: 0.65s; }
.work-card:nth-child(14) { animation-delay: 0.70s; }
.work-card:nth-child(15) { animation-delay: 0.75s; }
.work-card:nth-child(16) { animation-delay: 0.80s; }

/* =============================================
   关于我页：简介 + 时间轴
   ============================================= */
.about-intro {
  margin-bottom: 48px;
  padding: 28px 32px;
  background: var(--paper-light);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease-out 0.15s forwards;
}

.about-intro p {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.about-timeline {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease-out 0.3s forwards;
}

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  /* 渐变竖线模拟水墨晕染的轨迹 */
  background: linear-gradient(180deg, var(--accent-light), var(--border-soft), transparent);
}

.timeline-item {
  position: relative;
  padding: 0 0 36px 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper-bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 111, 78, 0.12);
}

.timeline-date {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}

.timeline-content {
  padding: 14px 18px;
  background: var(--paper-light);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text-primary);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.timeline-item:hover .timeline-content {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-soft);
}

/* =============================================
   Footer：与首页一致的固定底栏
   ============================================= */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 10px 24px 12px;
  text-align: center;
  background: rgba(244, 239, 230, 0.85);
  border-top: 1px solid var(--border-soft);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.site-footer p {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
  line-height: 1.9;
}

.site-footer a {
  color: var(--text-faint);
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--text-muted);
}

/* =============================================
   入场动画
   ============================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   响应式
   ============================================= */
@media (max-width: 767px) {
  .site-topbar {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 12px;
  }

  .site-quote {
    font-size: 11px;
  }

  .site-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 20px;
  }

  .site-main {
    padding: 24px 16px 100px;
  }

  .page-heading h1 {
    font-size: 22px;
    letter-spacing: 3px;
  }

  .work-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .work-sidebar {
    position: static;
  }

  .work-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 12px;
  }

  .work-tab {
    padding: 8px 14px;
    border-right: none;
    border-bottom: 2px solid transparent;
  }

  .work-tab.active {
    border-right-color: transparent;
    border-bottom-color: var(--accent);
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .about-intro {
    padding: 20px;
  }
}
