/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --dark-color: #1a252f;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --light-gray: #f8f9fa;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --border-radius: 10px;
    --border-radius-sm: 5px;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    direction: rtl;
    -webkit-text-size-adjust: 100%;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* تحسينات SEO والوصولية */

/* تخطي إلى المحتوى للوصولية */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--secondary-color);
    color: white;
    padding: 8px;
    z-index: 1001;
    text-decoration: none;
    border-radius: 0 0 5px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* تحسين ترتيب المحتوى للقارئ الشاشة */
[role="main"] {
    order: 2;
}

nav[role="navigation"] {
    order: 1;
}

footer[role="contentinfo"] {
    order: 3;
}

/* تحسين التبويب */
:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* تحسين قراءة النصوص لتحسين SEO */
.about-text, .project-description, .edu-description {
    line-height: 1.8;
    text-align: justify;
}

/* تحسين العناوين */
h1, h2, h3, h4 {
    line-height: 1.3;
}

/* تحسين الصور */
img {
    max-width: 100%;
    height: auto;
}

/* تحسين الروابط */
a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* تحسين النموذج */
input, textarea {
    font-size: 16px; /* منع التكبير على iOS */
}

/* إخفاء العناصر للـ SEO فقط */
.seo-keywords {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* تحسين لشاشات كبيرة */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
}

/* تحسين للنصوص الطويلة */
.section-content p {
    max-width: 80ch; /* تحسين عرض النصوص للقراءة */
}

/* القائمة الجانبية */
.side-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 10px;
    z-index: 1000;
    box-shadow: var(--shadow-dark);
    transition: var(--transition);
}

.side-nav ul {
    list-style: none;
}

.side-nav li {
    margin-bottom: 15px;
}

.side-nav a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.side-nav a i {
    margin-left: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.side-nav a span {
    white-space: nowrap;
    overflow: hidden;
    max-width: 0;
    transition: max-width 0.5s ease;
}

.side-nav:hover a span {
    max-width: 100px;
}

.side-nav a:hover,
.side-nav a.active {
    background: var(--secondary-color);
    transform: translateX(-5px);
}

/* زر القائمة للهواتف */
.mobile-nav-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1100;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.mobile-nav-btn:hover {
    background: var(--primary-color);
}

.mobile-nav-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* الهيدر */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: white;
    padding: 60px 0 40px;
    border-radius: 0 0 30px 30px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23pattern)"/></svg>');
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 1;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.profile-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--secondary-color);
    box-shadow: var(--shadow-dark);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    background: var(--success-color);
    border-radius: 50%;
    border: 3px solid white;
}

.profile-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.profile-info {
    flex: 1;
    min-width: 300px;
}

.name {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 800;
}

.title {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 500;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(52, 152, 219, 0.2);
    color: var(--secondary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.contact-brief {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.contact-item i {
    color: var(--secondary-color);
}

.header-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stat-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* الأقسام العامة */
.section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    scroll-margin-top: 20px;
}

.section:hover {
    box-shadow: var(--shadow-dark);
    transform: translateY(-5px);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-color);
    color: var(--primary-color);
}

.section-title i {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.section-title span {
    font-size: 1.5rem;
    font-weight: 700;
}

/* قسم عني */
.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
    text-align: justify;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    border-right: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: var(--shadow);
}

.feature i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.feature h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* قسم الخبرات */
.timeline {
    position: relative;
    padding-right: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--secondary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--light-color);
}

.timeline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: -36px;
    top: 0;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--secondary-color);
}

