body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    color: #514ea9;
    background-color: rgb(0, 0, 0);
}

html {
    scroll-behavior: smooth;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    background-color: #000000;
}

header {
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    height: 70px;
    background-color: rgba(2, 2, 2, 0.121);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px #6600c5;
    z-index: 999;
}

.left {
    display: flex;
    align-items: center;
}

.left img {
    width: 100px;
    margin: 0 15px;
}


header ul {
    display: flex;
    justify-content: space-between;
    width: 20%;
    padding: 15px 15px;
    border-radius: 50px;
}

header ul li {
    list-style: none;
}

header ul a {
    text-decoration: none;
    color: white;
    font-weight: 700;
    transition: 0.3s;
    margin: 0 10px;
}

header ul a:hover {
    text-shadow: 0 0 15px blueviolet;
}

header ul a:active {
    color: #de72bc;
    text-shadow: 0 0 20px #72a1de;
    transform: scale(1.1);
}

.box-icons {
    display: flex;
    gap: 20px;
}

.box-icons p {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border: 2px solid #72a1de;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.5s;
}

.box-icons p:hover {
    background-color: #72a1de;
    color: black;
    box-shadow: 0 0 15px #72a1de;
}


.hero {
    position: relative;
    display: flex;
    width: 100%;
    height: 100vh;
    align-items: center;
    justify-content: space-between;
}

.hero-info {
    position: absolute;
    left: 5%;
}

.hero-info .hero-info-title {
    color: #72a1de;
    font-size: large;
    padding: 8px 5px;

}

.hero-info h1 {
    font-size: 60px;
    max-width: 600px;
    font-weight: 700;
    line-height: 70px;
    margin-top: 40px;
    margin-bottom: 30px;
}

.hero-info p {
    max-width: 550px;
    line-height: 25px;
    margin-bottom: 40px;
    font-size: 20px;
}

.hero-info button {
    color: white;
    padding: 15px 35px;
    border-radius: 10px;
    border: 1px solid #72a1de81;
    background-color: #2200493d;
    box-shadow: 0 0 5px #72a1de81;
    cursor: pointer;
    transition: 0.3s;
}

.social-icons {
    display: flex;
    gap: 18px;
    margin: 20px 0 30px;

}

.social-icons a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6a00ff, #9b5cff);
    box-shadow: 0 0 15px rgba(154, 92, 255, 0.4);
    transition: 0.3s;
    text-decoration: none;

}

.social-icons a i {
    font-size: 22px;
    color: white;
    display: block;
    line-height: 1;
}

.social-icons a:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 25px rgba(154, 92, 255, 0.8);
}


.hero-info button:hover {
    box-shadow: 0 0 15px #72a1de81;
}


.gradient {
    background: linear-gradient(to right, #00aaa7, #7e42a7, #6600c5, #6070fd, #2a46ff, #0099ff, #008ead);
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animate-gradient 2.5s linear infinite;
}



@keyframes animate-gradient {
    to {
        background-position: 200%;
    }
}

.about-image {
    width: 250px;
    height: 200حء;
    border-radius: 50%;
    overflow: hidden;
}

.about-image img {

    object-fit: cover;
    display: block;
}

.skills-video-box {
    position: absolute;
    right: 3%;
}

.skills-video {
    height: 900px;
    mix-blend-mode: lighten;
}


.scroll-down {
    height: 50px;
    width: 30px;
    border: 2px solid lightgray;
    position: absolute;
    left: 49%;
    bottom: 8%;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.626);
}



.scroll-down::before {
    top: 30%;
    animation-delay: 0.5s;
    /* animation: scroll-down 1s ease-in-out infinite; */
}

@keyframes scroll-down {
    0% {
        /* top:20%; */
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    100% {
        top: 90%;
        opacity: 0;
    }
}


.about-section {
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}


.about-image {
    width: 50%;
    display: flex;
    justify-content: center;
}

.about-image img {
    width: 100%;
    max-width: 380px;
    mix-blend-mode: lighten;
}


.about-text {
    width: 50%;
}

.about-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #72a1de;
}

.about-text p {
    font-size: 18px;
    line-height: 28px;
    margin-bottom: 20px;
    color: #bfc7ff;
}


