/* Reset & Base Styles */
:root {
    --primary: #6a11cb;
    --secondary: #2575fc;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --success: #00b09b;
    --text: #333;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary);
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -15px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: var(--secondary);
}

/* Navbar Styles */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: var(--dark);
    text-decoration: none;
    padding: 10px 15px;
    font-weight: 500;
    transition: var(--transition);
    font-size: 1.1rem;
}

.nav-links li a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 180px 0 120px;
    text-align: center;
    margin-top: 60px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    animation: fadeInDown 1s ease;
}

.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 400;
    animation: fadeInDown 1s ease 0.2s both;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    animation: fadeInDown 1s ease 0.4s both;
}

.btn {
    display: inline-block;
    background-color: white;
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid white;
    font-size: 1.1rem;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn:hover {
    background-color: transparent;
    color: white;
}

/* About Section */
.about {
    background-color: white;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.skill {
    background-color: var(--light);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-img {
    width: 100%;
    max-width: 400px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Projects Section */
.projects {
    background-color: var(--light);
}

.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 50px;
    text-align: center;
}

.stat-item {
    padding: 30px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 10px;
    min-width: 200px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.project-info ul {
    list-style-position: inside;
    margin-top: 10px;
}

.project-info li {
    margin-bottom: 8px;
}

/* Media Section */
.media-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 0;
}

.media-link {
    display: flex;
    align-items: center;
    background-color: var(--light);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    font-weight: 500;
}

.media-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-5px);
}

.media-link img {
    width: 24px;
    margin-left: 10px;
}

.testimonials {
    background-color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.testimonials h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
}

.testimonial {
    background-color: var(--light);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    position: relative;
}

.testimonial p:first-child {
    font-style: italic;
    margin-bottom: 10px;
}

.testimonial p:last-child {
    font-weight: 500;
    color: var(--primary);
}


/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin-bottom: 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact {
        clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
        padding-top: 80px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 150px 0 80px;
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 20px;
    }
}