/* --- 1. 全局重置与基础设定 --- */
:root {
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-main: #1d1d1f;
    --text-sub: #86868b;
    --accent-color: #000000;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    overflow-y: auto; 
}

/* --- 2. 卡片容器 --- */
#card {
    background-color: var(--card-bg);
    width: 600px;
    padding: 70px 40px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.8);
    margin: auto 0;
}

/* --- 3. 头像区域 --- */
.avatar-container {
    margin-bottom: 30px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    -webkit-font-smoothing: antialiased;
    transform: translateZ(0);
    border: 3px solid #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar:hover {
    transform: rotate(10deg) scale(1.1);
}

/* --- 4. 文字介绍 --- */
.intro-container {
    margin-bottom: 50px;
}

.name {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.bio {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.6;
    padding: 0 10px;
}

/* --- 5. 导航图标 (PC端) --- */
.nav-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: nowrap;
    width: 100%;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-sub);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-icon {
    font-size: 28px;
    color: #333;
    margin-bottom: 12px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}

.nav-label {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s ease;
}

/* 悬停特效 */
.nav-item:hover .nav-icon {
    transform: scale(1.2) translateY(-2px);
    color: var(--accent-color);
}

.nav-item:hover .nav-label {
    color: var(--accent-color);
}

/* --- 6. 底部联系方式 --- */
.contact-container {
    border-top: 1px solid #f0f0f0;
    padding-top: 25px;
    font-size: 14px;
    color: var(--text-sub);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* --- 7. 页脚版权 --- */
.footer {
    margin-top: auto;
    padding-top: 40px;
    padding-bottom: 10px;
    font-size: 12px;
    color: #bbb;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
}

/* --- 8. 移动端适配 (极限间距优化) --- */
@media (max-width: 650px) {
    #card {
        width: 100%;
        /* ⚠️ 核心：左右由之前的 10px 改为 0，彻底利用屏幕宽度 */
        padding: 50px 0; 
        margin: 20px 0;
    }

    .nav-container {
        justify-content: center; /* 保持居中 */
        
        /* ⚠️ 核心：间距提升至 25px，这在手机上视觉效果很宽 */
        gap: 25px; 
    }

    .nav-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .nav-label {
        font-size: 12px;
    }

    /* ⚠️ 智能缩放：针对屏幕宽度小于 400px 的手机 (绝大多数标准手机) */
    /* 因为 25px 间距太宽，在小屏上可能会溢出，所以整体微微缩小 5% */
    /* 这样既保持了宽间距的比例，又不会把图标挤出屏幕 */
    @media (max-width: 400px) {
        .nav-container {
            zoom: 0.95; 
        }
    }
    
    /* 针对超小屏 (iPhone SE / mini) */
    @media (max-width: 360px) {
        .nav-container {
            zoom: 0.85; 
            gap: 20px; /* 稍微妥协一下间距 */
        }
    }
}