body {
    font-family: "Cairo", sans-serif;
}

#about {
    background: #f7f7f7;
}

.about-img {
    width: 100%;
    max-width: 280px;
    border-radius: 15px;
    border: 4px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


#hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1618761714954-0b8cd0026356?fm=jpg&q=60&w=3000&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8bW9iaWxlJTIwYXBwJTIwZGV2ZWxvcG1lbnR8ZW58MHx8MHx8fDA%3D') center/cover no-repeat;
    color: white;
}
.header-text {
    background: rgba(0, 0, 0, 0.5);
    padding: 30px;
    border-radius: 15px;
}

.skill-counter {
    font-size: 32px;
    font-weight: bold;
    color: #007bff;
}

.skill-box {
    background: #222;
    color: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    box-shadow: 0 0 10px #ddd;
    font-weight: bold;
     transition: all 0.3s ease;
}

.skill-box:hover {
    transform: translateY(-5px) scale(1.05);
    background: #000 !important;
}

.slider {
    position: relative;
    width: 300px;
    overflow: hidden;
    margin: 30px auto;
    border-radius: 10px;
}

.slides {
    display: flex;
    transition: transform 0.5s ease;
}

.slides img {
    width: 300px;
    height: auto;
}

.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #0006;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.timeline {
    background: linear-gradient(to bottom, #d4af37, #8d6e63);
    transform: translateX(-50%);
    border-radius: 5px;
     position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background: linear-gradient(to bottom, #d4af37, #8d6e63);
    border-radius: 10px;
}



.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    margin-bottom: 50px;
    clear: both;
}


.timeline-item .content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0e6d2;
    transition: all 0.3s ease;
    position: relative;
}


.timeline-item .content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}


.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 70px;
}


.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
    padding-left: 70px;
}


.timeline-item::after {
    content: "";
    position: absolute;
    top: 30px;
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid #d4af37;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}


.timeline-item:nth-child(odd)::after {
    right: -10px;
}


.timeline-item:nth-child(even)::after {
    left: -10px;
}


.timeline-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.timeline-date {
    font-size: 0.95rem;
    color: #d4af37;
    font-weight: 600;
    margin-bottom: 12px;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 20px;
}
.timeline-item .content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Animation for centered timeline */
.timeline-item.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.timeline-item.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .timeline {
        max-width: 700px;
        transform: 0; /* أقل عرض للشاشات المتوسطة */
    }
}

@media (max-width: 768px) {
    .timeline {
        max-width: 90%; /* ياخذ 90% من الشاشة */
        margin: 0 auto; /* دايمًا متمركز */
        padding: 30px 15px;
        transform: translateY(0);
    }
    
    .timeline::before {
        left: 30px; /* الخط يتحرك شوي لليسار */
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
        text-align: left;
        left: 0;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-right: 20px;
        padding-left: 70px;
        text-align: left;
        left: 0;
    }
    
    .timeline-item::after {
        left: 21px !important;
        right: auto !important;
    }
    
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 21px;
    }
}

@media (max-width: 576px) {
    .timeline {
        max-width: 95%; /* تقريبًا الشاشة كاملة لكن مع مسافة */
        margin: 0 auto;
        padding: 20px 10px;
        transform: translateY(0);
    }
    
    .timeline-item {
        padding-left: 50px;
        padding-right: 10px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item::after {
        left: 11px !important;
        width: 16px;
        height: 16px;
    }
    
    .timeline-item .content {
        padding: 20px 15px;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .timeline-date {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .timeline {
        max-width: 100%; /* ياخذ كامل العرض على الشاشات الصغيرة جدًا */
        padding: 15px 5px;
        transform: translateY(0);
    }
}

.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Variations */
.slide-left {
    transform: translateX(-50px);
}

.slide-right {
    transform: translateX(50px);
}

.scale-in {
    transform: translateY(50px) scale(0.9);
}

.scale-in.visible {
    transform: translateY(0) scale(1);
}

/* Delay Classes */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

.project-card {
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.fa-github{
    color: #333;
    padding-left: 4px;
}
.fa-linkedin{
    color: #0077b5;
    padding-left: 4px;
}
.profile-link {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}
.profile-link:hover {
    text-decoration: underline;
}
.profile-link-linkedin span {
    color: #0077b5;
    text-decoration: none;
    font-weight: bold;
}
.profile-link-github:hover span:hover {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}