/* style.css - 个人展示网站样式文件 */

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* 盒模型设置为border-box，方便布局计算 */
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif; /* 字体设置 */
}

/* CSS变量定义，便于统一管理和维护 */
:root {
    --primary-color: #4361ee;      /* 主色调 - 蓝色 */
    --secondary-color: #3f37c9;    /* 次要色调 - 深蓝色 */
    --accent-color: #4cc9f0;       /* 强调色 - 浅蓝色 */
    --light-color: #f8f9fa;        /* 浅色背景 */
    --dark-color: #212529;         /* 深色文字 */
    --gray-color: #6c757d;         /* 灰色文字 */
    --light-gray: #e9ecef;         /* 浅灰色边框/背景 */
    --border-radius: 10px;         /* 统一圆角 */
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* 统一阴影效果 */
    --transition: all 0.3s ease;   /* 统一过渡动画 */
}

/* 页面基础样式 */
body {
    background-color: #f5f7fb;     /* 浅灰色背景 */
    color: var(--dark-color);      /* 文字颜色 */
    line-height: 1.6;              /* 行高 */
    min-height: 100vh;             /* 最小高度为视口高度 */
    padding-bottom: 80px;          /* 为移动端底部导航栏留出空间 */
}

/* 容器样式，用于包裹主要内容 */
.container {
    width: 100%;
    max-width: 1200px;             /* 最大宽度限制 */
    margin: 0 auto;                /* 水平居中 */
    padding: 0 20px;               /* 左右内边距 */
}

/* ==================== 导航栏样式 ==================== */
.navbar {
    background-color: white;       /* 白色背景 */
    box-shadow: var(--box-shadow); /* 阴影效果 */
    position: sticky;              /* 粘性定位，滚动时保持在顶部 */
    top: 0;                        /* 距离顶部0 */
    z-index: 1000;                 /* 高z-index确保在最上层 */
}

/* 导航容器，用于水平布局 */
.nav-container {
    display: flex;
    justify-content: space-between; /* 两端对齐 */
    align-items: center;            /* 垂直居中 */
    padding: 15px 20px;             /* 内边距 */
    max-width: 1200px;              /* 最大宽度限制 */
    margin: 0 auto;                 /* 水平居中 */
}

/* 导航栏Logo样式 */
.nav-logo {
    display: flex;
    align-items: center;            /* 垂直居中 */
    font-size: 1.5rem;              /* 字体大小 */
    font-weight: 700;               /* 加粗 */
    color: var(--primary-color);    /* 主色调 */
}

.nav-logo i {
    margin-right: 10px;             /* 图标右边距 */
    font-size: 1.8rem;              /* 图标大小 */
}

/* 导航菜单样式 */
.nav-menu {
    display: flex;
    gap: 30px;                      /* 菜单项间距 */
}

/* 导航链接样式 */
.nav-link {
    display: flex;
    align-items: center;            /* 垂直居中 */
    color: var(--gray-color);       /* 灰色文字 */
    text-decoration: none;          /* 去除下划线 */
    font-weight: 500;               /* 中等字重 */
    padding: 8px 12px;              /* 内边距 */
    border-radius: var(--border-radius); /* 圆角 */
    transition: var(--transition);  /* 过渡动画 */
}

.nav-link i {
    margin-right: 8px;              /* 图标右边距 */
    font-size: 1.1rem;              /* 图标大小 */
}

/* 导航链接悬停和激活状态 */
.nav-link:hover, .nav-link.active {
    color: var(--primary-color);    /* 主色调文字 */
    background-color: rgba(67, 97, 238, 0.1); /* 半透明背景 */
}

/* 导航切换按钮（移动端） */
.nav-toggle {
    display: none;                  /* 默认隐藏，移动端显示 */
    background: none;               /* 无背景 */
    border: none;                   /* 无边框 */
    font-size: 1.5rem;              /* 图标大小 */
    color: var(--dark-color);       /* 颜色 */
    cursor: pointer;                /* 手型光标 */
}

/* ==================== 主要内容区域 ==================== */
.main-content {
    padding: 30px 0;                /* 上下内边距 */
    min-height: calc(100vh - 140px); /* 最小高度，减去导航和底部空间 */
}

/* ==================== 个人资料区域 ==================== */
/* 个人资料整体容器 */
.profile-section {
    display: flex;
    gap: 30px;                      /* 左右两部分间距 */
    background-color: white;        /* 白色背景 */
    border-radius: var(--border-radius); /* 圆角 */
    box-shadow: var(--box-shadow);  /* 阴影效果 */
    overflow: hidden;               /* 防止内容溢出 */
    padding: 30px;                  /* 内边距 */
}

