/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #0f172a;
    --secondary-bg: #1e293b;
    --accent-color: #2563eb;        /* تغيير من #7c3aed إلى #2563eb (أزرق) */
    --accent-secondary: #0ea5e9;    /* تغيير من #10b981 إلى #0ea5e9 (أزرق فاتح) */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --hover-bg: #334155;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); /* تغيير التدرج إلى أزرق */
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%); /* تغيير التدرج إلى أزرق */
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
.light-theme {
    --primary-bg: #f8fafc;
    --secondary-bg: #ffffff;
    --accent-color: #2563eb;        /* أزرق */
    --accent-secondary: #0ea5e9;    /* أزرق فاتح */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --hover-bg: #f1f5f9;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); /* أزرق */
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%); /* أزرق */
    --gradient-hero: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); /* أزرق */
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.light-theme .hero::before {
    background: rgba(248, 250, 252, 0.7);
}

.light-theme .about-section::before {
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232563eb' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.light-theme .global-spinner {
    background: rgba(248, 250, 252, 0.9);
}

.light-theme .global-spinner .spinner {
    border: 6px solid rgba(37, 99, 235, 0.2); /* أزرق مع شفافية */
    border-top: 6px solid var(--accent-color);
}

.light-theme .global-spinner .spinner-content {
    color: var(--text-primary);
}

.light-theme .projects-spinner .spinner {
    border: 5px solid rgba(37, 99, 235, 0.2); /* أزرق مع شفافية */
    border-top: 5px solid var(--accent-color);
}

.light-theme .projects-spinner p {
    color: var(--text-primary);
}
body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'El Messiri', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #3b82f6;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(12, 18, 32, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: var(--transition);
}

.logo-img:hover {
    transform: rotate(15deg);
}

.logo-text {
    font-family: 'El Messiri', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);

}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero {
    padding: 6rem 2rem;
    text-align: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237c3aed' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-text {
    background: #f1f5f9;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.typing-text::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--hover-bg);
    border-color: var(--accent-color);
}

/* Projects Section */
.projects-section {
    padding: 4rem 2rem;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Project Filters */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--secondary-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary); /* استخدام التدرج الأزرق الجديد */
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--text-primary);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.filter-btn.active::before,
.filter-btn:hover::before {
    opacity: 1;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: var(--secondary-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    transform: translateY(50px);
    opacity: 0;
}

.project-card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.15); /* ظل أزرق */
}

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    padding: 1.5rem;
}

.project-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gradient-primary);
    color: var(--text-primary);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    padding: 0.25rem 0.5rem;
    background: var(--hover-bg);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.8rem;
    transition: var(--transition);
}

.tech-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: var(--transition);
}

.project-link:hover {
    color: #3b82f6; /* أزرق فاتح */
}

.project-link:hover::after {
    width: 100%;
}

/* About Section */
.about-section {
    padding: 4rem 2rem;
    background: var(--secondary-bg);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237c3aed' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    transform: rotate(45deg);
    z-index: 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--primary-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    transform: translateY(50px);
    opacity: 0;
}

.stat-item.animate-in {
    transform: translateY(0);
    opacity: 1;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--primary-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 1rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary); /* استخدام التدرج الأزرق الجديد */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--gradient-primary);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-logo-text {
    font-family: 'El Messiri', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--text-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--secondary-bg);
    color: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gradient-primary);
    color: var(--text-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--primary-bg);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        padding: 4rem 1rem;
        min-height: 70vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
        min-height: 100px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .project-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}


