    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }
    /* Variables for custom properties */
    
     :root {
        --font-primary: 'Raleway', sans-serif;
        --font-secondary: 'roboto';
        --font-weight-regular: 300;
        --font-weight-bold: 900;
        --font-primary-color: #Ffffff;
        --font-secondary-color: #D2D5DD;
        --accent-color: #9cdcfe;
        --body-line-height: 1.6;
        --heading-line-height: 1;
        --font-size-h1: 3rem;
        --font-size-h2: 2.25rem;
        --font-size-h3: 1.25rem;
        --font-size-h4: 1.15rem;
        --font-size-body: 1rem;
        --font-social-size: 1.75rem;
        --primary-color: #131920;
        --secondary-color: #1A222B;
        --box-shadow: 0.25em 0.25em 0.75em rgba(0, 0, 0, .25), 0.125em 0.125em 0.25em rgba(0, 0, 0, .15);
    }
    
    @media (min-width: 800px) {
         :root {
            --font-size-h1: 4.5rem;
            --font-size-h2: 3.25rem;
            --font-size-h3: 1.5rem;
            --font-size-body: 1.125rem;
            --font-social-size: 2.5rem;
        }
    }
    /* General Styles */
    
    html {
        scroll-behavior: smooth;
    }
    
    body {
        background: var(--primary-color);
        color: var(--font-primary-color);
        margin: 0;
        font-family: var(--font-primary);
        font-size: var(--font-size-body);
        line-height: var(--body-line-height);
    }
    
    section {
        padding: 2em 0.5em;
    }
    
    img {
        display: block;
        max-width: 100%;
    }
    
    .section_title {
        padding-bottom: 0.25em;
    }
    /* Button */
    
    .btn {
        display: inline-block;
        padding: .5em 1.5em;
        background: none;
        border: 1px solid var(--font-primary-color);
        color: var(--font-secondary-color);
        text-decoration: none;
        cursor: pointer;
        font-size: .8rem;
        font-weight: var(--font-weight-bold);
        transition: transform 200ms ease-in-out;
        border-radius: 4px;
    }
    
    .btn:hover {
        transform: scale(1.1);
        border: 1px solid var(--accent-color);
        color: var(--accent-color);
    }
    /* Typography */
    
    h1,
    h2,
    h3,
    h4 {
        line-height: var(--heading-line-height);
        margin: 0;
    }
    
    h1 {
        font-size: var(--font-size-h1);
        color: var(--accent-color);
    }
    
    h2 {
        font-size: var(--font-size-h2);
        color: var(--accent-color);
    }
    
    h3 {
        font-size: var(--font-size-h3);
    }
    
    h4 {
        font-size: var(--font-size-h4);
    }
    
    .section_title {
        margin: 0;
    }
    
    .section_subtitle {
        margin: 0;
        font-size: var(--font-size-h3);
        word-wrap: break-word;
    }
    /*cover background */
    
    .background {
        background-color: var(--primary-color);
        background-image: linear-gradient(to bottom, var(--primary-color), rgba(32, 50, 73, 0.825));
        background-size: cover;
        background-attachment: fixed;
        background-position: center;
    }
    
    @media(min-width:600px) {
        .background {
            background-color: var(--primary-color);
            background-image: linear-gradient(to bottom, var(--primary-color), rgba(32, 50, 73, 0.825)), url(../Images/Backgrounds/background.jpg);
            background-size: cover;
            background-attachment: fixed;
            background-position: center;
        }
    }
    /* header */
    
    header {
        display: flex;
        justify-content: space-between;
        padding: 0.25em;
    }
    
    .logo {
        max-width: 40px;
    }
    
    @media(min-width: 600px) {
        .logo {
            max-width: 60px;
        }
    }
    /*navigation menu */
    
    .nav {
        position: fixed;
        background: var(--primary-color);
        color: var(--font-primary-color);
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        transform: translateX(100%);
        transition: transform 250ms cubic-bezier(.5, 0, .5, 1);
    }
    
    .nav_list {
        list-style: none;
        display: flex;
        height: 100%;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        margin: 0;
        padding: 0;
    }
    
    .nav_item a {
        color: var(--font-primary-color);
        font-size: var(--font-size-h3);
        font-weight: var(--font-weight-bold);
        text-transform: uppercase;
        text-decoration: none;
        letter-spacing: 0.15em;
    }
    
    .nav_item a:hover {
        color: var(--accent-color);
    }
    
    .nav-toggle {
        padding: 0.5em;
        background: transparent;
        border: 0;
        cursor: pointer;
        position: fixed;
        right: 0.5em;
        top: 0.5em;
        z-index: 999;
    }
    
    .nav-open .nav {
        transform: translateX(0);
    }
    
    .nav-open .nav-toggle {
        position: fixed;
    }
    
    .nav-open .hamburger {
        transform: rotate(.625turn);
    }
    
    .nav-open .hamburger::before {
        transform: rotate(90deg) translateX(-6px);
    }
    
    .nav-open .hamburger::after {
        opacity: 0;
    }
    
    .hamburger {
        display: block;
        position: relative;
    }
    
    .hamburger,
    .hamburger::before,
    .hamburger::after {
        background: var(--accent-color);
        width: 2em;
        height: 3px;
        border-radius: 1em;
        transition: transform 250ms ease-in-out;
    }
    
    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
    }
    
    .hamburger::before {
        top: 6px;
    }
    
    .hamburger::after {
        bottom: 6px;
    }
    /* Intro Section */
    
    .intro .section_title {
        position: relative;
        text-align: center;
        padding-bottom: 1em;
    }
    
    .intro_image {
        display: block;
        margin-left: auto;
        margin-right: auto;
        width: 50%;
        border-radius: 0px 40px 0px 40px;
    }
    
    .intro .section_subtitle {
        text-align: center;
        padding-top: 1.5em;
    }
    
    @media(min-width: 600px) {
        .intro_image {
            max-width: 280px;
            position: relative;
            z-index: 2;
            box-shadow: var(--box-shadow);
        }
    }
    /* Skills Section*/
    
    .skills {
        background-color: var(--primary-color);
        position: relative;
    }
    
    .skills .section_title {
        text-align: center;
        padding-bottom: 0.5em;
    }
    
    .skills_list {
        display: flex;
        flex-wrap: wrap;
        align-self: center;
        justify-content: space-around;
    }
    
    .aSkill {
        display: inline-block;
        margin-right: 20px;
        margin-left: 20px;
        position: relative;
    }
    
    .aSkill img {
        height: 80px;
        max-width: 120px;
        padding: 5px;
    }
    
    @media(min-width: 600px) {
        .aSkill {
            display: inline-block;
            position: relative;
            margin-right: 40px;
            margin-left: 40px;
        }
        .aSkill img {
            height: 120px;
            max-width: 175px;
        }
    }
    /* Portfolio Section */
