:root {
    --text-color: #ffffff;
    --accent-color: #d4af37; /* ذهبي */
    --accent-hover: #f3e5ab;
    --card-bg: rgba(255, 255, 255, 0.05);
    --dark-bg: #0a0a0a;
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--dark-bg);
}

/* --- اعدادات خلفية الفيديو --- */
#myVideo {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -2; /* في الخلف تماماً */
    object-fit: cover;
}

.bg-overlay-animation {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; /* فوق الفيديو مباشرة */
    /* تدرج لوني داكن لإعطاء الفخامة */
    background: linear-gradient(-45deg, rgba(5,5,5,0.8), rgba(26,26,46,0.7), rgba(22,33,62,0.8), rgba(0,0,0,0.9));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- باقي التنسيقات --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 5%;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 100;
}
.logo { font-weight: 700; font-size: 1.4rem; letter-spacing: 2px; text-transform: uppercase; }
nav ul { list-style: none; display: flex; gap: 30px; align-items: center; }
nav a { text-decoration: none; color: var(--text-color); font-size: 0.95rem; transition: 0.3s; opacity: 0.8; }
nav a:hover { color: var(--accent-color); opacity: 1; }
.btn-contact { border: 1px solid rgba(255,255,255,0.3); padding: 10px 25px; border-radius: 50px; }
.btn-contact:hover { border-color: var(--accent-color); color: var(--accent-color); }