.about-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.about-highlights span {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #72a1de81;
    font-size: 14px;
    color: #72a1de;
    background: #2200493d;
}


.my-project {
    display: flex;
    flex-direction: column;
    gap: 10%;
    align-items: center;
    position: relative;
    width: 80%;
    margin-top: 180px;
}

@media screen and (max-width: 450px) {

    /* إزالة ارتفاعات ضخمة */
    .my-project {
        height: auto !important;
        /* بدل 100vh */
        margin-top: 10px !important;
        /* قلل الفراغ */
        gap: 30px;
    }

    .tech-section {
        margin-top: 10px !important;
        /* قلل الفراغ بين المشاريع والتقنيات */
    }

    .contact-section {
        margin-top: 15px !important;
        /* قلل الفراغ بين التقنيات والتواصل */
        min-height: auto;
    }

    .skills-section {
        margin-top: 5px;
    }

    .skills-line {
        margin-top: 10px;
        gap: 15px;
    }

    /* Projects adjustments */
    .project-card {
        flex-direction: column;
        gap: 20px;
        margin-left: 0 !important;
    }

    .project-info {
        width: 95%;
        margin-left: 0;
        padding-left: 0;
        text-align: center;
    }

    .project-vidbox {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
}


.project-card {
    display: flex;
    width: 100%;
    height: 40%;
    align-items: center;
    gap: 10%;
    justify-content: center;
}

.project-vidbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    mix-blend-mode: exclusion;
    position: relative;
    cursor: pointer;
    transition: 0.5s;
    min-width: 400px;

}

.project-vidbox video {
    object-fit: cover;
    width: 100%;
    box-shadow: 0 0 10px lightgray;
    border-radius: 20px;
    transition: 0.5s;
}

.project-card video:hover {
    box-shadow: 0 0 25px rgb(255, 255, 255);
}

.project-info {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    width: 50%;
    padding-left: 10%;
}

.project-info h1 {
    width: 90%;
    font-size: 25px;
    font-weight: bold;
    text-wrap: nowrap;
    margin-top: 2;
    margin-bottom: 10px;
    max-width: 450px;
}

.project-info p {
    width: 90%;
    max-width: 400px;
    min-width: 300px;
    margin-bottom: 50px;
    margin-top: 0;
}

.project-info button {
    color: white;
    padding: 15px 35px;
    border-radius: 10px;
    border: 1px solid #72a1de81;
    background-color: #2200493d;
    box-shadow: 0 0 5px #72a1de81;
    cursor: pointer;
    transition: 0.3s;
}

.project-info button:hover {
    opacity: 0.8;
    box-shadow: 0 0 15px #72a1de81;
}

.project-vidbox .hover-sign {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30%;
    height: 100px;
}



.skills-box {
    width: 100%;
    height: 90vh;
    position: relative;
    display: flex;
    align-items: start;
    justify-content: center;
    mix-blend-mode: lighten;
    opacity: 0.7;
}


.tech-section {
    width: 100%;
    text-align: center;
    margin-top: 200px;

}

.tech-grid {
    width: 70%;
    margin: 60px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    justify-items: center;
}

.project-vidbox img.project-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: none;
    transition: 0.5s;
}



