/* ========== 基础变量 ========== */
:root {
  --font-en: 'League Spartan', serif;
  --font-cn: 'Source Han Serif CN', serif;
  --text-color: #1a1a1a;
  --light-text: #666;
  --border-color: #e0e0e0;
  --hover-color: #999;
  --spacing-unit: 20px;
  --max-width: 1200px;
  --header-height: 80px;
  --content-spacing: 40px;
}

/* ========== 基础样式 ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-cn), var(--font-en);
  color: var(--text-color);
  background: white;
  padding: var(--spacing-unit);
  -webkit-font-smoothing: antialiased;
}

/* 修改语言字体控制部分 */
body {
  font-family: var(--font-cn), var(--font-en);
  color: var(--text-color);
  /* 其他样式保持不变 */
}

/* 移除之前的[lang]选择器，改为以下方式 */
.text-en {
  font-family: var(--font-en);
}
.text-cn {
  font-family: var(--font-cn);
}

/* 确保项目标题能响应语言切换 */
.project-title {
  font-family: inherit; /* 继承父元素字体设置 */
}

.project-description {
  font-family: inherit; /* 继承父元素字体设置 */
}

/* 强制英文内容使用英文字体 */
[lang="en"] .project-title {
  font-family: var(--font-en) !important;
}

/* 强制中文内容使用中文字体 */
[lang="zh-CN"] .project-title {
  font-family: var(--font-cn) !important;
}

/* 强制字体设置 */
.force-en {
  font-family: var(--font-en) !important;
}
.force-cn {
  font-family: var(--font-cn) !important;
}

/* 项目描述特定样式 */
.project-description {
  font-family: inherit;
  transition: font-family 0.3s ease; /* 添加平滑过渡 */
}

/* 保持以下元素始终使用英文字体 */
.logo,
.nav-list,
.language-switcher,
.cv-year,
.wc-artist-name,
.project-meta {
  font-family: var(--font-en) !important;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--hover-color); }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ========== 通用布局 ========== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ========== 页眉 ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  padding: 0 5%;
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.header.hidden { transform: translateY(calc(-100% - 1px)); }

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  position: relative;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--text-color);
}

.language-switcher {
  display: flex;
  margin-left: 2.5rem;
}
.language-btn {
  background: none;
  border: none;
  font: inherit;
  color: var(--text-color);
  cursor: pointer;
  padding: 0 0.2rem;
}
.language-btn:hover { color: var(--hover-color); }
.language-btn.active {
  font-weight: 500;
  text-decoration: underline;
}

/* ========== 主内容区 ========== */
.main {
  min-height: calc(100vh - 120px);
  padding-top: calc(var(--header-height) + var(--content-spacing));
}

.page-title {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

/* ========== 首页样式 ========== */
.hero {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 40px);
  margin-bottom: 4rem;
}

.hero-image {
  flex: 1;
  margin: 0 calc(-1 * var(--spacing-unit)) 3rem;
  overflow: hidden;
}
.hero-image img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.hero-content {
  max-width: 800px;
  padding-top: 3rem;
}

.hero-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--light-text);
  margin-bottom: 2rem;
}

.section {
  max-width: 800px;
  margin-bottom: 5rem;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 2rem;
}

.about-content {
  max-width: 800px;
  margin-top: 2rem;
}
.about-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.contact-info {
  margin-top: 1rem;
}
.contact-info p { margin-bottom: 0.5rem; }
.contact-info a {
  border-bottom: 1px solid var(--text-color);
  padding-bottom: 1px;
}

/* ========== 项目页面 ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px 20px;
  margin-top: 3rem;
}

.project-item {
  display: block;
  color: inherit;
  transition: transform 0.3s ease;
}
.project-item:hover { transform: translateY(-5px); }
.project-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 1.2rem;
  border: 1px solid #f0f0f0;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.project-meta {
  font-size: 0.9rem;
  color: var(--light-text);
  margin-top: 0.8rem;
}

.project-description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* ========== CV页面 ========== */
.cv-section-title {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 0 var(--spacing-unit);
}

.cv-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 30px;
  margin-bottom: 3rem;
  grid-template-rows: auto 1fr; /* 明确行高分配 */
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-unit);
}

.cv-year {
  font-weight: normal;
  text-align: right;
}

