/* Modern Design System & Foundation */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Light Professional Theme Palette */
    --bg-main: #F5F3F0;
    --bg-card: #FFFFFF;
    --bg-section-alt: #FFFFFF;
    /* Light blue for alternating sections */
    --bg-navbar: rgba(255, 255, 255, 0.95);

    --accent: #8B5CF6;
    /* Violet */
    --accent-secondary: #A78BFA;
    --accent-glow: rgba(139, 92, 246, 0.25);

    /* Blue for variety */
    --accent-blue: #8B5CF6;
    --accent-blue-secondary: #A78BFA;
    --accent-blue-glow: rgba(139, 92, 246, 0.25);

    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-dim: #64748B;

    --border: #E2E8F0;
    --border-hover: #CBD5E1;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Misc */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: #F5F3F0;
    color: #1E293B;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    pointer-events: none;
    z-index: -1;
}

/* Decorative shapes background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(1.75rem, 8vw, 4.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: 2.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
}

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

/* Shared Components */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Glassmorphism Effect - Light Theme */
.glass-effect {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.glass-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    border-color: var(--accent);
    background: var(--bg-card);
    transform: translateY(-8px);
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.1), 0 10px 15px rgba(139, 92, 246, 0.05);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(139, 92, 246, 0.05),
            transparent);
    transition: 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

/* Layout Utilities */
section {
    padding: 5rem 0;
    opacity: 1 !important;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

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

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--accent);
    color: #FFFFFF;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--accent-secondary);
    box-shadow: 0 8px 20px var(--accent-glow);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s var(--transition-smooth) forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 10px;
    border: 3px solid var(--bg-main);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Sticky Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    padding: 0.6rem 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
    transition: var(--transition-fast);
}

.mobile-toggle:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 0.35rem;
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.nav-menu a {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    position: relative;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.nav-menu a:hover {
    color: var(--accent);
    background: rgba(139, 92, 246, 0.08);
    /* Soft violet */
}

.nav-menu a.active {
    color: var(--accent);
    background: rgba(139, 92, 246, 0.12);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.1);
}

@media (max-width: 992px) {
    .nav-menu {
        display: none;
        /* Hidden by default entirely until toggle logic shows it? No, keep it structurally ready */
    }
}

@media (max-width: 992px) {
    .navbar {
        justify-content: space-between;
        padding: 0 1.5rem;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        display: flex;
        position: fixed;
        top: 80px;
        left: 1.5rem;
        right: 1.5rem;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        padding: 1.5rem;
        border-radius: var(--radius-lg);
        gap: 0.5rem;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        z-index: 1000;
        width: auto;
        overflow-x: hidden;
        border: 1px solid rgba(255, 255, 255, 0.5);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu a {
        font-size: 1rem;
        padding: 1rem;
        width: 100%;
        text-align: center;
        border-radius: var(--radius-md);
        background: transparent;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(139, 92, 246, 0.05);
        color: var(--accent);
        box-shadow: none;
    }
}

/* Activities Section Styles */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.activity-item:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    transform: translateX(10px);
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.1);
}

.activity-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.activity-info i {
    color: var(--accent);
    font-size: 1.1rem;
}

.activity-info h3 {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0;
}

.activity-info a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    opacity: 0.9;
}

.activity-info a:hover {
    opacity: 1;
    color: var(--accent-secondary);
}

