/* 全局样式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100;300;400;500;700&display=swap');

:root {
  --color-primary: #1a1a1a;
  --color-secondary: #f5f5f5;
  --color-accent: #8b7355;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
  --transition-slow: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--color-secondary);
  overflow-x: hidden;
}

/* 导航样式 */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: rgba(245, 245, 245, 0.9);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.nav-container.scrolled {
  background-color: rgba(245, 245, 245, 0.95);
  box-shadow: var(--shadow-sm);
}

.nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: var(--transition-normal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

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

.nav-link:hover {
  color: var(--color-accent);
}

/* 图片悬停效果 */
.image-hover {
  overflow: hidden;
  position: relative;
}

.image-hover img {
  transition: transform 0.6s ease, filter 0.6s ease;
}

.image-hover:hover img {
  transform: scale(1.05);
  filter: brightness(0.95);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.image-hover:hover .image-overlay {
  opacity: 1;
}

/* 页面切换动画 */
.page-transition {
  animation: fadeInUp 0.8s ease-out;
}

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

/* 淡入效果 */
.fade-in {
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@media (max-width: 1024px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .masonry-grid {
    column-count: 1;
  }
}

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

/* 卡片样式 */
.card {
  background-color: white;
  border-radius: 4px;
  overflow: hidden;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* 按钮样式 */
.btn-primary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  transition: var(--transition-normal);
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* 文本样式 */
.text-title {
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.text-subtitle {
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.text-description {
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.8;
  letter-spacing: 0.02em;
}

/* 页脚样式 */
.footer {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 100;
  letter-spacing: 0.1em;
}

/* 加载动画 */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 6px;
}

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

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

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

/* 响应式字体大小 */
@media (max-width: 640px) {
  .text-title {
    font-size: 1.75rem;
  }
  
  .text-subtitle {
    font-size: 1rem;
  }
  
  .text-description {
    font-size: 0.9rem;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #f5f5f5;
    --color-secondary: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-light: #808080;
    --border-color: #333333;
  }
  
  .nav-container {
    background-color: rgba(26, 26, 26, 0.9);
    border-bottom: 1px solid var(--border-color);
  }
  
  .card {
    background-color: #2a2a2a;
  }
}