.cv-content {
  border-left: 1px solid var(--border-color);
  padding-left: 30px;
  line-height: 1.2; /* 增加行高 */
}

/* 增加加粗标题与正文的间距 */
.cv-content strong {
  display: inline-block; /* 使margin生效 */
  margin-bottom: 0.5rem; /* 增加下边距 */
}

.download-btn {
  display: block;
  width: fit-content;
  padding: 0.75rem 1.5rem;
  margin: 5rem auto 3rem;
  border: 1px solid var(--text-color);
  transition: all 0.2s ease;
  max-width: var(--max-width);
}
.download-btn:hover {
  background: var(--text-color);
  color: white;
}

.white-download-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  margin: 5rem auto 3rem;
  background: white;
  color: #333;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-size: 0.95rem;
  font-weight: 500;
  max-width: var(--max-width);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.white-download-btn:hover {
  background: #f8f8f8;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.download-icon {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  fill: currentColor;
  transition: transform 0.3s ease;
}
.white-download-btn:hover .download-icon {
  fill: #2c3e50;
  transform: translateY(2px);
}

/* ========== 页脚 ========== */
.footer {
  margin-top: 20rem;
  padding: 2rem 0;
  color: var(--light-text);
  font-size: 0.875rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

/* ========== Collections部分 ========== */
.collections-list {
  list-style: none;
  margin: 0.8rem 0;
  padding-left: 0;
}

.collection-item {
  margin-bottom: 0.8rem;
  padding-left: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* ========== WC样式 ========== */
.wc-hero {
  position: relative;
  display: block;
  width: 100vw;
  min-height: 70vh;
  margin: 0 0 0 -50vw;
  left: 50%;
  right: 50%;
  padding: 0;
}

.wc-artwork-container {
  width: 100vw;
  height: 70vh;
  margin: 0;
  padding: 0;
}

.wc-featured-artwork {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.wc-artist-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  padding: 2rem;
}

.wc-artist-name {
  font-size: 4.5rem;
  line-height: 1.2;
  color: white;
  margin-bottom: 1rem;
  white-space: nowrap; /* 确保不换行 */
  overflow: hidden; /* 隐藏溢出内容 */
  text-overflow: ellipsis; /* 溢出显示省略号 */
  max-width: 100%; /* 限制最大宽度 */
}

.wc-artist-meta p {
  color: white;
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.wc-section {
  padding: 5rem 15%;
}
.wc-section-title {
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
}

.wc-exhibition-list {
  display: grid;
  grid-template-columns: 15% 85%;
}
.wc-exhibition-year {
  font-size: 1.1rem;
  font-weight: 500;
  color: #555;
}

.wc-exhibitions li {
  display: grid;
  grid-template-columns: 25% 35% 40%;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

/* BIO 区域动画样式 */
.bio-section {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), 
              visibility 0.6s linear;
}

.bio-section.visible {
  opacity: 1;
  visibility: visible;
}

.bio-container {
  display: flex;
  gap: 5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-unit);
  align-items: flex-start;
}

.artist-photo {
  flex: 0 0 30%;
  position: sticky;
  top: 120px;
  margin-left: -50px;
}
.artist-photo img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.bio-content {
  flex: 1;
  max-width: 900px;
  margin-top: 4rem;
  padding-left: 2rem;
  color: var(--light-text);
  font-size: 1.2rem;
  line-height: 1.8;
}
.bio-content p {
  margin-bottom: 1.8rem;
  text-align: left;
}

/* ========== 字体定义 ========== */
@font-face {
  font-family: 'Source Han Serif CN';
  font-style: normal;
  font-weight: 400;
  src: local('Source Han Serif CN'), 
       local('SourceHanSerifCN-Regular'),
       local('Noto Serif CJK SC');
}

@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  src: local('Gentium Book Plus'), 
       local('GentiumBookPlus'),
       url('https://fonts.gstatic.com/s/gentiumbookplus/v1/pe0uMIQNIuS4iq--vYzJX1BQKXjg.ttf') format('truetype');
  font-display: swap;
}

/* ========== 响应式汉堡菜单 (右侧打开) ========== */
@media (max-width: 768px) {
  /* 隐藏常规导航 */
  .nav-list {
    display: none;
  }
  
  /* 汉堡按钮样式 (右侧) */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
    margin-left: auto;
  }
  
  .hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--text-color);
    transition: all 0.3s ease;
  }
  
  /* 移动菜单样式 (从右侧滑入) */
  .mobile-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 70%;
    max-width: 300px;
    height: calc(100vh - var(--header-height));
    background: white;
    padding: 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }
  
  .mobile-nav.active {
    transform: translateX(0);
  }
  
  .mobile-nav-list {
    list-style: none;
  }
  
  .mobile-nav-list li {
    margin-bottom: 20px;
  }
  
  .mobile-nav-link {
    font-size: 1.1rem;
    color: var(--text-color);
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
  }
  
  .mobile-language-switcher {
    display: flex;
    gap: 2px;
    margin-top: 30px;
    padding-top: 20px;
  }
  
  /* 汉堡动画 */
  .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  /* 调整header容器 */
  .header-container {
    justify-content: space-between;
  }
  
  /* 点击菜单外部关闭菜单 */
  .mobile-nav-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* 保持电脑端布局不变 */
