/* ===== GENERAL STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Tajawal:wght@400;500;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

:root {
    /* Main Colors - Dark Theme */
    --primary-bg: #121212;
    --secondary-bg: #1e1e1e;
    --card-bg: #252525;
    --primary-color: #4da6ff;
    --secondary-color: #64ffda;
    --accent-color: #ff7e5f;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-white: #ffffff;
    --border-color: #333;
    --border-color-rgb: 51, 51, 51;
    
    /* RGB Values for Animations and Effects */
    --primary-rgb: 77, 166, 255; /* #4da6ff */
    --secondary-rgb: 100, 255, 218; /* #64ffda */
    --accent-rgb: 255, 126, 95; /* #ff7e5f */
    --success-rgb: 0, 184, 148; /* #00b894 */
    --warning-rgb: 253, 203, 110; /* #fdcb6e */
    --info-rgb: 108, 92, 231; /* #6c5ce7 */
    --danger-rgb: 231, 76, 60; /* #e74c3c */
    
    /* UI Elements */
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

/* Light Theme Variables */
.light-theme {
    --primary-bg: #f8f9fa;
    --secondary-bg: #e9ecef;
    --card-bg: #ffffff;
    --primary-color: #0066cc;
    --secondary-color: #00b894;
    --accent-color: #e74c3c;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-white: #ffffff;
    --border-color: #dee2e6;
    --border-color-rgb: 222, 226, 230;
    
    /* RGB Values for Light Theme */
    --primary-rgb: 0, 102, 204; /* #0066cc */
    --secondary-rgb: 0, 184, 148; /* #00b894 */
    --accent-rgb: 231, 76, 60; /* #e74c3c */
    --success-rgb: 40, 167, 69; /* #28a745 */
    --warning-rgb: 255, 193, 7; /* #ffc107 */
    --info-rgb: 23, 162, 184; /* #17a2b8 */
    --danger-rgb: 220, 53, 69; /* #dc3545 */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--text-white);
    background-color: var(--primary-bg);
    position: relative;
    transition: var(--transition);
    overflow-x: hidden;
}

/* Particles Container */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* Gradient Background */
.gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.97) 0%, rgba(32, 32, 50, 0.95) 50%, rgba(18, 18, 18, 0.97) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.light-theme .gradient-background {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.97) 0%, rgba(230, 230, 250, 0.95) 50%, rgba(248, 249, 250, 0.97) 100%);
    background-size: 400% 400%;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 480px) {
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .profile-image img {
        width: 150px !important;
        height: 150px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        aspect-ratio: 1/1;
    }
    
    .header-text h1 {
        font-size: 1.8rem;
    }
    
    .summary {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

.circular-dots:nth-child(3n) {
    animation-timing-function: ease-in-out;
    animation-name: circularMove2;
    animation-duration: 20s;
}

.circular-dots:nth-child(3n+1) {
    animation-name: circularMove3;
    animation-duration: 18s;
}

@keyframes circularMove {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(100px, 100px) rotate(90deg) scale(1.2);
        opacity: 0.5;
    }
    50% {
        transform: translate(0, 200px) rotate(180deg) scale(1);
        opacity: 0.3;
    }
    75% {
        transform: translate(-100px, 100px) rotate(270deg) scale(0.8);
        opacity: 0.5;
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
        opacity: 0.3;
    }
}

@keyframes circularMove2 {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(0.8);
        opacity: 0.2;
    }
    33% {
        transform: translate(150px, -50px) rotate(120deg) scale(1);
        opacity: 0.4;
    }
    66% {
        transform: translate(-50px, -100px) rotate(240deg) scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(0.8);
        opacity: 0.2;
    }
}

@keyframes circularMove3 {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-120px, 80px) rotate(180deg) scale(1.5);
        opacity: 0.4;
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
        opacity: 0.3;
    }
}

.background-particles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.background-particles::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: floatingBubbles 30s linear infinite;
}

/* Floating elements */
.floating-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

.floating-element:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 5%;
    animation: float 15s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation: float 20s ease-in-out infinite reverse;
}

.floating-element:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 15%;
    animation: float 18s ease-in-out infinite 2s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(20px, -20px) rotate(180deg) scale(1.1);
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

@keyframes floatingBubbles {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
    100% {
        transform: translateY(0) rotate(360deg);
    }
}

/* English (LTR) */
html[lang="en"] {
    direction: ltr;
}

/* Arabic (RTL) */
html[lang="ar"] {
    direction: rtl;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    font-family: 'Poppins', 'Cairo', sans-serif;
    margin: 5px;
}

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

