/* ===== BACKGROUND ===== */


/* ==========================
   GOOGLE FONT
========================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ==========================
   RESET
========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background:#0d0d0d;
    color:#fff;
    overflow-x:hidden;
}

/* ==========================
   COLORS
========================== */
:root{
    --primary:#800020;
    --secondary:#a52a2a;
    --white:#ffffff;
    --gray:#bfbfbf;
    --dark:#0d0d0d;
}

/* ==========================
   NAVBAR
========================== */

/* ===== PREMIUM NAVBAR ===== */

header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index:99999;
    margin-top: 0;
}

.navbar{
    max-width:1300px;
    margin:15px auto;
    padding:14px 35px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    background:rgba(20,20,20,.45);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);

    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;

    box-shadow:
    0 8px 30px rgba(0,0,0,.35),
    0 0 20px rgba(180,0,0,.15);

    transition:.4s ease;
}
.navbar {
    width: 100%;
    margin-top: 0; /* 7eyed ay margin l-fog */
    /* dir bdlha padding ila bghiti tkhli l-navbar broad mn l-dakhl */
}

.logo{
    font-size:32px;
    font-weight:700;
    color:white;
}

.logo span{
    color:var(--primary);
}

.navbar ul{
    display:flex;
    gap:35px;
    list-style:none;
}

.navbar ul li a{
    color:white;
    text-decoration:none;
    font-weight:600;
    transition:.3s;
    position:relative;
}

.navbar ul li a:hover{
    color:#ff4040;
}

.navbar ul li a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-6px;
    width:0%;
    height:2px;
    background:#ff4040;
    transition:.3s;
}

.navbar ul li a:hover::after{
    width:100%;
}
@media screen and (max-width: 768px) {
    header {
        width: 100% ;
        left: 0 ;
        right: 0 ;
        padding: 0 10px; /* katkhli chwiya d l-khwa f l-jnab dial l-ecran */
        box-sizing: border-box;
    }

    .navbar {
        width: 100% ;
        max-width: 100%;
        flex-direction: column; /* katzl l-links t7t l-logo b7al li rak dayr dba */
        align-items: center;
        text-align: center;
        padding: 15px 10px ;
        border-radius: 12px; /* ila knti dayr liha border-radius bch dji round */
    }

    .navbar ul {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap; /* bach ila ma-kfach l-blasayt, l-links i-hbtou l-t7t bla ma-ykhirjo 3la l-ecran */
        gap: 12px;
        margin-top: 10px;
        padding: 0;
    }


.logo span{

font-size:20px;

}

}
/* ==========================
   HERO
========================== */

.hero {
    width: 90%;
    max-width: 1300px; /* باش ما تتهربش الكتيبة في الشاشات الكبار */
    min-height: 100vh;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 80px;
    padding-top: 140px; /* هادي هي العفسة السحرية اللي تدفع الكتيبة والتصويرة تحت الـ Navbar */
    padding-bottom: 40px;
    .hero {
    padding-top: 120px; /* Zid had l-9ima (awla 3la 7sab ch7al fiha l-navbar f l-irtifa3) */
}
}

.hero-text{
    flex:1;
}

.hero-text h3{
    color:var(--gray);
    font-size:22px;
}

.hero-text h1{
    font-size:70px;
    margin:15px 0;
}

.hero-text h1 span{
    color:var(--primary);
}

.hero-text h2{
    font-size:32px;
    margin-bottom:20px;
    color:var(--gray);
}

.hero-text p{
    max-width:600px;
    line-height:1.8;
    color:#d7d7d7;
    margin-bottom:35px;
}

.buttons{
    display:flex;
    gap:20px;
}

.btn{
    background:var(--primary);
    color:white;
    text-decoration:none;
    padding:15px 35px;
    border-radius:12px;
    transition:.4s;
    font-weight:600;
}

.btn:hover{
    background:var(--secondary);
    transform:translateY(-5px);
    box-shadow:0 0 25px rgba(128,0,32,.6);
}

.btn2{
    border:2px solid var(--primary);
    color:white;
    text-decoration:none;
    padding:15px 35px;
    border-radius:12px;
    transition:.4s;
    font-weight:600;
}

.btn2:hover{
    background:var(--primary);
    transform:translateY(-5px);
}

/* ==========================
   IMAGE
========================== */

.hero-image{
    flex:1;
    display:flex;
    justify-content:center;
    align-items:center;
}

.hero-image img{
    width:420px;
    border-radius:25px;
    border:4px solid var(--primary);
    box-shadow:0 0 60px rgba(128,0,32,.45);
    transition:.4s;
}

.hero-image img:hover{
    transform:scale(1.03);
}

/* ==========================
   SECTION TITLE
========================== */

.title{
    text-align:center;
    margin-bottom:60px;
}

.title h2{
    font-size:45px;
    color:white;
}

section{
    padding:120px 10%;
}
/* ==========================
   ABOUT
========================== */