.timeline-date {
    background: var(--light-gray);
    color: var(--secondary-color);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.timeline-content h4 {
    color: var(--gray-color);
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 1rem;
}

.timeline-content ul {
    list-style: none;
    padding-right: 20px;
}

.timeline-content li {
    position: relative;
    padding: 5px 0;
    color: #555;
}

.timeline-content li::before {
    content: '▸';
    position: absolute;
    right: -20px;
    color: var(--secondary-color);
}

/* قسم المهارات */
.skill-category {
    margin-bottom: 30px;
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.skill-category h3 i {
    color: var(--secondary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-name {
    font-weight: 600;
    color: var(--primary-color);
}

.skill-level {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.skill-bar {
    height: 10px;
    background: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), #2980b9);
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-tag {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.tech-tag.primary {
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.tech-tag.secondary {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.tech-tag:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.other-skill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--light-gray);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.other-skill:hover {
    background: white;
    box-shadow: var(--shadow);
}

.other-skill i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* قسم المشاريع */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--light-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
}

.project-header {
    padding: 20px 20px 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-header h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.project-badge {
    background: var(--accent-color);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
}

.project-image {
    height: 180px;
    background: linear-gradient(135deg, var(--light-gray) 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--secondary-color);
    box-shadow: var(--shadow);
}

.project-description {
    padding: 15px 20px;
    color: #555;
    line-height: 1.6;
    border-bottom: 1px solid var(--light-color);
}

.project-tech {
    padding: 15px 20px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tech span {
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.project-features {
    padding: 10px 20px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.project-features span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--gray-color);
}

.project-features i {
    color: var(--success-color);
    font-size: 0.9rem;
}

/* قسم التعليم */
.education-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.education-card {
    display: flex;
    gap: 20px;
    background: var(--light-gray);
    padding: 25px;
    border-radius: var(--border-radius);
    border-right: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    background: white;
}

.edu-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.edu-content {
    flex: 1;
}

.edu-content h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.edu-content h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 500;
}

.edu-details {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.edu-date {
    color: var(--accent-color);
    font-weight: 600;
}

.edu-grade {
    color: var(--success-color);
    font-weight: 600;
}

.edu-description {
    color: #555;
    line-height: 1.6;
}

/* قسم الشهادات */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.certificate-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--secondary-color);
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-dark);
}

.cert-icon {
    width: 50px;
    height: 50px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.cert-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.cert-content p {
    color: #555;
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    color: var(--gray-color);
    font-size: 0.85rem;
    padding-top: 15px;
    border-top: 1px solid var(--light-color);
}

/* قسم التواصل */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.contact-info p {
    color: #555;
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-detail i {
    width: 40px;
    height: 40px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-detail h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1rem;
}

.contact-detail p {
    color: #555;
    margin: 0;
}

.social-contact {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 45px;
    height: 45px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-5px);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn-submit {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-submit:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* الفوتر */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
    border-radius: 30px 30px 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    margin-bottom: 25px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* التجاوب مع الشاشات المختلفة */
@media (max-width: 1200px) {
    .side-nav {
        right: 10px;
    }
    
    .side-nav a span {
        display: none;
    }
    
    .side-nav:hover a span {
        display: inline;
    }
}

@media (max-width: 992px) {
    .name {
        font-size: 2rem;
    }
    
    .title {
        font-size: 1.1rem;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-badge {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .header-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .stat {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .side-nav {
        right: -250px;
        top: 0;
        transform: none;
        height: 100vh;
        width: 250px;
        border-radius: 0;
        padding-top: 80px;
        transition: right 0.3s ease;
    }
    
    .side-nav.active {
        right: 0;
    }
    
    .side-nav ul {
        padding: 0;
    }
    
    .side-nav a {
        padding: 15px 20px;
    }
    
    .side-nav a span {
        display: inline;
        max-width: 100%;
    }
    
    .mobile-nav-btn {
        display: flex;
    }
    
    .section {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .projects-grid,
    .education-cards {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    /* تحسين للقراءة على الأجهزة المحمولة */
    html {
        font-size: 16px;
    }
    
    body {
        -webkit-text-size-adjust: 100%;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 40px 0 30px;
    }
    
    .name {
        font-size: 1.8rem;
    }
    
    .title {
        font-size: 1rem;
    }
    
    .header-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline {
        padding-right: 20px;
    }
    
    .timeline-item::before {
        right: -26px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* الطباعة */
@media print {
    .side-nav,
    .mobile-nav-btn,
    .social-contact,
    .btn-submit,
    .skip-to-content,
    .seo-keywords {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    
    .header {
        background: #2c3e50 !important;
        -webkit-print-color-adjust: exact;
        border-radius: 0;
    }
    
    .section {
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        background: white !important;
        color: #000 !important;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
        color: #666;
    }
    
    .footer {
        background: #2c3e50 !important;
        -webkit-print-color-adjust: exact;
        border-radius: 0;
    }
}

/* تحسينات التباين */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #0066cc;
        --accent-color: #cc0000;
        --success-color: #008000;
        --warning-color: #cc5500;
    }
    
    body {
        background: #ffffff;
        color: #000000;
    }
}

/* تحسينات لغة العرض للغة العربية */
[lang="ar"] {
    letter-spacing: 0;
}

/* تحسينات للأجهزة التي تدعم اللمس */
@media (hover: none) and (pointer: coarse) {
    .side-nav a:hover,
    .tech-tag:hover,
    .other-skill:hover,
    .project-card:hover,
    .education-card:hover,
    .certificate-card:hover,
    .social-link:hover,
    .btn-submit:hover {
        transform: none;
    }
    
    .side-nav a:active,
    .tech-tag:active,
    .other-skill:active,
    .social-link:active,
    .btn-submit:active {
        transform: scale(0.98);
    }
}

/* تحسينات للقراءة الليلية */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #ecf0f1;
        --secondary-color: #3498db;
        --accent-color: #e74c3c;
        --success-color: #2ecc71;
        --warning-color: #f39c12;
        --dark-color: #2c3e50;
        --light-color: #34495e;
        --gray-color: #7f8c8d;
        --light-gray: #2c3e50;
    }
    
    body {
        background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
        color: #ecf0f1;
    }
    
    .section {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .feature,
    .other-skill,
    .education-card,
    .certificate-card {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .skill-bar {
        background: #2c3e50;
    }
    
    .contact-form input,
    .contact-form textarea {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #34495e;
    }
    
    .project-card {
        background: #34495e;
        border-color: #2c3e50;
    }
    
    .project-image {
        background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    }
    
    .image-placeholder {
        background: #2c3e50;
    }
}

/* تحسينات لشاشات التلفزيون */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .name {
        font-size: 3rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
}

/* تحسينات التحميل المتقدم */
.lazy-load {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lazy-load.loaded {
    opacity: 1;
    transform: translateY(0);
}