/* 
 * Main Stylesheet for Dr. Abdullah Abu-Karaki's Professional Website
 * Author: Manus AI
 * Version: 1.0
 */

/* ===== CSS Variables ===== */
:root {
    /* Light Theme Colors */
    --primary-color: #1a365d;
    --secondary-color: #c9a227;
    --background-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --card-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --section-bg: #f5f7fa;
    --timeline-line: #e0e0e0;
    --timeline-dot: #1a365d;
    --input-bg: #f8f9fa;
    --footer-bg: #1a365d;
    --footer-text: #ffffff;
    
    /* Font Families */
    --font-heading-en: 'Montserrat', sans-serif;
    --font-body-en: 'Open Sans', sans-serif;
    --font-accent-en: 'Poppins', sans-serif;
    --font-heading-ar: 'Tajawal', sans-serif;
    --font-body-ar: 'Cairo', sans-serif;
    --font-accent-ar: 'Almarai', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 15px;
    --card-padding: 30px;
    --element-spacing: 20px;
    
    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 20px;
    --border-radius-circle: 50%;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
    
    /* Z-index layers */
    --z-back: -1;
    --z-normal: 1;
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}

/* Dark Theme Colors */
[data-theme="dark"] {
    --primary-color: #4a78c9;
    --secondary-color: #e9c46a;
    --background-color: #0a192f;
    --text-color: #e6e6e6;
    --text-light: #b0b0b0;
    --card-bg: #112240;
    --border-color: #2d3748;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --section-bg: #0c1b33;
    --timeline-line: #2d3748;
    --timeline-dot: #4a78c9;
    --input-bg: #112240;
    --footer-bg: #020c1b;
    --footer-text: #e6e6e6;
}

/* Arabic Language Direction */
[lang="ar"] {
    direction: rtl;
    text-align: right;
    font-family: var(--font-body-ar);
}

[lang="ar"] h1, 
[lang="ar"] h2, 
[lang="ar"] h3, 
[lang="ar"] h4, 
[lang="ar"] h5, 
[lang="ar"] h6 {
    font-family: var(--font-heading-ar);
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body-en);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-medium), color var(--transition-medium);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading-en);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: color var(--transition-medium);
}

p {
    margin-bottom: 1.5rem;
}

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

a:hover {
    color: var(--secondary-color);
}

ul, ol {
    list-style-position: inside;
    margin-bottom: 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.section-padding {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-line {
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 0 auto 20px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    text-align: center;
    transition: all var(--transition-fast);
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

/* ===== Preloader ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
    transition: opacity var(--transition-medium), visibility var(--transition-medium);
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-fixed);
    background-color: var(--background-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: all var(--transition-medium);
}

.header.scrolled {
    padding: 15px 0;
    background-color: var(--background-color);
    box-shadow: 0 5px 20px var(--shadow-color);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-fast);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.header-controls {
    display: flex;
    align-items: center;
}

.theme-toggle,
.lang-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    margin-left: 20px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.theme-toggle:hover,
.lang-toggle:hover {
    color: var(--secondary-color);
}

.theme-toggle .fa-sun {
    display: none;
}

.theme-toggle .fa-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

.lang-toggle {
    font-weight: 600;
    font-size: 0.9rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 25px;
    position: relative;
    margin-left: 20px;
}

.mobile-menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--text-color);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: var(--transition-fast);
}

.mobile-menu-toggle span:nth-child(1) {
    top: 0px;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 10px;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 20px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.mobile-menu-toggle.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: var(--z-back);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title .greeting {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.hero-title .name {
    display: block;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-light);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 15px;
}

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

.image-container {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: var(--border-radius-circle);
    overflow: hidden;
    box-shadow: 0 20px 30px var(--shadow-color);
    border: 5px solid var(--secondary-color);
    animation: float 6s ease-in-out infinite;
}

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

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: var(--z-normal);
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-color);
    border-radius: 20px;
    position: relative;
    margin: 0 auto 10px;
}

.wheel {
    width: 6px;
    height: 6px;
    background-color: var(--text-color);
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 10px;
    }
    100% {
        opacity: 0;
        top: 30px;
    }
}

.scroll-text {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* ===== About Section ===== */
.about {
    background-color: var(--section-bg);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
}

.image-frame {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.image-frame::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 5px solid var(--secondary-color);
    z-index: var(--z-back);
    transition: all var(--transition-medium);
}

.image-frame img {
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px var(--shadow-color);
    position: relative;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-info h4 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.stat-info p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

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

.expertise-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: var(--card-padding);
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    position: relative;
    z-index: var(--z-normal);
    overflow: hidden;
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 0;
    background-color: var(--secondary-color);
    transition: height var(--transition-medium);
    z-index: -1;
}

.expertise-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.expertise-card:hover::before {
    height: 100%;
}

.expertise-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: color var(--transition-medium);
}

.expertise-card:hover .expertise-icon {
    color: var(--secondary-color);
}

.expertise-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    transition: color var(--transition-medium);
}

.expertise-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ===== Experience Section ===== */
.experience {
    background-color: var(--section-bg);
}

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

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--timeline-line);
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

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

