/* 全局样式文件 - 极简设计规范 */

/* 重置默认样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 根元素配置 */
:root {
  --color-bg: #ffffff;
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-border: #e2e8f0;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础排版 */
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 标题层次 */
h1 {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 400;
}

/* 导航栏 */
nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 400;
  transition: var(--transition-smooth);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: var(--transition-smooth);
}

nav a:hover::after {
  width: 100%;
}

/* 图片样式 */
img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* 灯箱效果 */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 响应式设计 - 平板 */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  nav a {
    display: block;
    margin: var(--spacing-xs) 0;
  }
}

/* 响应式设计 - 手机 */
@media (max-width: 640px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  :root {
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
  }
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 文本选择样式 */
::selection {
  background: var(--color-text);
  color: var(--color-bg);
}