:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #2563eb;
    --text-color: #1e293b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-gradient: linear-gradient(135deg, #1e3a8a, #3b82f6);
    --section-bg: #ffffff;
}

.dark-theme {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --accent-color: #2563eb;
    --text-color: #e2e8f0;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --header-gradient: linear-gradient(135deg, #1e40af, #3b82f6);
    --section-bg: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* الهيدر */
header {
    background: var(--header-gradient);
    color: white;
    text-align: center;
    padding: 5rem 1rem 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color);
    border-radius: 0 0 30px 30px;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    margin-bottom: 1.5rem;
    transition: transform 0.5s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

.header-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0.9;
}

/* القسم الرئيسي */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.section {
    background-color: var(--section-bg);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.section-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 50px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section:hover .section-title::after {
    width: 100%;
}

/* المهارات */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.skill-item {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px var(--shadow-color);
    background: var(--accent-color);
}

/* الشهادات */
.certificate-container {
    text-align: center;
}

.certificate-img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.certificate-img:hover {
    transform: scale(1.02);
}

.certificate-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.certificate-date {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* الفوتر */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .header-title {
        font-size: 2.5rem;
    }
    
    .header-subtitle {
        font-size: 1.2rem;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
    
    .section {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* تأثيرات الانتقال */
.navbar.scrolled {
    background-color: rgba(30, 58, 138, 0.98);
    padding: 0.3rem 0;
}

/* القائمة الرئيسية */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(25, 55, 109, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.navbar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-logo span {
    background: linear-gradient(45deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-right: 0.5rem;
}

.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-item {
    margin: 0 0.5rem;
}

.navbar-link {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar-link:hover, .navbar-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* تعديل الهيدر ليتناسب مع القائمة */
header {
    margin-top: 60px;
}

/* تصميم أيقونات التواصل الاجتماعي */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.social-link i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: #fff;
    transition: all 0.3s ease;
}

.social-link:hover i {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link span {
    display: none;
}

/* معرض الصور */
.gallery-section {
    margin-top: 3rem;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* تصميم متجاوب للقائمة */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 70%;
        height: calc(100vh - 60px);
        background-color: rgba(25, 55, 109, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: all 0.3s ease;
    }

    .navbar-menu.active {
        right: 0;
    }

    .navbar-item {
        margin: 0.5rem 0;
    }

    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* معرض الصور المكبر */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.lightbox-nav button {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-nav button:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* زر التبديل بين الوضع الليلي والنهاري */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: none;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

/* تحسينات إضافية */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تأثيرات إضافية */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease forwards;
}

/* تعديلات على الأقسام */
.section-title {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to left, var(--accent-color), transparent);
    transition: width 0.3s ease;
}

.section:hover .section-title::after {
    width: 100px;
}