/* 左侧个人信息区域 */
.profile-left {
    flex: 0 0 350px;                /* 固定宽度350px，不伸缩 */
    display: flex;
    flex-direction: column;         /* 垂直排列 */
    align-items: flex-start;        /* 左对齐（修改：原为center居中） */
    justify-content: center;
    border-right: 1px solid var(--light-gray); /* 右边框分隔线 */
    padding-right: 30px;            /* 右边距 */
    text-align: left;               /* 文字左对齐（修改：原为center居中） */
}

/* 头像容器 */
.avatar-container {
    margin-bottom: 25px;            /* 底部外边距 */
    width: 100%;                    /* 宽度100% */
    display: flex;
    justify-content: center;        /* 水平居中 */
}

/* 头像容器内无有效图片时的样式 */
.avatar-container:has(.avatar.avatar-error),
.avatar-container:has(.avatar[data-placeholder="true"]) {
    /* 确保容器本身没有额外的边框或阴影 */
}

/* 头像样式 */
.avatar {
    width: 200px;                   /* 宽度 */
    height: 200px;                  /* 高度 */
    border-radius: 50%;             /* 圆形头像 */
    object-fit: cover;              /* 图片填充方式，保持比例裁剪 */
    border: 5px solid var(--light-gray); /* 边框 */
    box-shadow: var(--box-shadow);  /* 阴影效果 */
    background-color: var(--light-color); /* 背景色，用于无图片时的占位 */
    display: block;                 /* 确保正确显示 */
}

/* 头像加载失败或无图片时的样式 */
.avatar:not([src]),
.avatar[src=""],
.avatar[src*="undefined"],
.avatar[src*="null"],
.avatar[data-placeholder="true"],
.avatar.avatar-error {
    /* 完全移除所有边框和阴影效果 */
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    /* 设置背景和占位符图标 */
    background-color: var(--light-gray) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Ccircle cx='100' cy='100' r='80' fill='%23e9ecef'/%3E%3Cpath d='M100 70c-16.569 0-30 13.431-30 30 0 8.284 3.352 15.784 8.75 21.25C85.5 135 92.5 140 100 140s14.5-5 21.25-18.75c5.398-5.466 8.75-12.966 8.75-21.25 0-16.569-13.431-30-30-30zm0 50c-11.046 0-20-8.954-20-20s8.954-20 20-20 20 8.954 20 20-8.954 20-20 20zM100 150c-27.614 0-50 22.386-50 50h100c0-27.614-22.386-50-50-50z' fill='%236c757d'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    /* 确保图片元素本身不显示任何内容 */
    opacity: 1;
    /* 移除可能的图片边框 */
    image-rendering: auto;
}

/* 头像上传功能样式 */
.avatar-upload {
    position: absolute;             /* 绝对定位 */
    bottom: 10px;                   /* 距离底部 */
    right: 10px;                    /* 距离右侧 */
}

.avatar-upload label {
    display: flex;
    align-items: center;            /* 垂直居中 */
    justify-content: center;        /* 水平居中 */
    width: 40px;                    /* 宽度 */
    height: 40px;                   /* 高度 */
    background-color: var(--primary-color); /* 主色调背景 */
    color: white;                   /* 白色文字 */
    border-radius: 50%;             /* 圆形 */
    cursor: pointer;                /* 手型光标 */
    transition: var(--transition);  /* 过渡动画 */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); /* 阴影 */
}

.avatar-upload label:hover {
    background-color: var(--secondary-color); /* 悬停时深蓝色 */
    transform: scale(1.05);         /* 轻微放大 */
}

.avatar-upload label span {
    display: none;                  /* 隐藏文字，只显示图标 */
}

.avatar-upload input {
    display: none;                  /* 隐藏原始文件输入框 */
}

/* ==================== 个人信息部分 ==================== */
/* 个人信息容器 */
.personal-info {
    width: 100%;
    display: flex;
    flex-direction: column;         /* 垂直排列 */
    align-items: center;            /* 水平居中 */
}

/* 姓名样式 */
.name {
    font-size: 2.2rem;              /* 大字体 */
    margin-bottom: 20px;            /* 底部外边距 */
    color: var(--dark-color);       /* 深色文字 */
    text-align: center;             /* 居中显示 */
    width: 100%;                    /* 宽度100% */
}

/* 个人信息项通用样式（性别、学校、专业） */
.info-item {
    display: flex;
    align-items: center;            /* 垂直居中 - 取消注释 */
    justify-content: flex-start;    /* 左对齐 */
    margin-bottom: 15px;            /* 底部外边距 */
    padding: 10px;                  /* 内边距 */
    border-radius: var(--border-radius); /* 圆角 */
    width: 100%;                    /* 宽度100% */
    max-width: 300px;               /* 最大宽度限制，统一宽度 */
    
}