.primary-btn {
    background: linear-gradient(135deg, #4da6ff, #6a5acd);
    color: #fff;
    box-shadow: 0 4px 15px rgba(77, 166, 255, 0.4);
    border: none;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(77, 166, 255, 0.6);
}

.secondary-btn {
    background: linear-gradient(135deg, #64ffda, #00cc99);
    color: #fff;
    box-shadow: 0 4px 15px rgba(100, 255, 218, 0.4);
    border: none;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* تغيير لون أيقونة Contact Me إلى اللون الأزرق */
.secondary-btn .fa-envelope {
    color: #0066ff;
}

.secondary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(100, 255, 218, 0.6);
}

.section {
    padding: 80px 0;
}

.section-title {
    font-family: 'Poppins', 'Cairo', sans-serif;
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

/* Hide elements based on language */
html[lang="ar"] .en {
    display: none;
}
/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
    animation: pulse 1s ease-in-out;
}

@keyframes profileFadeInOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    25% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.95);
    }
    75% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.project-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card.hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.skill-bar-fill {
    width: 0;
    transition: width 1s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.light-theme .navbar {
    background-color: rgba(248, 249, 250, 0.9);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.logo a {
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

/* Profile icon in navbar */
.navbar-profile-icon {
    width: 0;
    height: 0;
    border-radius: 50%;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.navbar-profile-icon.visible {
    width: 30px;
    height: 30px;
    opacity: 1;
    animation: rotateIn 0.5s ease-out;
}

@keyframes rotateIn {
    from {
        transform: rotate(180deg) scale(0.5);
    }
    to {
        transform: rotate(0) scale(1);
    }
}

.navbar-profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(77, 166, 255, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(77, 166, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 5px rgba(77, 166, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(77, 166, 255, 0);
    }
}

.nav-links ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: var(--border-radius);
    position: relative;
    display: inline-block;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background-color: rgba(77, 166, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg);
    min-width: 180px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

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

.dropdown-menu a {
    display: block;
    padding: 8px 15px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: rgba(77, 166, 255, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.dropdown-menu a::after {
    display: none;
}

.theme-language-toggle {
    display: flex;
    gap: 10px;
}

.theme-language-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.theme-language-toggle button:hover {
    background-color: var(--card-bg);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 2px 0;
    transition: var(--transition);
}

/* ===== HEADER ===== */
header {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    padding: 150px 0 80px;
    position: relative;
    overflow: hidden;
}

.header-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(var(--primary-color) 1px, transparent 1px), 
                     radial-gradient(var(--secondary-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    opacity: 0.1;
    animation: particleAnimation 20s linear infinite;
}

@keyframes particleAnimation {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-10px) rotate(180deg) scale(1.05);
    }
    100% {
        transform: translateY(-20px) rotate(360deg) scale(1);
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    text-align: center;
}

.profile-image {
    width: 250px;
    height: 250px;
    margin-bottom: 20px;
}

.profile-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
    animation: profileFadeInOut 4s ease-in-out infinite;
}

.profile-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

@keyframes borderGlow {
    0% {
        filter: blur(5px);
        opacity: 0.8;
    }
    50% {
        filter: blur(10px);
        opacity: 0.5;
    }
    100% {
        filter: blur(5px);
        opacity: 0.8;
    }
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.header-text h1 {
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    transition: transform 0.5s ease;
}

.header-text h1:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(77, 166, 255, 0.5);
}

.header-text h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--accent-color), var(--secondary-color));
    transition: width 0.5s ease;
}

.header-text h1:hover::after {
    width: 100%;
.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    height: 1.5em;
    display: flex;
    align-items: center;
}

.typing-text {
    position: relative;
    color: var(--primary-color);
    font-weight: 500;
}

.typing-text::after {
    content: '|';
    position: absolute;
    right: -5px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
    transition: transform 0.4s ease, color 0.4s ease;
    border-radius: 4px;
}

.tagline:hover {
    transform: translateY(-3px);
    color: var(--primary-color);
    background-color: rgba(77, 166, 255, 0.1);
}

.location {
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.4s ease;
    padding: 5px 10px;
    border-radius: 20px;
}

.location:hover {
    transform: translateX(5px);
    color: var(--accent-color);
}

.location i {
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-buttons .btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: transform 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.hero-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
    z-index: -1;
}

.hero-buttons .btn:hover::before {
    left: 100%;
}

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

.social-links a {
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: all 0.4s ease;
    width: 40px;
    height: 40px;
    background-color: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.social-links a:hover {
    color: var(--text-primary);
    transform: translateY(-5px) rotate(360deg);
    background-color: var(--secondary-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-links a:hover::before {
    opacity: 0.3;
    transform: scale(1.2);
}

.social-links a i {
    position: relative;
    z-index: 2;
}

/* Social Media Platform Specific Styles */
.social-links a[href*="github.com"] {
    background-color: #24292e;
    color: #fff;
}

.social-links a[href*="linkedin.com"] {
    background-color: #0077b5;
    color: #fff;
}

.social-links a[href*="twitter.com"], .social-links a[href*="x.com"] {
    background-color: #1da1f2;
    color: #fff;
}

.social-links a[href*="instagram.com"] {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
}

.summary {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 20px;
}

.summary::before {
    content: '"';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.summary::after {
    content: '"';
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-left: 5px;
}

/* ===== ABOUT SECTION ===== */
#about {
    background-image: url('bg.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.85);
    z-index: 1;
}

.light-theme #about::before {
    background-color: rgba(248, 249, 250, 0.85);
}

#about .container {
    position: relative;
    z-index: 2;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.about-image {
    margin-bottom: 20px;
}

.about-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.about-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: left;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

.about-skills {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    text-align: left;
}

.about-skills li {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.05));
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.about-skills li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.1), transparent);
    transition: left 0.5s ease;
}

.about-skills li:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.2);
}

.about-skills li:hover::before {
    left: 100%;
}

.download-cv {
    margin-top: 30px;
}

/* ===== EDUCATION SECTION ===== */
#education {
    background-image: url('bg3.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

#education::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.85);
    z-index: 1;
}

