:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --text-dark: #1e293b;
    --text-light: #475569;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #f0f0f0 100%);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    margin: 3px 0;
    background-color: var(--text-dark);
    transition: 0.3s;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-light);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

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

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

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

section {
    padding: 80px 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
}

.about {
    background-color: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.skills {
    margin-top: 2rem;
}

.skills h3, .education h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.education {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.education-item {
    margin-bottom: 1.5rem;
}

.education-item:last-child {
    margin-bottom: 0;
}

.education-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.education-details {
    color: var(--text-light);
    font-size: 0.95rem;
}

.project-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.5rem 1.5rem;
    background-color: transparent;
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-light);
}

.category-btn.active,
.category-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--bg-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    /* Enhanced image filters for vibrancy */
    filter: saturate(1.4) contrast(1.1) brightness(1.1);
    transition: filter 0.3s ease;
}

.project-card:hover .project-image {
    /* Even more vibrant on hover */
    filter: saturate(1.6) contrast(1.2) brightness(1.15);
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Reduced overlay opacity for better image visibility */
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::before {
    /* Further reduce overlay on hover */
    opacity: 0.5;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-light);
    border-radius: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.experience, .teaching {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.teaching {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

.experience-timeline, .teaching-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.teaching-timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #6366f1, #8b5cf6, #d946ef);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.experience-item, .teaching-item {
    position: relative;
    padding: 20px 0 40px 80px;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: 44px;
    top: 30px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-white);
    box-shadow: 0 0 0 3px var(--primary-color);
}

.teaching-item::before {
    content: '';
    position: absolute;
    left: 43.5px;
    top: 30px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: 3px solid var(--bg-white);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), 0 0 20px rgba(99, 102, 241, 0.4);
}

.experience-date {
    position: absolute;
    left: -150px;
    top: 28px;
    width: 180px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.teaching-date {
    position: absolute;
    left: -150px;
    top: 28px;
    width: 180px;
    text-align: right;
    font-size: 0.9rem;
    color: #6366f1;
    font-weight: 600;
}

.experience-content, .teaching-content {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.teaching-content {
    background: linear-gradient(135deg, var(--bg-white) 0%, #fefefe 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

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

.teaching-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.2);
}

.experience-content h3, .teaching-content h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.experience-content h4, .teaching-content h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.experience-content ul, .teaching-content ul {
    list-style: none;
    padding: 0;
}

.experience-content li, .teaching-content li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: var(--text-light);
    line-height: 1.6;
}

.experience-content li::before, .teaching-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.publications {
    background-color: var(--bg-light);
}

.publications-list {
    max-width: 900px;
    margin: 0 auto;
}

.publication-item {
    background-color: var(--bg-white);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.publication-item:hover {
    box-shadow: var(--shadow-md);
}

.publication-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.publication-details {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.publication-description {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-light);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.contact-icon {
    width: 20px;
    height: 20px;
}

.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .experience-timeline, .teaching-timeline {
        padding: 10px 0;
    }

    .experience-timeline::before, .teaching-timeline::before {
        left: 20px;
    }

    .experience-item, .teaching-item {
        padding: 20px 0 30px 50px;
    }

    .experience-item::before, .teaching-item::before {
        left: 14px;
    }

    .experience-date, .teaching-date {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        text-align: left;
        margin-bottom: 10px;
        font-size: 0.85rem;
    }

    .experience-content, .teaching-content {
        padding: 20px;
    }

    .experience-content h3, .teaching-content h3 {
        font-size: 1.1rem;
    }

    .experience-content h4, .teaching-content h4 {
        font-size: 1rem;
    }

    .experience-content li, .teaching-content li {
        font-size: 0.9rem;
    }

    .project-image {
        height: 250px;
        background-size: contain;
        background-color: #1a1a2e;
    }

    .project-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .project-image {
        height: 280px;
        background-size: contain;
        background-position: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-image {
        height: 220px;
        background-size: cover;
        background-position: center;
    }
}