/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    --border-color: #e2e8f0;
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.portfolio-container {
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--bg-secondary);
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    margin-bottom: 80px;
    padding: 60px 0;
    transition: var(--transition);
}

/* Updated Welcome Section */
.welcome-section {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    padding: 80px 20px;
    /* Reduced padding */
    margin: -30px auto;
    /* Center the section */
    width: 100%;
    /* Ensure it uses only 100% width */
    max-width: 100%;
    /* Prevent overflow */
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    /* Include padding and border in width calculation */
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("assets/images/background.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Remove animation for static background */
}

@keyframes wave {
    0% {
        background-position-x: 0;
    }

    100% {
        background-position-x: 1000px;
    }
}

.profile-pic {
    width: 150px;
    /* Reduced size */
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.9);
    /* Slightly thinner border */
    box-shadow: var(--shadow-md);
    /* Subtle shadow */
    transition: var(--transition);
    position: relative;
    z-index: 0;
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    /* Slightly reduced hover shadow */
}

.about-section {
    background: var(--bg-primary) !important;
    color: var(--text-primary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    /* Reduced padding */
    box-shadow: var(--shadow-md);
    /* Subtle shadow */
    margin: 30px 0;
    /* Reduced margin */
    font-size: 1.2em;
    line-height: 1.8;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    /* Ensure proper stacking context */
    z-index: 1;
    /* Ensure it appears above other elements */
}

.about-section:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.about-section p {
    margin-bottom: 28px;
    text-align: justify;
    color: var(--text-secondary);
}

.about-section .highlight {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    font-size: 1.1em;
}

.about-section .emphasis {
    color: var(--primary-color);
    font-weight: 600;
}

.projects-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    /* Reduced padding */
    margin: 30px 0;
    /* Reduced margin */
    box-shadow: var(--shadow-md);
    /* Subtle shadow */
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.projects-section:hover {
    box-shadow: var(--shadow-xl);
}

.resume-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    /* Reduced padding */
    box-shadow: var(--shadow-md);
    /* Subtle shadow */
    text-align: left;
    margin: 30px 0;
    /* Reduced margin */
    font-size: 1.1em;
    line-height: 1.7;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.resume-section:hover {
    box-shadow: var(--shadow-xl);
}

.resume-section h2 {
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-primary);
}

.resume-section h3 {
    color: var(--primary-color);
    font-size: 1.6em;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.resume-section h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.resume-section .contact-info {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.resume-section .contact-info:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.resume-section .contact-info strong {
    font-size: 1.4em;
    color: white;
    font-weight: 600;
}

.resume-section .contact-info a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
}

.resume-section .contact-info a:hover {
    color: white;
    text-decoration: underline;
}

.resume-section .job-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2em;
}

.resume-section .company-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1em;
}

.resume-section .date-range {
    color: var(--text-light);
    font-style: italic;
    margin-left: 12px;
    font-weight: 500;
}

.resume-section .degree {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1em;
}

.resume-section .institution {
    color: var(--text-primary);
    font-weight: 600;
}

.resume-section ul {
    margin: 20px 0;
    padding-left: 24px;
}