.activity-date {
    color: var(--accent);
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    white-space: nowrap;
    background: rgba(139, 92, 246, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
}

@media (max-width: 768px) {
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .activity-date {
        align-self: flex-end;
    }
}

/* =========================================
   Rich Footer Styles - Blue Theme
   ========================================= */
footer {
    background: #4360ee;
    border-top: none;
    padding: 3rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 50%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: #ffffff;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.footer-section h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.footer-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    color: #1e293b;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.btn-submit {
    background: #ffffff;
    color: #4360ee;
    border: none;
    padding: 0.7rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.25rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

footer .social-link {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

footer .social-link:hover {
    background: #ffffff;
    color: #4360ee;
    border-color: #ffffff;
}

/* RTL Footer Support */
html[dir="rtl"] footer,
html[dir="rtl"] footer.scrolled {
    background: #4360ee;
    color: #ffffff;
}

html[dir="rtl"] .footer-brand h3,
html[dir="rtl"] footer h3 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
}

html[dir="rtl"] .footer-brand p,
html[dir="rtl"] footer p {
    color: rgba(255, 255, 255, 0.85) !important;
}

html[dir="rtl"] .footer-section h4,
html[dir="rtl"] footer h4 {
    color: #ffffff !important;
}

html[dir="rtl"] .footer-links a {
    color: rgba(255, 255, 255, 0.7) !important;
}

html[dir="rtl"] .footer-links a:hover {
    color: #ffffff !important;
}

html[dir="rtl"] .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

html[dir="rtl"] footer .social-link {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

html[dir="rtl"] footer .social-link:hover {
    background: #ffffff !important;
    color: #4360ee !important;
    border-color: #ffffff !important;
}

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea {
    background: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #1e293b !important;
}

html[dir="rtl"] .form-group input::placeholder,
html[dir="rtl"] .form-group textarea::placeholder {
    color: #94a3b8 !important;
}

html[dir="rtl"] .form-group input:focus,
html[dir="rtl"] .form-group textarea:focus {
    background: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
}

html[dir="rtl"] .btn-submit {
    background: #ffffff !important;
    color: #4360ee !important;
}

html[dir="rtl"] .btn-submit:hover {
    background: rgba(255, 255, 255, 0.9) !important;
}

@media (max-width: 992px) {
    footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-links a:hover {
        transform: translateX(0) scale(1.05);
    }

    .footer-brand,
    .footer-links,
    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-brand p {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* =========================================
   Research & Profiles Improvements (Bright Crystal)
   ========================================= */

/* Research Cards - High Contrast "Ice/Crystal" Look */
.research-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    /* Highlight top border */
    position: relative;
    overflow: hidden;
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    /* Subtle depth */
}

/* Inner glow effect */
.research-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2), transparent 70%);
    opacity: 0.6;
    pointer-events: none;
}

.research-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Icon Box - Stronger pop */
.icon-box {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.research-card:hover .icon-box {
    transform: scale(1.15) rotate(5deg);
}

/* Specific gradients - brighter and more saturated */
.icon-box-data {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(225, 245, 254, 0.9));
    color: #0288d1;
    /* Deep Blue */
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.icon-box-ai {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(243, 229, 245, 0.9));
    color: #7b1fa2;
    /* Deep Purple */
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.icon-box-parallel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(224, 242, 241, 0.9));
    color: #00796b;
    /* Teal */
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.research-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    /* Ensure text readability on light grass */
    position: relative;
    z-index: 2;
    font-weight: 800;
}

/* Academic Profiles Section */
.academic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.academic-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.academic-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2);
}

.academic-btn:hover::before {
    transform: translateX(100%);
}

.academic-btn i {
    font-size: 1.75rem;
    transition: transform 0.3s ease;
}

.academic-btn:hover i {
    transform: scale(1.2);
}

.academic-btn span {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

/* Brand Colors */
.btn-scopus i {
    color: #FFA726;
    text-shadow: 0 0 15px rgba(255, 167, 38, 0.4);
}

.btn-scholar i {
    color: #4FC3F7;
    text-shadow: 0 0 15px rgba(79, 195, 247, 0.4);
}

.btn-orcid i {
    color: #AED581;
    text-shadow: 0 0 15px rgba(174, 213, 129, 0.4);
}

/* =========================================
   Light Blue Theme for Sections
   ========================================= */

/* Research, Courses, Activities, Publications - Light Blue Background */
#research,
#courses,
#activities,
#publications {
    background-color: transparent;
    position: relative;
}

/* Section Headers - Dark Text on Light Blue */
#research .section-header h2,
#courses .section-header h2,
#activities .section-header h2,
#publications .section-header h2 {
    color: #1E293B;
    background: none;
    -webkit-text-fill-color: #1E293B;
    text-shadow: none;
}

#research .section-tag {
    color: #8B5CF6;
    font-weight: 800;
}

#courses .section-tag,
#activities .section-tag,
#publications .section-tag {
    color: #8B5CF6;
    font-weight: 800;
}

#research h4,
#courses h4 {
    color: #1E293B !important;
}

/* White Cards on Light Blue Background */
#research .glass-card,
#courses .glass-card,
#publications .glass-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#research .glass-card:hover,
#courses .glass-card:hover,
#publications .glass-card:hover {
    background: #FFFFFF;
    transform: translateY(-8px);
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.1), 0 10px 15px rgba(139, 92, 246, 0.05);
    border-color: #8B5CF6;
}

/* Card Text Colors */
#research .glass-card h3,
#courses .glass-card h3,
#publications .glass-card h3 {
    color: #1E293B;
    text-shadow: none;
    font-weight: 700;
}

#courses .glass-card p {
    color: #475569;
}

#publications .glass-card p {
    color: #8B5CF6 !important;
}

/* Icons */
#research .glass-card .flex-center,
#courses .course-icon {
    background: rgba(139, 92, 246, 0.1) !important;
    border-color: rgba(139, 92, 246, 0.2) !important;
}

#research .glass-card .flex-center i,
#courses .course-icon i {
    color: #8B5CF6 !important;
}

/* Course Year Badge */
#courses .course-year {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
}

/* Oracle Badge */
#courses .oracle-badge {
    background: linear-gradient(90deg, #8B5CF6, #A78BFA);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.6rem;
    font-weight: 600;
}

#courses .oracle-grid {
    background: rgba(139, 92, 246, 0.05);
    border-color: #E2E8F0;
}

#courses .checklist-item {
    background: #FFFFFF;
    border-color: #E2E8F0;
}

#courses .checklist-item:hover {
    background: #FFFFFF;
    border-color: #8B5CF6;
}

#courses .checklist-item h4 {
    color: #1E293B;
}

