/* Reset basic margins and paddings */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: Arial, sans-serif;
        line-height: 1.6;
        background-color: #0A192F;
        color: #fff;
        padding: 20px;
    }

    html {
        scroll-behavior: smooth;
    }

    section {
        scroll-margin-top: 160px;
    }

    section{  /*خاص ب scroll animation*/
        opacity:0;
        transform:translateY(40px);
        transition:0.8s ease;
    }

    section.show{  /*خاص ب scroll animation*/
        opacity:1;
        transform:translateY(0);
    } 

    #about {
        scroll-margin-top: 80px;
    }

    nav {
        display: flex; 
        align-items: center;/*يخلي العناصر في النص*/
        justify-content: space-between;
        font-size: medium;
        background-color: #002164;
        padding : 15px 20px;
        border-radius: 25px;
        position: fixed;
        top: 20px;
        left: 2%;
        right: 2%;
        z-index: 100;
    }

    .navbar{               /*خاص ب انيميشن ال navbar*/
        animation: navDrop 0.8s ease forwards;
    }
    
    @keyframes navDrop{
        from{
        transform: translateY(-80px);
        opacity: 0;
        }
        to{
        transform: translateY(0);
        opacity: 1;
        }
    }

    .name-header-animation{   /*خاص ب انيميشن الاسم في ال header*/
        color: #fff;
        animation: nameSlide 0.8s ease forwards, glow 2s ease-in-out infinite alternate;
    }
        
        @keyframes nameSlide{
        from{
        transform: translateX(-100px);
        opacity: 0;
        }
        to{
        transform: translateX(0);
        opacity: 1;
        }
    }
    
    @keyframes glow{
        from{
        text-shadow: 0 0 5px #64ffda;
        }
        to{
        text-shadow: 
            0 0 10px #64ffda,
            0 0 20px #64ffda,
            0 0 40px #64ffda;
        }
    }

    nav ul {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        list-style: none;
    }

    nav a {
        display: inline-block;
        font-size: larger;
        color: #fff;
        background-color: #4769ff;
        padding: 12px 16px;
        border-radius: 25px;
        text-decoration: none;
        font-weight: bolder;
        transition: 0.3s;
    }

    nav a:hover {
        background-color: #333;
        font-size: 150%;
        border-radius: 10px;
    }

    nav h1{
    color: #fff;
    animation: glow 2s ease-in-out infinite alternate;
    }

    .hero{
        position: relative;
        height: 100vh;
        display: flex;
        align-items: center;
        padding-left: 80px;
        overflow: hidden;
    }

    .hero-image{
        position: absolute;
        right: 0;
        top: 0;
        width: 55%;
        height: 100%;
        background:
        linear-gradient(to left, transparent 60%, #0a192f 100%),
        url("profile\ picture.jpg");
    
        background-size: cover;
        background-position: center;
    }

    .hero::before{
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 50%;
        height: 100%;
        background: linear-gradient(
        to right,
        #0a192f 40%,
        rgba(10,25,47,0.8) 60%,
        rgba(10,25,47,0.2) 80%,
        transparent
        );
    }

    .hero-text{
    position: relative;
    z-index: 2;
    color: white;
    font-size: larger;
    }

    .hero-text a {
        font-size: larger;
        display: inline-block;
        padding: 10px 15px;
        background-color: #016fff;
        text-decoration: none;
        border-radius: 25px;
        margin-top: 25px;
        margin-right: 10px;
        transition: 0.3s;
        font-weight: bolder;
    }

    .hero-text a:hover {
        font-size: xx-large;
        border-radius: 10px;
        background-color: #333;
        color: #fff;
    }

    .type-hi-massage {
        width: fit-content;
        overflow: hidden;              /* يمنع النص يظهر كله دفعة واحدة */
        border-right: 3px solid #64ffda; /* خط صغير يشبه المؤشر */
        white-space: nowrap;            /* يمنع النص من الكسر لسطر جديد */
        animation: typing 1.2s steps(19), 1 forwards, blink 0.7s step-end infinite;
        animation-delay: 0.5s;  /* هنا هيتأخر 0.8 ثانية قبل ما يبدأ */
    }

    .type-hi-massage {
        border-right: 3px solid #64ffda;
        text-shadow: 0 0 10px #64ffda;
    }


    @keyframes typing {
        from { width: 0; }
        to { width: 19ch; }  /* عدد الحروف في الاسم */
    }

    @keyframes blink {
        50% { border-color: transparent; }
    }

    /* section يظهر من تحت عند تحميل الصفحة */
    .hero {
        opacity: 0; /* يبدأ مخفي */
        transform: translateY(50px); /* يبدأ أسفل شوية */
        animation: slideUp 1s ease forwards; /* animation يظهر النص */
        animation-delay: 0.5s; /* يتأخر شوية بعد navbar */
    }
    
    @keyframes slideUp {
        from {
        opacity: 0;
        transform: translateY(50px); /* أسفل */
        }
        to {
        opacity: 1;
        transform: translateY(0); /* مكانه الطبيعي */
        }
    }

        .about{
        position: relative;
        height: 100vh;
        display: flex;
        align-items: center;
        padding-left: 80px;
        overflow: hidden;
        margin-top: 50px;
    }

    .about-image{
        position: absolute;
        right: 0;
        top: 0;
        width: 55%;
        height: 100%;
        background:
        linear-gradient(to left, transparent 60%, #0a192f 100%),
        url("profile\ picture2.jpg");
    
        background-size: cover;
        background-position: center;
    }

    .about::before{
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 55%;
        height: 100%;
        background: linear-gradient(
        to right,
        #0a192f 40%,
        rgba(10,25,47,0.8) 60%,
        rgba(10,25,47,0.2) 80%,
        transparent
        );
    }

    .about-text{
    position: relative;
    z-index: 2;
    color: white;
    font-size: larger;
    border-left: 2px solid #002e8b;
    padding: 20px;
    }

    .about h3 span {
        color: aqua;
    }

    .about h1 {
        color: #6C8CD5;
        font-size: 40px;
    }

    .about h3 {
        font-size: xx-large;
        margin-top: 25px;
        margin-bottom: 25px;
    }

    .about p {
        max-width: 50%;
        font-size: large;
    }


    .skills-icon {
        width: 50px;
        height: 50px;
    }

    .skills {
        border: 2px solid #002e8b;
        padding: 15px;
        margin-top: 50px;
        border-radius: 25px;
        margin-bottom: 50px;
    }

    .skills h1 {
        color: #6C8CD5;
        font-size: 40px;
    }

    .skills-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 أعمدة متساوية */
        gap: 20px; /* المسافة بين العناصر */
        justify-items: center; /* يحط العناصر في نص كل خلية */
        margin-top: 30px;
    }

    .skill {
        border: 2px solid #0d6efd;
        border-radius: 10px;
        width: 100%;
        padding: 15px;
        margin-bottom: 25px;
    }

    .bar {
        width: 100%;
        background-color: #7c7c7c;
        border-radius: 5px;
        height: 10px;
    }

    .bar-fill {
        background-color: #0d6efd;
        height: 100%;
        border-radius: 5px;
    }

    .skill h3 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom:10px;
    }

    .percent {
        color: #0d6efd;
    }

    .education-box {
        border: 2px solid #002e8b ;
        border-radius: 25px;
        display: flex;
        justify-content: space-between;
        width: 100%;
        align-items: center;
        padding: 20px;
    }

    .education {
        border: 2px solid #002e8b ;
        border-radius: 25px;
        width: 100%;
        align-items: center;
        padding: 20px;
    }

    .education h1 {
        color: #6C8CD5;
        font-size: 40px;
    }


    .education-box img {
        width: 15%;
        height: 15%;
        border-radius: 50%;
        transition: 0.3s;
    }

    .education-box img:hover {
        width: 25%;
        height: 25%;
    }

    .education-box h3 {
        font-size: 30px;
    }

    #contact {
        border: 2px solid #002e8b ;
        border-radius: 25px;
        padding: 20px;
        margin-top: 50px;
    }

    #contact ul li {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: x-large;
        margin-bottom: 10px;
    }

    .contact-icon {
        width: 25px;
        height: 25px;
    }

    #contact h1 {
        color: #6C8CD5;
        font-size: 40px;
    }

    #contact p {
        font-size:x-large ;
    }

    #contact a {
        text-decoration: none;
        transition: 0.3s;
        border-radius: 25PX;
        padding: 2px 5px;
        color: #333;
        background-color: #b3b3ff;
    }

    #contact a:hover {
        font-size: larger;
        border-radius: 10px;
        font-weight: bolder;
    }

    #email:hover {
        color: #FFF;
        background-color: #333;
    }

    #linkedin:hover{
        color: #8269ff;
        background-color: #3b25ff9a;
    }

    #whatsapp:hover {
        color: #25D366;
        background-color: #00461ac3;
    }

    #instagram:hover {
        color: #efaaff;
        background-color: #bc05ff99;
    }

    #github:hover {
        color: #fff;
        background-color: #333;
    }

    @media (min-width: 768px) and (max-width: 1024px) {
        nav a {
            padding: 4px 10px;
        }
        nav ul {
            gap: 10px;
        }

        .hero {
            padding-left: 4px;
        }

        .hero-text p {
            max-width: 50%;
        }

        .hero-text a {
            font-size: medium; 
        }

        .hero-text a:hover {
            font-size: larger;
        }

        .about {
            padding-left: 4px;
        }

        .about-text p {
            max-width: 40%;
        }

        .skills-container{
            grid-template-columns: repeat(2, 1fr);
        }

        .education-box h3 {
            font-size: larger;
        }

        .education-box img {
            width: 150px;
            height: 150px;
        }

        .education-box img:hover {
            width: 200px;
            height: 200px;
        }


    }

    @media (max-width: 767px) {
        section{
            scroll-margin-top: 200px;
        }

        nav {
            flex-direction: column;
        }
        nav ul {
            padding: 2px 5px;
            gap: 12px;
        }

        nav a {
            font-size: x-small;
        }

        nav a:hover {
            font-size: medium;
        }

        .hero h1 {
            font-size: medium;
        
        }

        .hero-text {
            font-size: small;
            max-width: 50%;
            padding-left : 10px;
        }

        .hero-text p {
            margin-top: 10px;
            margin-bottom: 15px;
        }

        .hero {
            padding-left: 0px;
        }

        .hero a {
            font-size: x-small;
            padding: 4px 10px;
            margin-top: 10px;
        }

        .hero-text a:hover {
            font-size: medium;
        }

        .hero-image {
            width: 95%;
            left: 25%;
        }

        .about {
            padding-left: 0;
        }

        .about-text {
            font-size: small;
        }

        .about h1 {
            font-size: x-large;
        }

        .about h3 {
            font-size: large;
            margin-top: 15px;
            margin-bottom: 10px;
        }

        .about p {
            font-size: x-small;
            max-width: 40%;
        }


        .about-image {
            width: 80%;
            left: 25%;
        }

        .skills-container {
            grid-template-columns: repeat(1, 1fr);
        }

        .skills h1 {
            font-size: x-large;
        }

        .skill h3 {
            font-size: small;
        }

        .bar {
            height: 5px;
        }

        .education h1 {
            font-size: x-large;
        }

        .education-box h3 {
            font-size: small;
            max-width: 60%;
        } 

        .education-box img {
            width: 70px;
            height: 70px;
        }

        .education-box img:hover {
            width: 90px;
            height: 90px;
        }

        #contact {
            padding: 10px;
        }

        #contact p{
            font-size: medium;
        }

        #contact h1 {
            font-size: x-large;
        }

        #contact ul li {
            font-size: small;
        }
    }