@media (min-width: 769px) {
  .hamburger,
  .mobile-nav,
  .mobile-nav-overlay {
    display: none;
  }
}

/* ========== [修改] 仅删除 home 页面的页眉下方空白 ========== */
.home-page .main {
  padding-top: var(--header-height);
}

/* 保证 artworks 和 CV 页面保留原有间距 */
.artworks-page .main,
.cv-page .main {
  padding-top: calc(var(--header-height) + var(--content-spacing));
}

/* ========== [修正] 彻底移除 home 页眉下方空白 ========== */
.home-page .main {
  padding-top: 0 !important;
  margin-top: var(--header-height);
}

/* 确保 home 页面的 hero 部分紧贴页眉 */
.home-page .wc-hero {
  margin-top: calc(-1 * var(--header-height));
}

/* 保护其他页面样式 */
.artworks-page .main,
.cv-page .main {
  padding-top: calc(var(--header-height) + var(--content-spacing)) !important;
}

/* 保持时间轴连线的连续性 */
.cv-content {
  padding-bottom: 1.5rem;
}

/* 保护其他页面不受影响 */
.projects-grid,
.collections-list {
  margin-bottom: initial;
}

/* ========== [修改] Collections内容对齐调整 ========== */
.collections-list {
  margin-left: 20px;
  margin-top: -0.5rem;
}

/* 保持原有时间轴样式 */
.cv-content {
  border-left: 1px solid var(--border-color);
}

/* 响应式适配 */
@media (max-width: 768px) {
  .collections-list {
    margin-left: 80px;
    padding-left: 15px;
  }
}

/* ========== [修改] 增加home页bio区域上方间距 ========== */
.home-page .bio-section {
  padding-top: 8rem;
  padding-bottom: 5rem;
}

/* 保护其他页面不受影响 */
.artworks-page .bio-section,
.cv-page .bio-section {
  padding-top: 5rem !important;
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .home-page .bio-section {
    padding-top: 6rem;
  }
}

@media (max-width: 768px) {
  .home-page .bio-section {
    padding-top: 5rem;
  }
}