/* 信息项图标 */
.info-item i {
    margin-right: 10px;             /* 图标右边距 */
    color: var(--primary-color);    /* 主色调 */
    width: 20px;                    /* 固定宽度 */
    text-align: center;             /* 居中 */
    flex-shrink: 0;                 /* 防止图标被压缩 */
}

/* 信息标签（如"性别："） */
.info-label {
    font-weight: 600;               /* 加粗 */
    margin-right: 0px;              /* 右边距 */
    color: var(--dark-color);       /* 深色文字 */
    min-width: 80px;                /* 最小宽度，保证标签对齐 */
    flex-shrink: 0;                 /* 防止标签被压缩 */
}

/* 信息值（如"男"） */
.info-value {
    color: var(--gray-color);       /* 灰色文字 */
    flex: 1;                        /* 占据剩余空间 */
    text-align: left;               /* 文字左对齐 */
}

/* ==================== 联系方式区域 ==================== */
/* 联系方式容器 */
.contact-info {
    margin-top: 30px;               /* 顶部外边距 */
    padding-top: 20px;              /* 顶部内边距 */
    border-top: 1px solid var(--light-gray); /* 顶部边框分隔线 */
    width: 100%;                    /* 宽度100% */
    max-width: 300px;               /* 最大宽度，与info-item保持一致 */
    text-align: left;               /* 文字左对齐 */
}

/* 联系方式标题 */
.contact-info h3 {
    margin-bottom: 15px;            /* 底部外边距 */
    color: var(--dark-color);       /* 深色文字 */
    font-size: 1.3rem;              /* 字体大小 */
    text-align: left;               /* 左对齐 */
    padding-left: 0x;             /* 与下方图标对齐 */
}

/* 联系方式项（邮箱、电话、地址） */
.contact-item {
    display: flex;
    align-items: center;            /* 垂直居中 */
    margin-bottom: 10px;            /* 底部外边距 */
    color: var(--gray-color);       /* 灰色文字 */
    justify-content: flex-start;    /* 左对齐 */
    width: 100%;                    /* 宽度100% */
}

/* 联系方式图标 */
.contact-item i {
    margin-right: 10px;             /* 图标右边距 */
    color: var(--primary-color);    /* 主色调 */
    width: 20px;                    /* 固定宽度 */
    text-align: center;             /* 居中 - 改回center */
    flex-shrink: 0;                 /* 防止图标被压缩 */
}

/* 联系方式文字 */
.contact-item span {
    text-align: left;               /* 文字左对齐 */
}

/* ==================== 右侧个人简介区域 ==================== */
.profile-right {
    flex: 1;                        /* 占据剩余空间 */
}

/* 区域标题样式 */
.section-header {
    display: flex;
    justify-content: space-between; /* 两端对齐 */
    align-items: center;            /* 垂直居中 */
    margin-bottom: 25px;            /* 底部外边距 */
    padding-bottom: 15px;           /* 底部内边距 */
    border-bottom: 1px solid var(--light-gray); /* 底部边框 */
}

.section-header h2 {
    font-size: 1.8rem;              /* 字体大小 */
    color: var(--dark-color);       /* 深色文字 */
    display: flex;
    align-items: center;            /* 垂直居中 */
}

.section-header h2 i {
    margin-right: 10px;             /* 图标右边距 */
    color: var(--primary-color);    /* 主色调 */
}

/* 个人简介内容 */
.intro-content {
    margin-bottom: 30px;            /* 底部外边距 */
    line-height: 1.8;               /* 行高 */
    color: var(--dark-color);       /* 深色文字 */
}

.intro-content p {
    margin-bottom: 15px;            /* 段落间距 */
}

/* ==================== 技能区域 ==================== */
.skills-section h3 {
    font-size: 1.5rem;              /* 字体大小 */
    margin-bottom: 20px;            /* 底部外边距 */
    color: var(--dark-color);       /* 深色文字 */
    display: flex;
    align-items: center;            /* 垂直居中 */
}

.skills-section h3 i {
    margin-right: 10px;             /* 图标右边距 */
    color: var(--primary-color);    /* 主色调 */
}

/* 技能列表 */
.skills-list {
    display: flex;
    flex-direction: column;         /* 垂直排列 */
    gap: 15px;                      /* 项间距 */
}

/* 技能项 */
.skill-item {
    display: flex;
    align-items: center;            /* 垂直居中 */
}

/* 技能名称 */
.skill-name {
    width: 120px;                   /* 固定宽度 */
    font-weight: 600;               /* 加粗 */
    color: var(--dark-color);       /* 深色文字 */
}

/* 技能条容器 */
.skill-bar {
    flex: 1;                        /* 占据剩余空间 */
    height: 10px;                   /* 高度 */
    background-color: var(--light-gray); /* 浅灰色背景 */
    border-radius: 5px;             /* 圆角 */
    overflow: hidden;               /* 隐藏溢出部分 */
    margin: 0 15px;                 /* 左右外边距 */
}

