/* Main CSS file for Wang Xuehe's Portfolio */

/* Base Styles */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #6366f1;
    --accent-color: #f472b6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --transition-slow: 0.3s ease-in-out;
    --transition-fast: 0.15s ease-in-out;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-dark);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Header and Navigation */
.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: white;
    font-weight: 500;
    border: 1px solid white;
    border-radius: 0.375rem;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

/* Section Styles */
.section-title {
    font-size: 2rem;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: 5rem;
}

/* Timeline Component for Experience and Education */
.timeline {
    position: relative;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}

.timeline-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    width: calc(50% - 2rem);
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 1.5rem;
    width: 1rem;
    height: 1rem;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
}

.timeline-item:nth-child(odd) .timeline-content {
    float: left;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    right: -2.5rem;
}

.timeline-item:nth-child(even) .timeline-content {
    float: right;
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -2.5rem;
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 500;
}

.timeline-title {
    margin: 0.5rem 0;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.timeline-subtitle {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 0.5rem;
}

/* Card Components */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Skill Bar */
.skill-bar {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-progress {
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
}

.skill-progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 0.25rem;
}

/* Social Links */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .timeline::before {
        left: 2rem;
    }
    
    .timeline-content {
        width: calc(100% - 5rem);
        float: right;
        margin-left: 5rem;
    }
    
    .timeline-content::after {
        left: -2.5rem !important;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Profile Image Styles */
.profile-image-container {
    position: relative;
    transition: transform var(--transition-slow);
}

.profile-image-container:hover {
    transform: scale(1.03);
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Tab Styles */
.tab-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    border-radius: 0.375rem;
    background-color: #f3f4f6;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    outline: none;
}

.tab-button:hover {
    background-color: #e5e7eb;
    transform: translateY(-2px);
}

.tab-button.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

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

/* Make tab container nice and centered */
.tab-content-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Responsive tab navigation */
@media (max-width: 640px) {
    .tab-navigation {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .tab-button {
        width: 100%;
        text-align: center;
    }
}
