:root {
    /* Color Palette - Dark (Default) with Glassmorphism */
    --bg-color: #0f1e4a;
    --bg-gradient: linear-gradient(135deg, #1b3691 0%, #102159 100%);

    /* Glass Effect Cards */
    --card-bg: rgba(255, 255, 255, 0.07);
    --card-border: rgba(255, 255, 255, 0.12);
    --card-hover-bg: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    
    /* Accent: bright electric blue, visible on dark blue bg */
    --accent-color: #60a5fa;
    --accent-glow: 0 0 25px rgba(96, 165, 250, 0.5);
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #c8dcff 100%);

    /* Navigation Glass */
    --nav-bg: rgba(27, 54, 145, 0.75);
    --nav-blur: saturate(180%) blur(20px);

    --border-color: rgba(255, 255, 255, 0.12);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

    /* Spacing & Layout */
    --container-width: 1200px;
    --section-padding: 100px 0;
    --border-radius: 20px;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides - Glassmorphism */
body.light-mode {
    --bg-color: #f0f4ff;
    --bg-gradient: linear-gradient(135deg, #f8f9ff 0%, #edf0fb 100%);

    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(27, 54, 145, 0.15);
    --card-hover-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 8px 32px 0 rgba(27, 54, 145, 0.1);

    --text-primary: #0d1730;
    --text-secondary: #3a4a6b;
    --accent-color: #1b3691;
    --accent-gradient: linear-gradient(135deg, #1b3691 0%, #3b6fd4 100%);
    --accent-glow: 0 0 20px rgba(27, 54, 145, 0.25);

    --nav-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(27, 54, 145, 0.1);
    --shadow: 0 8px 32px 0 rgba(27, 54, 145, 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 80px;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.3s ease;
    position: relative;
}

/* Subtle animated gradient overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

h1,
h2,
h3,
h4,
.logo,
.btn {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.section {
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.center-text {
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    margin-left: 10px;
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-text {
    color: var(--accent-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-text:hover {
    gap: 12px;
}

/* Text Selection */
::selection {
    background: var(--accent-color);
    color: #fff;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--nav-bg);
    backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

#theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    /* margin-left: 10px; removed as it's handled by gap in nav-right */
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    /* margin-left: 10px; removed as it's handled by gap in nav-right */
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.lang-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.lang-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 150px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: var(--transition);
    overflow: hidden;
}

.lang-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.lang-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.lang-item.active {
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
}

.lang-item img {
    width: 20px;
    height: auto;
    border-radius: 3px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    /* Hidden by default */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-link {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    height: 100%;
    position: relative;
}

.hero-status {
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff66;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.5);
}

.hero-role {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.hero-name {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

[lang="ar"] .hero-name {
    font-family: 'Cairo', sans-serif;
    font-size: 5rem;
}

.hero-contact-grid {
    display: grid;
    grid-template-columns: max-content max-content;
    gap: 15px 30px;
    margin-bottom: 4rem;
}

.contact-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.contact-pill i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.contact-pill:hover {
    color: var(--text-primary);
}

.hero-pill-nav {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 8px;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pill-nav-item {
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.pill-nav-item.active {
    background: rgba(255, 255, 255, 0.9);
    color: #0d1730;
    font-weight: 600;
}

.pill-nav-item:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255,255,255,0.1);
}

.hero-visual {
    position: relative;
    height: 100%;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center; /* Center vertically instead of pushing to bottom */
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65vw;
    height: 65vw;
    max-width: 700px;
    max-height: 700px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(0, 71, 171, 0.5) 40%, transparent 70%);
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
}

.hero-portrait {
    position: relative;
    z-index: 1;
    width: 150%; /* 2x base width */
    max-width: 1500px; /* Reduced maximum */
    min-width: 800px; /* Adjusted minimum */
    object-fit: contain;
    transform: scale(1.2); /* Reduced scaling */
    filter: drop-shadow(0px 30px 40px rgba(0, 0, 0, 0.5)) drop-shadow(0px -10px 30px rgba(0, 71, 171, 0.3));
    /* Soft fade out at the bottom */
    -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.download-cv-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: var(--text-primary);
    color: #000;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    z-index: 10;
}

.download-cv-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
}

.photo-wrapper {
    position: relative;
    z-index: 1;
    width: fit-content;
}

.photo-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    z-index: -1;
    transition: var(--transition);
}

.profile-photo {
    width: 300px;
    height: auto;
    /* Maintain aspect ratio */
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    filter: grayscale(10%);
    display: block;
    /* Remove inline spacing */
}

.about-image:hover .photo-wrapper::before {
    top: 10px;
    left: 10px;
}

.about-image:hover .profile-photo {
    transform: translateY(-5px);
    filter: grayscale(0%);
}

.about-text .section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 3.5rem;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    text-align: left;
    background: none;
    -webkit-text-fill-color: var(--text-primary);
    color: var(--text-primary);
}

[lang="ar"] .about-text .section-title {
    text-align: right;
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0;
}

.about-text .manifesto-content {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 2.5rem;
    text-align: left;
    max-width: 100%;
    font-family: var(--font-body);
}

[lang="ar"] .about-text .manifesto-content {
    text-align: right;
    font-family: 'Cairo', sans-serif;
    font-weight: 300;
}

.about-text .manifesto-content strong {
    color: var(--accent-color);
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 25px 20px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-8px);
    background: var(--card-hover-bg);
    border-color: var(--accent-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--accent-color);
    line-height: 1.2;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}


/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-8px);
    background: var(--card-hover-bg);
    box-shadow: var(--shadow), var(--accent-glow);
    border-color: var(--accent-color);
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--accent-color);
}

