/* ==================== CSS 变量：浅色/深色主题 ==================== */
:root {
    /* 主题色 */
    --primary: #38d6d5;
    --primary-hover: #2bb8b7;
    --primary-light: rgba(56, 214, 213, 0.08);
    
    /* 浅色模式 */
    --bg: #f8fafb;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
    --navbar-bg: rgba(248, 250, 251, 0.9);
    --navbar-blur: blur(12px);
}

/* 深色模式 */
[data-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --navbar-bg: rgba(15, 23, 42, 0.9);
    --navbar-blur: blur(12px);
}

/* ==================== 全局重置与基础样式 ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==================== 菜单栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--navbar-bg);
    backdrop-filter: var(--navbar-blur);
    -webkit-backdrop-filter: var(--navbar-blur);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo区域 - 纯文字 */
.navbar-brand {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.navbar-brand:hover {
    color: var(--primary);
}

.brand-text {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* 右侧按钮区域 */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0;
}

.navbar-actions.hidden {
    display: none;
}

/* 简约无边框按钮 */
.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 0;
    white-space: nowrap;
}

/* 按钮底部下划线（hover时出现） */
.nav-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: transform 0.25s ease;
}

.nav-btn:hover {
    color: var(--primary);
}

.nav-btn:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-btn:active {
    opacity: 0.7;
}

/* 深浅切换按钮 - 图标大小 */
.nav-btn .icon-sun,
.nav-btn .icon-moon {
    width: 18px;
    height: 18px;
}

/* 深浅切换按钮图标显示逻辑 */
[data-theme="light"] .icon-moon {
    display: block;
}

[data-theme="light"] .icon-sun {
    display: none;
}

[data-theme="dark"] .icon-sun {
    display: block;
}

[data-theme="dark"] .icon-moon {
    display: none;
}

/* 竖线分隔符 */
.nav-divider {
    color: var(--border);
    font-size: 1rem;
    margin: 0 2px;
    user-select: none;
    pointer-events: none;
}

/* ==================== 页面内容区 ==================== */
.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 56px;
    transition: opacity 0.3s ease;
}

.page-content.hidden {
    display: none;
}

/* ==================== 主页容器 ==================== */
.home-container {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
}

/* ==================== 头像+介绍区域 ==================== */
.hero-section {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-top: 60px;
    padding-left: 60px;
}

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.intro-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.greeting {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ==================== 版权信息 ==================== */
.site-footer {
    text-align: center;
    padding: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}

/* ==================== 关于页 ==================== */
.about-container {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 28px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 560px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.about-icon {
    margin-bottom: 20px;
}

.about-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 8px;
}

.about-author {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
}

/* ==================== 大屏自适应（>1200px） ==================== */
@media (min-width: 1201px) {
    .navbar-inner {
        max-width: 1200px;
    }
    
    .home-container,
    .about-container {
        max-width: 1200px;
    }
}

/* ==================== 平板竖屏适配（768px - 1024px） ==================== */
@media (min-width: 768px) and (max-width: 1024px) {
    .navbar-inner {
        padding: 0 20px;
    }

    .home-container {
        padding: 32px 20px;
    }

    .hero-section {
        padding-top: 40px;
        padding-left: 20px;
    }

    .avatar {
        width: 80px;
        height: 80px;
    }

    .greeting {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}

/* ==================== 手机竖屏适配（<768px） ==================== */
@media (max-width: 767px) {
    .navbar-inner {
        padding: 0 16px;
        height: 52px;
    }

    .brand-text {
        font-size: 1rem;
    }

    .nav-btn {
        padding: 4px 8px;
        font-size: 0.85rem;
    }

    .nav-divider {
        margin: 0 0;
        font-size: 0.9rem;
    }

    .home-container {
        padding: 24px 16px;
    }

    .hero-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding-left: 0;
        padding-top: 20px;
    }

    .avatar {
        width: 72px;
        height: 72px;
    }

    .greeting {
        font-size: 1.4rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .about-container {
        padding: 40px 16px;
    }

    .about-card {
        padding: 32px 24px;
    }

    .about-card h2 {
        font-size: 1.3rem;
    }

    .site-footer {
        padding: 20px 16px;
        font-size: 0.8rem;
    }
}