/* Global Styles */
:root {
    --primary-color: #0ff;
    --secondary-color: #8a2be2;
    --bg-color: #0a0a1f;
    --text-color: #fff;
    --card-bg: rgba(13, 13, 44, 0.7);
}

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

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

.ar {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.en {
    direction: ltr;
}

/* Language-specific content */
body.ar .en-content {
    display: none;
}

body.en .ar-content {
    display: none;
}

body.ar .language-toggle {
    left: 20px;
    right: auto;
}

body.en .language-toggle {
    right: 20px;
    left: auto;
}

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.language-toggle button {
    padding: 8px 16px;
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid var(--secondary-color);
    color: var(--text-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-toggle button.active {
    background: var(--secondary-color);
}

.language-toggle button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Particles Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Personal Info Section */
.personal-info {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out;
}

.glowing-text {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color),
                0 0 20px var(--primary-color),
                0 0 30px var(--primary-color);
    animation: glow 2s ease-in-out infinite alternate;
}

.bio {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.2rem;
}

.skills-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem 0;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    border-radius: 15px;
    transition: all 0.3s ease;
    width: 120px;
}

.skill-card i {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.skill-card span {
    font-size: 1rem;
    font-weight: 600;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

/* Projects Section */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
    text-shadow: 0 0 10px var(--secondary-color);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-image {
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-card h3 {
    margin: 1rem 0;
    color: var(--primary-color);
}

.project-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: var(--text-color);
    text-decoration: none;
    border-radius: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-color);
}

/* Contact Section */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-link {
    font-size: 2rem;
    color: var(--text-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px var(--primary-color),
                     0 0 20px var(--primary-color),
                     0 0 30px var(--primary-color);
    }
    to {
        text-shadow: 0 0 20px var(--primary-color),
                     0 0 30px var(--primary-color),
                     0 0 40px var(--primary-color);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .glowing-text {
        font-size: 2.5rem;
    }

    .skills {
        flex-wrap: wrap;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
    }
}