.skill-list li {
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
    color: var(--text-secondary);
}

.skill-list li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    background: var(--card-hover-bg);
    border-color: var(--accent-color);
    box-shadow: var(--shadow), var(--accent-glow);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    /* Aligned left for easier mobile adaption */
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--accent-color);
}

.date {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    background: var(--card-hover-bg);
    border-color: var(--accent-color);
    box-shadow: var(--shadow), var(--accent-glow);
}

.quote-icon {
    font-size: 2rem;
    color: var(--accent-color);
    opacity: 0.3;
    margin-bottom: 20px;
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.client-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.client-info span {
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    background: var(--card-hover-bg);
    border-color: var(--accent-color);
    box-shadow: var(--shadow), var(--accent-glow);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-bottom: 1px solid var(--border-color);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.project-image {
    height: 220px;
    width: 100%;
    overflow: hidden;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.5s ease;
}

.color-1 {
    background: linear-gradient(45deg, #FF6B6B, #EE5253);
}

.color-2 {
    background: linear-gradient(45deg, #4834d4, #686de0);
}

.color-3 {
    background: linear-gradient(45deg, #f0932b, #ffbe76);
}

.project-card:hover .placeholder-img {
    transform: scale(1.1);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Career Objective */
.objective-box {
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    padding: 50px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--card-shadow), var(--accent-glow);
}

.objective-box p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.objective-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.05;
    pointer-events: none;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Store Section */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.product-image {
    height: 250px;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.product-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
}

.btn-buy {
    background: var(--accent-gradient);
    color: #fff;
    text-align: center;
    padding: 12px;
    border-radius: 50px;
    font-weight: 600;
    margin-top: auto;
    display: block;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-buy:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.social-links-big {
    display: flex;
    gap: 20px;
}

.social-links-big a {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.social-links-big a:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: var(--accent-glow);
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-to-top {
    font-weight: 500;
}

.back-to-top:hover {
    color: var(--accent-color);
}

/* Animation Keys */
@keyframes float {
    0% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }

    100% {
        transform: translateY(0px) scale(1);
    }
}

@keyframes float-reverse {
    0% {
        transform: rotate(-10deg) translateY(0px);
    }

    50% {
        transform: rotate(-10deg) translateY(15px);
    }

    100% {
        transform: rotate(-10deg) translateY(0px);
    }
}

/* Scroll Animation Classes (to be triggered by JS) */
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.fade-in-up {
    transform: translateY(30px);
}

.fade-in-left {
    transform: translateX(-30px);
}

.fade-in-right {
    transform: translateX(30px);
}

.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    :root {
        --container-width: 90%;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        margin-bottom: 30px;
    }

    .stats-grid {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        text-align: center;
        padding-top: 100px;
        height: auto;
    }

    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        display: flex;
        min-height: 400px;
        margin-top: 30px;
        justify-content: center;
    }

    .hero-portrait {
        width: 150%; /* 2x base width on mobile */
        min-width: 400px;
        max-width: none;
        max-height: 75vh; /* Adjusted height on mobile */
        transform: scale(1.1); /* Reduced scaling */
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .footer .container {
        flex-direction: column;
        gap: 15px;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

html[dir="rtl"] .margin-left-auto {
    margin-right: auto;
    margin-left: 0;
}

html[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

html[dir="rtl"] .timeline::before {
    right: 20px;
    left: auto;
}

html[dir="rtl"] .timeline-item {
    padding-right: 60px;
    padding-left: 0;
}

html[dir="rtl"] .timeline-item::before {
    right: 11px;
    left: auto;
}

html[dir="rtl"] .skill-list li {
    padding-right: 15px;
    padding-left: 0;
}

html[dir="rtl"] .skill-list li::before {
    right: 0;
    left: auto;
}

html[dir="rtl"] .about-container {
    direction: rtl;
}

html[dir="rtl"] .contact-item {
    flex-direction: row;
}

html[dir="rtl"] .fade-in-left {
    transform: translateX(30px);
}

html[dir="rtl"] .fade-in-right {
    transform: translateX(-30px);
}

/* Zenix Chat UI */
.assist-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.assist-chat {
    width: 380px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    animation: chatOpen 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.assist-chat.active {
    display: flex;
}

@keyframes chatOpen {
    from {
        transform: translateY(30px) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.assist-header {
    background: var(--accent-gradient);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.assist-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    animation: brainPulse 2s infinite ease-in-out;
}

@keyframes brainPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        text-shadow: 0 0 10px #fff;
    }

    100% {
        transform: scale(1);
    }
}

.assist-info h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.assist-info span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.assist-messages {
    padding: 20px;
    height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Custom Scrollbar for Chat */
.assist-messages::-webkit-scrollbar {
    width: 5px;
}

.assist-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.msg {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    max-width: 85%;
    line-height: 1.5;
}

.msg.bot {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.msg.user {
    background: var(--accent-gradient);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.assist-input-area {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.assist-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 15px;
    color: white;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.assist-input-area input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.assist-input-area button {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--accent-gradient);
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.assist-input-area button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* Chat CTA Buttons */
.chat-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chat-cta-btn {
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.chat-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, var(--accent-color));
}

.chat-cta-btn:active {
    transform: translateY(0);
}

/* Zenix Chat Trigger Button */
.assist-trigger {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--accent-gradient);
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    color: #0d1730; /* Dark navy on white gradient button */
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1001;
}

.assist-trigger:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

.assist-trigger i {
    font-size: 1.4rem;
}

.assist-trigger span {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Attention Grabber Pulse */
.assist-trigger::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    background: inherit;
    z-index: -1;
    opacity: 0.5;
    animation: triggerPulse 4s infinite;
}

@keyframes triggerPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.15, 1.4);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Tooltip Styling */
.assist-tooltip {
    position: absolute;
    bottom: calc(100% + 15px);
    right: 0;
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 0.9rem;
    width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.assist-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 25px;
    border: 8px solid transparent;
    border-top-color: var(--card-bg);
}

.assist-widget:not(.active) .assist-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* RTL Adjustments */
html[dir="rtl"] .assist-widget {
    right: auto;
    left: 30px;
}

html[dir="rtl"] .assist-tooltip {
    right: auto;
    left: 0;
}

html[dir="rtl"] .assist-tooltip::after {
    right: auto;
    left: 25px;
}

@media (max-width: 480px) {
    .assist-chat {
        width: calc(100vw - 40px);
        height: 80vh;
        bottom: 0;
        right: 20px;
    }

    .assist-trigger span {
        display: none;
        /* Icon only on mobile to save space */
    }

    .assist-trigger {
        padding: 15px;
        border-radius: 50%;
    }

    .assist-trigger::after {
        border-radius: 50%;
    }
}

/* Sticky Action Bar */
.sticky-cta {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(22, 22, 22, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    z-index: 900;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sticky-cta.active {
    transform: translateX(-50%) translateY(0);
}

.sticky-cta .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

@media (max-width: 580px) {
    .sticky-cta {
        width: 90%;
        bottom: 15px;
        gap: 8px;
        padding: 8px 12px;
    }

    .sticky-cta .btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.85rem;
        text-align: center;
    }
}

@import url('arabic_style.css');