/* 技能水平条 */
.skill-level {
    height: 100%;                   /* 充满容器高度 */
    background-color: var(--primary-color); /* 主色调 */
    border-radius: 5px;             /* 圆角 */
    transition: width 1s ease;      /* 宽度变化动画 */
}

/* 技能百分比 */
.skill-percent {
    width: 40px;                    /* 固定宽度 */
    text-align: right;              /* 右对齐 */
    font-weight: 600;               /* 加粗 */
    color: var(--primary-color);    /* 主色调 */
}

/* ==================== 技能认证区域 ==================== */
.certifications-section {
    margin-top: 30px;               /* 顶部外边距 */
    padding-top: 30px;              /* 顶部内边距 */
    border-top: 1px solid var(--light-gray); /* 顶部边框分隔线 */
}

.certifications-section h3 {
    font-size: 1.5rem;              /* 字体大小 */
    margin-bottom: 20px;            /* 底部外边距 */
    color: var(--dark-color);       /* 深色文字 */
    display: flex;
    align-items: center;            /* 垂直居中 */
}

.certifications-section h3 i {
    margin-right: 10px;             /* 图标右边距 */
    color: var(--primary-color);    /* 主色调 */
}

/* 认证列表 */
.certifications-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 每行2列 */
    gap: 15px;                      /* 项间距 */
}

/* 认证项 */
.certification-item {
    display: flex;
    align-items: flex-start;        /* 顶部对齐 */
    padding: 15px;                  /* 内边距 */
    background-color: var(--light-color); /* 浅色背景 */
    border-radius: var(--border-radius); /* 圆角 */
    transition: var(--transition);  /* 过渡动画 */
}

.certification-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); /* 悬停时阴影 */
    transform: translateX(5px);     /* 轻微右移 */
}

/* 认证图标 */
.certification-item i {
    font-size: 1.5rem;              /* 图标大小 */
    color: var(--primary-color);    /* 主色调 */
    margin-right: 15px;             /* 右边距 */
    margin-top: 2px;                /* 顶部微调 */
    flex-shrink: 0;                 /* 防止图标被压缩 */
}

/* 认证内容 */
.certification-content {
    display: flex;
    flex-direction: column;         /* 垂直排列 */
    gap: 5px;                       /* 项间距 */
    flex: 1;                        /* 占据剩余空间 */
}

/* 认证名称 */
.certification-name {
    font-weight: 600;               /* 加粗 */
    color: var(--dark-color);       /* 深色文字 */
    font-size: 1.1rem;              /* 字体大小 */
}

/* 认证机构 */
.certification-org {
    color: var(--gray-color);       /* 灰色文字 */
    font-size: 0.95rem;             /* 字体大小 */
}

/* 认证日期 */
.certification-date {
    color: var(--gray-color);       /* 灰色文字 */
    font-size: 0.9rem;              /* 字体大小 */
}

/* ==================== 工作经历页面样式 ==================== */
/* 页面标题 */
.page-header {
    text-align: center;             /* 居中 */
    margin-bottom: 40px;            /* 底部外边距 */
}

.page-header h1 {
    font-size: 2.5rem;              /* 大字体 */
    color: var(--dark-color);       /* 深色文字 */
    margin-bottom: 10px;            /* 底部外边距 */
    display: flex;
    align-items: center;            /* 垂直居中 */
    justify-content: center;        /* 水平居中 */
}

.page-header h1 i {
    margin-right: 10px;             /* 图标右边距 */
    color: var(--primary-color);    /* 主色调 */
}

.page-header p {
    color: var(--gray-color);       /* 灰色文字 */
    font-size: 1.1rem;              /* 字体大小 */
}

/* ==================== 空状态样式 ==================== */
/* 没有内容时的显示样式 */
.empty-state {
    text-align: center;             /* 居中 */
    padding: 60px 20px;             /* 内边距 */
    background-color: white;        /* 白色背景 */
    border-radius: var(--border-radius); /* 圆角 */
    box-shadow: var(--box-shadow);  /* 阴影 */
}

.empty-icon {
    font-size: 4rem;                /* 大图标 */
    color: var(--light-gray);       /* 浅灰色 */
    margin-bottom: 20px;            /* 底部外边距 */
}

.empty-state h3 {
    font-size: 1.8rem;              /* 字体大小 */
    color: var(--dark-color);       /* 深色文字 */
    margin-bottom: 10px;            /* 底部外边距 */
}

.empty-state p {
    color: var(--gray-color);       /* 灰色文字 */
    margin-bottom: 10px;            /* 底部外边距 */
    max-width: 500px;               /* 最大宽度 */
    margin-left: auto;              /* 水平居中 */
    margin-right: auto;             /* 水平居中 */
}

