/* متغيرات الألوان */
:root[data-theme="light"] {
    --bg: #f8fafc; --text: #1a1a1a; --accent: #2563eb; --card-bg: #ffffff; --pill-bg: #f1f5f9; --line: rgba(0,0,0,0.06);
}
:root[data-theme="dark"] {
    --bg: #0b0f19; --text: #f1f5f9; --accent: #3b82f6; --card-bg: #161f32; --pill-bg: #1e293b; --line: rgba(255,255,255,0.05);
}
:root[data-theme="cinema"] {
    --bg: #050505; --text: #e2e2e2; --accent: #d4af37; --card-bg: #0f0f0f; --pill-bg: #1a1a1a; --line: rgba(212,175,55,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }
body { background: var(--bg); color: var(--text); transition: 0.5s ease; overflow-x: hidden; }

/* التنقل (Nav) */
nav { display: flex; justify-content: space-between; padding: 25px 8%; position: sticky; top: 0; background: rgba(var(--bg), 0.8); backdrop-filter: blur(15px); z-index: 999; border-bottom: 1px solid var(--line); }
.logo { font-weight: 800; font-size: 1.4rem; text-transform: uppercase; letter-spacing: -1px; }
.logo span { color: var(--accent); }
.nav-links a { text-decoration: none; color: var(--text); margin-left: 25px; font-weight: 600; font-size: 0.9rem; transition: 0.3s; }
.nav-links a:hover { color: var(--accent); }

/* الهيرو (Hero) */
.hero { min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 20px; }
.profile-glow { width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 30px; padding: 5px; background: linear-gradient(45deg, var(--accent), transparent); position: relative; }
.profile-glow::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; background: var(--accent); filter: blur(35px); opacity: 0.2; z-index: -1; }
.profile-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg); background: #111; }

h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -2px; }
.highlight { color: var(--accent); }
.hero-desc { font-size: 1.2rem; opacity: 0.7; max-width: 650px; margin: 0 auto 30px; }
.tech-tags { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.tech-tags span { background: var(--card-bg); border: 1px solid var(--accent); color: var(--accent); padding: 6px 18px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }

/* المشاريع (Projects) */
.container { padding: 100px 8%; }
.section-title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 80px; font-weight: 800; text-align: center; }

.project-group { margin-bottom: 100px; }
.group-header { display: flex; align-items: center; gap: 20px; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.group-icon { width: 55px; height: 55px; border: 1px solid var(--accent); color: var(--accent); border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; background: rgba(59, 130, 246, 0.05); }
.group-label { font-size: 1.3rem; font-weight: 800; }
.group-info p { font-size: 0.9rem; opacity: 0.5; margin-top: 2px; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.project-card { 
    background: var(--card-bg); padding: 45px; border-radius: 30px; text-decoration: none; color: inherit;
    border: 1px solid var(--line); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; flex-direction: column; justify-content: space-between; min-height: 280px;
}
.card-tag { font-size: 0.7rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; }
.project-card h4 { font-size: 1.8rem; margin-bottom: 15px; font-weight: 800; letter-spacing: -1px; }
.project-card p { opacity: 0.6; line-height: 1.7; margin-bottom: 25px; }
.card-footer { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--accent); font-size: 0.9rem; }

/* تأثيرات الماوس للمشاريع */
.project-card:hover { transform: translateY(-12px); border-color: var(--accent); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

/* التواصل (Contact Modern Box) */
.contact-modern { padding: 120px 8%; position: relative; display: flex; justify-content: center; }
.contact-blur-bg { position: absolute; width: 400px; height: 400px; background: var(--accent); filter: blur(150px); opacity: 0.12; z-index: 0; }
.contact-box { 
    background: var(--card-bg); width: 100%; max-width: 1100px; padding: 60px; border-radius: 40px; 
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; border: 1px solid var(--line); z-index: 1; box-shadow: 0 40px 100px rgba(0,0,0,0.3);
}
.contact-left h2 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.1; margin: 20px 0; }
.contact-left h2 span { color: var(--accent); }
.badge { background: rgba(37, 211, 102, 0.1); color: #25d366; padding: 6px 15px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }
.contact-right { display: flex; flex-direction: column; gap: 15px; }

.contact-pill { 
    background: var(--pill-bg); padding: 20px 25px; border-radius: 20px; display: flex; align-items: center; gap: 20px; text-decoration: none; color: inherit; transition: 0.3s; border: 1px solid transparent; 
}
.contact-pill:hover { transform: translateX(10px); border-color: var(--accent); background: var(--bg); }
.pill-icon { width: 50px; height: 50px; background: var(--accent); color: white; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.contact-pill.wa .pill-icon { background: #25d366; }
.pill-text span { display: block; font-size: 0.75rem; opacity: 0.5; text-transform: uppercase; font-weight: 800; }
.pill-text strong { font-size: 1rem; font-weight: 700; word-break: break-all; }

/* التحكم في الأزرار */
.theme-control { position: fixed; bottom: 30px; right: 30px; background: var(--card-bg); padding: 8px; border-radius: 50px; border: 1px solid var(--line); z-index: 1000; }
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer; background: transparent; font-size: 1.1rem; color: var(--text); }
.theme-btn.active { background: var(--accent); color: white; }

footer { padding: 60px; text-align: center; opacity: 0.3; font-size: 0.8rem; letter-spacing: 1px; }

/* موبايل (Mobile Responsive) */
@media (max-width: 992px) {
    .contact-box { grid-template-columns: 1fr; padding: 40px; gap: 40px; }
    .nav-links { display: none; }
    .hero { padding-top: 100px; }
}
