/* ========================================
   Google Fonts Import
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Noto+Serif+SC:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ========================================
      CSS Variables & Theme Colors
      ======================================== */
:root {
    /* Color Palette - 高雅经典配色（暗色主题默认值） */
    --color-bg-primary: #0f0f0f;
    --color-bg-secondary: #1a1a1a;
    --color-bg-elevated: #252525;
    --color-paper: #f8f7f4;
    --color-text-primary: #e8e8e8;
    --color-text-secondary: #a8a8a8;
    --color-text-muted: #707070;
    --color-text-dark: #2a2a2a;
    --color-accent-gold: #c9a961;
    --color-accent-gold-dark: #a88c4e;
    --color-line: #2f2f2f;
    --color-line-subtle: #262626;

    /* Typography */
    --font-serif: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --spacing-xxl: 10rem;

    /* Layout */
    --max-width: 1200px;
    --nav-height: 90px;

    /* Borders */
    --border-thin: 1px solid var(--color-line);
    --border-accent: 1px solid var(--color-accent-gold);
    
    /* Border Radius - 统一圆角系统 */
    --radius-none: 0;
    --radius-sm: 4px;      /* 小元素：按钮、标签 */
    --radius-md: 8px;      /* 中等元素：卡片、输入框 */
    --radius-lg: 12px;     /* 大元素：主要卡片、容器 */
    --radius-xl: 20px;     /* 超大元素：特殊卡片（如摄影） */
    --radius-full: 50%;    /* 圆形：头像、图标按钮 */
    --radius-pill: 999px;  /* 胶囊：特殊装饰元素 */

    /* Transitions */
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 暗色主题 - 覆盖颜色变量，添加主题专用变量 */
.theme-dark {
    /* 暗色主题专用变量 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.6);
    --accent-glow: rgba(201, 169, 97, 0.2);
    --accent-glow-strong: rgba(201, 169, 97, 0.4);
    --accent-border: rgba(201, 169, 97, 0.3);
    --accent-border-strong: rgba(201, 169, 97, 0.5);
}

/* 亮色主题 - 优化对比度和视觉效果，使用更深的色调 */
.theme-light {
    --color-bg-primary: #e8e5de;
    --color-bg-secondary: #ddd9d0;
    --color-bg-elevated: #d2cdc2;
    --color-paper: #0f0f0f;
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #4a4a4a;
    --color-text-muted: #6a6a6a;
    --color-text-dark: #e8e8e8;
    --color-accent-gold: #a67c3d;
    --color-accent-gold-dark: #8b6629;
    --color-line: #b8b2a5;
    --color-line-subtle: #c8c2b5;
    
    /* 亮色主题专用变量 - 增强视觉效果 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.24);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.3);
    --accent-glow: rgba(166, 124, 61, 0.2);
    --accent-glow-strong: rgba(166, 124, 61, 0.35);
    --accent-border: rgba(166, 124, 61, 0.5);
    --accent-border-strong: rgba(166, 124, 61, 0.7);
}

/* ========================================
      Reset & Base Styles
      ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 300;
}

/* ========================================
      Typography - 优雅排版
      ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
}

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--color-text-secondary);
    font-weight: 300;
    letter-spacing: 0.01em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* ========================================
      Layout & Containers
      ======================================== */
.main-container {
    width: 100%;
    min-height: 100vh;
}

.section {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
    border-bottom: var(--border-thin);
}

.section:last-child {
    border-bottom: none;
}

.section-header {
    margin-bottom: var(--spacing-lg);
    position: relative;
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    z-index: 1;
}

.section-title {
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
    font-weight: 400;
    position: relative;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

/* Section 标题的装饰性下划线 */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.3em;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, var(--color-accent-gold), transparent);
    transition: width var(--transition-slow);
}

.section-header:hover .section-title::after {
    width: 60px;
}

.theme-light .section-title {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-family: var(--font-sans);
}

/* Section Icon */
.section-icon {
    font-size: 2rem;
    color: var(--color-accent-gold);
    opacity: 0.6;
    transition: all var(--transition-normal);
    display: inline-block;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.section-header:hover .section-icon {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 12px var(--accent-glow-strong));
}

.header-center .section-icon {
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

/* 亮色主题下的图标增强 */
.theme-light .section-icon {
    opacity: 0.7;
    filter: drop-shadow(0 0 6px var(--accent-glow-strong));
}

.theme-light .section-header:hover .section-icon {
    filter: drop-shadow(0 0 16px var(--accent-glow-strong));
}

/* Header Layout Variants */

/* Left Aligned Header */
.header-left {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding-left: var(--spacing-md);
}

.header-left::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-accent-gold), transparent);
    opacity: 0.5;
    transition: opacity var(--transition-normal);
}

.header-left:hover::before {
    opacity: 0.8;
}

.header-left .header-content {
    flex: 1;
}

.header-left .section-icon {
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.header-left::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: var(--color-accent-gold);
    margin-top: var(--spacing-md);
    opacity: 0.6;
}

/* Center Aligned Header */
.header-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.header-center .header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.header-center::before {
    content: '';
    display: block;
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-accent-gold), transparent);
    margin-bottom: var(--spacing-sm);
    opacity: 0.5;
}

.header-center::after {
    content: '';
    display: block;
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-accent-gold), transparent);
    margin-top: var(--spacing-sm);
    opacity: 0.5;
}

.header-center .section-icon {
    order: -1;
    margin-bottom: 0;
}

.header-icon-bottom .section-icon {
    order: 3;
    margin-top: var(--spacing-sm);
}

/* Right Aligned Header */
.header-right {
    text-align: right;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.header-right::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 3px;
    height: 60px;
    background: linear-gradient(to top, var(--color-accent-gold), transparent);
    opacity: 0.5;
    transition: opacity var(--transition-normal);
}

.header-right:hover::before {
    opacity: 0.8;
}

.header-right .header-content {
    flex: 1;
    text-align: right;
}

.header-right .section-icon {
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.header-right::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: var(--color-accent-gold);
    margin-top: var(--spacing-md);
    margin-left: auto;
    opacity: 0.6;
}


/* ========================================
      Utility Classes
      ======================================== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
      Responsive
      ======================================== */

/* 中等屏幕优化 (900px - 1200px) */
@media (max-width: 1200px) and (min-width: 769px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .section {
        padding: var(--spacing-xl) var(--spacing-md);
    }
}

/* 小屏幕优化 (769px - 900px) */
@media (max-width: 900px) and (min-width: 769px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
        --spacing-xxl: 6rem;
        --nav-height: 70px;
    }

    .section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .section-header {
        margin-bottom: var(--spacing-lg);
    }

    .section-icon {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }
    
    .section-subtitle {
        font-size: 0.875rem;
    }

    .header-left,
    .header-right {
        padding-left: 0;
        padding-right: 0;
        gap: var(--spacing-sm);
    }

    .header-left::before,
    .header-right::before {
        display: none;
    }

    .header-center::before,
    .header-center::after {
        width: 60px;
    }
}