/* CSS Variables for theming */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Dark mode CSS variables */
body.dark-mode {
    --primary-color: #60a5fa;
    --secondary-color: #3b82f6;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: #1f2937;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    transition: background-color 0.3s ease;
}

.profile-section {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 30px;
}

.profile-image {
    flex-shrink: 0;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: white;
    box-shadow: var(--shadow-lg);
}

.profile-info h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.profile-info .title {
    font-size: 1.5em;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.profile-info .tagline {
    font-size: 1.1em;
    color: var(--text-secondary);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.contact-item .icon {
    font-size: 1.2em;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
}

.section-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
}

/* About Section */
.about p {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.timeline-item {
    padding: 20px;
    border-left: 3px solid var(--primary-color);
    padding-left: 25px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 25px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid var(--bg-card);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-header h4 {
    font-size: 1.3em;
    color: var(--text-primary);
}

.period {
    color: var(--text-secondary);
    font-weight: 600;
    background-color: var(--bg-secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.company {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.achievements {
    margin-left: 20px;
    color: var(--text-secondary);
}

.achievements li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.skill-category h4 {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    background-color: var(--bg-secondary);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-card h4 {
    font-size: 1.3em;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tag {
    background-color: var(--bg-card);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
    border: 1px solid var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer p {
    color: var(--text-secondary);
    margin: 0;
}

.footer-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Theme Toggle Button */
.theme-toggle {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 25px;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info h1 {
        font-size: 2em;
    }
    
    .profile-info .title {
        font-size: 1.2em;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.5em;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer {
        flex-direction: column;
        text-align: center;
    }
}

/* Animations - handled by JavaScript Intersection Observer */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
