/* ---------- style.css ---------- */
/* 全局重置 & 字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS 变量 — 浅色主题 (默认) */
:root {
    --bg-body: #f6f9fc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #2c3e58;
    --text-muted: #5b6f88;
    --border-light: #eef2f8;
    --tag-bg: #f1f7fe;
    --about-bg: #fafdff;
    --social-bg: #f0f6fe;
    --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
    --nav-hover: #4A90D9;
    --accent: #5B8DEF;
    --accent-hover: #4A90D9;
    --footer-bg: #f0f6fd;
    --icon-color: #2c3e58;
}

/* 深色主题 — 通过 .dark 类切换 */
body.dark {
    --bg-body: #111827;
    --bg-card: #1f2937;
    --text-primary: #e5e9f0;
    --text-secondary: #d1d9e6;
    --text-muted: #9aa9bb;
    --border-light: #2d3a4b;
    --tag-bg: #2a3748;
    --about-bg: #1e2a3a;
    --social-bg: #273445;
    --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    --nav-hover: #7aa9f0;
    --accent: #7aa9f0;
    --accent-hover: #5B8DEF;
    --footer-bg: #1f2a3a;
    --icon-color: #d1d9e6;
}

body {
    background-color: var(--bg-body);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 2rem 1.2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.25s ease;
}

/* 主卡片 */
.container {
    max-width: 820px;
    width: 100%;
    background-color: var(--bg-card);
    border-radius: 36px;
    box-shadow: var(--shadow-card);
    padding: 2.2rem 2.5rem 1.8rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 520px) {
    .container {
        padding: 1.6rem 1.2rem 1.4rem;
        border-radius: 28px;
    }
}

/* ---------- 顶部导航 ---------- */
nav {
    display: flex;
    justify-content: flex-end;
    gap: 1.8rem;
    font-size: 1rem;
    font-weight: 460;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.2s ease, border-color 0.2s ease;
    padding: 0.25rem 0.1rem;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

nav a i {
    font-size: 0.9rem;
    color: var(--accent);
}

nav a:hover {
    color: var(--nav-hover);
    border-bottom-color: var(--accent);
}

nav a:active {
    transform: scale(0.96);
}

/* 明暗切换按钮 — 与导航样式统一 */
.theme-toggle {
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 460;
    color: var(--text-primary);
    padding: 0.25rem 0.1rem;
    border-bottom: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.theme-toggle i {
    font-size: 0.9rem;
    color: var(--accent);
}

.theme-toggle:hover {
    color: var(--nav-hover);
    border-bottom-color: var(--accent);
}

.theme-toggle:active {
    transform: scale(0.96);
}

@media (max-width: 480px) {
    nav {
        gap: 1rem;
        justify-content: center;
        font-size: 0.9rem;
    }
    nav a i, .theme-toggle i {
        font-size: 0.8rem;
    }
}

/* ---------- 头像 + 昵称 + 简介 ---------- */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

/* 圆形占位图 */
.avatar {
    width: 126px;
    height: 126px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e3ecf5;
    box-shadow: 0 6px 16px rgba(74, 144, 217, 0.08);
    margin-bottom: 1.2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: inline-block;
}

.avatar:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(74, 144, 217, 0.15);
}

.nickname {
    font-size: 3.2rem;
    font-weight: 620;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .nickname {
        font-size: 2.6rem;
    }
}

.tagline {
    font-size: 1.2rem;
    font-weight: 360;
    color: var(--text-secondary);
    background: var(--tag-bg);
    padding: 0.4rem 1.6rem;
    border-radius: 60px;
    display: inline-block;
    margin-top: 0.2rem;
    backdrop-filter: blur(2px);
    letter-spacing: 0.2px;
    border: 1px solid rgba(91, 141, 239, 0.08);
    transition: background 0.25s ease, color 0.25s ease;
}

.tagline i {
    color: var(--accent);
    margin-right: 8px;
}

@media (max-width: 480px) {
    .tagline {
        font-size: 1rem;
        padding: 0.3rem 1.2rem;
    }
}

/* ---------- 关于我 ---------- */
.about-section {
    margin: 2.8rem 0 2.4rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 560;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--accent);
    font-size: 1.4rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border-light), transparent);
    margin-left: 0.6rem;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-primary);
    background-color: var(--about-bg);
    padding: 1.2rem 1.8rem;
    border-radius: 24px;
    border-left: 5px solid var(--accent);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.01);
    line-height: 1.75;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.about-text i {
    color: var(--accent);
    opacity: 0.5;
    margin: 0 4px;
}

@media (max-width: 480px) {
    .about-text {
        font-size: 0.98rem;
        padding: 1rem 1.2rem;
    }
}

/* ---------- 社交图标 ---------- */
.social-section {
    margin: 2.4rem 0 1.8rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 2.4rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.social-icons a {
    color: var(--icon-color);
    font-size: 2.2rem;
    transition: color 0.2s ease, transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 60px;
    background: var(--social-bg);
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01);
}

.social-icons a:hover {
    color: #ffffff;
    background: var(--accent-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(74, 144, 217, 0.18);
}

.social-icons a:active {
    transform: scale(0.92);
}

@media (max-width: 480px) {
    .social-icons {
        gap: 1.5rem;
    }
    .social-icons a {
        font-size: 1.8rem;
        width: 3rem;
        height: 3rem;
    }
}

.social-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.9rem;
    letter-spacing: 0.3px;
    transition: color 0.25s ease;
}
.social-hint i {
    opacity: 0.6;
    margin-right: 4px;
}

/* ---------- 页脚 ---------- */
footer {
    margin-top: 2.6rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    padding-top: 1.6rem;
    letter-spacing: 0.4px;
    transition: color 0.25s ease, border-color 0.25s ease;
}

footer span {
    background: var(--footer-bg);
    padding: 0.2rem 1.2rem;
    border-radius: 60px;
    display: inline-block;
    font-weight: 400;
    transition: background 0.25s ease;
}

footer i {
    margin-right: 6px;
    color: var(--accent);
    opacity: 0.7;
}

@media (max-width: 400px) {
    footer {
        font-size: 0.85rem;
    }
    footer span {
        padding: 0.2rem 1rem;
    }
}

/* 辅助 */
a {
    cursor: pointer;
}