.about-container{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:80px;
    flex-wrap:wrap;
}

.about-image{
    flex:1;
    display:flex;
    justify-content:center;
}

.about-image img{
    width:350px;
    border-radius:20px;
    border:3px solid var(--primary);
    box-shadow:0 0 35px rgba(128,0,32,.45);
    transition:.4s;
}

.about-image img:hover{
    transform:scale(1.04);
}

.about-text{
    flex:1;
}

.about-text h3{
    font-size:38px;
    margin-bottom:20px;
}

.about-text p{
    color:#cfcfcf;
    line-height:1.9;
    font-size:17px;
}

/* ==========================
   SKILLS
========================== */



.skills-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:30px;
}

.card{
    background:#181818;
    padding:40px 25px;
    text-align:center;
    border-radius:20px;
    border:1px solid rgba(255,255,255,.08);
    transition:.4s;
}

.card:hover{
    transform:translateY(-12px);
    border-color:var(--primary);
    box-shadow:0 0 30px rgba(128,0,32,.35);
}

.card i{
    font-size:60px;
    color:var(--primary);
    margin-bottom:20px;
}

.card h3{
    font-size:24px;
    margin-bottom:15px;
    color: white;
}

.card p{
    color:#bdbdbd;
    line-height:1.7;
}

/* ==========================
   SKILL BAR
========================== */

.skill-bar{
    margin-top:20px;
}

.skill-name{
    display:flex;
    justify-content:space-between;
    margin-bottom:8px;
    font-size:15px;
}

.bar{
    width:100%;
    height:8px;
    background:#2a2a2a;
    border-radius:20px;
    overflow:hidden;
}

.bar span{
    display:block;
    height:100%;
    background:linear-gradient(to right,#800020,#c2185b);
    border-radius:20px;
}

.html{
    width:100%;
}

.css{
    width:95%;
}

.js{
    width:80%;
}

.C{
    width:90%;
}
/* ==========================
   PROJECTS
========================== */



.projects-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:35px;
}

.project{
   
    border-radius:20px;
    overflow:hidden;
    transition:.4s;
    border:1px solid rgba(255,255,255,.08);
}

.project:hover{
    transform:translateY(-10px);
    border-color:var(--primary);
    box-shadow:0 0 30px rgba(128,0,32,.35);
}

.project img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.project h3{
    font-size:28px;
    padding:20px 20px 10px;
}

.project p{
    padding:0 20px;
    color:#cfcfcf;
    line-height:1.8;
}

.project a{
    display:inline-block;
    margin:20px;
    padding:12px 28px;
    background:var(--primary);
    color:#fff;
    text-decoration:none;
    border-radius:10px;
    transition:.3s;
}

.project a:hover{
    background:var(--secondary);
}

/* ==========================
   CONTACT
========================== */



.contact-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:30px;
    margin-top:50px;
}

.contact-container div{
    
    padding:35px;
    border-radius:20px;
    text-align:center;
    transition:.4s;
    border:1px solid rgba(255,255,255,.08);
}

.contact-container div:hover{
    transform:translateY(-10px);
    border-color:var(--primary);
    box-shadow:0 0 25px rgba(128,0,32,.35);
}

.contact-container i{
    font-size:45px;
    color:var(--primary);
    margin-bottom:20px;
}

.contact-container p{
    color:#d6d6d6;
    word-break:break-word;
}

/* ==========================
   FOOTER
========================== */

footer{
    padding:30px;
    text-align:center;
    background:#090909;
    color:#999;
    border-top:1px solid rgba(255,255,255,.08);
}

/* ==========================
   RESPONSIVE
========================== */

@media(max-width:991px){

    .navbar{
        flex-direction:column;
        height:auto;
        padding:20px 0;
    }

    .navbar ul{
        margin-top:20px;
        gap:20px;
        flex-wrap:wrap;
        justify-content:center;
    }

    .hero{
        flex-direction:column-reverse;
        text-align:center;
        padding-top:120px;
    }

    .hero-text p{
        margin:auto;
    }

    .buttons{
        justify-content:center;
        flex-wrap:wrap;
    }

    .hero-image img{
        width:320px;
    }

    .hero-text h1{
        font-size:50px;
    }

    .hero-text h2{
        font-size:24px;
    }

    .about-container{
        flex-direction:column;
        text-align:center;
    }

    .about-image img{
        width:300px;
    }

}

@media(max-width:600px){

    .hero-text h1{
        font-size:40px;
    }

    .hero-text h2{
        font-size:20px;
    }

    .title h2{
        font-size:35px;
    }

    .btn,
    .btn2{
        width:100%;
        text-align:center;
    }

    .hero-image img{
        width:260px;
    }

}
@keyframes fadeUp{

0%{
opacity:0;
transform:translateY(50px);
}

100%{
opacity:1;
transform:translateY(0);
}

}