.timeline-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background-color: var(--timeline-dot);
    border-radius: 50%;
    z-index: var(--z-normal);
}

.timeline-date {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(50% - 40px);
    text-align: right;
    padding-right: 30px;
    font-weight: 600;
    color: var(--secondary-color);
}

.timeline-content {
    margin-left: calc(50% + 40px);
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: 0 5px 20px var(--shadow-color);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -10px;
    width: 20px;
    height: 20px;
    background-color: var(--card-bg);
    transform: rotate(45deg);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.timeline-content ul {
    list-style-type: none;
    margin-bottom: 0;
}

.timeline-content li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

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

.timeline-content li::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

/* ===== Education Section ===== */
.education-container {
    display: flex;
    gap: 50px;
}

.education-column {
    flex: 1;
}

.column-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.education-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

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

.education-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.education-details h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.institution {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.year {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.certification-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform var(--transition-fast);
}

.certification-item:hover {
    transform: translateY(-5px);
}

.certification-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.certification-details h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

/* ===== Services Section ===== */
.services {
    background-color: var(--section-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: var(--card-padding);
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform var(--transition-medium);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-align: center;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

.service-card p {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.service-card ul {
    list-style-type: none;
    margin-top: auto;
    margin-bottom: 0;
}

.service-card li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.service-card li:last-child {
    margin-bottom: 0;
}

.service-card li::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

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

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform var(--transition-medium);
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

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

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.project-content p {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

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

.project-tags span {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
}

/* ===== Contact Section ===== */
.contact {
    background-color: var(--section-bg);
}

.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.info-content p {
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

.contact-form {
    flex: 1;
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 30px;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 80px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: white;
}

.footer-logo p {
    color: var(--secondary-color);
    margin-bottom: 0;
}

.footer-links h3,
.footer-social h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after,
.footer-social h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links ul {
    list-style-type: none;
    margin-bottom: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--footer-text);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

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

.footer-social .social-links a {
    background-color: rgba(255, 255, 255, 0.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* ===== Back to Top Button ===== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: var(--z-fixed);
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* ===== Responsive Styles ===== */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .image-container {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 992px) {
    .section-padding {
        padding: 80px 0;
    }
    
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .image-frame {
        margin-bottom: 40px;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .education-container {
        flex-direction: column;
    }
    
    .contact-container {
        flex-direction: column;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .timeline-date {
        position: relative;
        width: 100%;
        text-align: left;
        padding-left: 70px;
        padding-right: 0;
        margin-bottom: 10px;
    }
    
    .timeline-content {
        margin-left: 70px;
    }
    
    .timeline-content::before {
        left: -10px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--background-color);
        box-shadow: 0 5px 10px var(--shadow-color);
        padding: 20px 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-medium);
        z-index: var(--z-fixed);
    }
    
    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav li {
        margin: 10px 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .expertise-grid,
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .certifications-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
    
    .image-container {
        width: 250px;
        height: 250px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* RTL Specific Adjustments */
[lang="ar"] .main-nav a::after {
    left: auto;
    right: 0;
}

[lang="ar"] .timeline::before {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[lang="ar"] .timeline-dot {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[lang="ar"] .timeline-date {
    left: auto;
    right: 0;
    text-align: left;
    padding-right: 0;
    padding-left: 30px;
}

[lang="ar"] .timeline-content {
    margin-left: 0;
    margin-right: calc(50% + 40px);
}

[lang="ar"] .timeline-content::before {
    left: auto;
    right: -10px;
}

[lang="ar"] .timeline-content li {
    padding-left: 0;
    padding-right: 20px;
}

[lang="ar"] .timeline-content li::before {
    left: auto;
    right: 0;
}

[lang="ar"] .footer-links h3::after,
[lang="ar"] .footer-social h3::after {
    left: auto;
    right: 0;
}

[lang="ar"] #backToTop {
    right: auto;
    left: 30px;
}

@media (max-width: 992px) {
    [lang="ar"] .timeline::before {
        left: auto;
        right: 30px;
    }
    
    [lang="ar"] .timeline-dot {
        left: auto;
        right: 30px;
    }
    
    [lang="ar"] .timeline-date {
        text-align: right;
        padding-left: 0;
        padding-right: 70px;
    }
    
    [lang="ar"] .timeline-content {
        margin-right: 70px;
        margin-left: 0;
    }
    
    [lang="ar"] .timeline-content::before {
        left: auto;
        right: -10px;
    }
}
