/*
 * Copyright (c) 2025 Avijit Mondal
 * Licensed under the MIT License
 * See LICENSE file in the project root for full license information
 */

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

:root {
    --primary-color: #eab308;
    --secondary-color: #d97706;
    --accent-color: #fbbf24;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-1: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
    --gradient-2: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    --gradient-3: linear-gradient(135deg, #fcd34d 0%, #fb923c 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px) saturate(200%) brightness(110%);
    -webkit-backdrop-filter: blur(30px) saturate(200%) brightness(110%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(40px) saturate(200%) brightness(110%);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(110%);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

.nav-container {
    max-width: 95%;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.nav-profile-photo.visible {
    opacity: 1;
    transform: scale(1);
}

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

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

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

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b 0%, #dc2626 50%, #fb923c 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero-profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero .subtitle {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    letter-spacing: -0.01em;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.85;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.8s both;
}

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

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.social-links {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease 1s both;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

/* Section Styles */
section {
    padding: 5rem 5%;
    max-width: 100%;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 3.5rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-profile-photo {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-hover);
    transition: transform 0.3s ease;
}

.about-profile-photo:hover {
    transform: scale(1.05);
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.2);
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Experience Section */
.experience-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.current-role {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.current-role::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.current-role:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -15px rgba(234, 179, 8, 0.4);
}

.role-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.role-details {
    flex: 1;
    color: white;
    position: relative;
}

.role-details h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.role-details .company-name {
    font-size: 1.3rem;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 0;
}

.previous-companies {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.previous-companies:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.previous-companies h4 {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.company-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.company-tag {
    background: var(--bg-light);
    color: var(--text-primary);
    padding: 0.7rem 1.5rem;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.company-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(234, 179, 8, 0.3);
}

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

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-category:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.2);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category i {
    font-size: 1.5rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--bg-light);
    padding: 0.6rem 1.2rem;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-12px);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Featured Personal Projects */
.featured-project {
    border: 2px solid var(--primary-color);
    box-shadow: 0 10px 40px rgba(234, 179, 8, 0.2);
}

.featured-project:hover {
    box-shadow: 0 15px 50px rgba(234, 179, 8, 0.3);
    transform: translateY(-15px);
}

.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.featured-project .project-header {
    background: linear-gradient(135deg, #fbbf24, #f97316);
}

.project-header {
    padding: 2rem;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: white;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-header .project-type {
    font-size: 0.9rem;
    opacity: 0.9;
}

.project-body {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

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

.project-link {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.education-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary-color);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
}

.education-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
    border-left-color: var(--accent-color);
}

.education-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.education-card .university {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.education-card .date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.contact-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(10px);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
}

.contact-item-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.contact-item-content p,
.contact-item-content a {
    color: var(--text-secondary);
    text-decoration: none;
}

.contact-item-content a:hover {
    color: var(--primary-color);
}

.contact-form {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--bg-light);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 1rem;
}

footer p {
    margin-bottom: 0;
}

/* Custom Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
    animation: modalSlideIn 0.3s ease;
}

.modal-icon {
    margin-bottom: 1.5rem;
}

.modal-icon i {
    font-size: 4rem;
    color: #10b981;
    animation: checkBounce 0.6s ease;
}

.modal-content h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.7) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes checkBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Responsive Design */
@media (min-width: 1600px) {
    .nav-container,
    section {
        padding-left: 8%;
        padding-right: 8%;
    }
}

@media (max-width: 1024px) {
    section {
        padding: 4rem 4%;
    }

    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

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

    .mobile-menu {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

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

    .about-image-container {
        order: -1;
        margin-bottom: 2rem;
    }

    .about-profile-photo {
        max-width: 300px;
    }

    .current-role {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .company-tags {
        flex-direction: column;
    }

    .company-tag {
        width: 100%;
    }

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

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

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