/* Custom variables for colors and design system */
:root {
    --bg-color: #000000;
    --panel-bg: #0c0c0c;
    --panel-border: rgba(255, 255, 255, 0.05);
    --panel-border-hover: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a6a6a6;
    --text-muted: #666666;
    --primary-color: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --accent-glow: rgba(59, 130, 246, 0.15);
    --font-english: 'Poppins', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
    --transition-speed: 0.3s;
}

/* Base resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-english);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Language-specific styles */
body.lang-ar {
    font-family: var(--font-arabic);
    direction: rtl;
}

/* Background decorative blur elements */
.bg-blur {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

.bg-blur-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
}

.bg-blur-2 {
    top: 50%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}

.bg-blur-3 {
    bottom: -10%;
    left: 20%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

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

/* Navigation Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--panel-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-speed);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-speed);
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.btn-secondary {
    background: var(--panel-bg);
    color: var(--text-primary);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--panel-border-hover);
    background: rgba(30, 41, 59, 0.7);
}

/* Glassmorphism Card Style */
.card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    padding: 2rem;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: var(--panel-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--accent-glow);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    padding-bottom: 80px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

.hero-content {
    flex: 1.3;
    text-align: left;
}

body.lang-ar .hero-content {
    text-align: right;
}

.badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    margin-bottom: 3.5rem;
}

body.lang-ar .hero-buttons {
    justify-content: flex-start;
}

.hero-buttons .btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    text-decoration: none;
}

.hero-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: flex-start;
}

body.lang-ar .hero-tech-stack {
    justify-content: flex-start;
}

.hero-image-container {
    flex: 0.9;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    padding: 6px;
    background: var(--primary-gradient);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.25), 0 0 60px rgba(139, 92, 246, 0.15);
    animation: floatImage 6s ease-in-out infinite;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-color);
}

@keyframes floatImage {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.tech-chip {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--panel-border);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
}

.tech-chip:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.tech-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: inline-block;
}

/* Colors for chips icons */
.text-blue { color: #3b82f6; }
.text-green { color: #10b981; }
.text-yellow { color: #f59e0b; }
.text-purple { color: #8b5cf6; }

/* Section Utilities */
.section-padding {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    margin: 0 auto;
    border-radius: 10px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.about-info p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-info p:last-child {
    margin-bottom: 0;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.highlight-item i {
    font-size: 1.8rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.highlight-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.highlight-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--panel-border);
    top: 10px;
    bottom: 10px;
    left: 20px;
    margin-left: -1px;
}

body.lang-ar .timeline::after {
    left: auto;
    right: 20px;
    margin-right: -1px;
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 3.5rem;
}

body.lang-ar .timeline-item {
    padding-left: 0;
    padding-right: 50px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-gradient);
    left: 12px;
    top: 25px;
    z-index: 2;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

body.lang-ar .timeline-dot {
    left: auto;
    right: 12px;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.timeline-content .company {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.timeline-list {
    padding-left: 1.2rem;
}

body.lang-ar .timeline-list {
    padding-left: 0;
    padding-right: 1.2rem;
}

.timeline-list li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

.timeline-list li strong {
    color: var(--text-primary);
}

/* Projects Section */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-secondary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.project-icon {
    font-size: 2.2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    width: fit-content;
}

.project-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.project-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.project-tech span {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--panel-border);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.skills-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.skills-card h3 i {
    color: var(--primary-color);
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
}

.skill-name {
    color: var(--text-primary);
}

.skill-pct {
    color: var(--primary-color);
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--panel-border);
}

.skill-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
}

.certifications-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cert-item {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    background: rgba(30, 41, 59, 0.2);
    border: 1px solid var(--panel-border);
    padding: 1.2rem;
    border-radius: 12px;
    transition: border-color var(--transition-speed);
}

.cert-item:hover {
    border-color: var(--panel-border-hover);
}

.cert-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 8px;
}

.cert-details h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.cert-details p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}

.contact-info-block {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.info-item a, .info-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.info-item a:hover {
    color: var(--primary-color);
}

.contact-cta {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-cta h3 {
    font-size: 1.6rem;
    font-weight: 800;
}

.contact-cta p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    width: fit-content;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    text-decoration: none;
    margin-top: 1rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--panel-border);
    padding: 3rem 0;
    background: #070a12;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.socials {
    display: flex;
    gap: 1.5rem;
}

.socials a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color var(--transition-speed);
}

.socials a:hover {
    color: var(--text-primary);
}

/* Responsiveness */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }
    .hero-content {
        text-align: center;
    }
    body.lang-ar .hero-content {
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    body.lang-ar .hero-buttons {
        justify-content: center;
    }
    .hero-tech-stack {
        justify-content: center;
    }
    body.lang-ar .hero-tech-stack {
        justify-content: center;
    }
    .hero-image-wrapper {
        width: 260px;
        height: 260px;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Can be enhanced with mobile menu */
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero h2 {
        font-size: 1.6rem;
    }
    .project-grid {
        grid-template-columns: 1fr;
    }
    .section-padding {
        padding: 5rem 0;
    }
}