.tech-item {
    width: 120px;
    height: 120px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;

    background: transparent;
    border: 2px solid #6600c5;

    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tech-item:hover {
    box-shadow:
        0 0 15px rgba(102, 0, 197, 0.6),
        0 0 30px rgba(102, 0, 197, 0.4),
        0 0 45px rgba(102, 0, 197, 0.2);
}

.contact-section {
    width: 80%;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 30px;
}

.contact-subtitle {
    max-width: 600px;
    font-size: 18px;
    color: #bfc7ff;
}

.contact-cards {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-card {
    width: 220px;
    padding: 30px 20px;
    border-radius: 20px;
    text-decoration: none;
    color: white;

    background: rgba(102, 0, 197, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(102, 0, 197, 0.4);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;

    transition: 0.4s ease;
}

.contact-card i {
    font-size: 38px;
    color: #9b5cff;
}

.contact-card h3 {
    margin: 0;
    font-size: 20px;
}

.contact-card span {
    font-size: 14px;
    color: #dcdcff;
}

/* Hover */
.contact-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow:
        0 0 20px rgba(102, 0, 197, 0.6),
        0 0 40px rgba(102, 0, 197, 0.4);
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    height: 70px;
    background-color: rgba(42, 7, 91, 0.121);
    z-index: 999;
    padding: 0 3rem;
}


.skills-section {
    width: 80%;
    margin: auto;
    text-align: center;
}

.skills-line {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.skill-card {
    width: 230px;
    background: #0b0030;
    border-radius: 20px;
    padding: 25px 20px;
    transition: 0.4s;
}

.skill-card i {
    font-size: 38px;
    color: #7a3cff;
    margin-bottom: 15px;
}

.skill-card h3 {
    margin-bottom: 10px;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 20px rgba(122, 60, 255, 0.4);
}

.autoBlur {
    animation: autoBlurAnimation linear both;
    animation-timeline: view();

}

@keyframes autoBlurAnimation {
    0% {
        filter: blur(40px);
    }

    35%,
    65% {
        filter: blur(0);
        opacity: 1;
    }

    100% {
        filter: blur(40px);
        opacity: 0;
    }
}

.autoDisplay {
    animation: autoDisplayAnimation both;
    animation-timeline: view();

}

@keyframes autoDisplayAnimation {
    from {
        filter: blur(10px);
        transform: translateY(-200px) scale(0);
    }

    50% {
        opacity: 1;
        filter: blur(0px);
        transform: translateX(0) scale(1);
    }
}

.fadein-left {
    animation: fadeInLeftAnimation both;
    animation-timeline: view();
}

@keyframes fadeInLeftAnimation {
    0% {
        opacity: 0;
        transform: translateX(-500px) scale(0.2);
        filter: blur(10px);
    }

    35%,
    65% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0px);
    }
}

.menu-icon {
    font-size: 35px;
    cursor: pointer;
    display: none;
}


.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 70%;
    width: 0%;
    background-color: #000000b8;
    z-index: 999;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.479);
    backdrop-filter: blur(10px);
    opacity: 0;
    border-bottom-left-radius: 100%;

}

.close-icon {
    font-size: 50px;
    color: lightgray;
    padding-left: 10px;
    cursor: pointer;
}

.sidebar ul {
    padding-left: 20px;
}

.sidebar ul li {
    list-style: none;
    margin-bottom: 30px;
}

.sidebar ul li a {
    text-decoration: none;
    color: lightgray;
    font-size: 30px;
    font-weight: 900;
    text-shadow: 0 0 15px #4c4c4c;
}

.social-sidebar {
    padding-left: 20px;
    margin-top: 60px;
    text-wrap: nowrap;
}

.social-sidebar a {
    font-size: 35px;
    padding: 5px 5px;
    cursor: pointer;
    transition: 0.5s;
}


.sidebar.open-sidebar {
    animation: openSideBarAnimation 1.5s forwards;
}

@keyframes openSideBarAnimation {
    to {
        width: 80%;
        opacity: 1;
        bottom: 0;
        border-radius: 0;
    }
}



.sidebar.close-sidebar {
    animation: closeSideBarAnimation 1.5s forwards;
}

@keyframes closeSideBarAnimation {
    from {
        width: 80%;
        opacity: 1;
        bottom: 0;
        border-radius: 0;
    }

    to {
        width: 0;
        opacity: 0;
        bottom: 70%;
        border-bottom-left-radius: 50%;
    }
}


@media screen and (max-width: 1200px) {


    .hero-info h1 {
        font-size: 40px;
        max-width: 400px;
        line-height: 40px;
    }

    .hero-info P {
        max-width: 300px;
    }

    .skills-video-box {
        right: 0%;
    }

    .skills-video-box video {
        height: 500px;
    }

    .info-cards {
        grid-template-columns: auto;
    }

    .card:nth-child(3) {
        grid-column: span 2;
        height: 70vh;
    }

    .info-cards .card h1 {
        font-size: 20px;
    }

    .info-cards .card:nth-child(3) h1 {
        bottom: 25%;
    }

    .card video {
        height: 60%;

        margin-top: 5%;
    }


    .contact-section .section-title {
        left: 30%;
    }
}

