/* Base Styles */
:root {
    --primary: #6c63ff;
    --secondary: #ff6584;
    --dark: #2d3436;
    --light: #f9f9f9;
    --accent: #00cec9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--light);
    color: var(--dark);
    overflow-x: hidden;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width 0.3s, height 0.3s, background 0.3s;
    z-index: 9999;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width 0.5s, height 0.5s, border-color 0.5s;
    z-index: 9998;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(108, 99, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: 0.5s;
}

header.sticky {
    padding: 15px 100px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
    position: relative;
    overflow: hidden;
}

.logo::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    background: var(--secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-out;
}

.logo:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    padding: 5px 0;
}

.nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-out;
}

.nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
#hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(0, 206, 201, 0.1));
    z-index: -1;
}

.shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.5;
}

.shape-1 {
    width: 300px;
    height: 300px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: rgba(108, 99, 255, 0.2);
    top: 10%;
    left: 10%;
    animation: morph 10s linear infinite alternate;
}

.shape-2 {
    width: 200px;
    height: 200px;
    border-radius: 64% 36% 27% 73% / 55% 58% 42% 45%;
    background: rgba(255, 101, 132, 0.2);
    bottom: 20%;
    right: 20%;
    animation: morph 8s linear infinite alternate;
}

.shape-3 {
    width: 150px;
    height: 150px;
    border-radius: 41% 59% 40% 60% / 65% 37% 63% 35%;
    background: rgba(0, 206, 201, 0.2);
    top: 60%;
    left: 30%;
    animation: morph 12s linear infinite alternate;
}

@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%; }
    100% { border-radius: 64% 36% 27% 73% / 55% 58% 42% 45%; }
}

.hero-content {
    max-width: 600px;
    z-index: 10;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s 0.5s forwards;
}

.hero-text-animate {
    overflow: hidden;
}

.hero-title, .hero-subtitle {
    display: block;
    overflow: hidden;
}

h1 {
    font-size: 4rem;
    margin-bottom: 15px;
    position: relative;
    color: var(--dark);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--dark);
    opacity: 0.9;
}

.highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    bottom: 5px;
    left: 0;
    background: rgba(108, 99, 255, 0.3);
    z-index: -1;
}

.cta-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    margin-right: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(108, 99, 255, 0.4);
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.cta-btn:hover::before {
    left: 100%;
}

.secondary-btn {
    display: inline-block;
    background: transparent;
    color: var(--dark);
    padding: 14px 29px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1s 1.5s forwards;
}

.scroll-text {
    font-size: 0.9rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-icon {
    width: 30px;
    height: 50px;
    border: 2px solid var(--dark);
    border-radius: 15px;
    position: relative;
}

.scroll-icon::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--dark);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About Section */
#about {
    padding: 100px;
    position: relative;
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 5px;
    background: var(--primary);
    bottom: -10px;
    left: 15%;
    border-radius: 5px;
}

.about-container {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-img {
    flex: 1;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
    transform: translateX(-50px);
    opacity: 0;
}

.about-img.animated {
    animation: fadeInRight 1s forwards;
}

.about-img img {
    width: 100%;
    display: block;
    border-radius: 10px;
    transition: transform 0.5s;
}

.about-img:hover img {
    transform: scale(1.05);
}

.about-content {
    flex: 1;
    transform: translateX(50px);
    opacity: 0;
}

.about-content.animated {
    animation: fadeInLeft 1s forwards;
}

.about-title {
    font-size: 2rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.about-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: var(--secondary);
    bottom: -5px;
    left: 0;
}

.about-text {
    margin-bottom: 30px;
    line-height: 1.8;
    color: #555;
}

.stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-text {
    font-size: 0.9rem;
    color: #777;
}

.skills {
    margin-top: 40px;
}

.skills-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-tag {
    padding: 8px 16px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Projects Section */
#projects {
    padding: 100px;
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s, box-shadow 0.5s;
    opacity: 0;
    transform: translateY(30px);
}

.project-card.animated {
    animation: fadeInUp 0.8s forwards;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-img {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(108, 99, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-btn {
    padding: 12px 24px;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease 0.1s;
}

.project-card:hover .project-btn {
    transform: translateY(0);
    opacity: 1;
}

.project-content {
    padding: 25px;
}

.project-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.project-tag {
    font-size: 0.8rem;
    padding: 5px 10px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    border-radius: 5px;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.project-card:hover .project-title {
    color: var(--primary);
}

.project-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-btns {
    display: flex;
    gap: 15px;
}

.card-btn {
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s;
}

.view-btn {
    background: var(--primary);
    color: white;
}

.view-btn:hover {
    background: #534dff;
}

.code-btn {
    background: transparent;
    color: var(--dark);
    border: 1px solid #ddd;
}

.code-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* Contact Section */
#contact {
    padding: 100px;
    position: relative;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(0, 206, 201, 0.05));
}

.contact-container {
    display: flex;
    gap: 50px;
    margin-top: 50px;
}

.contact-info {
    flex: 1;
    transform: translateX(-50px);
    opacity: 0;
}

.contact-info.animated {
    animation: fadeInRight 1s forwards;
}

.contact-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.contact-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: var(--secondary);
    bottom: -10px;
    left: 0;
}

.contact-text {
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
    color: var(--primary);
    font-size: 1.3rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.contact-item:hover .contact-icon {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.contact-detail {
    color: #555;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--dark);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.contact-form {
    flex: 1;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transform: translateX(50px);
    opacity: 0;
}

.contact-form.animated {
    animation: fadeInLeft 1s forwards;
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.2);
}

.submit-btn:hover {
    background: #534dff;
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(108, 99, 255, 0.3);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 50px 100px 30px;
    position: relative;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    display: inline-block;
}

.footer-text {
    max-width: 300px;
    line-height: 1.8;
    color: #aaa;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.footer-social-link:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.footer-links-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-links-title::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background: var(--primary);
    bottom: -5px;
    left: 0;
}

.footer-links {
    list-style: none;
}

.footer-link {
    margin-bottom: 15px;
}

.footer-link a {
    color: #aaa;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    padding-left: 15px;
}

.footer-link a::before {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--primary);
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    transition: all 0.3s;
}

.footer-link a:hover {
    color: white;
    padding-left: 20px;
}

.footer-link a:hover::before {
    left: 8px;
}

.footer-contact-item {
    display: flex;
    margin-bottom: 15px;
    color: #aaa;
}

.footer-contact-icon {
    margin-right: 15px;
    color: var(--primary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #aaa;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.open .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
    transition: all 0.3s;
}

.close-modal:hover {
    color: var(--dark);
    transform: rotate(90deg);
}

/* 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;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 99;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #534dff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.4);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    header, #hero, #about, #projects, #contact, footer {
        padding: 50px;
    }
}

@media (max-width: 992px) {
    .about-container, .contact-container {
        flex-direction: column;
    }
    
    .about-img, .about-content, .contact-info, .contact-form {
        width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        padding: 20px 50px;
    }
    
    header.sticky {
        padding: 15px 50px;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 99;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
    }
    
    .nav.active {
        right: 0;
    }
    
    .menu-btn {
        display: block;
        z-index: 100;
    }
    
    .close-menu {
        position: absolute;
        top: 30px;
        right: 30px;
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    header, #hero, #about, #projects, #contact, footer {
        padding: 30px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .cta-btn, .secondary-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .stats {
        flex-wrap: wrap;
    }
    
    .footer-logo {
        font-size: 1.5rem;
    }
}