/* ------------------------------------- */
/* 1. المتغيرات الأساسية (CSS Variables) */
/* ------------------------------------- */
:root {
    --primary-color: #3498db;      /* أزرق أساسي للأزرار والعناوين */
    --secondary-color: #2c3e50;    /* لون داكن للخلفية أو النصوص الهامة */
    --accent-color: #e74c3c;       /* لون تمييز ثانوي (يمكن استخدامه للتحويم) */
    --background-dark: #1A242F;    /* خلفية داكنة خارجية */
    --background-light: #ffffff;   /* خلفية فاتحة للمحتوى لسهولة القراءة */
    --text-dark: #333;             /* لون النص الرئيسي */
    --text-light: #ecf0f1;         /* لون النص الفاتح */
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* ------------------------------------- */
/* 2. التنسيقات الأساسية والـ Body */
/* ------------------------------------- */
body {
    font-family: 'Roboto', 'Arial', sans-serif; /* إضافة خط احتياطي حديث */
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    color: var(--text-dark); /* تغيير لون النص الأساسي ليكون داكناً */
}

/* خلفية الصورة مع التمويه */
body::before {
    background: url('assets/code-background.jpg') no-repeat center center fixed;
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-attachment: fixed;
    filter: blur(4px) opacity(0.8); /* زيادة التمويه لتخفيف حدة الخلفية */
    z-index: 0;
}

/* ------------------------------------- */
/* 3. حاوية الـ CV الرئيسية (.profile-container) */
/* ------------------------------------- */
.profile-container {
    margin: 40px 20px;
    /* التبديل إلى خلفية ثابتة بسيطة أو تركها كما هي */
    background: var(--background-light); /* تغيير الخلفية الداخلية إلى أبيض */
    box-shadow: var(--shadow);
    border-radius: 12px;
    overflow: hidden;
    width: 90%;
    max-width: 900px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.profile-header {
    background: var(--secondary-color); /* شريط علوي داكن وجذاب */
    color: var(--text-light);
    padding: 40px 30px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

/* ------------------------------------- */
/* 4. رأس الصفحة والصورة (.profile-header) */
/* ------------------------------------- */

.profile-picture {
    margin: 0 auto 15px;
    border-radius: 50%;
    width: 220px;
    height: 220px;
    background-image: url('assets/ziad-abdulkarim.jpg');
    background-size: cover;
    background-position: center;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 5px !important;
}

.profile-header p {
    color: #bdc3c7;
    font-size: 1.1rem;
    font-weight: 300;
}

.btn-download {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background: var(--primary-color);
    color: var(--text-light) !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-download:hover {
    background-color: var(--accent-color);
}

/* ------------------------------------- */
/* 5. المحتوى الرئيسي (.profile-content) */
/* ------------------------------------- */

.profile-content {
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
    text-align: left; /* جعل النص الأساسي يبدأ من اليسار */
}

.about-section p {
    color: var(--text-dark);
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 25px;
}

h2 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding: 10px 0;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

h2 i {
    color: var(--primary-color);
    margin-right: 10px;
}

h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 15px;
    margin-bottom: 10px;
}

/* ------------------------------------- */
/* 6. تنسيق المهارات (Skills Grid) */
/* ------------------------------------- */
.skills-grid {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.skills-grid > div {
    flex: 1;
}

.skill-list, .detail-list, .additional-list, .timeline {
    list-style: none;
    padding-left: 0;
}

.skill-list li, .detail-list li, .additional-list li {
    background-color: #f4f4f4;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 5px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.additional-list i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* ------------------------------------- */
/* 7. تنسيق التعليم والخبرة (Timeline) */
/* ------------------------------------- */
.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid #ddd;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 5px;
    width: 14px;
    height: 14px;
    background-color: var(--primary-color);
    border: 3px solid var(--background-light);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.degree-info, .proj-info, .detail-list li {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-top: 5px;
}


/* ------------------------------------- */
/* 8. نموذج الاتصال (Contact Form) */
/* ------------------------------------- */
.contact-form {
    padding: 20px 0;
    text-align: center;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    background-color: #f9f9f9;
    width: 48%; /* تعديل الحجم ليناسب الـ flex */
    margin: 8px 1%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: var(--text-dark);
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.contact-form textarea {
    width: 98%;
    min-height: 100px;
    resize: vertical;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.btn-submit {
    padding: 10px 30px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background-color 0.3s;
    margin-top: 15px;
}

.btn-submit:hover {
    background-color: var(--secondary-color);
}

/* ------------------------------------- */
/* 9. أيقونات ومعلومات التواصل */
/* ------------------------------------- */
.divider {
    border: none;
    height: 1px;
    background: #eee;
    margin: 30px 0;
}

.contact-details {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap; /* للسماح بالنزول على سطر جديد في الجوال */
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    color: var(--text-dark);
}

.contact-item i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* أيقونات السوشيال ميديا */
.social-icons {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.social-icons a {
    margin: 0 15px;
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: color 0.3s, transform 0.3s;
}

.social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

/* ------------------------------------- */
/* 10. التجاوب (Responsive Design) */
/* ------------------------------------- */
@media (max-width: 650px) {
    .profile-container {
        width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .profile-header, .profile-content {
        padding: 20px;
    }

    /* تقسيم المهارات عمودياً على الجوال */
    .skills-grid {
        flex-direction: column;
        gap: 0;
    }
    
    .skills-grid > div {
        margin-bottom: 20px;
    }

    /* جعل حقول الإدخال تأخذ عرض كامل */
    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea {
        width: 98%;
        margin: 8px 1%;
    }
    
    /* جعل تفاصيل الاتصال عمودية */
    .contact-details {
        flex-direction: column;
        align-items: flex-start;
    }
}
