/* ========== 项目经历系统样式 ========== */

/* 首页公司名超链接 */
.company-link {
    color: #2c5aa0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}
.company-link:hover {
    color: #1a3d6d;
}
/* 提示小字绝对定位：浮现在公司名下一行的最右侧，不占行高、不挤压下方内容 */
.exp-header {
    position: relative;
}
.exp-company-hint {
    position: absolute;
    top: 100%;
    right: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #95a5a6;
    cursor: pointer;
}

/* 首页个人项目卡片化 */
.project-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #2c5aa0;
    border-radius: 6px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}
.project-item:last-child {
    border-bottom: 1px solid #e0e0e0;
}
.project-card-clickable {
    cursor: pointer;
}
/* 首页个人项目标题行：标题左、时间右 */
.project-item .project-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.project-date {
    font-size: 0.8rem;
    font-weight: normal;
    color: #95a5a6;
    white-space: nowrap;
}
.project-card-clickable:hover {
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.15);
    transform: translateY(-2px);
}

/* 技术栈标签 */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}
.tech-chip {
    display: inline-block;
    padding: 3px 10px;
    background: #eef3fa;
    color: #2c5aa0;
    border-radius: 12px;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* 公司项目面板 */
.company-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 900;
    animation: fadeIn 0.2s;
}
.company-overlay.active {
    display: block;
}
/* 面板自身当唯一滚动容器：移动端上「定高 flex 容器 + 内层 overflow」经常划不动 */
.company-panel {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 950;
    background: #f5f5f5;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    animation: slideUp 0.3s;
}
.company-panel.active {
    display: block;
}
.company-panel-header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 24px 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 10;
}
.company-panel-header > .skill-panel-header {
    align-items: flex-start;
}
.company-panel-title {
    font-size: 1.4rem;
    color: #2c3e50;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.company-panel-period {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: normal;
    padding: 2px 10px;
    background: #ecf0f1;
    border-radius: 12px;
}
/* 顶部留出空白，让标题条的投影落在它与时间标签中间，而不是压在文字上 */
.company-panel-intro {
    background: #fff;
    padding: 22px 32px;
}
.company-panel-overview {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.8;
    max-width: 900px;
}
.company-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    /* 定高滚动容器里 grid 默认会把行拉伸到满高，卡片会顶满屏幕 */
    align-content: start;
    gap: 20px;
    padding: 28px 32px;
}
/* 钉在标题条下沿（偏移量由 JS 按标题条实际高度写入），折叠按钮始终够得着 */
.company-projects-head {
    position: sticky;
    top: var(--companyHeadTop, 0px);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 32px;
    background: #f5f5f5;
    border-bottom: 1px solid #e6e6e6;
}
.company-projects-count {
    font-size: 1rem;
    font-weight: bold;
    color: #2c3e50;
    border-left: 4px solid #2c5aa0;
    padding-left: 10px;
}
.company-projects.expanded {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}
.company-panel-actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* 项目卡片 */
.project-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.project-card:hover {
    box-shadow: 0 6px 18px rgba(44, 90, 160, 0.15);
    border-color: #2c5aa0;
    transform: translateY(-3px);
}
.project-card-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.project-card-name {
    font-size: 1.05rem;
    font-weight: bold;
    color: #2c3e50;
}
.project-card-sub {
    font-size: 0.78rem;
    color: #fff;
    background: #2c5aa0;
    padding: 2px 8px;
    border-radius: 10px;
}
.project-card-period {
    font-size: 0.78rem;
    color: #95a5a6;
    margin-top: 6px;
}
.project-card-summary {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.7;
    margin-top: 12px;
    flex: 1;
}
.project-card-more {
    margin-top: 14px;
    font-size: 0.8rem;
    color: #2c5aa0;
    font-weight: bold;
}

/* 响应式 */
@media screen and (max-width: 768px) {
    .company-panel-header {
        padding: 18px 16px;
    }
    /* 公司名要与「返回简历」挤在同一行，字号不降就会换行，固定条反而更高 */
    .company-panel-title {
        font-size: 1.1rem;
        gap: 8px;
    }
    .company-panel-intro {
        padding: 16px 16px 18px;
    }
    .company-projects-head {
        padding: 12px 16px;
    }
    .company-projects {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .related-chips, .related-cards {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* 技能面板：关联项目 */
.related-chips {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4px 30px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.project-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 8px 14px;
    background: white;
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
    text-align: left;
    transition: all 0.2s;
}
.project-chip:hover {
    border-color: #2c5aa0;
    color: #2c5aa0;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.18);
    transform: translateY(-1px);
}
.chip-meta {
    font-size: 0.72rem;
    color: #8a94a6;
}
.related-empty {
    font-size: 0.88rem;
    color: #999;
    padding: 2px 0 6px;
}
.related-cards {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.inline-project-card {
    background: white;
    border-radius: 10px;
    border-left: 4px solid #2c5aa0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    /* 展开区自身是定高滚动容器，不允许 flex 压缩卡片高度 */
    flex: 0 0 auto;
}
.inline-project-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: #f8fafd;
    border-bottom: 1px solid #eaeef4;
}
.inline-project-period {
    font-size: 0.78rem;
    color: #8a94a6;
    margin-top: 6px;
}
.inline-project-body {
    padding: 6px 22px 20px;
}
.inline-project-body h2 {
    font-size: 1rem;
    color: #2c5aa0;
    margin: 20px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eef1f6;
}
.inline-project-body h3 {
    font-size: 0.92rem;
    color: #34495e;
    margin: 14px 0 6px;
}
.inline-project-body p,
.inline-project-body li {
    font-size: 0.86rem;
    color: #555;
    line-height: 1.8;
}
.inline-project-body ul {
    padding-left: 20px;
}
.inline-project-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin: 10px 0;
}
.inline-project-body th,
.inline-project-body td {
    border: 1px solid #dfe4ea;
    padding: 6px 9px;
    text-align: left;
    vertical-align: top;
}
.inline-project-body th {
    background: #f2f5f9;
    color: #2c3e50;
}
.inline-project-body code {
    background: #eef3fa;
    color: #2c5aa0;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}
.inline-project-body hr {
    border: none;
    border-top: 1px dashed #e0e0e0;
    margin: 16px 0;
}
