/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 8px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container and Layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* Header Styles */
.header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

.profile-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.profile-left {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

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

.profile-info {
    padding-top: 0.5rem;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    line-height: 1;
    margin-top: 0;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    margin-bottom: 10px;
}

.contact-link:hover {
    color: var(--primary-dark);
    transform: translateX(-2px);
}

.contact-link i {
    width: 16px;
    text-align: center;
}

.location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0;
    line-height: 1;
}

.location i {
    width: 16px;
    text-align: center;
}

/* Section Styles */
section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 3rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

/* Intro Section */
.intro-section p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.intro-section p:last-child {
    margin-bottom: 0;
}

/* Experience Section */
.job {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

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

.job:last-child {
    margin-bottom: 0;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.company {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.duration {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.875rem;
    background: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.position {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.job-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}


/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.skill-category:hover {
    box-shadow: var(--shadow-sm);
}

.skill-category h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.skill-category li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.skill-category li:last-child {
    margin-bottom: 0;
}

/* Education Section */
.education {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.education h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.degree {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.education-details {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Projects Section */
.project {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

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

.project:last-child {
    margin-bottom: 0;
}

.project h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.project-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Interests Section */
.interests-section p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Approach Section */
.approach-section p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* References Section */
.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.reference {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.reference:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.reference h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.reference-title {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.reference-note {
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .profile-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        gap: 1rem;
    }
    
    .profile-pic {
        width: 100px;
        height: 100px;
    }
    
    .contact-info {
        align-items: flex-start;
        width: 100%;
    }
    
    .job-header,
    .education-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .intro-section p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.75rem;
    }
    
    .name {
        font-size: 1.75rem;
    }
    
    .job,
    .education,
    .project,
    .skill-category {
        padding: 1rem;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .project-link {
        justify-content: center;
    }
}

/* Animation for smooth loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus styles for accessibility */
.contact-link:focus,
.project-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Theme toggle positioning */
.theme-toggle {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    z-index: 1000 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 20px !important;
        top: auto !important;
        left: 20px !important;
    }
}

/* Print styles */
@media print {
    .container {
        max-width: none;
        padding: 0;
        box-shadow: none;
    }
    
    .job:hover,
    .project:hover {
        transform: none;
        box-shadow: none;
    }
    
    .contact-link,
    .project-link {
        color: var(--text-primary) !important;
    }
    
    .theme-toggle {
        display: none !important;
    }
}

/* Prevent line breaks in subtitle text */
.subtitle {
    white-space: nowrap;
}
