/* Reset and Base Styles */
:root {
    /* Color Palette */
    --primary-color: #1F4E78; /* Deep Navy Blue */
    --secondary-color: #2E75B6; /* Bright Blue */
    --accent-color: #00A8CC; /* Teal/Cyan */
    --bg-light: #FFFFFF;
    --bg-gray: #F5F5F5;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
    
    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(31, 78, 120, 0.15);
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*[dir="rtl"] {
    --font-primary: 'Cairo', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

*[dir="rtl"] html {
    font-size: 17px;
}

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

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-gray);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-primary-sm, .btn-outline-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 14px 28px;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    padding: 12px 28px;
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary-sm {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 20px;
}

.btn-outline-white {
    background-color: transparent;
    color: var(--white);
    padding: 12px 28px;
    border: 2px solid var(--white);
}

.btn-outline-white:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

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

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.logo .dot {
    color: var(--accent-color);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.desktop-nav a:not(.btn-primary-sm) {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
}

.desktop-nav a:not(.btn-primary-sm):hover {
    color: var(--secondary-color);
}

/* Language Selector */
.lang-selector-wrapper {
    position: relative;
    margin-inline-start: 20px;
}

.lang-btn {
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.lang-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    overflow: hidden;
}

*[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

.lang-selector-wrapper:hover .lang-dropdown,
.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
}

*[dir="rtl"] .lang-option {
    text-align: right;
}

.lang-option:hover {
    background-color: var(--bg-gray);
    color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 180px 24px 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    min-height: 100vh;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(46, 117, 182, 0.1);
    color: var(--secondary-color);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-inline: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.social-links-hero {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-links-hero a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
}

.social-links-hero a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* Blob Backgrounds */
.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: drift 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background-color: rgba(46, 117, 182, 0.2);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background-color: rgba(0, 168, 204, 0.2);
    bottom: -50px;
    left: -50px;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Section Title */
.section-title {
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.section-title.center {
    text-align: center;
}

.underline {
    height: 4px;
    width: 60px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.mx-auto { margin-inline: auto; }

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.differentiators {
    margin-bottom: 40px;
}

.differentiators li {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.differentiators i {
    color: var(--accent-color);
    margin-top: 4px;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(46, 117, 182, 0.2);
}

.stat-card h3 {
    font-size: 3rem;
    color: var(--primary-color);
    display: inline-block;
}

.stat-card .plus {
    font-size: 2.5rem;
    color: var(--accent-color);
    font-weight: 700;
}

.stat-card p {
    color: var(--text-light);
    font-weight: 500;
    margin-top: 8px;
}

/* Expertise / Cards */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.expertise-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.03);
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: var(--transition);
}

.expertise-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.expertise-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(46, 117, 182, 0.1);
    color: var(--secondary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 24px;
}

.expertise-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.expertise-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span {
    background: var(--bg-gray);
    color: var(--text-dark);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Skills */
.skills-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.skill-item {
    margin-bottom: 24px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.skill-bar {
    width: 100%;
    height: 10px;
    background-color: var(--bg-gray);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    width: 0; /* Animated later via JS */
    transition: width 1.5s ease-in-out;
}

*[dir="rtl"] .skill-progress {
    background: linear-gradient(-90deg, var(--primary-color), var(--secondary-color));
}

.tools-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.tools-tags span {
    padding: 10px 18px;
    background: var(--white);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.project-img {
    height: 240px;
    background: linear-gradient(135deg, rgba(31,78,120,0.8), rgba(0,168,204,0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    position: relative;
}

.project-img i {
    opacity: 0.5;
}

.project-content {
    padding: 30px;
}

.project-category {
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.project-achievements {
    font-size: 0.9rem;
}

.project-achievements li {
    position: relative;
    padding-inline-start: 20px;
    margin-bottom: 8px;
}

.project-achievements li::before {
    content: '✓';
    position: absolute;
    inset-inline-start: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Contact CTA */
.cta-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    padding: 60px;
    text-align: center;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.cta-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: translate(30%, -30%);
}

.cta-card h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-card p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.contact-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* Footer */
footer {
    background-color: #111;
    color: #fff;
    padding: 80px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #aaa;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-social a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: #222;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-inline-start: 12px;
    color: #fff;
}

.footer-social a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #777;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .about-grid, .skills-wrapper {
        grid-template-columns: 1fr;
    }
    
    .hero h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .desktop-nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 30px 24px;
        align-items: center;
        gap: 24px;
        border-top: 1px solid var(--glass-border);
    }
    
    *[dir="rtl"] .desktop-nav.active {
        left: auto;
        right: 0;
    }

    .desktop-nav.active a {
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 10px;
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .lang-selector-wrapper {
        margin-inline-start: auto;
        margin-inline-end: 20px;
    }
    
    .hero {
        padding-top: 140px;
    }

    .hero h1 { font-size: 2.2rem; }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .contact-info {
        flex-direction: column;
        gap: 16px;
    }
}