.light-theme #education::before {
    background-color: rgba(248, 249, 250, 0.85);
}

#education .container {
    position: relative;
    z-index: 2;
}

#education .section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 50px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 3s linear infinite;
}

#education .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    animation: gradientBg 3s linear infinite;
    border-radius: 3px;
}

.education-content {
    max-width: 800px;
    margin: 0 auto;
}

.education-item {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.1) 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.education-item:nth-child(1) { animation-delay: 0.1s; }
.education-item:nth-child(2) { animation-delay: 0.2s; }
.education-item:nth-child(3) { animation-delay: 0.3s; }

.education-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(var(--primary-rgb), 0.3);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.education-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.education-item:hover::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

.education-item h3 {
    font-family: 'Poppins', 'Cairo', sans-serif;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.education-item:hover h3 {
    transform: translateX(5px);
}

.education-subtitle {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 5px;
    padding-left: 15px;
    border-left: 2px solid rgba(var(--primary-rgb), 0.2);
    transition: all 0.3s ease;
    line-height: 1.6;
}

.education-item:hover .education-subtitle {
    border-left-color: var(--primary-color);
}

.education-period {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 15px;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    background-color: rgba(var(--secondary-rgb), 0.1);
    border-left: 3px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.education-item:hover .education-period {
    transform: translateX(5px);
    background-color: rgba(var(--secondary-rgb), 0.2);
}

.relevant-courses {
    margin-top: 30px;
}

.relevant-courses h3 {
    font-family: 'Poppins', 'Cairo', sans-serif;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    list-style-position: inside;
    padding-right: 20px;
}

.courses-list li {
    color: var(--text-secondary);
}

/* ===== CERTIFICATE MODAL STYLES ===== */
.certificate-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.certificate-modal-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    animation: slideIn 0.4s ease;
}

.certificate-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.05));
    border-bottom: 1px solid rgba(var(--border-color-rgb), 0.2);
}

.certificate-modal-title {
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.certificate-modal-close {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(var(--accent-rgb), 0.1);
    border: 1px solid transparent;
}

.certificate-modal-close:hover {
    color: var(--accent-color);
    background-color: rgba(var(--accent-rgb), 0.2);
    border-color: rgba(var(--accent-rgb), 0.3);
    transform: scale(1.1);
}

.certificate-modal-body {
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary-bg);
    min-height: 500px;
    max-height: 80vh;
    overflow: auto;
    flex: 1;
}

.certificate-modal-img {
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    display: block;
}

.certificate-modal-img:hover {
    transform: scale(1.02);
}

.certificate-modal-footer {
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(var(--secondary-rgb), 0.05), rgba(var(--primary-rgb), 0.1));
    border-top: 1px solid rgba(var(--border-color-rgb), 0.2);
    display: flex;
    justify-content: center;
    gap: 15px;
}

.certificate-download-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--text-white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(var(--secondary-rgb), 0.3);
}

.certificate-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--secondary-rgb), 0.4);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.certificate-download-btn i {
    font-size: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive design for certificate modal */
@media (max-width: 768px) {
    .certificate-modal-content {
        max-width: 98vw;
        max-height: 98vh;
        margin: 5px;
    }
    
    .certificate-modal-header {
        padding: 15px 20px;
    }
    
    .certificate-modal-title {
        font-size: 1.2rem;
    }
    
    .certificate-modal-close {
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
    
    .certificate-modal-body {
        padding: 5px;
        min-height: 400px;
        max-height: 85vh;
    }
    
    .certificate-modal-img {
        width: 100%;
        height: auto;
    }
    
    .certificate-modal-footer {
        padding: 15px 20px;
    }
    
    .certificate-download-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .certificate-modal-content {
        max-width: 99vw;
        max-height: 99vh;
        margin: 2px;
    }
    
    .certificate-modal-header {
        padding: 12px 15px;
    }
    
    .certificate-modal-title {
        font-size: 1.1rem;
    }
    
    .certificate-modal-body {
        padding: 3px;
        min-height: 350px;
        max-height: 90vh;
    }
    
    .certificate-modal-img {
        width: 100%;
        height: auto;
    }
    
    .certificate-modal-footer {
        padding: 12px 15px;
    }
}

/* ===== EXPERIENCE SECTION ===== */
#experience {
    background-image: url('bg3.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

#experience::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.85);
    z-index: 1;
}

.light-theme #experience::before {
    background-color: rgba(248, 249, 250, 0.85);
}

#experience .container {
    position: relative;
    z-index: 2;
}

#experience .section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 50px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 3s linear infinite;
}

#experience .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    animation: gradientBg 3s linear infinite;
    border-radius: 3px;
}

.experience-content {
    max-width: 800px;
    margin: 0 auto;
}

.experience-item {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.1) 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.experience-item:nth-child(1) { animation-delay: 0.1s; }
.experience-item:nth-child(2) { animation-delay: 0.2s; }
.experience-item:nth-child(3) { animation-delay: 0.3s; }
.experience-item:nth-child(4) { animation-delay: 0.4s; }

.experience-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(var(--primary-rgb), 0.3);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.experience-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.experience-item:hover::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

.experience-item:hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, transparent 30%, var(--secondary-bg) 80%);
    opacity: 0;
    animation: bubbleEffect 1.5s ease-in-out 0.5s infinite;
}