.empty-state a {
    color: var(--primary-color);    /* 主色调 */
    text-decoration: none;          /* 去除下划线 */
    font-weight: 500;               /* 中等字重 */
}

.empty-state a:hover {
    text-decoration: underline;     /* 悬停时显示下划线 */
}

.empty-action {
    margin-top: 30px;               /* 顶部外边距 */
}

/* ==================== 按钮样式 ==================== */
/* 通用按钮样式 */
.btn {
    padding: 10px 20px;             /* 内边距 */
    border-radius: var(--border-radius); /* 圆角 */
    font-weight: 500;               /* 中等字重 */
    cursor: pointer;                /* 手型光标 */
    border: none;                   /* 无边框 */
    transition: var(--transition);  /* 过渡动画 */
    display: inline-flex;
    align-items: center;            /* 垂直居中 */
    justify-content: center;        /* 水平居中 */
}

.btn i {
    margin-right: 8px;              /* 图标右边距 */
}

/* 主要按钮 */
.btn-primary {
    background-color: var(--primary-color); /* 主色调背景 */
    color: white;                   /* 白色文字 */
}

.btn-primary:hover {
    background-color: var(--secondary-color); /* 悬停时深蓝色 */
}

/* 次要按钮 */
.btn-secondary {
    background-color: var(--light-gray); /* 浅灰色背景 */
    color: var(--dark-color);       /* 深色文字 */
}

.btn-secondary:hover {
    background-color: #dde1e7;      /* 悬停时稍深灰色 */
}

/* ==================== 模态框样式 ==================== */
/* 模态框背景 */
.modal {
    display: none;                  /* 默认隐藏 */
    position: fixed;                /* 固定定位 */
    top: 0;
    left: 0;
    width: 100%;                    /* 全宽 */
    height: 100%;                   /* 全高 */
    background-color: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */
    z-index: 2000;                  /* 高z-index在最上层 */
    align-items: center;            /* 垂直居中 */
    justify-content: center;        /* 水平居中 */
}

/* 模态框内容 */
.modal-content {
    background-color: white;        /* 白色背景 */
    border-radius: var(--border-radius); /* 圆角 */
    width: 90%;                     /* 宽度90% */
    max-width: 700px;               /* 最大宽度 */
    max-height: 100vh;               /* 最大高度 */
    overflow: hidden;               /* 隐藏溢出 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); /* 阴影 */
}

/* 模态框头部 */
.modal-header {
    display: flex;
    justify-content: space-between; /* 两端对齐 */
    align-items: center;            /* 垂直居中 */
    padding: 20px;                  /* 内边距 */
    border-bottom: 1px solid var(--light-gray); /* 底部边框 */
}

.modal-header h3 {
    font-size: 1.5rem;              /* 字体大小 */
    color: var(--dark-color);       /* 深色文字 */
}

/* 模态框关闭按钮 */
.modal-close {
    background: none;               /* 无背景 */
    border: none;                   /* 无边框 */
    font-size: 1.2rem;              /* 字体大小 */
    color: var(--gray-color);       /* 灰色文字 */
    cursor: pointer;                /* 手型光标 */
    transition: var(--transition);  /* 过渡动画 */
}

.modal-close:hover {
    color: var(--dark-color);       /* 悬停时深色 */
}

/* 模态框主体 */
.modal-body {
    padding: 20px;                  /* 内边距 */
}

/* 模态框文本域 */
.modal-body textarea {
    width: 100%;                    /* 宽度100% */
    padding: 15px;                  /* 内边距 */
    border: 1px solid var(--light-gray); /* 边框 */
    border-radius: var(--border-radius); /* 圆角 */
    font-size: 1rem;                /* 字体大小 */
    line-height: 1.6;               /* 行高 */
    resize: vertical;               /* 允许垂直调整大小 */
    min-height: 200px;              /* 最小高度 */
}

/* 模态框底部 */
.modal-footer {
    padding: 20px;                  /* 内边距 */
    border-top: 1px solid var(--light-gray); /* 顶部边框 */
    display: flex;
    justify-content: flex-end;      /* 右对齐 */
    gap: 15px;                      /* 按钮间距 */
}

/* ==================== 移动端底部导航栏 ==================== */
/* 移动端底部导航栏（默认隐藏，响应式显示） */
.mobile-nav {
    display: none;                  /* 默认隐藏，响应式显示 */
    position: fixed;                /* 固定定位 */
    bottom: 0;                      /* 距离底部0 */
    left: 0;                        /* 距离左侧0 */
    width: 100%;                    /* 全宽 */
    background-color:white;        /* 白色背景 */
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1); /* 顶部阴影 */
    z-index: 1000;                  /* 高z-index */
    padding: 5px 0;                /* 内边距（减小） */
}