@media screen and (max-width: 700px) {
    header {
        position: fixed;
        height: 50px;

    }



    header ul {
        display: none;
    }

    header .box-icons {
        display: none;
    }

    .menu-icon {
        display: inline;
    }



    .autoBlur {
        animation: none;
    }

    .hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: auto;
        padding-top: 120px;
        padding-bottom: 80px;
    }


    .hero-info,
    .skills-video-box {
        position: static !important;
        transform: none !important;
    }


    .hero-info {
        order: 1;
        text-align: center;
    }

    .skills-video-box {
        order: 2;
        margin-top: 40px;
        display: flex;
        justify-content: center;
    }

    .skills-video-box img {
        width: 100%;
        max-width: 320px;
    }

    .scroll-down {
        bottom: 5%;
    }



    .info-cards {
        grid-template-columns: auto;
    }

    .card:nth-child(3) {
        grid-column: span 2;
        height: 70vh;
    }

    .card video {
        width: 100%;
    }

    .container {
        height: 100%;
    }

    .project-vidbox video {
        width: 250px;
        margin-left: -100px;
    }

    .project-info {
        overflow: hidden;
        padding-left: 0;
        margin-left: -50px;
    }

    .project-info h1 {
        font-size: 20px;
        max-width: 200px;
        text-wrap: wrap;
    }

    .project-info p {
        font-size: 10px;
        text-wrap: wrap;
        max-width: 200px;
        min-width: 0;
    }

    .project-info button {
        padding: 5px 10px;
    }



    .project-card {
        flex-direction: column;
        margin-left: 25%;
        gap: 30px;
    }

    .project-vidbox {
        min-width: 200px;
    }

    .project-info {
        width: 85%;
    }

    .project-info h1 {
        text-wrap: nowrap;
    }

    .project-info p {
        max-width: 300px;
    }

    .slider .list .item img {
        width: 70%;
    }

    .contact-section {
        flex-direction: column;
        margin-top: 10px;
        margin-bottom: 10px;
    }




}

@media screen and (max-width: 480px) {
    .skills-video-box {
        display: flex;
        justify-content: center;
        margin-top: 30px;
    }

    .skills-video-box img {
        width: 100%;
        max-width: 240px;
        height: auto;
        opacity: 0.9;
    }

    .contact-section {
        flex-direction: column;
        margin-top: 10px;
        margin-bottom: 10px;
    }



    .left {
        scale: 0.9;
        margin-left: -5px;
    }

    .left h2 {
        font-size: 20px;
    }

    .hero {
        scale: 0.9;
    }

    .hero-info {
        bottom: 15%;
    }

    .hero-info h1 {
        font-size: 35px;
    }



    .section-title {
        font-size: 25px;
    }

    .info-cards {
        display: flex;
        flex-direction: column;
    }

    .card {
        min-height: 20rem;
    }

    .card h1 {
        bottom: 30%;
        font-size: 5px;
    }

    .project-card {
        height: 50%;
    }

    .project-info p {
        margin-bottom: 15px;
    }

    .project-info {
        margin-left: -80px;
    }



    .slider {
        bottom: 0%;
    }

    .contact-section {
        scale: 0.9;
        height: 50vh;
    }

    .contact-section .section-title {
        top: -30px;
        left: 25%;
    }

    .footer .box-icons {
        gap: 10px;
    }


}