@media (max-width: 768px) {
  /* 新增：防止艺术家信息换行 */
  .wc-artist-info {
    white-space: nowrap; /* 禁止换行 */
    width: auto; /* 取消宽度限制 */
    padding: 1rem; /* 调整内边距 */
  }
  
  .wc-artist-name,
  .wc-artist-meta p {
    display: inline-block; /* 行内显示 */
    white-space: nowrap; /* 禁止换行 */
  }
  
  .wc-artist-meta {
    display: flex;
    flex-direction: column;
  }
  
  /* 调整字体大小确保内容不超出视口 */
  .wc-artist-name {
    font-size: 2rem;
  }
  
  .wc-artist-meta p {
    font-size: 1rem;
  }
  
@media (max-width: 768px) {
  /* CV时间轴响应式调整 */
  .cv-item {
    grid-template-columns: 60px 1fr; /* 缩小年份列，扩大内容列 */
    gap: 15px; /* 缩小间距 */
    margin-bottom: 1rem; /* 增加条目间距（原为1.5rem） */
    grid-template-rows: auto 1fr; /* 明确行高分配 */
  }
  
  .cv-year {
    font-size: 0.9rem; /* 调小年份字体 */
    text-align: left; /* 改为左对齐 */
    padding-right: 10px; /* 添加右边距 */
  }
  
  .cv-content {
    padding-left: 15px; /* 减小左边距 */
    font-size: 0.95rem; /* 适当调大内容字体 */
  }
  
  /* 调整时间轴连线位置 */
  .cv-content {
    border-left-width: 2px; /* 调细时间轴连线 */
    margin-left: -1px; /* 微调对齐 */
  }
  
  /* 保护标题样式 */
  .cv-section-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }
  
  /* 调整下载按钮 */
  .white-download-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  /* 修改collections-list的对齐方式 */
  .collections-list {
    margin-left: 20px; /* 移除左边距 */
    padding-left: 0; /* 移除内边距 */
    text-align: left; /* 确保文本左对齐 */
  }

  .collection-item {
    padding-left: 0; /* 移除项目左边距 */
    margin-left: 0; /* 移除项目左边距 */
    text-indent: 0; /* 移除文本缩进 */
  }

  /* 保持CV内容区域与collections对齐 */
  .cv-content {
    padding-left: 15px; /* 与collections-list保持相同缩进 */
  }

@media (max-width: 768px) {
  /* 移动菜单列表样式 */
  .mobile-nav-list {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 60px; /* 为语言按钮留出空间 */
  }

  /* 语言切换项样式 */
  .mobile-language-item {
    margin-top: auto; /* 将语言按钮推到最下方 */
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
  }

  /* 语言切换器容器 */
  .mobile-language-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }

  /* 语言按钮样式（与其他导航项对齐） */
  .mobile-language-switcher .language-btn {
    padding: 8px 16px;
    font-size: 1.1rem;
    color: var(--text-color);
    background: none;
    border: none;
    font-family: 'League Spartan', sans-serif;
  }

.mobile-language-switcher {
  gap: 0px; /* 增大按钮间距 */
}

  /* 分隔线样式 */
  .language-divider {
    color: var(--text-color);
    padding: 0 5px;
  }

  /* 保持活动状态样式 */
  .language-btn.active {
    font-weight: 500;
    text-decoration: underline;
  }
}

  /* 调整菜单列表高度 */
  .mobile-nav-list {
    padding-bottom: 80px; /* 为语言按钮留出空间 */
  }
  
    /* 移动菜单字体设置为 League Spartan */
  .mobile-nav {
    font-family: 'League Spartan', sans-serif; /* 新增 */
  }

  /* 确保语言切换按钮也继承字体 */
  .mobile-language-switcher,
  .mobile-language-switcher .language-btn {
    font-family: inherit; /* 继承父元素字体 */
  }
  
    /* BIO 区域横版布局 */
  .bio-container {
    flex-direction: column; /* 改为垂直排列 */
    gap: 2rem; /* 调整间距 */
  }

  .artist-photo {
    flex: 0 0 auto; /* 取消固定比例 */
    width: 100%; /* 全宽显示 */
    margin-left: 0; /* 移除左边距 */
    position: static; /* 取消固定定位 */
    margin-bottom: 1.5rem; /* 图片和文字间距 */
	padding-top: 6rem;
  }

  .artist-photo img {
    width: 100%; /* 图片全宽 */
    max-height: 300px; /* 限制高度 */
    object-fit: cover; /* 保持比例填充 */
  }

  .bio-content {
    padding-left: 0; /* 移除左边距 */
    margin-top: 0; /* 重置顶部间距 */
    width: 100%; /* 全宽显示 */
  }
  
  .bio-content {
    font-size: 1rem; /* 调小字体适应移动端 */
    line-height: 1.6; /* 增加行高 */
  }
  
  .bio-content p {
    margin-bottom: 1.2rem; /* 段落间距 */
  }
  
    /* 修改项目网格为每行2个 */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr); /* 改为2列 */
    gap: 40px 5px; /* 调整间隙：行间隙40px，列间隙15px */
  }

  /* 可选：调整项目卡片大小 */
  .project-item img {
    aspect-ratio: 3/2; /* 改为正方形 */
  }

  /* 可选：调整文字大小 */
  .project-title {
    font-size: 1rem;
  }
  .project-description {
    font-size: 0.85rem;
  }
}