/* 移动端导航链接 */
.mobile-nav-link {
    flex: 1;                        /* 等分宽度 */
    display: flex;
    flex-direction: column;         /* 垂直排列 */
    align-items: center;            /* 水平居中 */
    justify-content: center;        /* 垂直居中 */
    color: var(--gray-color);       /* 灰色文字 */
    text-decoration: none;          /* 去除下划线 */
    padding: 5px 0;                /* 内边距（减小） */
    transition: var(--transition);  /* 过渡动画 */
}

.mobile-nav-link i {
    font-size: 1.1rem;              /* 图标大小（减小） */
    margin-bottom: 3px;             /* 底部外边距（减小） */
}

.mobile-nav-link span {
    font-size: 0.8rem;              /* 小字体 */
    font-weight: 500;               /* 中等字重 */
}

/* 移动端导航链接悬停和激活状态 */
.mobile-nav-link:hover, .mobile-nav-link.active {
    color: var(--primary-color);    /* 主色调 */
}

/* ==================== 工作经历卡片样式 ==================== */
/* 工作经历卡片容器 */
.experience-card {
    background-color:transparent;        /* 透明背景 */
    border-radius: var(--border-radius); /* 圆角 */
    box-shadow: var(--box-shadow);  /* 阴影效果 */
    overflow: hidden;               /* 隐藏溢出 */
    margin-bottom: 30px;            /* 底部外边距 */
    display: flex;                  /* 弹性布局 */
    min-height: 700px;              /* 最小高度 */
    position: relative;             /* 相对定位 */
}

.experience-card::before {
  content: "";
  position: absolute;
  left: 30px;    /* 根据容器内边距调整 */
  right: 30px;
  top: 70px;     /* 调整到正好位于 company-name 下方 */
  height: 2px;
  background: var(--primary-color);
  z-index: 5;    /* 确保在图片之上 */
  display: block; /* 确保显示 */
}

/* 工作经历信息区域（左侧） */
.experience-info {
    flex: 0 0 40%;                  /* 固定宽度40% */                       
    padding: 30px;                  /* 内边距 */
    display: flex;                  /* 弹性布局 */
    flex-direction: column;         /* 垂直排列 */
    justify-content: space-between; /* 两端对齐 */
}

/* 公司信息 */
.company-info {
    margin-bottom: 50px;            /* 底部外边距 */
    position: relative;
    z-index: 3; /* 确保标题在横线之上 */
}

.company-name {
    font-size: 1.8rem;              /* 字体大小 */
    color: var(--dark-color);       /* 深色文字 */
    margin-bottom: 15px;            /* 底部外边距 */
    padding-bottom: 10px;
    position: relative;
    display: inline-block; /* 使标题只覆盖部分宽度 */
    background-color: white; /* 背景色覆盖部分横线 */
    padding-right: 20px;

}

/* 经历元信息 */
.experience-meta {
    display: flex;                  /* 弹性布局 */
    flex-direction: column;         /* 垂直排列 */
    gap: 12px;                      /* 项间距 */
}

.meta-item {
    display: flex;                  /* 弹性布局 */
    align-items: center;            /* 垂直居中 */
    gap: 8px;                       /* 间距 */
}

.meta-item i {
    color: var(--primary-color);    /* 主色调 */
    width: 16px;                    /* 固定宽度 */
    text-align: center;             /* 居中 */
}

.meta-label {
    font-weight: 600;               /* 加粗 */
    color: var(--dark-color);       /* 深色文字 */
    min-width: 50px;                /* 最小宽度 */
}

.meta-value {
    color: var(--gray-color);       /* 灰色文字 */
}

/* 工作内容区域 */
.work-content {
    flex: 1;                        /* 占据剩余空间 */
}

.work-content h4 {
    font-size: 1.3rem;              /* 字体大小 */
    color: var(--dark-color);       /* 深色文字 */
    margin-bottom: 15px;            /* 底部外边距 */
    display: flex;                  /* 弹性布局 */
    align-items: center;            /* 垂直居中 */
    gap: 8px;                       /* 间距 */
}

.work-content h4 i {
    color: var(--primary-color);    /* 主色调 */
}

.work-list {
    list-style: none;               /* 去除列表样式 */
    padding-left: 0;                /* 去除左内边距 */
}

.work-list li {
    padding: 8px 0;                 /* 上下内边距 */
    border-bottom: 1px solid var(--light-gray); /* 底部边框 */
    color: var(--gray-color);       /* 灰色文字 */
    position: relative;             /* 相对定位 */
    padding-left: 20px;             /* 左内边距 */
}

.work-list li:before {
    content: "•";                   /* 圆点符号 */
    color: var(--primary-color);    /* 主色调 */
    font-weight: bold;              /* 加粗 */
    position: absolute;             /* 绝对定位 */
    left: 0;                        /* 距离左侧0 */
}