/* الهيرو سكشن */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    position: relative; /* مهم عشان الأزرار تشتغل */
    z-index: 1;
}
.hero h1 { 
    font-size: 4rem; 
    margin-bottom: 20px; 
    line-height: 1.1; 
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.3rem; color: #ccc; margin-bottom: 30px; font-weight: 300; }
.social-hero { margin-bottom: 30px; font-size: 1.8rem; display: flex; justify-content: center; gap: 20px; }
.social-hero a { color: #fff; transition: 0.3s; }
.social-hero a:hover { color: var(--accent-color); transform: scale(1.1); }

.btn-main {
    background: var(--accent-color);
    color: #000;
    padding: 14px 35px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: 0.3s;
    display: inline-block;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}
.btn-main:hover { background: var(--accent-hover); transform: translateY(-3px); }

/* المعرض */
.portfolio { padding: 80px 5%; position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; }
.portfolio h2 { text-align: center; margin-bottom: 50px; font-size: 2.5rem; font-weight: 300; letter-spacing: 2px; }

.filters { display: flex; justify-content: center; gap: 15px; margin-bottom: 50px; flex-wrap: wrap; }
.filter-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-color);
    padding: 10px 25px;
    cursor: pointer;
    border-radius: 30px;
    transition: 0.3s;
    font-family: 'Outfit', sans-serif;
}
.filter-btn.active, .filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(212, 175, 55, 0.1);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}
.project-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: 0.4s ease;
    backdrop-filter: blur(10px);
}
.project-card:hover { 
    transform: translateY(-10px); 
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.video-container { position: relative; padding-bottom: 56.25%; height: 0; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.info { padding: 20px; }
.info h3 { font-size: 1.2rem; margin-bottom: 5px; }
.info span { font-size: 0.8rem; color: var(--accent-color); letter-spacing: 1px; text-transform: uppercase; }

/* الفوتر */
footer { 
    text-align: center; 
    padding: 80px 20px; 
    background: linear-gradient(to top, #000, transparent);
    position: relative;
    z-index: 1;
}
.contact-info { 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 30px; 
    margin: 40px 0; 
}
.contact-item { 
    color: #ccc; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    transition: 0.3s; 
    font-size: 1.1rem;
}
.contact-item:hover { color: var(--accent-color); }
.copy { color: #555; font-size: 0.9rem; }

/* انميشن */
.fade-in { animation: fadeIn 1.5s ease; }
.fade-in-up { animation: fadeInUp 1.5s ease; }
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    nav ul { display: none; }
    .contact-info { flex-direction: column; gap: 15px; }
}
/* --- تنسيق الصورتين بجانب بعض --- */

/* الحاوية التي تمسك الصورتين */
.identity-container {
    display: flex;
    justify-content: center; /* توسيط الصورتين */
    align-items: center;     /* محاذاة عمودية */
    gap: 25px;               /* مسافة بين اللوجو والصورة */
    margin-bottom: 30px;     /* مسافة تحتهم قبل العنوان */
}

/* تنسيق اللوجو */
.img-logo {
    height: 100px;       /* ارتفاع اللوجو */
    width: auto;         /* العرض يتظبط لوحده */
    object-fit: contain;
    /* فلتر بسيط لجعل اللوجو يلمع لو هو غامق (اختياري) */
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}

/* تنسيق صورتك الشخصية */
.img-me {
    width: 100px;        /* نفس حجم اللوجو */
    height: 100px;
    border-radius: 50%;  /* يجعلها دائرة كاملة */
    object-fit: cover;   /* عشان الصورة متتمطش */
    border: 2px solid var(--accent-color); /* برواز ذهبي */
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

/* تنسيق الخط الفاصل بينهما */
.divider-line {
    width: 2px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2); /* لون أبيض شفاف */
}

/* تحسين للموبايل: تصغير الصور قليلاً */
@media (max-width: 768px) {
    .img-logo, .img-me {
        height: 80px;
        width: 80px;
    }
    .identity-container {
        gap: 15px;
    }
}
/* --- About Section Styles --- */
.about-section {
    padding: 100px 5%;
    /* خلفية متدرجة خفيفة لتمييز القسم عن باقي الصفحة */
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.6)); 
    text-align: center;
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 800px;
    margin: 0 auto; /* توسيط البلوك */
    background: rgba(255, 255, 255, 0.05); /* خلفية زجاجية شفافة */
    padding: 50px;
    border-radius: 20px; /* حواف دائرية */
    border: 1px solid rgba(255, 255, 255, 0.1); /* برواز خفيف جداً */
    backdrop-filter: blur(10px); /* تأثير الضبابية خلف النص */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.about-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 2px;
}

.about-content h3 {
    font-size: 1.8rem;
    color: var(--accent-color); /* اللون الذهبي */
    margin-bottom: 30px;
    font-weight: 500;
    line-height: 1.3;
}

.about-content p {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-bottom: 25px;
    line-height: 1.8;
    text-align: left; /* جعل محتوى الفقرات يبدأ من اليسار للقراءة المريحة */
}

/* تنسيق الموبايل */
@media (max-width: 768px) {
    .about-content {
        padding: 25px;
    }
    .about-content h3 {
        font-size: 1.4rem;
    }
    .about-content p {
        text-align: center; /* في الموبايل التوسيط أفضل */
    }
}
/* --- Tech Stack Section --- */
.tech-stack {
    padding: 50px 5%;
    text-align: center;
    margin-bottom: 50px; /* مسافة قبل الفوتر */
}

.tech-stack h3 {
    font-size: 1.2rem;
    color: #888; /* لون رمادي خافت للعنوان */
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 30px;
}

.tools-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* عشان ينزلوا سطر جديد لو الشاشة صغيرة */
    gap: 15px; /* مسافة بين كل أداة والتانية */
}

.tool-item {
    padding: 10px 25px;
    border: 1px solid rgba(255, 255, 255, 0.15); /* برواز شفاف */
    border-radius: 50px; /* شكل بيضاوي */
    color: #ccc;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.3s ease;
    cursor: default;
    background: rgba(255, 255, 255, 0.02);
}

/* التأثير عند مرور الماوس */
.tool-item:hover {
    border-color: var(--accent-color); /* البرواز يبقى ذهبي */
    color: var(--accent-color); /* الكلام يبقى ذهبي */
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4); /* توهج (Glow) */
    transform: translateY(-3px); /* يرتفع لأعلى قليلاً */
}