.resume-section li {
    margin-bottom: 12px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.resume-section li::marker {
    color: var(--primary-color);
}

.resume-section .highlight-achievement {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.resume-section .publication-item {
    background: var(--bg-accent);
    padding: 20px;
    margin: 15px 0;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.resume-section .publication-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.resume-section .publication-journal {
    color: var(--primary-color);
    font-weight: 600;
}

.resume-section .publication-year {
    color: var(--text-light);
    font-weight: 600;
}

.section-title {
    font-size: 2.5em;
    /* Reduced font size */
    font-weight: 600;
    /* Slightly lighter weight */
    margin-bottom: 30px;
    /* Reduced margin */
    color: var(--text-primary);
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    /* Adjusted position */
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    /* Reduced width */
    height: 3px;
    /* Reduced height */
    background: var(--gradient-primary);
    border-radius: 2px;
}

.welcome-title {
    font-size: 3em;
    /* Reduced font size */
    font-weight: 700;
    margin-bottom: 20px;
    /* Reduced margin */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* Subtle shadow */
    position: relative;
    z-index: 1;
}

.welcome-subtitle {
    font-size: 1.4em;
    /* Reduced font size */
    opacity: 0.9;
    /* Slightly reduced opacity */
    margin-bottom: 30px;
    /* Reduced margin */
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.project-card {
    background: var(--bg-primary);
    padding: 30px;
    /* Reduced padding */
    margin: 15px 0;
    /* Reduced margin */
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    /* Subtle shadow */
    border: 1px solid var(--border-color);
    transition: var(--transition);
    font-size: 1.1em;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.project-card h3 {
    font-size: 1.6em;
    /* Reduced font size */
    margin-bottom: 15px;
    /* Reduced margin */
    color: var(--text-primary);
    font-weight: 600;
}

.project-card p {
    font-size: 1em;
    /* Reduced font size */
    line-height: 1.5;
    /* Adjusted line height */
    margin-bottom: 12px;
    /* Reduced margin */
    color: var(--text-secondary);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.project-content {
    flex: 1;
}

.project-footer {
    margin-top: auto;
    padding-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.details-btn,
.github-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.details-btn {
    background: var(--gradient-primary);
    color: white;
}

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

.github-btn {
    background: var(--text-primary);
    color: white;
}

.github-btn:hover {
    background: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.modal-text-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-text-content h4 {
    color: var(--primary-color);
    font-size: 1.6em;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.modal-text-content .story-section {
    margin-bottom: 25px;
}

.modal-text-content .story-section h5 {
    color: var(--secondary-color);
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.modal-text-content ul {
    margin-left: 24px;
    margin-bottom: 20px;
}

.modal-text-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.modal-text-content .tech-stack {
    background: var(--bg-accent);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.modal-text-content .tech-stack strong {
    color: var(--primary-color);
}

.modal-text-content p {
    line-height: 1.7;
    margin-bottom: 18px;
}

/* Navigation Styles */
.nav-container {
    width: 100%;
    /* Make the nav bar span the full width */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    /* Slightly transparent background */
    backdrop-filter: blur(20px);
    /* Add blur effect */
    border-bottom: 1px solid var(--border-color);
    /* Add subtle border */
    display: flex;
    justify-content: space-around;
    /* Space items evenly */
    align-items: center;
    /* Center items vertically */
    padding: 10px 0;
    /* Adjust padding */
    transition: var(--transition);
}

.nav-container button {
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: transparent;
    border: none;
}

.nav-container button:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-1px);
}

/* Navigation Styles */
.nav-container .nav-icon {
    display: none;
    /* Hide icons by default */
}

/* Show icons only in mobile view */
@media (max-width: 768px) {
    .nav-container .nav-icon {
        display: inline-block;
        /* Show icons on mobile */
        font-size: 1.5em;
        /* Adjust icon size */
        color: var(--text-secondary);
        cursor: pointer;
        transition: var(--transition);
    }

    .nav-container .nav-icon:hover {
        color: var(--primary-color);
        transform: scale(1.1);
        /* Slight hover effect */
    }

    .nav-container button {
        display: none;
        /* Hide text buttons on mobile */
    }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Responsive Design Adjustments */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 0 12px;
        /* Reduced padding for smaller screens */
        margin: 0 auto;
        /* Center the content-wrapper */
        text-align: center;
        /* Ensure content is centered */
    }

    .welcome-title {
        font-size: 2em;
        /* Reduced font size for smaller screens */
        margin-bottom: 15px;
        /* Reduced margin */
    }

    .welcome-subtitle {
        font-size: 1.2em;
        /* Reduced font size for smaller screens */
        margin-bottom: 20px;
        /* Reduced margin */
    }

    .profile-pic {
        width: 120px;
        /* Reduced size for smaller screens */
        height: 120px;
        border: 2px solid rgba(255, 255, 255, 0.8);
        /* Adjusted border thickness */
    }

    .section-title {
        font-size: 1.8em;
        /* Reduced font size for smaller screens */
        margin-bottom: 20px;
        /* Reduced margin */
    }

    .about-section,
    .projects-section,
    .resume-section {
        padding: 16px;
        /* Reduced padding for smaller screens */
        margin: 20px 0;
        /* Reduced margin */
    }

    .project-card {
        padding: 16px;
        /* Reduced padding for smaller screens */
        margin: 10px 0;
        /* Reduced margin */
        font-size: 1em;
        /* Adjusted font size */
    }

    .project-card h3 {
        font-size: 1.4em;
        /* Reduced font size */
        margin-bottom: 10px;
        /* Reduced margin */
    }

    .project-card p {
        font-size: 0.9em;
        /* Reduced font size */
        line-height: 1.4;
        /* Adjusted line height */
        margin-bottom: 8px;
        /* Reduced margin */
    }

    .nav-container {
        padding: 10px;
        /* Adjusted padding for smaller screens */
        gap: 10px;
        /* Reduced gap between buttons */
        display: flex;
        justify-content: space-around;
        /* Space icons evenly */
    }

    .nav-container button {
        font-size: 0.9em;
        /* Reduced font size for navigation buttons */
        padding: 6px 12px;
        /* Adjusted padding */
        display: none;
        /* Hide text buttons on mobile */
    }

    .nav-container .nav-icon {
        display: inline-block;
        /* Show icons on mobile */
        font-size: 1.5em;
        /* Adjust icon size */
        color: var(--text-secondary);
        cursor: pointer;
        transition: var(--transition);
    }

    .nav-container .nav-icon:hover {
        color: var(--primary-color);
        transform: scale(1.2);
        /* Slightly enlarge the icon */
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        /* Add subtle shadow */
    }

    .resume-section h3 {
        font-size: 1.4em;
        /* Reduced font size */
        margin-top: 30px;
        /* Adjusted margin */
        margin-bottom: 20px;
        /* Adjusted margin */
    }

    .resume-section ul {
        padding-left: 20px;
        /* Adjusted padding for list items */
    }

    .publication-card {
        padding: 20px;
        /* Reduced padding for smaller screens */
        margin: 15px 0;
        /* Adjusted margin */
    }

    .publication-header h3 {
        font-size: 1.4em;
        /* Reduced font size */
    }

    .back-to-top {
        width: 48px;
        /* Reduced size */
        height: 48px;
        font-size: 1.2em;
        /* Adjusted font size */
    }
}

.close-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: #764ba2;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.publication-card {
    background: var(--bg-primary);
    padding: 30px;
    margin: 20px 0;
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

.publication-header h3 {
    font-size: 1.6em;
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.publication-content p {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 10px 0;
    color: var(--text-secondary);
}

.publication-footer {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 15px;
}