@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

* {
    font-family: "Poppins", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    height: 100vh;
    background: url("background.jpg") repeat center / cover;
    padding: 50px 5%;
}
/* all media query */
@media (max-width: 768px) {
    header {
        display: flex !important;
        justify-content: center !important;
        flex-direction: column !important;
        a {
            margin-bottom: 10px;
        }
        nav {
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            a {
                margin-left: 10px !important;
                font-size: 16px !important;
            }
        }
    }
    .home {
        flex-direction: column-reverse !important;
        text-align: center !important;
        gap: 30px !important;
    }
    .img-box {
        width: 250px !important;
        height: 250px !important;
    }
    .project-card:nth-child(even) {
        flex-direction: column !important;
    }
    .project-img {
        height: 150px !important;
        width: 100% !important;
        border-radius: 12px !important;
    }
    .social-icons a{
        margin-bottom: 10px !important;
    }
}
.title {
    font-size: 55px;
    line-height: 1;
    font-weight: 500;
}
.title2 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 20px;
}
.container {
    position: relative;
    height: auto;
    border-radius: 30px;

    /* ------- */
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);

    /* -------- */
    backdrop-filter: blur(30px);
    /*بتعمل تأثير ضبابي على الخلفية اللي ورا العنصر  */
    transform: scale(0);
    /* تصغير العنصر من غير ما يختفي */
    animation: zoom-in 1s ease forwards;
}
@keyframes zoom-in {
    /* لتعريف شكل الحركة  */
    100% {
        transform: scale(1);
    }
}

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    /*فائدتها بتخلي العنصر الذي لديه قيمة اكبر فوق ولكن بشرط وجود position للعنصر */
}

/* اضافات  */
.animated {
    transform: translateY(30px);
    opacity: 0;
    animation: slide-in 1s ease forwards;
    animation-delay: 1s;
}
@keyframes slide-in {
    /* بعد ما الحركة ما تخلص بنسبة 100% يرجع ثني لشكلة الطبيعي  */
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo {
    font-size: 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}
.navbar a {
    font-size: 18px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin-left: 35px;
    border-bottom: 2px solid transparent;
    /* transparent  فايدتها تحعل الخط تحت العناصر  شفاف لكي تستخدم في الhover */
    transition: 0.5s;
}
.navbar a:hover,
.navbar a.active {
    border-color: #fff;
}
.home {
    display: flex;
    align-items: center;
    height: 100%;
    margin-top: 100px;
    gap: 50px;
    /* gap فائدتها مسافة بين العنصر والثاني  */
    padding: 50px 5% 0;
    color: #fff;

    animation-delay: 1.5s;
}
.home-detail h1 {
    font-size: 55px;
    line-height: 1;
    /* تحدد المسافة بين السطور  */
}
.home-detail h2 {
    font-size: 32px;
}
.home-detail p {
    margin: 10px 0 20px;
}
.home-detail .download-social {
    display: flex;
    align-items: center;
}
.btn {
    display: inline-block;
    padding: 10px 30px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 40px;
    box-shadow: 0 0 10px #fff;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: 0.5s;
}
.btn:hover {
    background: transparent;
    box-shadow: none;
}
.home-detail .social-icons {
    margin-left: 20px;
}
.home-detail .social-icons a {
    display: inline-flex;
    padding: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 20px;
    color: #fff;
    text-decoration: none;
    margin: 0 8px;
    transition: 0.5s;
}
.home-detail .social-icons a:hover {
    background: #fff;
    box-shadow: 0 0 10px #fff;
    color: #333;
}
.home-img .img-box {
    position: relative;
    width: 28vw;
    height: 28vw;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 20px #fff;
    overflow: hidden;
}
.home-img .img-box img {
    position: absolute;

    display: block;
    width: 100%;
    object-fit: cover;
}
.heading {
    text-align: center;
    font-size: 40px;
    margin-bottom: 20px;
    color: #fff;
}

/* ----------------------------------------------------- */

.about,
.skills,
.projects,
.contact {
    padding: 80px 10%;
    color: #fff;
    animation-delay: 1.8s;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
}

.skills ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.skills li {
    border: 2px solid #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    transition: 0.3s;
}

.skills li:hover {
    background: #fff;
    color: #333;
}

.projects .project {
    margin-bottom: 30px;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.projects h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #fff;
}

.projects p {
    font-size: 16px;
    line-height: 1.5;
}

.contact ul {
    list-style: none;
    padding: 0;
    text-align: center;
    margin-top: 20px;
}

.contact li {
    margin: 10px 0;
    font-size: 18px;
}

.contact a {
    color: #fff;
    text-decoration: underline;
    transition: 0.3s;
}

.contact a:hover {
    color: #000;
    background: #fff;
    padding: 3px 8px;
    border-radius: 10px;
}
/* Projects: image beside text (one-by-one list) */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
}

/* card layout */
.project-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    overflow: hidden;
    padding: 16px;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* hover lift */
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* image column */
.project-img {
    height: 250px ;
    width: 350px ;
    border-radius: 12px !important;
}

/* content column */
.project-content {
    flex: 1 1 62%;
    padding: 6px 0;
}

/* content typography */
.project-content h3 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #fff;
}
.project-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.project-content li {
    margin: 6px 0;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

/* alternate layout: even cards reverse (image on right) */
.project-card:nth-child(even) {
    flex-direction: row-reverse;
}

/* responsive: stack on small screens */
@media (max-width: 768px) {
    .project-card {
        flex-direction: column;
        padding: 12px;
    }
    /*     .project-img {
        width: 100%;
        max-width: 100%;
        height: 260px;
        flex: 0 0 auto;
        border-radius: 12px;
    }
    .project-content {
        width: 100%;
        padding-top: 12px;
    } */
}
