  
/* Canvas Background */
#bg-canvas { position:fixed; top:0; left:0; width:100%; height:100%; z-index:-1; background:#0f0f0f; }

 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #0f0f0f;
    color: white;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 80px;
    background: rgba(17,17,17,0.95);
    backdrop-filter: blur(8px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: background 0.3s;
}
.navbar:hover {
    background: rgba(24,24,24,0.95);
}
.navbar ul {
    display: flex;
    list-style: none;
    gap: 25px;
}
.navbar a {
    text-decoration: none;
    color: #4fc3f7;
    font-weight: 500;
    position: relative;
    transition: 0.3s;
}
.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    left: 0;
    bottom: -4px;
    background: #4fc3f7;
    transition: width 0.3s ease;
}
.navbar a:hover::after, .navbar a.active::after { width:100%; }
.navbar a:hover { color: #81d4fa; text-shadow: 0 0 8px #4fc3f7, 0 0 16px #81d4fa; }
/* Skills */
.skills-grid { display:grid; gap:20px; justify-items:center; margin-top:40px; }
.technical-skills { grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); }
.soft-skills { grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); }
.skill-card { width:140px; height:80px; display:flex; justify-content:center; align-items:center; border-radius:12px; border:2px solid #4fc3f7; background:rgba(15,15,15,0.85); cursor:pointer; color:white; font-weight:500; transition:0.3s; text-align:center; }
.skill-card:hover { transform:translateY(-5px); box-shadow:0 0 20px #4fc3f7; }
.skill-card.active { background:#4fc3f7; color:#111; box-shadow:0 0 25px #4fc3f7; }


/* Menu Toggle - Base */
.menu-toggle {
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #4fc3f7;
    border-radius: 2px;
}

/* HERO */
.hero {
    display: flex;
    align-items: center; /* يبقي النص والصورة بمحاذاة بعض */
    justify-content: space-between;
    gap: 30px; /* قلل المسافة بين النص والصورة */
    padding: 120px 80px;
}
.hero-text { max-width: 520px; }
.hero-text h1 { font-size: 56px; margin-bottom: 15px; }
.hero-text h3 { color: #4fc3f7; margin-bottom: 20px; }
.hero-text p { line-height: 1.6; margin-bottom: 30px; color: #ccc; }
.hero-img { width: 320px; border-radius: 50%; box-shadow: 0 0 40px #4fc3f7; transition: 0.4s; }
.hero-img:hover { transform: scale(1.05); }
.hero-buttons { margin-top: 30px; display: flex; gap: 15px; flex-wrap: wrap; }

/* BUTTONS */
.btn, .btn-outline { padding: 12px 28px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: 0.3s; }
.btn { background: #4fc3f7; color: #111; }
.btn-outline { border: 2px solid #4fc3f7; color: #4fc3f7; }
.btn:hover { background: #81d4fa; transform: translateY(-3px); }
.btn-outline:hover { background: #4fc3f7; color: #111; transform: translateY(-3px); }

 /* زر GitHub */
.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    border-radius: 12px;
    background: #333;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-github:hover {
    background: #4fc3f7;
    color: #111;
    transform: translateY(-3px);
}

.github-icon {
    width: 28px;
    height: 28px;
}

/* SECTIONS */
section { padding: 100px 80px; text-align: center; }
h1,h2 { background: linear-gradient(90deg,#4fc3f7,#81d4fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* SKILLS */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 20px; }
/* البطاقة */
/* بطاقة المهارة بخلفية شفافة ولون نفس الخلفية */
.skill-card {
    background: #0f0f0f; /* نفس لون الصفحة */
    padding: 20px;
    border-radius: 12px;
    position: relative;
    color: #fff;
    overflow: hidden;
    z-index: 0;
}

/* الخط المتحرك حول البطاقة */
.skill-card::before {
    content: "";
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 14px; /* أكبر من الكارت شويه عشان يظهر كإطار */
    padding: 2px; /* سمك الخط */
    background: linear-gradient(90deg, #4fc3f7, #4fffa3, #4fc3f7);
    background-size: 200% 200%;
    z-index: -1;
    animation: moveBorder 6s linear infinite; /* حركة بطيئة */
}

/* حركة الخط */
@keyframes moveBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hover effect للكارت */
.skill-card:hover {
    transform: translateY(-5px);
    background: #0f0f0f; /* يظل نفس لون الخلفية */
    color: #fff;
}
/* PROJECTS */ 
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 30px; }
.project-card { background: #1a1a1a; padding: 25px; border-radius: 10px; transition: 0.3s; } 
.project-card p { margin-bottom: 20px; } 
.project-card:hover { transform: scale(1.05); box-shadow: 0 0 30px #4fc3f7; }

/* EDUCATION & TRAINING */
.edu-card, .train-card { background: #1a1a1a; padding: 25px; border-radius: 10px; margin: auto; max-width: 600px; }

/* CONTACT */
.contact a { color: #4fc3f7; text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* FOOTER */
footer { background: #111; text-align: center; padding: 20px; }

/* RESPONSIVE */
@media screen and (max-width:768px){
    /* Menu Toggle appears only on mobile */
    .menu-toggle { display: flex; }
    .project-card {
    padding: 20px 15px 40px 15px; /* زيادة المسافة السفلية */
}

.project-card p {
    margin-bottom: 20px;   
}

.project-card a.btn-outline {
    display: inline-block;   
    margin-top: 10px;
}

    /* Hide navbar links by default on mobile */
    .navbar ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        background: #111;
        padding: 20px;
        border-radius: 8px;
        gap: 15px;
        width: 200px;
    }
    .navbar ul.active { display: flex; }

    /* Hero side-by-side on mobile */
      .hero {
        flex-direction: row; /* نص + صورة جنب بعض */
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 20px;  
        padding: 80px 20px;
    }

    .hero-text { 
        max-width: 50%;
    }

    .hero-text h1 { font-size: 32px; }
    .hero-text h3 { font-size: 18px; }
    .hero-text p { font-size: 14px; }

    .hero-img { 
        width: 153px; /* حجم معقول على الموبايل */
        max-width: 50%;
        margin-top: 3; /* الصورة في مستوى النص */
    }

    /* مسافة بين الأزرار */
    .hero-buttons a {
        display: block;
        margin-top: 10px;
    }
     

    section { padding: 80px 20px; }
}






















