/* Variables & Reset */
:root {
    --primary: #6C63FF;
    --primary-light: #8d86ff;
    --secondary: #4A44C6;
    --dark: #2A2D3E;
    --darker: #1a1c2b;
    --light: #F7F9FC;
    --lighter: #ffffff;
    --gray: #E2E8F0;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(108, 99, 255, 0.2);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 0;
}

section {
    padding: 6rem 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

section.animate {
    opacity: 1;
    transform: translateY(0);
}

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

h1 {
    font-size: 3.5rem;
}

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

h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #555;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--lighter);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover {
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(108, 99, 255, 0.4);
}

.btn:hover:before {
    width: 100%;
}

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

.btn-outline:before {
    background: var(--primary);
}

.btn-outline:hover {
    color: var(--lighter);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 8px;
}

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

.nav-links li {
    margin-left: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    font-size: 1.1rem;
}

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

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

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background: var(--dark);
    margin: 5px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 2rem;
    border: 5px solid var(--primary);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--primary);
    position: relative;
}

.hero h1 span:after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 15px;
    background: rgba(108, 99, 255, 0.2);
    z-index: -1;
    border-radius: 3px;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-down span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
    transform: rotate(45deg);
    margin: -10px;
    animation: scroll 2s infinite;
}

.scroll-down span:nth-child(2) {
    animation-delay: -0.2s;
}

.scroll-down span:nth-child(3) {
    animation-delay: -0.4s;
}

/* Floating particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-light);
    opacity: 0.5;
    animation: float 15s infinite linear;
}

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

.about-img {
    position: relative;
    display: flex;
    justify-content: center;
}

.img-border {
    position: relative;
    width: 85%;
    height: 0;
    padding-bottom: 85%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: var(--primary);
    overflow: hidden;
    animation: morph 8s ease-in-out infinite;
    box-shadow: 0 20px 40px rgba(108, 99, 255, 0.3);
}

.about-img img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.skills span {
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.skills span i {
    margin-right: 6px;
}

.skills span:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

/* Skills Progress */
.skill-bars {
    margin-top: 2rem;
}

.skill-bar {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-progress {
    height: 8px;
    background: var(--gray);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress span {
    display: block;
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Services Section */
.services {
    background: var(--lighter);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.service-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.service-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--primary);
    transition: var(--transition);
    z-index: -1;
}

.service-card:hover:before {
    height: 100%;
}

.service-card i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card h3 {
    margin-bottom: 1rem;
    transition: var(--transition);
}

.service-card p {
    transition: var(--transition);
}

.service-card:hover, 
.service-card:hover i,
.service-card:hover h3,
.service-card:hover p {
    color: white;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.project-card.animate {
    transform: translateY(0);
    opacity: 1;
}

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

.card-header {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-header img {
    transform: scale(1.1);
}

.project-tags {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 0.5rem;
}

.project-tag {
    background: var(--primary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-content {
    padding: 1.8rem;
}

.card-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
}

.project-link {
    display: inline-block;
    margin-top: 1.2rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
}

.project-link i {
    margin-left: 8px;
    transition: var(--transition);
}

.project-link:hover i {
    transform: translateX(5px);
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: white;
    padding: 3.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-details p {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.contact-details i {
    margin-right: 1rem;
    color: var(--primary);
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray);
    border-radius: 8px;
    font-family: inherit;
    transition: var(--transition);
    font-size: 1rem;
}

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

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

/* Footer */
footer {
    background: var(--darker);
    color: white;
    text-align: center;
    padding: 4rem 0 2rem;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.3rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.copyright {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--secondary);
}

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

@keyframes scroll {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-20px, -20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(20px, 20px);
    }
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .about-img {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        flex-direction: column;
        background: white;
        width: 70%;
        height: calc(100vh - 80px);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        padding: 2rem;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
        text-align: center;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .contact-wrapper {
        padding: 2rem;
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
}