*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

body{
    background:#0f172a;
    color:white;
    scroll-behavior:smooth;
}

section{
    padding:100px 80px;
    text-align:center;
    scroll-margin-top: 80px;
}

.section-title{
    font-size:32px;
    margin-bottom:40px;
    color:#00ffff;
}

/* NAVBAR */
nav{
    position:fixed;
    width:100%;
    padding:20px 80px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    transition:0.4s;
    z-index:1000;
}

nav.scrolled{
    background:#111827;
    box-shadow:0 5px 20px rgba(0,0,0,0.5);
}

nav ul{
    list-style:none;
    display:flex;
    gap:30px;
}

nav a{
    text-decoration:none;
    color:white;
    transition:0.3s;
}

nav a:hover{
    color:#00ffff;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    flex-direction: column;
    justify-content: space-between;
    
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
}

@media (max-width: 768px) {
    nav {
        padding: 15px 30px;
    }

    .menu-toggle {
        display: flex; 
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        right: -100%; 
        top: 0;
        height: 100vh;
        width: 50%; 
        background: #111827;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}


/* HERO */
.hero{
    position:relative;
    height:100vh;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
}
.hero h1{
    font-size: 40px;
}
.name{
    color: #00ffff;
}
#particles-js{
    position:absolute;
    width:100%;
    height:100%;
    z-index:0;
}

.hero-container{
    position:relative;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:space-between;
    width:85%;
}

.fade-in{
    opacity:0;
    transform:translateY(30px);
    animation:fadeUp 1s forwards;
    
}

.fade-in-delay{
    opacity:0;
    transform:translateY(30px);
    animation:fadeUp 1s 0.5s forwards;
}

.fade-in-delay2{
    opacity:0;
    transform:translateY(30px);
    animation:fadeUp 1s 1s forwards;
}

@keyframes fadeUp{
    to{
        opacity:1;
        transform:translateY(0);
    }
}

.hero-image-wrapper{
    position:relative;
    width:380px;
    height:380px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.blob{
    position:absolute;
    width:380px;
    height:380px;
    background:linear-gradient(45deg,#00ffff,#9333ea);
    border-radius:50%;
    filter:blur(60px);
    animation:blobMove 8s infinite alternate ease-in-out;
}

@keyframes blobMove{
    0%{ transform:scale(1); }
    100%{ transform:scale(1.2); }
}

.hero-image{
    width:350px;
    height:350px;
    border-radius:50%;
    overflow:hidden;
    position:relative;
    z-index:2;
    transition:0.4s;
}

.hero-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:50%;
}

.hero-image::before{
    content:"";
    position:absolute;
    inset:-5px;
    border-radius:50%;
    background:linear-gradient(45deg,#00ffff,#0ea5e9,#9333ea,#00ffff);
    background-size:300%;
    animation:borderAnim 6s linear infinite;
    z-index:-1;
}

@keyframes borderAnim{
    0%{background-position:0%}
    100%{background-position:300%}
}

.hero-image:hover{
    transform:rotateY(10deg) rotateX(5deg) scale(1.05);
}
.btn{
    padding:12px 25px;
    background:#00ffff;
    color:black;
    border-radius:30px;
    text-decoration:none;
    transition:0.3s;
    
}
.hero-text .btn{
    display:inline-block;
    margin-top:50px;
}

.btn:hover{
    transform:scale(1.1);
}

/* Responsive */
@media(max-width:900px){
    .hero-container{
        flex-direction:column;
        text-align:center;
    }
    .hero-image-wrapper{
        margin-top:40px;
    }
}

.hero-image::after{
    content:"";
    position:absolute;
    inset:0;
    border-radius:50%;
    box-shadow:0 0 40px #00ffff;
    z-index:0;
}

@keyframes borderAnimation{
    0%{ background-position:0% 50%; }
    50%{ background-position:100% 50%; }
    100%{ background-position:0% 50%; }
}

@keyframes float{
    0%{ transform:translateY(0px); }
    50%{ transform:translateY(-15px); }
    100%{ transform:translateY(0px); }
}

@media(max-width:900px){
    .hero-container{
        flex-direction:column;
        text-align:center;
    }
    .hero-image{
        margin-top:40px;
        width:250px;
        height:250px;
    }
}

/* about */

.about-container{
    display:flex;
    flex-direction:column; 
    align-items:center;
    gap:30px;
    flex-wrap:wrap;

}

.about-text{
    flex:1;
    min-width:300px;
    line-height:1.8;
    color:#ccc;
}

.about-stats{
    display:flex;
    gap:30px;
    flex-wrap:wrap;
}

.stat{
    background:#1e293b;
    padding:35px;         
    border-radius:20px;    
    text-align:center;
    width:180px;          
    transition:0.4s;
}

.stat h3{
    color:#00ffff;
    font-size:32px;        
}

.stat p{
    font-size:16px;        
}

.stat:hover{
    transform:translateY(-10px);
    box-shadow:0 0 25px #00ffff; 
}

.stat h3{
    color:#00ffff;
    font-size:28px;
}

.stat:hover{
    transform:translateY(-10px);
    box-shadow:0 0 20px #00ffff;
}

/* EDUCATION */
.education-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.edu-box {
    background: #1e293b;
    padding: 40px 30px;
    width: 400px;
    border-radius: 20px;
    transition: 0.4s;
    text-align: left;
    position: relative;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.edu-icon {
    font-size: 30px;
    color: #00ffff;
    margin-bottom: 20px;
}

.edu-box h3 {
    color: white;
    font-size: 22px;
    margin-bottom: 10px;
}

.university {
    color: #00ffff;
    font-weight: 600;
    margin-bottom: 5px;
}

.edu-date {
    display: inline-block;
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
    margin-bottom: 15px;
}

.edu-desc ul {
    list-style-type: "▹"; 
    padding-left: 5px;
}

.edu-desc li {
    margin-bottom: 8px;
    padding-left: 10px;
}

.edu-desc strong {
    color: #00ffff; 
}
.edu-desc {
    color: #ccc;
    line-height: 1.6;
    font-size: 15px;
}

.edu-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px #00ffff;
    border-color: #00ffff;
}

@media (max-width: 600px) {
    .edu-box {
        width: 100%;
    }
}

/* SKILLS */
.skills-container{
    display:flex;
    justify-content:center;
    gap:40px;
    flex-wrap:wrap;
}

.skill-box{
    background:#1e293b;
    padding:30px;
    width:280px;
    border-radius:20px;
    transition:0.4s;
    text-align:left;
}

.skill-box h3{
    color:#00ffff;
    margin-bottom:15px;
}

.skill-box ul{
    list-style:none;
}

.skill-box li{
    margin:8px 0;
    position:relative;
    padding-left:15px;
}

.skill-box li::before{
    content:"▹";
    position:absolute;
    left:0;
    color:#00ffff;
}

.skill-box:hover{
    transform:translateY(-10px);
    box-shadow:0 0 20px #00ffff;
}


/* PROJECTS */
.projects-container{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
    gap:30px;
    margin-top:40px;
}

.project-card{
    position:relative;
    overflow:hidden;
    border-radius:20px;
    cursor:pointer;
    transition:0.4s;
}
.project-card img{
    width: 100%;
    height:300px;
    object-fit:fill;
    transition:0.6s;
}

/* Overlay */
.project-overlay{
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    height:100%;
    background:linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.3));
    color:white;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    opacity:0;
    transition:0.5s;
    padding:20px;
}

.project-overlay h3{
    color:#00ffff;
    margin-bottom:10px;
}

.project-btn{
    margin-top:15px;
    padding:8px 18px;
    background:#00ffff;
    color:black;
    text-decoration:none;
    border-radius:20px;
    font-size:14px;
    transition:0.3s;
}

.project-btn:hover{
    background:white;
}

/* Hover Effects */
.project-card:hover img{
    transform:scale(1.1);
}

.project-card:hover .project-overlay{
    opacity:1;
}

.project-card:hover{
    box-shadow:0 0 25px #00ffff;
}





/* ================= CERTIFICATIONS SECTION ================= */
.certs-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap; 
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.cert-card {
    background: #1e293b;
    border-radius: 20px;
    width: 480px; 
    overflow: hidden;
    transition: 0.4s ease;
    border: 1px solid rgba(0, 255, 255, 0.05);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}


.cert-image {
    position: relative;
    width: 100%;
    height: 300px; 
    overflow: hidden;
}

.cert-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    background: #0f172a; 
    transition: 0.6s ease;
}