/* 工作经历图片区域（右侧） */
.experience-images {
    flex: 0 0 60%;                  /* 固定宽度45% */
    background-color: var(--light-gray); /* 浅灰色背景 */
    display: flex;                  /* 弹性布局 */
    align-items: center;            /* 垂直居中 */
    justify-content: center;        /* 水平居中 */
    padding: 0px;                  /* 内边距 */
}

/* 隐藏图片区域的样式 */
.experience-images.hidden {
    display: none;                  /* 隐藏图片区域 */
}

/* 当图片区域隐藏时，调整卡片布局 */
.experience-card:has(.experience-images.hidden) .experience-info {
    flex: 1;                        /* 信息区域占据全部空间 */
    width: 100%;                    /* 全宽 */
}

/* 图片轮播容器*/
/*PC端图片宽度*/
.image-carousel {
    width: 100%;                    /* 宽度100% */
    max-width: 600px;               /* 最大宽度 */
    position: relative;             /* 相对定位 */
}

.carousel-container {
    position: relative;             /* 相对定位 */
    overflow: hidden;               /* 隐藏溢出 */
    border-radius: 8px;             /* 圆角 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 阴影 */
}
/*PC端图片高度*/
.carousel-slide {
    display: none;                  /* 默认隐藏 */
    width: 100%;                    /* 宽度100% */
    height: 400px;                  /* 固定高度 */
}

.carousel-slide.active {
    display: block;                 /* 显示激活的幻灯片 */
}

.carousel-slide img {
    width: 100%;                    /* 宽度100% */
    height: 100%;                   /* 高度100% */
    object-fit: cover;              /* 图片填充方式 */
    border-radius: 8px;             /* 圆角 */
}

/* 轮播控制按钮 */
.carousel-controls {
    display: flex;                  /* 弹性布局 */
    align-items: center;            /* 垂直居中 */
    justify-content: space-between; /* 两端对齐 */
    margin-top: 15px;               /* 顶部外边距 */
    gap: 10px;                      /* 间距 */
}

.carousel-prev, .carousel-next {
    background: none;               /* 无背景 */
    color: var(--primary-color);    /* 主色调文字 */
    border: none;                   /* 无边框 */
    width: auto;                    /* 自动宽度 */
    height: auto;                   /* 自动高度 */
    cursor: pointer;                /* 手型光标 */
    display: flex;                  /* 弹性布局 */
    align-items: center;            /* 垂直居中 */
    justify-content: center;        /* 水平居中 */
    transition: var(--transition);  /* 过渡动画 */
    font-size: 1.5rem;              /* 字体大小 */
    font-weight: bold;              /* 加粗 */
    padding: 5px 10px;              /* 内边距 */
}

.carousel-prev:hover, .carousel-next:hover {
    color: var(--secondary-color);  /* 悬停时深蓝色 */
    transform: scale(1.1);          /* 轻微放大 */
}

/* 轮播指示器 - 数字显示 */
.carousel-indicators {
    display: flex;                  /* 弹性布局 */
    align-items: center;            /* 垂直居中 */
    justify-content: center;        /* 水平居中 */
}

.indicator-text {
    font-size: 0.9rem;              /* 字体大小 */
    font-weight: 600;               /* 加粗 */
    color: var(--gray-color);       /* 灰色文字 */
    padding: 4px 12px;              /* 内边距 */
    background-color: rgba(255, 255, 255, 0.8); /* 半透明白色背景 */
    border-radius: 12px;            /* 圆角 */
    border: 1px solid var(--light-gray); /* 边框 */
    transition: var(--transition);  /* 过渡动画 */
    min-width: 50px;                /* 最小宽度 */
    text-align: center;             /* 文字居中 */
}

.indicator-text.active {
    color: var(--primary-color);    /* 激活时主色调 */
    background-color: rgba(74, 144, 226, 0.1); /* 半透明主色调背景 */
    border-color: var(--primary-color); /* 主色调边框 */
}