#courses .checklist-item p {
    color: #64748B;
}

#courses .checklist-item i {
    color: #8B5CF6 !important;
}

/* Academic Profile Links */
#research a.glass-card {
    background: #FFFFFF;
    justify-content: flex-start;
}

#research a.glass-card:hover {
    background: #FFFFFF;
}

#research a.glass-card span {
    color: #1E293B;
    text-shadow: none;
}

#research a.glass-card i.fa-search,
#research a.glass-card i.fa-graduation-cap {
    color: #8B5CF6 !important;
}

/* Activities Section */
#activities .activity-item {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#activities .activity-item:hover {
    background: #FFFFFF;
    transform: translateX(10px);
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.1);
    border-color: #8B5CF6;
}

#activities .activity-item h3 {
    color: #1E293B;
    text-shadow: none;
}

#activities .activity-item h3 a {
    color: #8B5CF6;
}

#activities .activity-item h3 a:hover {
    color: #A78BFA;
}

#activities .activity-info i {
    color: #8B5CF6 !important;
    filter: none;
}

#activities .activity-date {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
}

/* Publications Icons */
#publications .pub-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-color: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
    text-shadow: none;
}

#publications .publication-card:hover .pub-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: #8B5CF6;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.15);
    text-shadow: none;
}

/* LTR Override for Oracle Academy Section - English Content */
#courses .oracle-header,
#courses .oracle-grid {
    direction: ltr !important;
    text-align: left !important;
}

#courses .oracle-header {
    flex-direction: row !important;
}

#courses .oracle-badge {
    unicode-bidi: bidi-override;
    font-size: 1.3rem !important;
}

#courses .oracle-grid .checklist-item {
    direction: ltr !important;
    text-align: left !important;
}

#courses .oracle-grid .checklist-item .checklist-content {
    direction: ltr !important;
    text-align: left !important;
}

#courses .oracle-grid .checklist-item h4 {
    direction: ltr !important;
    text-align: left !important;
}

#courses .oracle-grid .checklist-item p {
    direction: ltr !important;
    text-align: left !important;
}

/* Publications Typography */
.publication-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

/* Mobile Responsive for Publications Section */
@media (max-width: 768px) {
    .publication-card {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .publication-card>div {
        width: 100%;
    }

    .pub-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        align-self: flex-start;
    }

    .publication-card h3 {
        font-size: 1rem;
        line-height: 1.4;
        font-weight: 400;
        font-family: 'Montserrat', sans-serif;
    }
}

@media (max-width: 480px) {
    .publication-card {
        padding: 1.25rem;
        gap: 0.75rem;
    }

    .pub-icon {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .publication-card h3 {
        font-size: 0.95rem;
        line-height: 1.3;
        font-weight: 400;
        font-family: 'Montserrat', sans-serif;
    }

    /* Mobile responsive for gradient card */
    [style*="background: linear-gradient(135deg, var(--accent)"] {
        flex-direction: column !important;
        align-items: center !important;
    }

    [style*="background: linear-gradient(135deg, var(--accent)"] div:first-child {
        min-width: 60px !important;
        width: 60px !important;
        height: 60px !important;
        font-size: 2rem !important;
    }

    [style*="background: linear-gradient(135deg, var(--accent)"] h3 {
        text-align: center;
        font-size: 1.1rem !important;
    }

    [style*="background: linear-gradient(135deg, var(--accent)"] p {
        text-align: center;
        font-size: 0.9rem !important;
    }
}

/* Desktop Font Size Enhancement for Education Section */
@media (min-width: 1024px) {
    #education .timeline-item h3 {
        font-size: 1.3rem !important;
    }

    #education .timeline-item p {
        font-size: 0.95rem !important;
    }

    #education .timeline-date {
        font-size: 0.85rem !important;
    }
}

/* =========================================
   Language Switcher & Header Layout Refinements
   ========================================= */

/* Center the navigation menu on desktop */
@media (min-width: 993px) {
    .nav-menu {
        margin: 0 auto;
    }
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    margin-left: 0;
    z-index: 101;
}

/* RTL Support for Lang Switcher */
html[dir="rtl"] .lang-switch {
    margin-right: 0;
}

.lang-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-heading);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lang-link:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.lang-link img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive Language Switcher */
@media (max-width: 992px) {
    .lang-switch {
        margin-left: auto;
        /* Push to right in LTR */
    }

    html[dir="rtl"] .lang-switch {
        margin-right: auto;
        /* Push to left in RTL */
        margin-left: 0;
    }

    /* Adjusted view on mobile - Text Visible */
    .lang-link {
        padding: 0.4rem 0.8rem;
        width: auto;
        height: auto;
        justify-content: center;
        border-radius: var(--radius-full);
        gap: 0.4rem;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.4);
    }

    .lang-link span {
        display: inline-block;
        font-family: 'Almarai', sans-serif !important;
        font-size: 0.85rem;
        font-weight: 700;
        letter-spacing: 0;
    }

    .lang-link img {
        margin: 0;
        width: 18px;
        height: 18px;
    }
}