.experience-item h3 {
    font-family: 'Poppins', 'Cairo', sans-serif;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.experience-item:hover h3 {
    transform: translateX(5px);
}

.experience-position {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 5px;
    padding-left: 15px;
    border-left: 2px solid rgba(var(--primary-rgb), 0.2);
    transition: all 0.3s ease;
}

.experience-item:hover .experience-position {
    border-left-color: var(--primary-color);
}

.experience-location {
    color: var(--text-secondary);
    margin-bottom: 5px;
    padding-left: 15px;
    transition: all 0.3s ease;
}

.experience-item:hover .experience-location {
    transform: translateX(5px);
}

.experience-period {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 15px;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    background-color: rgba(var(--secondary-rgb), 0.1);
    border-left: 3px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.experience-item:hover .experience-period {
    transform: translateX(5px);
    background-color: rgba(var(--secondary-rgb), 0.2);
}

.experience-details {
    list-style-type: none;
    padding-right: 0;
    margin-top: 15px;
}

.experience-details li {
    margin-bottom: 15px;
    color: var(--text-secondary);
    padding: 10px 15px 10px 35px;
    border-radius: 8px;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    background: linear-gradient(135deg, rgba(var(--card-bg-rgb), 0.5) 0%, rgba(var(--primary-rgb), 0.05) 100%);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.experience-details li:hover {
    transform: translateX(5px);
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.1);
}

.experience-details li::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.05) 0%, transparent 70%);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.experience-details li:hover::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

.experience-details li::before {
    content: '\f0eb';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 10px;
    top: 10px;
    color: var(--accent-color);
}

.experience-details li[data-icon="fa-laptop-code"]::before {
    content: '\f5fc';
}

.experience-details li[data-icon="fa-tools"]::before {
    content: '\f7d9';
}

.experience-details li[data-icon="fa-database"]::before {
    content: '\f1c0';
}

.experience-details li[data-icon="fa-users"]::before {
    content: '\f0c0';
}

.experience-details li[data-icon="fa-code"]::before {
    content: '\f121';
}

.experience-details li[data-icon="fa-python"]::before {
    content: '\f3e2';
}

.experience-details li[data-icon="fa-brain"]::before {
    content: '\f5dc';
}

.experience-details li[data-icon="fa-lightbulb"]::before {
    content: '\f0eb';
}

.experience-details li[data-icon="fa-graduation-cap"]::before {
    content: '\f19d';
}

.experience-details li[data-icon="fa-chart-line"]::before {
    content: '\f201';
}

.experience-details li[data-icon="fa-filter"]::before {
    content: '\f0b0';
}

.experience-details li[data-icon="fa-robot"]::before {
    content: '\f544';
}

.experience-details li[data-icon="fa-cogs"]::before {
    content: '\f085';
}

.experience-details li[data-icon="fa-tasks"]::before {
    content: '\f0ae';
}

.experience-details li[data-icon="fa-project-diagram"]::before {
    content: '\f542';
}

.experience-details li[data-icon="fa-sliders-h"]::before {
    content: '\f1de';
}

.experience-details li[data-icon="fa-stream"]::before {
    content: '\f550';
}

.experience-details li:hover {
    background-color: rgba(var(--border-color-rgb), 0.1);
    transform: translateX(5px);
}

.experience-details li:last-child {
    border-bottom: none;
}

/* ===== SKILLS SECTION ===== */
.skills-container, .services-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skills-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.skill-box {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--secondary-rgb), 0.15) 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(var(--secondary-rgb), 0.2);
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.skill-box:nth-child(1) { animation-delay: 0.1s; }
.skill-box:nth-child(2) { animation-delay: 0.2s; }
.skill-box:nth-child(3) { animation-delay: 0.3s; }
.skill-box:nth-child(4) { animation-delay: 0.4s; }
.skill-box:nth-child(5) { animation-delay: 0.5s; }
.skill-box:nth-child(6) { animation-delay: 0.6s; }

.skill-box:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(var(--secondary-rgb), 0.3);
    border-color: rgba(var(--secondary-rgb), 0.3);
}

.skill-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.15) 0%, transparent 70%);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.skill-box:hover::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

.skill-box h4 {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.skill-box:hover h4 {
    transform: translateX(5px);
}

.skill-box h4 i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

/* Technical Skills Category Icons */
.skill-box h4 i.fas.fa-code {
    color: var(--accent-color);
}

.skill-box h4 i.fas.fa-database {
    color: var(--secondary-color);
}

.skill-box h4 i.fas.fa-brain {
    color: #9b59b6;
}

.skill-box h4 i.fas.fa-tools {
    color: #e67e22;
}

.skill-box h4 i.fas.fa-laptop-code {
    color: var(--primary-color);
}

.skill-box h4 i.fas.fa-network-wired {
    color: #2ecc71;
}

/* Soft Skills Category Icons */
.skill-box h4 i.fas.fa-lightbulb {
    color: #f39c12;
}

.skill-box h4 i.fas.fa-users {
    color: #3498db;
}

.skill-box h4 i.fas.fa-tasks {
    color: #e74c3c;
}

.skill-box h4 i.fas.fa-sync-alt {
    color: #1abc9c;
}

/* Hover effect for skill box icons */
.skill-box:hover h4 i {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px currentColor);
}