.hero{
animation:fadeUp 1.5s ease;
}
.btn:hover{

box-shadow:
0 0 10px white,
0 0 20px white,
0 0 40px white;

}


.logo{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
}

.logo-box{
    width:55px;
    height:55px;
    border-radius:15px;
    background:linear-gradient(135deg,#8B0000,#B22222,#DC143C);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:23px;
    font-weight:800;
    box-shadow:0 0 20px rgba(220,20,60,.45);
    transition:.3s ease;
}

.logo-box:hover{
    transform:scale(1.08);
    box-shadow:0 0 35px rgba(220,20,60,.8);
}

.logo span{
    color:#fff;
    font-size:28px;
    font-weight:700;
}


/* ===== CLEAN BACKGROUND (replace your repeated background code) ===== */

html,
/* ===== THE PERFECT BACKGROUND SYSTEM ===== */
html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh; /* رجعناها vh باش تدي كامل طول الشاشة مية بالمية */
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    
    /* هادا الـ gradient الأساسي المنظم */
    background: radial-gradient(circle at top, #3a000d 0%, #140005 40%, #050505 100%) no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Moving Grid Background Layer */
body::after {
    content: "";
    position: fixed;
    top: -60px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0; /* رجعناه 0 باش يطفو فوق الـ body ويبان */
    background-image:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 15s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    from { transform: translateY(0); }
    to { transform: translateY(60px); }
}

/* El-Canvas تاع الـ Particles */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* يجي فوق الـ Grid وتحت الكتيبه */
    pointer-events: none;
}

/* كود سحري باش الكتيبه والتصاور وقاع السيكشنز يطلعوا فوق الـ background بلا ما يتغطاو */
header, section, footer {
    position: relative;
    z-index: 10; /* يطلعهم قاع الفوق باش يبانو واضحين والـ background يتحرك موراهم */
}

section,
#home,
#about,
#skills,
#projects,
#contact {
    background: transparent !important;
}
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999; /* Bach tkon hiya l-fouganiya ga3 */
    /* Ila knti dayr backgroud wala margin l navbar, a7sen t-appliquéhoum hna awla tkhliha transparent */
}

.navbar {
    width: 100%;
    /* Khli l-code l-9dim dial styling hna (flex, padding, background...) bla fixed/sticky */
}
html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden; /* Bach t-mne3 l-glissage dial limn w l-issar f l-mobil */
}
@media screen and (max-width: 768px) {
    .navbar ul {
        display: flex;
        gap: 10px; /* na9as l-masafa mabinathm */
        font-size: 14px; /* sgher l-ktba chwiya */
    }
}
.section-title {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5),
                 0 0 10px rgba(255, 0, 0, 0.8),
                 0 0 20px rgba(255, 0, 0, 1);
}




.neon-red-text {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.neon-red-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #ff0000;
    box-shadow: 0 0 8px #ff0000, 0 0 15px #ff0000;
    border-radius: 2px;
}
/* ===== Hero Image Animation ===== */

.hero-image{
    opacity: 0;
    transform: translateX(120px) scale(.9);
    animation: photoIntro 1.2s ease forwards;
    animation-delay: .4s;
}

@keyframes photoIntro{
    0%{
        opacity: 0;
        transform: translateX(120px) scale(.9) rotate(3deg);
    }

    60%{
        opacity: 1;
        transform: translateX(-10px) scale(1.03);
    }

    100%{
        opacity: 1;
        transform: translateX(0) scale(1) rotate(0);
    }
}
body{
    background: linear-gradient(-45deg,
    #050505,
    #160008,
    #28000f,
    #0a0a0a);
    background-size: 400% 400%;
    animation: gradientBG 12s ease infinite;
}

@keyframes gradientBG{
    0%{
        background-position:0% 50%;
    }
    50%{
        background-position:100% 50%;
    }
    100%{
        background-position:0% 50%;
    }
}
/* --- Animation d-l-Scroll (Matbdel walo f-style dyalk, hada ghir l-transition) --- */

/* 1. L-sections kamlin f-l-bdaya (Hidden state) */
#about, #skills, #projects, #contact {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(4px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Mli t-scroll lihom w t-t-zad class active (Visible state) */
#about.active, #skills.active, #projects.active, #contact.active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.projects-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(500px,1fr));
    gap:30px;
}

.project-card{
    display:flex;
    flex-direction:column;
    background:#161616;
    border-radius:25px;
    overflow:hidden;
    border:1px solid rgba(255,215,0,.15);
}

.project-card img{
    width:100%;
    height:280px;
    object-fit:cover;
    display:block;
}

.project-content{
    padding:25px;
}

.project-content h3{
    color:#fff;
    margin-bottom:15px;
}

.project-content p{
    color:#ccc;
    margin-bottom:20px;
}

.project-btn{
    display:inline-block;
    padding:12px 30px;
    background:#b0002f;
    color:#fff;
    text-decoration:none;
    border-radius:10px;
}
