* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fafafa;
}

/* ====== HEADER ====== */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 20px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.header-content h1 {
    font-size: 2.8em;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.header-subtitle {
    font-size: 1.2em;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* ====== NAVBAR ====== */
.navbar {
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 18px 20px;
    flex-wrap: wrap;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 5px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    right: auto;
    left: 0;
}

.nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.nav-link.contact-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-link.contact-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* ====== MAIN CONTENT ====== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== PROJECTS SECTION ====== */
.projects-section {
    margin: 70px 0;
    padding: 50px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 15px;
    font-weight: 800;
}

.section-desc {
    font-size: 1.1em;
    color: #666;
    font-weight: 300;
}

/* ====== PROJECTS GRID ====== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 1000px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ====== PROJECT CARD ====== */
.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.card-image-wrapper {
    overflow: hidden;
    height: 250px;
    background: #f5f5f5;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .card-image {
    transform: scale(1.12) rotate(2deg);
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    color: #333;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 12px;
}

.card-content p {
    color: #666;
    font-size: 0.95em;
    line-height: 1.7;
}

/* ====== FLOATING CONTACT BUTTON ====== */
.contact-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 32px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    z-index: 50;
    transition: all 0.3s ease;
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
    }
}

.contact-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 15px 45px rgba(102, 126, 234, 0.8);
    animation: none;
}

@media (max-width: 768px) {
    .contact-btn {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}

/* ====== FOOTER ====== */
footer {
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 80px;
}

footer p {
    margin: 0;
    font-size: 0.95em;
    opacity: 0.9;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2em;
    }

    .header-subtitle {
        font-size: 1em;
    }

    .nav-container {
        gap: 20px;
        padding: 15px 10px;
    }

    .nav-link {
        font-size: 0.9em;
        padding: 6px 12px;
    }

    .section-title {
        font-size: 2em;
    }

    .projects-section {
        margin: 50px 0;
        padding: 30px 15px;
    }
}