.portfolio {
    background-color: var(--secondary-color);
    padding: 4em 0; /* إضافة مساحة علوية وسفلية */
}

.portfolio .section_title {
    text-align: center;
    padding-bottom: 1.5em;
    font-size: 2rem;
}

/* تنسيق الحاوية لتكون الصور بجانب بعضها */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* تجعل الصور بجانب بعضها وتتغير حسب حجم الشاشة */
    gap: 2em;
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* تنسيق الكرت الخاص بكل مشروع */
.aProject {
    background: #fff; /* خلفية بيضاء للكرت */
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* تأثيرات الحركة */
    position: relative;
    padding-bottom: 1.5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.aProject img {
    width: 100%;
    height: 230px;
    object-fit: cover; /* لضمان عدم تشوه الصورة */
    transition: transform 0.5s ease;
}

.aProject h3 {
    margin-top: 15px;
    padding: 0 10px;
    color: #333;
}

.aProject p {
    padding: 10px 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* --- تأثيرات تمرير الماوس (Hover Effects) --- */

/* 1. رفع الكرت للأعلى وإضافة ظل قوي */
.aProject:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

/* 2. تكبير الصورة قليلاً عند التمرير */
.aProject:hover img {
    transform: scale(1.1);
}

/* 3. تأثير على الزر */
.aProject .btn {
    margin-top: auto;
    transition: background 0.3s ease, transform 0.2s ease;
}

.aProject .btn:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}
    /* Experience Section*/
    
    .experience .section_title {
        text-align: left;
        padding-bottom: 0.5em;
    }
    
    .job {
        padding-top: 2em;
    }
    
    @media(min-width: 600px) {
        .job {
            max-width: 1600px;
            margin-right: auto;
            margin-left: auto;
            display: grid;
            grid-template-columns: 1fr 2fr 1fr;
            grid-template-rows: 1fr;
            grid-column-gap: 0px;
            grid-row-gap: 0px;
        }
        .overview {
            grid-column: 1/4;
            grid-row: 2;
        }
        .specs {
            grid-column: 1/4;
            grid-row: 3;
        }
    }
    /* Education Section Styles */
.education {
    padding: 4em 5%;
    background-color: #f9f9f9; /* لون خلفية فاتح لتمييزه */
}

.education_container {
    max-width: 900px;
    margin: 0 auto;
}

.school {
    background: #ffffff;
    padding: 2em;
    border-left: 5px solid #007bff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin: 20px 0;
    color: #333; /* يضمن أن كل النصوص داخل الكرت لها لون غامق */
}

.tech_stack .badge {
    background: #e1f5fe;
    color: #0288d1 !important; /* لون الخط داخل الشارات */
    border: 1px solid #b3e5fc;
}

.specs li strong {
    color: #222; /* لون العناوين الفرعية داخل التعليم */
}
.school:hover {
    transform: scale(1.01);
}

.school_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.date {
    background-color: #f0f0f0; /* خلفية رمادية فاتحة */
    color: #333 !important;    /* إجبار النص على الظهور باللون الأسود/الرمادي الغامق */
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
}

.specs ul li {
    color: #444; /* تغيير لون النص ليكون واضحاً */
    text-align: left; /* التأكد من المحاذاة */
    visibility: visible;
    opacity: 1;
}
/* التنسيق الخاص بشارات اللغات (Badges) */
.tech_stack {
    margin: 15px 0;
}

.badge {
    display: inline-block;
    background: #e1f5fe;
    color: #0288d1;
    padding: 5px 12px;
    margin: 4px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid #b3e5fc;
}

.specs ul {
    list-style: none;
    padding-left: 0;
}

.specs ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
    line-height: 1.6;
}

/* إضافة نقطة زرقاء قبل كل مشروع */
.specs ul li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color, #007bff);
    font-weight: bold;
}
    /* footer*/
    
    .footer {
        background-color: var(--primary-color);
        color: var(--font-primary-color);
        text-align: center;
        padding: 2.5em 0 0.5em 0;
    }
    
    .footer a {
        color: var(--font-secondary-color);
        font-size: var(--font-social-size);
        text-decoration: none;
    }
    
    .footer a:hover {
        color: var(--accent-color);
    }
    
    .social-list {
        list-style: none;
        display: flex;
        justify-content: center;
        margin: 0;
    }
    
    .social-list_item {
        margin: 0 .25em;
        padding: 0.2em;
    }
    
    .wrapper {
        padding-left: 2em;
    }
    
    .line {
        content: '';
        display: block;
        position: relative;
        width: 8em;
        height: 1px;
        margin: 1em auto 2em;
        background: currentColor;
    }
    
    .copyright {
        padding-left: 2em;
        margin-bottom: 0em;
    }