/* =========================================
   1. CSS VARIABLES (Theme Engine)
   تحكم في ألوان الموقع بالكامل من هنا
   ========================================= */
:root {
    /* ثيم السيبراني (Matrix/Cyberpunk Style) */
    --bg-main: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-glass: rgba(0, 0, 0, 0.9);

    --primary: #00ffcc;
    /* فيروزي مشع */
    --primary-hover: #00e6b8;
    --primary-glow: rgba(0, 255, 204, 0.4);

    --text-main: #e0e0e0;
    --text-muted: #888888;
    --border-color: #333333;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
    position: sticky;
    top: 0;
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    /* زيادة التغبيش لشكل زجاجي أفخم */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 9999;
    padding: 1rem 0;
}

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

.nav-logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 12px var(--primary-glow);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* تمييز كلمة في اللوجو باللون البنفسجي إن وجدت */
.nav-logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    /* توهج بسيط عند النص */
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.25) contrast(1.1) saturate(0);
    /* جعل الصورة خلفية هادئة جداً */
}

.hero::before {
    content: "";
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* تدرج لوني يعطي عمقاً بدلاً من السواد الكامل */
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.1) 0%, var(--bg-main) 70%);
}

.hero-content {
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 20px var(--primary-glow);
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-muted);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

.hero-icons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.hero-icons i:hover {
    color: var(--primary);
    transform: scale(1.1);
    transition: 0.3s;
}

/* =========================================
   SECTIONS GENERAL
   ========================================= */
.section {
    padding: 6rem 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   PROJECTS SECTION (Card Styling)
   ========================================= */
.projects-section {
    background-color: var(--bg-main);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    /* زوايا أكثر نعومة */
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
}

.project-thumbnail {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #1a1a2e;
    position: relative;
}

/* إضافة طبقة داكنة فوق الصورة تخف عند التحويم */
.project-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 100%);
    opacity: 0.6;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-thumbnail img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 0.75rem;
    color: var(--primary-hover);
}

/* =========================================
   SKILLS & ABOUT (Secondary Background)
   ========================================= */
.about-section,
.reel-section,
.testimonials-section,
.contact-section {
    background-color: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: stretch;
    max-width: 1100px;
    margin: 0 auto;
}

.about-image-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    height: 100%;
    border: 1px solid var(--border-color);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    /* لمسة فنية للصورة */
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.skills-section {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    width: 22px;
}


.skills-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    display: inline-block;
}

.skills-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.skills-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.skills-list li:hover {
    color: var(--text-main);
}

.skills-list i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* =========================================
   PROCESS & TESTIMONIALS
   ========================================= */
.process-section,
.faq-section {
    background-color: var(--bg-main);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.process-step {
    text-align: center;
    padding: 2.5rem 2rem;
    background-color: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* إضافة خط ملون علوي للكروت */
.process-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.process-step:hover::before {
    transform: scaleX(1);
}

.process-step:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.process-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    opacity: 0.2;

    line-height: 1;
}

.process-step-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.process-step-description {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.testimonial-quote {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-style: italic;
    position: relative;
}

.testimonial-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.2;
    position: absolute;
    top: -2rem;
    left: -1rem;
}

.testimonial-author strong {
    color: var(--text-main);
    display: block;
}

.testimonial-author span {
    color: var(--primary);
    /* تمييز المنصب الوظيفي بلون الموقع */
    font-size: 0.85rem;
    font-weight: 600;
}

/* =========================================
   FAQ & CONTACT
   ========================================= */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
    content: "-";
    transform: rotate(180deg);
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 0 auto 3rem auto;
    background-color: var(--bg-card);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    background-color: var(--bg-main);
    /* لون أغمق للحقل */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    /* لضمان نفس الخط */
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    background-color: #0f1018;
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
    font-size: 1.1rem;
    padding: 1.125rem;
    cursor: pointer;
    border: none;
    background-color: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: 8px;
    transition: 0.3s;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.contact-direct a {
    color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group select {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   FOOTER
   ========================================= */
/* =========================================
   PROFESSIONAL FOOTER (AI ENGINEER STYLE)
   ========================================= */

.footer {
    demonstrate: none;
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    font-weight: 700;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 360px;
    line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    transition: 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary-glow);
}

.footer-contact p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact i {
    color: var(--primary);
}

.footer-social {
    margin-top: 1.2rem;
    display: flex;
    gap: 1.2rem;
    font-size: 1.5rem;
}

.footer-social a {
    color: var(--text-muted);
    transition: 0.3s ease;
}

.footer-social a:hover {
    color: var(--primary);
    transform: translateY(-4px) scale(1.05);
    text-shadow: 0 0 12px var(--primary-glow);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

/* Responsive */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-contact p {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }
}