.cert-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 255, 255, 0.15); 
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.5s ease;
}

.view-cert-btn {
    padding: 10px 20px;
    background: #00ffff;
    color: #0f172a;
    text-decoration: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.view-cert-btn:hover {
    transform: scale(1.1);
    background: white;
}

/* تصميم معلومات الشهادة */
.cert-info {
    padding: 25px;
    text-align: left;
}

.cert-info h3 {
    font-size: 20px;
    color: white;
    margin-bottom: 8px;
}

.cert-info p {
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 12px;
}

.platform {
    display: inline-block;
    color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* Hover Effect على الكارت ككل */
.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
}

.cert-card:hover .cert-image img {
    transform: scale(1.05); 
}

.cert-card:hover .cert-overlay {
    opacity: 1; 
}


@media (max-width: 992px) {
    .cert-card {
        width: 100%; 
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .cert-image {
        height: 250px;
    }
}


/* ================= CONTACT ================= */
.contact-subtitle {
    color: #ccc;
    margin-bottom: 50px;
    font-size: 16px;
}

.contact-wrapper {
    display: flex;
    justify-content: center;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
    flex-wrap: wrap;
}

/* Info Side */
.contact-info {
    flex: 1;
    min-width: 300px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 20px;
    color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
    padding: 15px;
    border-radius: 50%;
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;

}

.info-item h4 {
    font-size: 18px;
    color: white;
}

.info-item p {
    color: #ccc;
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: #1e293b;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.social-links a:hover {
    background: #00ffff;
    color: #0f172a;
    transform: translateY(-5px);
}

/* Form Side */
.contact-form {
    flex: 1.5;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    gap: 20px;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 15px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 10px;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.contact-form .btn {
    width: fit-content;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    .contact-wrapper {
        gap: 40px;
    }
}

/* Responsive */
@media(max-width:768px){
    .contact-details{
        font-size:16px;
    }
    .contact-icons a{
        font-size:26px;
    }
}


footer{
    padding:20px;
    background:#111827;
    display: flex;
    justify-content: center;
    font-size: 14px;

}




/* تعديل الـ Navbar */
@media (max-width: 768px) {
    nav {
        padding: 15px 20px;
        flex-direction: column; 
    }

    nav ul {
        gap: 15px;
        margin-top: 10px;
        font-size: 14px;
    }
}
@media (max-width: 900px) {
    .hero {
        height: auto; 
        padding-top: 150px;
        padding-bottom: 50px;
    }

    .hero-container {
        flex-direction: column-reverse; 
        gap: 40px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .hero-image-wrapper, .blob {
        width: 280px;
        height: 280px;
    }

    .hero-image {
        width: 250px;
        height: 250px;
    }
}
@media (max-width: 600px) {
    section {
        padding: 60px 20px;
    }

    .about-stats {
        justify-content: center;
        width: 100%;
    }

    .stat {
        width: 100%; 
        max-width: 300px;
    }
}
/* تحسين شبكة المشاريع */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

@media (max-width: 480px) {
    .projects-container {
        grid-template-columns: 1fr; 
    }
    
    .skill-box {
        width: 100%; 
    }
}