/* Variables */
:root {
    --primary: #2563eb;
    --secondary: #7c3aed;
    --dark: #1e293b;
    --light: #f8fafc;
    --accent: #06b6d4;
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
}

section {
    padding: 5rem 2rem;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

header.scrolled {
    padding: 1rem 2rem;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    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: linear-gradient(to right, var(--primary), var(--secondary));
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 7rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero-text p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #64748b;
    max-width: 90%;
    margin-bottom: 2rem;
}

.profile-img-container {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    animation: float 3s ease-in-out infinite;
    background: transparent;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.profile-img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
    border: 5px solid White;
    background: transparent;
    mix-blend-mode: multiply;
}

.profile-img::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    z-index: -1;
    opacity: 0.5;
}

/* Projects Section */
.projects {
    background-color: #f1f5f9;
    position: relative;
}

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

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    transform: translateY(0);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.project-desc {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    font-size: 0.75rem;
    background-color: #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.project-link {
    display: inline-block;
    font-weight: 500;
    color: var(--primary);
    transition: var(--transition);
    margin-top: 0.5rem;
}

.project-link:hover {
    color: var(--secondary);
}

.project-link i {
    margin-left: 0.25rem;
    font-size: 0.8rem;
}

/* Contact Section */
.contact {
    position: relative;
    overflow: hidden;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.contact-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-text p {
    color: #64748b;
    margin-bottom: 2rem;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.contact-email:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: var(--dark);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-link:hover {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    transform: translateY(-5px);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #64748b;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    resize: none;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.submit-btn {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

.copyright {
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Responsive styles */
@media screen and (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text p {
        max-width: 100%;
    }

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

    .contact-text {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem 2rem;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

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

/* Animation for projects on scroll */
.animated {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animated.appear {
    opacity: 1;
    transform: translateY(0);
}