/* ==================== 移动端响应式布局 ==================== */
@media (max-width: 768px) {
    /* 隐藏PC端顶部导航栏 */
    .navbar {
        display: none;
    }
    
    /* 显示移动端底部导航栏 */
    .mobile-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    /* 首页个人资料区域移动端布局调整 */
    .profile-section {
        flex-direction: column;        /* 垂直排列 */
        padding: 20px;                 /* 移动端内边距 */
        gap: 0;                        /* 移除gap，使用margin控制间距 */
    }
    
    /* 左侧个人信息区域（包含个人信息，但不包括联系方式） */
    .profile-left {
        flex: none;                    /* 取消固定宽度 */
        width: 100%;                    /* 全宽 */
        border-right: none;            /* 移除右边框 */
        padding-right: 0;              /* 移除右边距 */
        padding-bottom: 0;             /* 移除底部内边距 */
        order: 1;                      /* 第一个显示 */
        display: flex;                 /* 变为flex容器 */
        flex-direction: column;        /* 垂直排列 */
    }
    
    /* 个人信息部分（头像+姓名+性别+学校+专业，不包括联系方式） */
    .personal-info {
        order: 1;                      /* 第一个显示 */
        display: flex;                 /* 变为flex容器 */
        flex-direction: column;        /* 垂直排列 */
    }
    
    /* 右侧内容区域 */
    .profile-right {
        order: 2;                      /* 第二个显示 */
        width: 100%;                   /* 全宽 */
        display: flex;                 /* 变为flex容器 */
        flex-direction: column;        /* 垂直排列 */
    }
    
    /* 个人简介部分（第二个显示） */
    .profile-right .section-header {
        order: 2;                      /* 第二个显示 */
        margin-top: 0;                 /* 移除顶部间距 */
        margin-bottom: 25px;           /* 保持底部间距 */
    }
    
    .profile-right .intro-content {
        order: 2;                      /* 第二个显示（与section-header一起） */
        margin-top: 0;                 /* 移除顶部间距 */
    }
    
    /* 技能专长部分（第三个显示） */
    .profile-right .skills-section {
        order: 3;                      /* 第三个显示 */
        margin-top: 30px;              /* 顶部间距 */
        padding-top: 30px;             /* 顶部内边距 */
        border-top: 1px solid var(--light-gray); /* 顶部边框 */
        margin-bottom: 0;              /* 移除底部间距 */
    }
    
    /* 技能认证部分（第四个显示） */
    .profile-right .certifications-section {
        order: 4;                      /* 第四个显示 */
        margin-top: 10px;              /* 顶部间距（减小） */
        padding-top: 10px;             /* 顶部内边距（减小） */
        border-top: 1px solid var(--light-gray); /* 顶部边框 */
        margin-bottom: 0;              /* 移除底部间距 */
    }
    
    /* 移动端认证列表也显示2列 */
    .certifications-list {
        grid-template-columns: repeat(2, 1fr); /* 移动端也2列 */
        gap: 5px;                      /* 移动端项间距（减小） */
    }
    
    /* 联系方式部分（第四个显示）- 在移动端通过JavaScript移到profile-section级别 */
    .profile-section > .contact-info {
        order: 4;                      /* 第四个显示 */
        width: 100%;                   /* 全宽 */
        max-width: 100%;               /* 移除最大宽度限制 */
        margin-top: 30px;              /* 顶部间距 */
        padding-top: 20px;             /* 顶部内边距 */
        border-top: 1px solid var(--light-gray); /* 顶部边框 */
    }
    
    /* 工作经历卡片在移动端改为垂直排列 */
    .experience-card {
        flex-direction: column;
        min-height: auto;
    }
    
    /* 工作经历信息区域在移动端占据全宽 */
    .experience-info {
        flex: none;
        width: 100%;
        order: 1;
        padding: 20px; /* 移动端减少内边距 */
    }
    
    /* 工作经历图片区域优化 */
    .experience-images {
        flex: none;
        width: 100%;
        order: 2;
        min-height: auto; /* 设置合适的最小高度 */
        padding: 15px;
        background-color: transparent;
    }
    
    /* 图片轮播容器优化 */
    .image-carousel {
        width: 100%;
        max-width: 100%;
        height: auto;/* 自动高度，由幻灯片控制 */
    }
    
    /* 轮播幻灯片优化 */
    .carousel-slide {
        height: auto;/* 增加竖屏时的高度 */
        display: none;
        position: relative;
    }
    
    .carousel-slide.active {
        display: block;
    }
    
    .carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* 移动端确保图片完整显示 */
        background-color: transparent;
        border-radius: 8px;
    }
    
    /* 轮播控制区域优化 */
    .carousel-controls {
        margin-top: 10px;
        padding: 0 10px;
    }
    
    /* 公司信息在移动端调整 */
    .company-info {
        margin-bottom: 30px;
    }
    
    .company-name {
        font-size: 1.5rem;
    }
}

/* PC端隐藏profile-section级别的contact-info（如果存在） */
@media (min-width: 769px) {
    .profile-section > .contact-info {
        display: none;             /* PC端隐藏 */
    }
}

/* 移动端横屏优化 - 768px以下横屏 */
@media (orientation: landscape) and (max-width: 768px) {
    .experience-images {
        min-height: 300px;
        padding: 10px;
    }
    
    .carousel-slide {
        height: 280px;
    }
    
    .carousel-slide img {
        object-fit: cover;
        max-width: 90%;
        margin: 0 auto;
        display: block;
    }
    
    .carousel-container {
        max-width: 80%;
        margin: 0 auto;
    }
}