.skill-icon-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.7rem;
    line-height: 1.4;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    border-left: 2px solid rgba(var(--secondary-rgb), 0.2);
    color: var(--text-white);
}

.skill-icon-list li:hover {
    transform: translateX(5px);
    background-color: rgba(var(--secondary-rgb), 0.08);
    border-left-color: var(--secondary-color);
}

.skill-icon-list li i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    margin-top: 0.2rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-icon-list li:hover i {
    transform: scale(1.2);
    color: var(--accent-color);
}

.skill-icon-list li i.fa-star {
    color: var(--accent-color);
}

/* Technical Skills Styling */
.skills-list {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    transition: var(--transition);
}

.skills-list:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
    position: relative;
    overflow: hidden;
}

.skills-list:hover::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, transparent 20%, var(--secondary-bg) 70%);
    opacity: 0;
    animation: bubbleEffect 1.5s ease-in-out infinite;
}

.skills-list:hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, transparent 30%, var(--secondary-bg) 80%);
    opacity: 0;
    animation: bubbleEffect 1.5s ease-in-out 0.5s infinite;
}

.skill-subcategory {
    margin-bottom: 20px;
}

.skill-subcategory h4 {
    color: var(--text-white);
    margin-bottom: 10px;
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
    transition: var(--transition);
}

.skill-subcategory h4:hover {
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
    transform: translateX(5px);
    text-shadow: 0 0 5px rgba(255, 126, 95, 0.3);
}

.skill-subcategory ul {
    list-style-type: disc;
    padding-right: 20px;
    margin-right: 20px;
}

.skill-subcategory li {
    margin-bottom: 15px;
    color: var(--text-white);
    position: relative;
    padding-right: 5px;
    padding-left: 5px;
    transition: var(--transition);
}

.skill-subcategory li:hover {
    color: var(--primary-color);
    transform: translateX(5px);
    text-shadow: 0 0 5px rgba(77, 166, 255, 0.3);
}

.skill-category {
    margin-bottom: 50px;
}

.skill-category h3 {
    font-family: 'Poppins', 'Cairo', sans-serif;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-white);
    font-size: 1.8rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 40px;
    justify-items: center;
    margin-bottom: 30px;
}

.skill-item {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.skill-item:hover {
    transform: translateY(-10px);
    background-color: var(--secondary-bg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.skill-item:hover::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, transparent 20%, var(--secondary-bg) 70%);
    opacity: 0;
    animation: bubbleEffect 1.5s ease-in-out infinite;
}

.skill-item:hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, transparent 30%, var(--secondary-bg) 80%);
    opacity: 0;
    animation: bubbleEffect 1.5s ease-in-out 0.5s infinite;
}

@keyframes bubbleEffect {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

.skill-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 5px;
    transition: width 1.5s ease-in-out, background 0.5s ease;
}

.skill-item:hover .skill-bar-fill {
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 100%;
    animation: gradientShift 2s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.skill-percentage {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-white);
    display: block;
    margin-top: 5px;
}

.skill-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
}

.skill-item i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

/* Programming Languages Icons */
.skill-item i.fab.fa-python {
    color: #3776ab;
}

.skill-item i.fab.fa-java {
    color: #ed8b00;
}

.skill-item i.fas.fa-code {
    color: var(--accent-color);
}

.skill-item i.fas.fa-database {
    color: var(--secondary-color);
}

.skill-item i.fab.fa-html5 {
    color: #e34f26;
}

.skill-item i.fab.fa-js {
    color: #f7df1e;
}

/* Developer Tools Icons */
.skill-item i.fas.fa-laptop-code {
    color: var(--primary-color);
}

.skill-item i.fas.fa-chart-bar {
    color: var(--accent-color);
}

/* Libraries & Frameworks Icons */
.skill-item i.fas.fa-calculator {
    color: #013243;
}

.skill-item i.fas.fa-table {
    color: #150458;
}

.skill-item i.fas.fa-brain {
    color: var(--secondary-color);
}

.skill-item i.fas.fa-chart-line {
    color: #ff6b6b;
}

.skill-item i.fas.fa-chart-area {
    color: #4ecdc4;
}

.skill-item i.fas.fa-file-excel {
    color: #217346;
}

.skill-item i.fab.fa-python {
    color: #092e20;
}

/* Hover effects for skill icons */
.skill-item:hover i {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 10px currentColor);
}

.skill-item h4 {
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-size: 1.1rem;
    color: var(--text-white);
}

/* ===== TESTIMONIALS SECTION ===== */
#testimonials {
    background-image: url('bg.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

#testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.85);
    z-index: 1;
}

.light-theme #testimonials::before {
    background-color: rgba(248, 249, 250, 0.85);
}

#testimonials .container {
    position: relative;
    z-index: 2;
}

#testimonials .section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 50px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 3s linear infinite;
}

.testimonials-container {
    position: relative;
    z-index: 2;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-item {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.05) 100%);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.testimonial-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.1), transparent);
    transition: left 0.5s ease;
}

.testimonial-item:hover::before {
    left: 100%;
}

.testimonial-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary-color);
}

.testimonial-image {
    text-align: center;
    margin-bottom: 20px;
}

.testimonial-image img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.testimonial-image {
    position: relative;
}

