:root {
    --primary-color: #007bff; /* أزرق احترافي */
    --secondary-color: #343a40; /* رمادي داكن للنصوص والعناصر */
    --background-color: #f8f9fa; /* خلفية فاتحة */
    --card-background: #ffffff; /* خلفية البطاقات/الأقسام */
    --text-color: #212529; /* لون النص الأساسي */
    --light-text-color: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --font-family: 'Tajawal', sans-serif; /* خط عربي جميل */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    background-color: var(--background-color);
    color: var(--text-color);
    direction: rtl; /* مهم للعربية */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: var(--light-text-color);
    padding: 60px 0 40px;
    text-align: center;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    box-shadow: var(--box-shadow);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header .subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
}

main section {
    padding: 50px 0;
    margin-bottom: 30px;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    opacity: 0; /* للأنيميشن */
    transform: translateY(30px); /* للأنيميشن */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

main section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    text-align: center;
    margin-bottom: 35px;
    font-size: 2.2rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 10px;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* قسم "نبذة عني" */
#about .about-content {
    display: flex;
    flex-wrap: wrap; /* للسماح بالالتفاف في الشاشات الصغيرة */
    align-items: center;
    gap: 30px;
}

.profile-image-container {
    flex: 0 0 150px; /* حجم ثابت للصورة أو الحرف */
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-placeholder {
    width: 150px;
    height: 150px;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    font-size: 5rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* يمكنك استخدام هذا بدلاً من الـ placeholder إذا كان لديك صورة
.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}
*/

#about .info {
    flex: 1;
    min-width: 280px; /* لضمان عدم الضغط الزائد في الشاشات الصغيرة */
}

#about .info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

#about .info strong {
    color: var(--secondary-color);
}

/* قسم المهارات */
.skills-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.skills-list li {
    background-color: var(--background-color);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    border-right: 5px solid var(--primary-color); /* تمييز على اليمين للعربية */
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skills-list li:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* قسم التواصل */
#contact p {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* للالتفاف عند الحاجة */
}

.contact-button {
    display: inline-flex; /* ليكون الأيقونة والنص في نفس السطر بشكل جيد */
    align-items: center;
    padding: 12px 25px;
    text-decoration: none;
    color: var(--light-text-color);
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.contact-button i { /* إذا استخدمت أيقونات Font Awesome */
    margin-left: 10px; /* سيكون على يسار النص */
    font-size: 1.3em;
}

.contact-button.whatsapp {
    background-color: #25D366; /* لون واتساب */
}
.contact-button.whatsapp:hover {
    background-color: #1DAE54;
    transform: scale(1.05);
}

.contact-button.telegram {
    background-color: #0088cc; /* لون تيليجرام */
}
.contact-button.telegram:hover {
    background-color: #0077b3;
    transform: scale(1.05);
}

footer {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 25px 0;
    margin-top: 30px;
    opacity: 0; /* للأنيميشن */
    transform: translateY(30px); /* للأنيميشن */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* استعلامات الوسائط للشاشات الأصغر */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    header .subtitle {
        font-size: 1.2rem;
    }
    section h2 {
        font-size: 1.8rem;
    }
    .container {
        width: 95%;
    }
    #about .about-content {
        flex-direction: column; /* ترتيب العناصر عموديا في الشاشات الصغيرة */
        text-align: center;
    }
    .profile-image-container {
        margin-bottom: 20px;
    }
    .skills-list {
        grid-template-columns: 1fr; /* عمود واحد للمهارات */
    }
}