@media screen and (max-width: 768px) {

    .tech-grid {
        display: flex;
        flex-wrap: nowrap;          /* يمنع النزول لسطر جديد */
        overflow-x: auto;           /* تفعيل السكرول الأفقي */
        gap: 16px;

        width: 100%;
        padding: 10px 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .tech-item {
        flex: 0 0 auto;             /* يمنع التمدد */
        scroll-snap-align: center;
        min-width: 80px;
    }

    .social-icons {
        justify-content: center;
    }
    .tech-grid::-webkit-scrollbar {
        display: none;
    }

    .tech-grid {
        scrollbar-width: none;
    }

    /* ===== General ===== */
    section {
        padding: 60px 0;
    }

    .container {
        align-items: center;
    }

    /* ===== Header ===== */
    header {
        position: fixed;
        height: 60px;
        padding: 5 20px;
    }

    header ul {
        display: none;
    }

    .menu-icon {
        display: block;
    }


    .hero {
        flex-direction: column;
        height: auto;
        padding-top: 120px;
        padding-bottom: 10px;
        text-align: center;
    }

    .hero-info {
        position: static;
        max-width: 100%;
    }

    .hero-info h1 {
        font-size: 34px;
        line-height: 44px;
        max-width: 100%;
    }

    .hero-info p {
        font-size: 16px;
        max-width: 100%;
    }

    .skills-video-box {
        position: static;
        margin-top: 40px;
        display: flex;
        justify-content: center;
    }

    .skills-video-box img {
        max-width: 300px;
        width: 100%;
    }

    .about-section {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .about-content {
        align-items: center;
    }

    .about-text {
        align-items: center;
        text-align: center;
    }

    .about-highlights {
        justify-content: center;
    }

    .skills-line {
        gap: 20px;
    }

    .skill-card {
        width: 180px;
    }

    .my-project {
        height: auto;
        margin-top: 6px;
        gap: 60px;
    }

    .project-card {
        flex-direction: column;
        gap: 30px;
        margin-left: 0 !important;
    }

    .project-vidbox {
        width: 100%;
        min-width: unset;
        mix-blend-mode: normal;
    }

    .project-info {
        width: 100%;
        padding-left: 0;
        align-items: center;
        text-align: center;
        margin-left: 0 !important;
    }

    .project-info h1 {
        text-wrap: wrap;
        font-size: 20px;
    }

    .project-info p {
        font-size: 14px;
        max-width: 100%;
        min-width: unset;
    }

    /* ===== Technologies ===== */
    .tech-section {
        margin-top: 30px;
    }

    .tech-grid {
        width: 90%;
        gap: 15px;
    }

    .tech-item {
        width: 90px;
        height: 90px;
    }

    /* ===== Contact ===== */
    .contact-section {
        min-height: auto;
    }

    .skills-section {
        margin-top: 10px;
        /* قلل المسافة بدل 120px أو أكبر */
    }

    .skills-line {
        margin-top: 20px;
        /* أقل مسافة بين الكروت */
    }

    .contact-card {
        width: 200px;
    }

    /* ===== Footer ===== */
    .footer {
        position: static;
        margin-top: 130px;
       text-align: center;
    }
}

@media screen and (max-width: 480px) {


    .hero {
        text-align: center;
    }

    .hero-info h1 {
        font-size: 28px;
        line-height: 38px;
    }

    .hero-info p {
        font-size: 14px;
    }

    .skill-card {
        width: 160px;
        padding: 18px 14px;
    }

    .tech-item {
        width: 75px;
        height: 75px;
    }

    .contact-card {
        width: 180px;
    }
}

@media screen and (max-width: 768px) {
    .about-content {
        flex-direction: column;
        gap: 30px;
        /* يعطي مسافة بين الصورة والنص */
        align-items: center;
    }

    .project-card {
        flex-direction: column;
        /* من صف إلى عمود */
        align-items: center;
        /* يوسّط كل العناصر أفقياً */
        gap: 30px;
        margin-left: 0;
    }

    .project-vidbox {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }

    .project-info {
        width: 90%;
        text-align: center;
        padding-left: 0;
        margin-left: 0;
    }

    .project-info h1,
    .project-info p {
        max-width: 100%;
    }

    .about-image,
    .about-text {
        width: 90%;
        text-align: center;
    }

    .about-image img {
        max-width: 250px;
        height: auto;
    }

    .about-text h2 {
        font-size: 24px;
    }

    .about-text p {
        font-size: 14px;
        line-height: 22px;
    }

    .about-highlights {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .about-highlights span {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media screen and (max-width: 480px) {
    .project-vidbox {
        max-width: 280px;
        margin: 0 auto;
    }

    .project-info {
        width: 95%;
    }

    .about-text h2 {
        font-size: 20px;
    }

    .about-text p {
        font-size: 13px;
        line-height: 20px;
    }

    .about-highlights span {
        font-size: 11px;
        padding: 5px 10px;
    }

    .about-image img {
        max-width: 200px;
    }
}