.testimonial-image::after {
    content: '👁️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 8px;
    border-radius: 50%;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.testimonial-image:hover::after {
    opacity: 1;
}

.testimonial-item:hover .testimonial-image img {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.5);
}

.testimonial-stars {
    text-align: center;
    margin-bottom: 15px;
}

.testimonial-stars i {
    color: #ffd700;
    font-size: 1.2rem;
    margin: 0 2px;
    animation: starTwinkle 2s infinite ease-in-out;
}

.testimonial-stars i:nth-child(2) { animation-delay: 0.2s; }
.testimonial-stars i:nth-child(3) { animation-delay: 0.4s; }
.testimonial-stars i:nth-child(4) { animation-delay: 0.6s; }
.testimonial-stars i:nth-child(5) { animation-delay: 0.8s; }

@keyframes starTwinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.testimonial-text {
    color: var(--text-primary);
    font-style: italic;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
    position: relative;
    padding: 0 10px;
}

.testimonial-text::before,
.testimonial-text::after {
    content: '"';
    font-size: 2rem;
    color: var(--primary-color);
    position: absolute;
    top: -10px;
}

.testimonial-text::before {
    left: 0;
}

.testimonial-text::after {
    right: 0;
    top: auto;
    bottom: -10px;
}

.testimonial-name {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 5px;
    font-size: 1.2rem;
    font-weight: 600;
}

.testimonial-position {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .testimonial-item {
        padding: 20px;
    }
    
    .testimonial-image img {
        width: 80px;
        height: 80px;
    }
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.image-modal-content {
    position: relative;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90%;
    max-width: 90%;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: var(--primary-color);
    text-decoration: none;
}

.image-modal-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.image-modal-img:hover {
    transform: scale(1.02);
}

.image-modal-caption {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Mobile responsive for modal */
@media (max-width: 768px) {
    .image-modal-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .image-modal-caption {
        font-size: 1rem;
        margin-top: 15px;
    }
}

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

.certificate-item {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.1) 50%, rgba(var(--secondary-rgb), 0.08) 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.15), 0 4px 12px rgba(var(--secondary-rgb), 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 0 0 calc(33.333% - 20px);
    min-width: 300px;
    border: 2px solid rgba(var(--primary-rgb), 0.3);
    animation: certificateShakeLeftRight 3s ease-in-out infinite;
}

.certificate-item:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.25), 0 10px 20px rgba(var(--accent-rgb), 0.15);
    border: 2px solid var(--primary-color);
    border-image: none;
    animation-play-state: paused;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--secondary-rgb), 0.12) 50%, rgba(var(--accent-rgb), 0.08) 100%);
}

.certificate-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(var(--primary-rgb), 0.05) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.certificate-item:hover::before {
    opacity: 1;
}

.certificate-item:hover .certificate-image img {
    transform: scale(1.05);
}

/* Certificate Info Styling */
.certificate-info {
    padding: 20px;
    text-align: center;
    background: rgba(var(--card-bg), 0.95);
    backdrop-filter: blur(5px);
}

.certificate-info h4 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.certificate-info .course-name {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.certificate-info .course-name strong {
    color: var(--primary-color);
    font-weight: 700;
}

.certificate-info .btn {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
    animation: pulse 2s infinite;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.8rem;
    z-index: 10;
    border: 2px solid rgba(var(--primary-rgb), 0.3);
    box-shadow: 0 8px 16px rgba(var(--primary-rgb), 0.2), 0 4px 8px rgba(var(--secondary-rgb), 0.1);
    transition: all 0.3s ease;
}

.slider-nav:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 12px 24px rgba(var(--accent-rgb), 0.3), 0 6px 12px rgba(var(--secondary-rgb), 0.2);
    border-color: var(--accent-color);
}

.slider-nav.prev {
    left: 10px;
}

.slider-nav.next {
    right: 10px;
}

@keyframes certificateShakeLeftRight {
    0% {
        transform: translateX(0);
    }
    10% {
        transform: translateX(-8px);
    }
    20% {
        transform: translateX(8px);
    }
    30% {
        transform: translateX(-6px);
    }
    40% {
        transform: translateX(6px);
    }
    50% {
        transform: translateX(-4px);
    }
    60% {
        transform: translateX(4px);
    }
    70% {
        transform: translateX(-2px);
    }
    80% {
        transform: translateX(2px);
    }
    90% {
        transform: translateX(-1px);
    }
    100% {
        transform: translateX(0);
    }
}

.certificate-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.certificate-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(var(--primary-rgb), 0.1) 0%, transparent 50%, rgba(var(--secondary-rgb), 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.certificate-item:hover .certificate-image::before {
    opacity: 1;
}

.certificate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    border-radius: 0;
    filter: brightness(1) contrast(1);
}

.certificate-item:hover .certificate-image img {
    filter: brightness(1.1) contrast(1.05);
}

.certificate-item:hover .certificate-image img {
    transform: scale(1.05);
}

.certificate-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.certificate-info h4 {
    font-family: 'Poppins', 'Cairo', sans-serif;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    animation: gradientText 3s ease infinite;
}

.certificate-item:hover .certificate-info h4 {
    transform: translateY(-2px);
    filter: drop-shadow(0 2px 4px rgba(var(--primary-rgb), 0.3));
}

.certificate-info p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.certificate-item:hover .certificate-info p {
    color: var(--text-primary);
}

