/* 全局样式变量定义 */
:root {
  /* 色彩系统 */
  --color-primary: #2C2C2C;
  --color-secondary: #FAFAFA;
  --color-accent-1: #E8E0D9;
  --color-accent-2: #F0F4F8;
  --color-highlight: #C4A484;

  /* 字体系统 */
  --font-heading-en: "Helvetica Now Display", "Helvetica Neue", Arial, sans-serif;
  --font-heading-zh: "Source Han Sans CN", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: system-ui, -apple-system, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 字体引入 */
@import url("https://fonts.googleapis.com/css2?family=Helvetica+Now+Display:wght@400;500;600;700&display=swap");

/* 基础样式 */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-secondary);
  color: var(--color-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 导航样式 */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-highlight);
  transition: width 0.3s ease;
}

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

/* 图片悬停效果 */
.image-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.image-hover:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 渐进式加载效果 */
.lazy-load {
  filter: blur(10px);
  transition: filter 0.5s ease;
}

.lazy-load.loaded {
  filter: blur(0);
}

/* 瀑布流布局 */
.masonry {
  column-count: 3;
  column-gap: 1.5rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

/* 网格布局 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* 时间轴样式 */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--color-accent-1);
  transform: translateX(-50%);
}

/* 响应式断点 */
@media (max-width: 1024px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .masonry {
    column-count: 1;
  }
  
  .timeline::before {
    left: 2rem;
  }
  
  body {
    font-size: 14px;
  }
}

/* 标题样式 */
h1, h2, h3 {
  font-family: var(--font-heading-zh);
  font-weight: 500;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.875rem;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-accent-2);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent-1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-highlight);
}

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}