@import url('https://fonts.font.im/css2?family=Ma+Shan+Zheng&display=swap');
/* 1. 基础样式重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* 2. 核心大容器 */
.resume-container {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap; 
}

/* 3. 🧩 左侧固定栏：精致窄版 */
.sidebar {
    flex: 1 1 200px; 
    min-width: 200px;
    background: linear-gradient(135deg, #32a59c, #32a59c);
    color: #e0f7f5;
}

.sticky-box {
    position: -webkit-sticky;
    position: sticky;
    top: 0;                    
    height: 100vh;             
    padding: 40px 20px;        
    text-align: center;
    display: flex;             
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    /* 🛡️ 锁定背景防御 */
    background-attachment: fixed;          
    transform: translateZ(0);             
    backface-visibility: hidden;          
}

.profilepic {
    /* 👑 核心魔法 1：让头像宽度响应左栏的缩窄 */
    width: 70%;                /* 在宽屏并排时，头像宽度占左栏总宽的 75% */
    max-width: 180px;          /* ⚡ 最大不能超过原尺寸，防止超大屏幕下头像无限变大 */
    min-width: 110px;          /* ⚡ 极限防线，在快要换行前，头像最小缩到 110px，防止缩成墨点 */
    
    /* 保持正圆 */
    aspect-ratio: 1 / 1;       /* ⚡ 现代 CSS 属性，确保高度永远等于宽度（完美正圆） */
    object-fit: cover;         /* 防止图片变形 */
    
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    margin-bottom: 20px;
    
    /* 让缩小过程更平滑顺畅 */
    transition: width 0.1s ease-out; 
}
.sidebar h2 { font-size: 1.5rem; margin-bottom: 5px; letter-spacing: 1px; color:#FFD700; font-family: 'Ma Shan Zheng', cursive;}
.sidebar .title { font-size: 0.88rem; color: #FFD700; margin-bottom: 25px; }
.contact-info { text-align: left; font-size: 0.95rem; display: flex; flex-direction: column; gap: 12px; width: 100%; }


a.lawfirm {
    text-decoration: none;     /* 去掉链接自带的下划线 */
    color: #FFD700;
    transition: color 0.2s ease;/* 👑 核心细节：让颜色变化过程有 0.2 秒的平滑过渡，不突兀 */
}

/* 👑 核心魔法：当鼠标移上去（hover）时的颜色 */
a.lawfirm:hover {
    color: #e0f7f5;             /* ⚡ 悬停时的颜色（比如变成深蓝色） */
}

a.university {
    text-decoration: none;     /* 去掉链接自带的下划线 */
    color:#2c3e50;
    transition: color 0.2s ease;/* 👑 核心细节：让颜色变化过程有 0.2 秒的平滑过渡，不突兀 */
}

/* 👑 核心魔法：当鼠标移上去（hover）时的颜色 */
a.university:hover {
    color: #795548;             /* ⚡ 悬停时的颜色（比如变成深蓝色） */
}

/* 2. 强制所有 Bootstrap Icons 使用 BI 字体 */
i.bi {
    font-family: "bootstrap-icons" !important;
    font-weight: normal !important;
    font-style: normal !important;
    display: inline-block !important;
}

hr { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 25px 0; width: 100%; }

/* 4. 📜 右侧自由滚动内容区 */
.main-content {
    flex: 3 1 600px;
    min-width: 320px;
    padding: 40px 40px 20px; 
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.resume-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.resume-section h2 {
    font-size: 1.2rem;
    color: #32a59c;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.timeline-item { margin-bottom: 10px; }
.timeline-item:last-child { margin-bottom: 0; }
.meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px; }
.meta h3 { font-size: 1.10rem; color: #795548; }
.date { font-size: 0.85rem; color: #64748b; font-weight: 500; }
.company { font-size: 0.95rem; color: #2c3e50; font-weight: 600; margin: 4px 0 10px 0; }
.text-block { font-size: 0.95rem; color: #475569; text-align: justify; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { background-color: #eff6ff; color: #795548; padding: 6px 14px; border-radius: 20px; font-size: 0.88rem; font-weight: 500; border: 1px solid #dbeafe; }

footer {text-align: center;font-size: 0.85rem;}
/* ==========================================================================
   5. 📱 针对手机端的优化（全新修改：头像靠左，名字和 Title 靠右居中）
   ========================================================================== */
@media (max-width: 815px) {
    .sticky-box {
        height: auto; 
        position: relative; 
        padding: 20px 25px;    /* ⚡ 修改：调整内边距，让手机端名片上下更饱满 */     
        
        /* 👑 修改：方向由原来的上下堆叠，改为左右并排横向排列 */
        flex-direction: row; 
        justify-content: flex-start; /* ⚡ 新增：靠屏幕左侧对齐 */
        align-items: center;         /* ⚡ 新增：让右侧文字与左侧头像完美垂直居中 */
        gap: 20px;                   /* ⚡ 新增：头像和右侧文字之间的间距 */
    }

    .profilepic {
        width: 80px;                 /* ⚡ 修改：上浮到顶部后，固定为一个精致的较小尺寸 */
        min-width: 80px;             /* ⚡ 新增：锁死尺寸，防止被右侧的名字挤压变形 */
        margin-bottom: 0;     
    }

    /* 👑 修改：取消原来的 display: none !important，放开大包装盒，允许名字和 title 显示 */
    .sidebar-details {
        display: block !important; 
        flex:1;
        text-align: center;            /* ⚡ 新增：文字改为靠左对齐，配合横向名片 */
        padding-right: 40px;
    }

    /* ⚡ 新增微调：微调名字和职位在手机端紧凑并排的间距与大小 */
    .sidebar h2 { 
        font-size: 1.25rem; 
        margin-bottom: 2px; 
    }
    .sidebar .title { 
        font-size: 0.85rem; 
        margin-bottom: 0;            /* ⚡ 修改：归零底部大间距，因为下方内容要被隐藏了 */
    }
    .sidebar .contact-info {
        gap: 0px; 
        font-size: 0.85rem; 
        margin-bottom: 0;
        text-align: center;
    }

    /* 👑 修改（精准外科手术式隐身）：只让以下繁杂信息“一键蒸发”，名字和title则保留 */
    .sidebar-details hr,
    .title {
        display: none !important;
    }

    .title1 {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size:0.8rem;
        display: inline-block !important;
    }

    .main-content {
        padding: 25px 15px;    
    }
}