.certificate-info .course-name {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--secondary-rgb), 0.08), rgba(var(--accent-rgb), 0.05));
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 15px;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    display: inline-block;
    direction: rtl;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.1);
}

.certificate-info .course-name::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.2), transparent);
    transition: left 0.5s ease;
}

.certificate-item:hover .certificate-info .course-name {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.certificate-item:hover .certificate-info .course-name::before {
    left: 100%;
}

@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ===== ONLINE PLATFORMS SECTION ===== */
#online-platforms {
    background-image: url('bg2.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

#online-platforms::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.85);
    z-index: 1;
}

.light-theme #online-platforms::before {
    background-color: rgba(248, 249, 250, 0.85);
}

#online-platforms .container {
    position: relative;
    z-index: 2;
}

#online-platforms .section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 50px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 3s linear infinite;
}

.platforms-container {
    position: relative;
    z-index: 2;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.platform-item {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.05) 100%);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    text-align: center;
}

.platform-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.1), transparent);
    transition: left 0.5s ease;
}

.platform-item:hover::before {
    left: 100%;
}

.platform-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary-color);
}

.platform-logo {
    margin-bottom: 20px;
    position: relative;
}

.platform-logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 15px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.platform-item:hover .platform-logo img {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 10px 25px rgba(var(--primary-rgb), 0.4));
}

.platform-info h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

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

.platform-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s ease;
}

.platform-item:hover .platform-badge {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .platforms-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .platform-item {
        padding: 20px;
    }
    
    .platform-logo img {
        width: 60px;
        height: 60px;
    }
}

/* ===== INSTITUTIONS SECTION ===== */
@keyframes institutionPulse {
    0% { transform: scale(1); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); }
    50% { transform: scale(1.03); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15); }
    100% { transform: scale(1); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); }
}

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

@keyframes glowEffect {
    0% { box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.3); }
    50% { box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.6); }
    100% { box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.3); }
}

.institutions-container {
    position: relative;
    padding: 30px 0;
    overflow: hidden;
}

.institutions-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03) 0%, rgba(var(--accent-rgb), 0.03) 100%);
    z-index: -1;
}

.institutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 20px 0;
    perspective: 1000px;
}

.institution-item {
    background: transparent;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: institutionPulse 6s infinite ease-in-out;
    animation-delay: calc(var(--animation-order, 0) * 0.5s);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.institution-item:nth-child(1) { --animation-order: 1; }
.institution-item:nth-child(2) { --animation-order: 2; }
.institution-item:nth-child(3) { --animation-order: 3; }
.institution-item:nth-child(4) { --animation-order: 4; }
.institution-item:nth-child(5) { --animation-order: 5; }

.light-theme .institution-item {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.dark-theme .institution-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.institution-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(var(--accent-rgb), 0.05) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.institution-item:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.institution-item:hover::before {
    opacity: 1;
}

.institution-logo {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 0;
    border-radius: 15px;
    background: none;
    box-shadow: none;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.institution-logo::after {
    display: none;
}

.dark-theme .institution-logo {
    background: none;
    box-shadow: none;
}

.institution-logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 15px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.institution-item:hover .institution-logo {
    animation: none;
    box-shadow: none;
}

.institution-item:hover .institution-logo::after {
    opacity: 0;
}

.institution-item:hover .institution-logo img {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 10px 25px rgba(var(--primary-rgb), 0.4));
}

.institution-info {
    padding: 15px 0;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.institution-info h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.institution-info h4::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transition: all 0.5s ease;
    transform: translateX(-50%);
}

.institution-item:hover .institution-info h4::after {
    width: 100%;
}

.institution-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.institution-item:hover .institution-info p {
    opacity: 1;
    transform: translateY(2px);
}

.institution-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9), rgba(var(--accent-rgb), 0.9));
    box-shadow: 0 3px 6px rgba(var(--primary-rgb), 0.2);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.85;
    margin-top: 5px;
}

.institution-item:hover .institution-badge {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(var(--primary-rgb), 0.3);
    opacity: 1;
}

.institution-item:nth-child(1) .institution-badge {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.institution-item:nth-child(2) .institution-badge {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.institution-item:nth-child(3) .institution-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.institution-item:nth-child(4) .institution-badge {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}

.institution-item:nth-child(5) .institution-badge {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
}

/* ===== PROJECTS SECTION ===== */
#projects {
    background-image: url('bg3.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

#projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.85);
    z-index: 1;
}

.light-theme #projects::before {
    background-color: rgba(248, 249, 250, 0.85);
}

#projects .container {
    position: relative;
    z-index: 2;
}

#projects .section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 50px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 3s linear infinite;
}

#projects .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    animation: gradientBg 3s linear infinite;
    border-radius: 3px;
}

@keyframes gradientText {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

@keyframes gradientBg {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    position: relative;
}

/* تأثير ظهور تدريجي لبطاقات المشاريع */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.project-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.1) 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(var(--primary-rgb), 0.3);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.project-card:hover::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

@keyframes shine {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.3;
    }
}

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

.project-card .project-img {
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-card .project-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.3) 0%, rgba(var(--accent-rgb), 0.3) 100%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.project-card:hover .project-img::before {
    opacity: 1;
}

.project-card .project-img img {
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    display: block;
}

.project-card:hover .project-img img {
    transform: scale(1.1) rotate(2deg);
}

