:root {
    --primary: #4361ee; /* Updated primary blue */
    --primary-light: #4895ef;
    --primary-dark: #3a0ca3;
    --secondary: #f72585;
    --accent: #4cc9f0;
    --dark: #14213d;
    --dark-gray: #2b2d42;
    --medium-gray: #6c757d;
    --light-gray: #f8f9fa;
    --light: #e9ecef;
    --white: #ffffff;
    --success: #2ecc71;
    --warning: #f39c12;
    --error: #e74c3c;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--medium-gray);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

.section-title p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.125rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.25rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2rem;
    color: var(--medium-gray);
}

.hero-btns {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

.avatar {
    width: 380px;
    height: 380px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 8px solid var(--white);
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-skills {
    margin-top: 2rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.skill-tag {
    background: var(--light-gray);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.about-image {
    flex: 1;
    text-align: center;
}

/* Skills Section */
.skills-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: var(--radius-full);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.skill-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.skill-progress {
    height: 6px;
    background: var(--light-gray);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: auto;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* Portfolio Section */
.portfolio-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    background: var(--white);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.portfolio-img-container {
    height: 220px;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.portfolio-content p {
    margin-bottom: 1.5rem;
    color: var(--medium-gray);
}

.portfolio-links {
    display: flex;
    gap: 1rem;
}

/* Contact Section - Redesigned */
.contact {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 7rem 0;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3QgZmlsbD0idXJsKCNwYXR0ZXJuKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==');
    opacity: 0.5;
}

.contact .section-title h2 {
    color: var(--white);
    position: relative;
    z-index: 1;
}

.contact .section-title h2::after {
    background: var(--accent);
}

.contact .section-title p {
    color: rgba(255,255,255,0.85);
    position: relative;
    z-index: 1;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.contact-info {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid rgba(255,255,255,0.2);
    transition: var(--transition);
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    color: var(--white);
}

.contact-info h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
    border-radius: var(--radius-full);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent);
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-detail:hover .contact-icon {
    background: var(--accent);
    color: var(--white);
    transform: rotate(10deg);
}

.contact-text h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.contact-text p, 
.contact-text a {
    color: rgba(255,255,255,0.85);
    margin-bottom: 0;
    transition: var(--transition);
}

.contact-text a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.contact-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: var(--transition);
    background: var(--light-gray);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    width: 2.75rem;
    height: 2.75rem;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px) scale(1.1);
}

.copyright {
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
    }

    .avatar {
        width: 320px;
        height: 320px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 0;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .skills-container,
    .portfolio-container {
        padding: 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact {
        padding: 5rem 0;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .avatar {
        width: 280px;
        height: 280px;
    }

    .skills-container,
    .portfolio-container {
        padding: 1.5rem;
    }
}