/* ===== 容器 ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-md);
    position: relative;
    z-index: 1;
}

/* ===== 个人信息卡片 ===== */
.profile-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

/* 卡片顶部装饰线 */
.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary), var(--accent));
}

.profile-inner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xl);
}

.profile-avatar-wrap {
    flex-shrink: 0;
    position: relative;
}

/* 头像光晕 */
.profile-avatar-wrap::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(var(--accent), var(--accent-secondary), var(--accent));
    animation: avatarGlow 4s linear infinite;
    opacity: 0.6;
}

@keyframes avatarGlow {
    to { transform: rotate(360deg); }
}

.profile-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-card);
    position: relative;
    z-index: 1;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-info h2 {
    margin-bottom: var(--space-sm);
    font-size: 1.6rem;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm) var(--space-lg);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.detail-icon svg {
    width: 16px;
    height: 16px;
}

.detail-label {
    color: var(--text-muted);
    flex-shrink: 0;
}

.detail-label::after {
    content: ':';
    margin-right: 4px;
}

.detail-value {
    color: var(--text-primary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-value a {
    font-size: 0.85rem;
}

/* 履历时间线 */
.profile-timeline {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.timeline-track {
    display: flex;
    align-items: flex-start;
    position: relative;
}

/* 横向连接线 */
.timeline-track::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--border);
}

.timeline-node {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
    min-width: 0;
}

.timeline-logo {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: transparent;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: border-color 0.3s;
    padding: 6px;
}

.timeline-node:hover .timeline-logo {
    border-color: var(--accent);
}

.timeline-node.current .timeline-logo {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    margin: 8px 0 6px;
    position: relative;
    z-index: 1;
}

.timeline-node.current .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.timeline-year {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

.timeline-title {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 500;
}

.timeline-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* 技能标签 */
.profile-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.skill-tag {
    padding: 3px 12px;
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    letter-spacing: 0.5px;
    transition: background 0.2s, border-color 0.2s;
}

.skill-tag:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
}

/* ===== 作品展示区 ===== */
.portfolio {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-bottom: var(--space-xl);
}

/* ===== Tab 导航 ===== */
.tab-nav {
    display: flex;
    border-bottom: 2px solid var(--accent);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 14px 22px;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: color 0.2s, background-color 0.2s;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.08);
}

.tab-btn.active {
    color: #fff;
    background: var(--accent);
}

/* 二级导航 */
.tab-nav.secondary {
    border-bottom-width: 1px;
    border-color: var(--border);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 50;
}

.tab-nav.secondary .tab-btn {
    padding: 10px 18px;
    font-size: 0.88rem;
}

.tab-nav.secondary .tab-btn.active {
    background: var(--accent);
}

/* ===== Tab 面板 ===== */
.tab-panels {
    padding: var(--space-lg);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.35s ease;
}

.sub-panel {
    display: none;
}

.sub-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== 响应式 ===== */
@media (max-width: 767px) {
    .container {
        padding: var(--space-sm);
    }

    .profile-card {
        padding: var(--space-lg);
    }

    .profile-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
    }

    .profile-avatar-wrap::before {
        inset: -4px;
    }

    .profile-details {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .profile-skills {
        justify-content: center;
    }

    .timeline-logo {
        width: 56px;
        height: 56px;
        border-radius: 10px;
        padding: 4px;
    }

    .timeline-year {
        font-size: 0.72rem;
    }

    .timeline-title {
        font-size: 0.72rem;
    }

    .timeline-desc {
        font-size: 0.65rem;
    }

    .tab-panels {
        padding: var(--space-md);
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding: var(--space-lg);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: var(--space-xl);
    }
}