.project-card h3 {
    font-family: 'Poppins', 'Cairo', sans-serif;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-size: 1.3rem;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.project-card:hover h3 {
    transform: translateX(5px);
}

.project-date {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    background-color: rgba(var(--secondary-rgb), 0.1);
    border-left: 3px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.project-card:hover .project-date {
    transform: translateX(5px);
    background-color: rgba(var(--secondary-rgb), 0.2);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
    position: relative;
    padding-left: 15px;
    border-left: 2px solid rgba(var(--primary-rgb), 0.2);
    transition: all 0.3s ease;
}

.project-card:hover .project-description {
    border-left-color: var(--primary-color);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tech span {
    background: linear-gradient(135deg, var(--secondary-bg), rgba(var(--accent-rgb), 0.2));
    color: var(--text-secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.project-tech span:hover {
    transform: translateY(-3px);
    color: var(--primary-color);
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.2);
}

.project-tech span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.project-tech span:hover::before {
    left: 100%;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: auto;
    position: relative;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    border: none;
    z-index: 1;
}

.project-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.project-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(var(--primary-rgb), 0.4);
}

.project-links a:hover::before {
    opacity: 1;
}

.project-links a i {
    margin-right: 5px;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    padding: 15px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.1) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }
.contact-item:nth-child(4) { animation-delay: 0.4s; }

.contact-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(var(--primary-rgb), 0.2);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.contact-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.contact-item:hover::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

.contact-item i {
    font-size: 1.5rem;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 15px;
    width: 50px;
    height: 50px;
    background-color: rgba(var(--primary-rgb), 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.contact-item:hover i {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.2);
}

.copy-btn {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--accent-rgb), 0.1) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 5px;
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 1rem;
    padding: 5px 10px;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(var(--primary-rgb), 0.2);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2) 0%, rgba(var(--accent-rgb), 0.2) 100%);
}

.contact-social.social-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-rgb), 0.1) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 5px;
    width: calc(50% - 20px);
    justify-content: center;
}

.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.2);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.social-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.social-btn:hover::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

.social-btn {
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

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

.social-btn i {
    font-size: 1.2rem;
    width: auto;
    height: auto;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.social-btn:hover i {
    transform: scale(1.2) rotate(5deg);
}

.contact-form {
    flex: 2;
    min-width: 300px;
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 30px;
}

.form-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

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

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(77, 166, 255, 0.2);
}

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

/* ===== FOOTER ===== */
footer {
    background-color: var(--card-bg);
    color: var(--text-primary);
    padding: 30px 0;
}

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

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--secondary-color);
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .profile-image {
        margin-right: 0;
        margin-bottom: 30px;
        width: 220px;
        height: 220px;
    }
    
    .header-text {
        align-items: center;
        width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--primary-bg);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        padding: 20px;
    }

    .nav-links.active ul {
        flex-direction: column;
        width: 100%;
    }

    .nav-links.active a {
        display: block;
        padding: 10px 0;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .certificates-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .certificate-item {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 20px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .header-text h1 {
        font-size: 2.2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .profile-image {
        width: 180px;
        height: 180px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 250px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .contact-content {
        flex-direction: column;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .courses-list {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
    
    .certificate-item {
        flex: 0 0 calc(100% - 20px);
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .institutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .institution-logo {
        width: 120px;
        height: 120px;
    }
    
    .contact-info {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .certificates-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .institutions-grid {
        grid-template-columns: 1fr;
    }
    
    .institution-item {
        padding: 15px;
    }
    
    .institution-logo {
        width: 100px;
        height: 100px;
        padding: 10px;
    }
    
    .institution-info h4 {
        font-size: 1rem;
    }
    
    .institution-info p {
        font-size: 0.8rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .theme-language-toggle {
        gap: 5px;
    }

    .theme-language-toggle button {
        padding: 5px;
    }
}

/* ===== SERVICES SECTION STYLING ===== */
#services .skill-box {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--secondary-rgb), 0.15) 100%);
    border: 1px solid rgba(var(--secondary-rgb), 0.2);
}

#services .skill-box:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(var(--secondary-rgb), 0.3);
    border-color: rgba(var(--secondary-rgb), 0.3);
}

#services .skill-box::before {
    background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.15) 0%, transparent 70%);
}

#services .skill-box h4 {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#services .skill-icon-list li {
    border-left: 2px solid rgba(var(--secondary-rgb), 0.2);
}

#services .skill-icon-list li:hover {
    background-color: rgba(var(--secondary-rgb), 0.08);
    border-left-color: var(--secondary-color);
}

#services .skill-icon-list li i {
    color: var(--primary-color);
}

#services .skill-icon-list li {
    color: var(--text-white);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease;
    border: 1px solid var(--border-color);
}

.modal-content h2 {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    margin: 0;
    padding: 20px 30px;
    border-radius: 15px 15px 0 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
    color: var(--text-primary);
    line-height: 1.6;
}

.modal-body h3 {
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.modal-body ul {
    margin: 15px 0;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.modal-body li strong {
    color: var(--primary-color);
    font-weight: 600;
}

.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 10px;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #ff6b6b;
    text-decoration: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 80vh;
    }
    
    .modal-content h2 {
        padding: 15px 20px;
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .close {
        font-size: 24px;
    }
}