/* 1. Google Fonts & Reset */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    cursor: none !important;
}

/* 2. Root Variables & Global Styles */
:root {
    --primary-blue: #9b9b9b;
    --dark-bg: #1a1a1a;
    --light-bg: #f5f5f7;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-light: rgba(0, 0, 0, 0.03);
    --card-gradient: linear-gradient(135deg, #313131 0%, #1a1a1a 100%);
    --card-gradient-light: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    --transition-smooth: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --spring-easing: cubic-bezier(0.5, 1.5, 0.5, 1);
}

body {
    font-family: 'Ubuntu', sans-serif;
    background-color: var(--dark-bg);
    color: white;
    overflow-x: hidden;
}

.highlight { 
    color: var(--primary-blue); 
    font-weight: 500; 
}

/* 3. Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #9e9e9e, #838383);
    border-radius: 2px;
}

/* الكرسر المطور */
.cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 40px; height: 40px;
    border: 2px solid #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: exclusion;
    transition: transform 0.1s ease-out, width 0.3s ease, height 0.3s ease;
}

/* مودال الـ Snap */
.snap-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(15px);
    padding: 30px; border-radius: 20px;
    z-index: 100000; visibility: hidden; opacity: 0;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.snap-modal.active { visibility: visible; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.snap-card { text-align: center; color: white; }
.snap-card .logo { width: 60px; border-radius: 50%; margin-bottom: 10px; border: 2px solid #4f6cf5; }
.qr-preview img { background: white; padding: 10px; border-radius: 10px; margin: 15px 0; }
/* 4. Header & Navigation */
header {
    position: sticky;
    top: 15px;
    z-index: 1000;
    width: 95%;
    margin: 1em auto;
    padding: 1.4em 2em;
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

nav ul {
    list-style: none;
    position: relative;
    display: flex;
    align-items: center;
}

.logo { margin-right: auto; }

.logo a {
    font-weight: 700;
    font-size: 1.8em;
    color: white;
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span { color: var(--primary-blue); }

nav a {
    padding: 0 15px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    font-size: 1.1em;
    transition: 0.3s;
    display: inline-flex;
}

nav a:hover {
    color: white;
    transform: translateY(-3px);
}

.nav-underline {
    position: absolute;
    bottom: -8px;
    height: 2px;
    background-color: var(--primary-blue);
    border-radius: 2px;
    transition: var(--transition-smooth);
    pointer-events: none;
}

nav a.active::after { display: none; }

.theme-toggle-btn {
    background: transparent; /* خلفية شفافة */
    color: rgba(255, 255, 255, 0.8); /* نفس لون لينكات الناف */
    border: 1px solid rgba(255, 255, 255, 0.2); /* برواز خفيف */
    width: 38px;
    height: 38px;
    border-radius: 10px; /* واخد شكل كيرفي زي الهيدر */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px; /* مسافة عن اللينكات */
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    color: white;
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-3px); /* نفس تأثير لينكات الناف */
}

/* 5. Hero Section (Home) */
#home {
    position: relative;
    height: 80vh;
    margin: 1em;
    padding: 0 3em;
    background: var(--card-gradient);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge {
    display: inline-block;
    background: rgba(79, 108, 245, 0.2);
    color: #cad7fd;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.8em;
    border: 1px solid var(--primary-blue);
    margin-bottom: 20px;
}

#home h1 {
    font-size: clamp(2em, 8vw, 4em);
    line-height: 1.1;
    margin-bottom: 0.3em;
}

#home h1 span { color: var(--primary-blue); }

#home p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
}

.hero-btns {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.btn-main, .btn-sub {
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-main {
    background: white;
    color: var(--dark-bg);
    font-weight: 600;
}

.btn-main:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-3px);
}

.btn-sub {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-sub:hover { background: rgba(255, 255, 255, 0.1); }

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.5em;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
}

/* 6. About Section */
#about {
    min-height: 60vh;
    margin: 1em;
    padding: 4em 3em;
    background: linear-gradient(135deg, #292929 0%, #1a1a1a 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}

.about-container {
    display: flex;
    gap: 50px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

#about h2 { font-size: 2em; margin-bottom: 1em; }
#about h2 span { color: var(--primary-blue); }
.content p { font-size: 1.2em; }
.bio-detail { margin-top: 1em; opacity: 0.8; }

.about-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2em;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.info-item i {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: var(--primary-blue);
    background: rgba(134, 150, 240, 0.1);
    border-radius: 10px;
}

.info-item h4 { font-size: 1em; color: var(--primary-blue); margin-bottom: 2px; }
.info-item p { font-size: 1.2em !important; color: white !important; line-height: 1.5; }

/* 7. Skills Section */
#skills {
    padding: 4em 2em;
    margin: 1em;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
}

.section-title { text-align: center; font-size: 2.5em; margin-bottom: 1.5em; }
.section-title span { color: var(--primary-blue); }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category h3 {
    margin-bottom: 25px;
    font-size: 1.4em;
    color: var(--primary-blue);
    border-left: 4px solid var(--primary-blue);
    padding-left: 15px;
}

.skill-item { margin-bottom: 20px; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 10px; font-weight: 500; }

.progress-line {
    height: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.progress-line span {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #3f3f3f, var(--primary-blue));
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.1, 0, 0.2, 1);
    will-change: width;
}

/* 8. Projects Section */
#project {
    margin: 1em;
    padding: 4em 2em;
    background: linear-gradient(135deg, #292929 0%, #1a1a1a 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#project h2 { text-align: center; font-size: 2.8em; margin-bottom: 30px; font-weight: 400; }

.filter-btns { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; }

.filter-btns button {
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: 0.3s ease;
}

.filter-btns button.active, 
.filter-btns button:hover {
    background: #4f6cf5;
    border-color: #4f6cf5;
    box-shadow: 0 5px 15px rgba(79, 108, 245, 0.3);
    transform: translateY(-2px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.project-card {
    display: none; /* Controlled by JS */
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: 0.4s ease;
}

.project-card.show { display: flex; }

.project-card:hover {
    transform: translateY(-10px);
    border-color: #4f6cf5;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.project-img {
    height: 220px;
    background: #1e428a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.project-info h3 { font-size: 1.2em; margin-bottom: 5px; }
.project-info span { color: #cad7fd; font-size: 0.9em; opacity: 0.8; margin-bottom: 15px; display: block; }

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(79, 108, 245, 0.2);
    border: 1px solid #4f6cf5;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85em;
    transition: 0.3s ease;
}

.view-btn:hover {
    background: #4f6cf5;
    box-shadow: 0 4px 12px rgba(79, 108, 245, 0.4);
}

/* أزرار الكارد لجعلهم بجانب بعض */
.project-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.card-btns {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.card-btns .view-btn { flex: 1; padding: 5px; }
.card-btns .icon-link {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 108, 245, 0.1);
    border: 1px solid #4f6cf5;
    color: white;
    border-radius: 8px;
    transition: 0.3s;
    text-decoration: none;
}

/* المودال المصغر */
.modal-wrapper {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}
.modal-box {
    position: relative;
    background: #1a1a1a;
    width: 95%;
    max-width: 550px; /* حجم صغير ومحكم */
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 10;
}
.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    background: none; border: none;
    color: white; font-size: 30px;
    cursor: pointer; z-index: 15;
}
.modal-img-holder img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.modal-txt-holder { padding: 25px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
#modal-year { color: #4f6cf5; font-weight: bold; font-size: 0.9em; }
#modal-desc { color: #ccc; font-size: 0.95em; line-height: 1.6; margin: 15px 0; }

/* 9. Contact Section */
#contact {
    min-height: 60vh;
    margin: 1em;
    background: var(--card-gradient);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2em;
}

.contact-content h1 { font-size: 3em; text-align: center; margin-bottom: 0.2em; }
.contact-content h1 span { color: var(--primary-blue); }
.contact-content p { font-size: 1.2em; color: rgba(255, 255, 255, 0.7); text-align: center; }

.icons { display: flex; justify-content: center; gap: 25px; flex-wrap: wrap; }

.icons a {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 2em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icons a:hover {
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    rotate: 10deg;
}

/* 10. Footer Section */
footer {
    margin: 2em;
    padding: 4em 2em 1em 2em;
    background-color: var(--glass-bg);
    border-radius: 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 3em;
}

.footer-logo { font-weight: 700; font-size: 1.8em; color: white; text-decoration: none; letter-spacing: 1px; }
.footer-logo span { color: var(--primary-blue); }
.footer-brand p { margin-top: 15px; color: rgba(255, 255, 255, 0.6); line-height: 1.6; font-size: 0.95em; }

.footer-links h3, .footer-newsletter h3 { color: white; font-size: 1.2em; margin-bottom: 20px; font-weight: 500; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a { color: rgba(255, 255, 255, 0.6); text-decoration: none; transition: 0.3s; }
.footer-links ul li a:hover { color: var(--primary-blue); padding-left: 10px; }

.footer-newsletter p { color: rgba(255, 255, 255, 0.6); margin-bottom: 10px; }

.footer-bottom {
    text-align: center;
    padding-top: 2em;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom span { color: var(--primary-blue); }


/* Custom Context Menu Style */
.custom-cm {
    position: fixed;
    width: 200px;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none; /* مخفية افتراضياً */
    z-index: 10000;
    transform: scale(0.9);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

.custom-cm.active {
    display: block;
    transform: scale(1);
    opacity: 1;
}

.cm-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s;
}

.cm-item i {
    width: 20px;
    color: #4f6cf5; /* لون الأيقونات */
}

.cm-item:hover {
    background: rgba(79, 108, 245, 0.2);
    color: white;
}

.cm-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
}
/* خيار النسخ عندما يكون باهتاً */
.cm-item.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* مودال الـ QR Code */
.qr-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(79, 108, 245, 0.3);
    z-index: 10001;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qr-modal.active {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.qr-modal img {
    border: 10px solid white;
    border-radius: 10px;
    margin-bottom: 15px;
    width: 200px;
}

.qr-modal h3 { font-size: 1.2rem; color: #4f6cf5; margin-bottom: 10px; }



body.light-theme {
    background-color: var(--light-bg);
    color: #333;
}

.highlight { 
    color: var(--primary-blue); 
    font-weight: 500; 
}

/* 3. Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

.light-theme ::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #9e9e9e, #838383);
    border-radius: 2px;
}

.light-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #b0b0b0, #909090);
}

/* الكرسر المطور */
.cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 40px; height: 40px;
    border: 2px solid #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: exclusion;
    transition: transform 0.1s ease-out, width 0.3s ease, height 0.3s ease;
}

.light-theme .cursor-ring {
    border-color: #333;
    mix-blend-mode: difference;
}

/* مودال الـ Snap */
.snap-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(15px);
    padding: 30px; border-radius: 20px;
    z-index: 100000; visibility: hidden; opacity: 0;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.light-theme .snap-modal {
    background: rgba(255, 255, 255, 0.95);
}

.snap-modal.active { visibility: visible; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.snap-card { text-align: center; color: white; }
.snap-card .logo { width: 60px; border-radius: 50%; margin-bottom: 10px; border: 2px solid #4f6cf5; }
.qr-preview img { background: white; padding: 10px; border-radius: 10px; margin: 15px 0; }

.light-theme .snap-card {
    color: #333;
}

/* 4. Header & Navigation */
header {
    position: sticky;
    top: 15px;
    z-index: 1000;
    width: 95%;
    margin: 1em auto;
    padding: 1.4em 2em;
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
}

.light-theme header {
    background-color: var(--glass-bg-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

nav ul {
    list-style: none;
    position: relative;
    display: flex;
    align-items: center;
}

.logo { margin-right: auto; }

.logo a {
    font-weight: 700;
    font-size: 1.8em;
    color: white;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.light-theme .logo a {
    color: #333;
}

.logo span { color: var(--primary-blue); }

nav a {
    padding: 0 15px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    font-size: 1.1em;
    transition: 0.3s;
    display: inline-flex;
}

.light-theme nav a {
    color: rgba(0, 0, 0, 0.7);
}

nav a:hover {
    color: white;
    transform: translateY(-3px);
}

.light-theme nav a:hover {
    color: #000;
}

.nav-underline {
    position: absolute;
    bottom: -8px;
    height: 2px;
    background-color: var(--primary-blue);
    border-radius: 2px;
    transition: var(--transition-smooth);
    pointer-events: none;
}

nav a.active::after { display: none; }

.theme-toggle-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.light-theme .theme-toggle-btn {
    color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn:hover {
    color: white;
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-3px);
}

.light-theme .theme-toggle-btn:hover {
    color: #000;
    background: rgba(155, 155, 155, 0.2);
}

/* 5. Hero Section (Home) */
#home {
    position: relative;
    height: 80vh;
    margin: 1em;
    padding: 0 3em;
    background: var(--card-gradient);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.5s ease;
}

.light-theme #home {
    background: var(--card-gradient-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.badge {
    display: inline-block;
    background: rgba(79, 108, 245, 0.2);
    color: #cad7fd;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.8em;
    border: 1px solid var(--primary-blue);
    margin-bottom: 20px;
}

.light-theme .badge {
    background: rgba(155, 155, 155, 0.2);
    color: #666;
    border: 1px solid #999;
}

#home h1 {
    font-size: clamp(2em, 8vw, 4em);
    line-height: 1.1;
    margin-bottom: 0.3em;
}

#home h1 span { color: var(--primary-blue); }

#home p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
}

.light-theme #home p {
    color: rgba(0, 0, 0, 0.7);
}

.hero-btns {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.btn-main, .btn-sub {
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-main {
    background: white;
    color: var(--dark-bg);
    font-weight: 600;
}

.light-theme .btn-main {
    background: #333;
    color: white;
}

.btn-main:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-3px);
}

.btn-sub {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.light-theme .btn-sub {
    border: 1px solid rgba(0, 0, 0, 0.3);
    color: #333;
}

.btn-sub:hover { background: rgba(255, 255, 255, 0.1); }
.light-theme .btn-sub:hover { background: rgba(0, 0, 0, 0.05); }

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.5em;
    animation: bounce 2s infinite;
}

.light-theme .scroll-down {
    color: #333;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
}

/* 6. About Section */
#about {
    min-height: 60vh;
    margin: 1em;
    padding: 4em 3em;
    background: linear-gradient(135deg, #292929 0%, #1a1a1a 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.5s ease;
}

.light-theme #about {
    background: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.about-container {
    display: flex;
    gap: 50px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

#about h2 { font-size: 2em; margin-bottom: 1em; }
#about h2 span { color: var(--primary-blue); }
.content p { font-size: 1.2em; }
.bio-detail { margin-top: 1em; opacity: 0.8; }

.light-theme .bio-detail {
    color: rgba(0, 0, 0, 0.7);
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2em;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
}

.light-theme .about-info {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

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

.info-item i {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: var(--primary-blue);
    background: rgba(134, 150, 240, 0.1);
    border-radius: 10px;
}

.light-theme .info-item i {
    background: rgba(155, 155, 155, 0.1);
}

.info-item h4 { font-size: 1em; color: var(--primary-blue); margin-bottom: 2px; }
.info-item p { font-size: 1.2em !important; color: white !important; line-height: 1.5; }

.light-theme .info-item p {
    color: #333 !important;
}

/* 7. Skills Section */
#skills {
    padding: 4em 2em;
    margin: 1em;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    transition: all 0.5s ease;
}

.light-theme #skills {
    background: rgba(0, 0, 0, 0.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.section-title { text-align: center; font-size: 2.5em; margin-bottom: 1.5em; }
.section-title span { color: var(--primary-blue); }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category h3 {
    margin-bottom: 25px;
    font-size: 1.4em;
    color: var(--primary-blue);
    border-left: 4px solid var(--primary-blue);
    padding-left: 15px;
}

.skill-item { margin-bottom: 20px; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 10px; font-weight: 500; }

.light-theme .skill-info {
    color: #333;
}

.progress-line {
    height: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.light-theme .progress-line {
    background: rgba(0, 0, 0, 0.1);
}

.progress-line span {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #3f3f3f, var(--primary-blue));
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.1, 0, 0.2, 1);
    will-change: width;
}

.light-theme .progress-line span {
    background: linear-gradient(90deg, #d0d0d0, var(--primary-blue));
}

/* 8. Projects Section */
#project {
    margin: 1em;
    padding: 4em 2em;
    background: linear-gradient(135deg, #292929 0%, #1a1a1a 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.5s ease;
}

.light-theme #project {
    background: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#project h2 { text-align: center; font-size: 2.8em; margin-bottom: 30px; font-weight: 400; }

.light-theme #project h2 {
    color: #333;
}

.filter-btns { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; }

.filter-btns button {
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: 0.3s ease;
}

.light-theme .filter-btns button {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-btns button.active, 
.filter-btns button:hover {
    background: #4f6cf5;
    border-color: #4f6cf5;
    box-shadow: 0 5px 15px rgba(79, 108, 245, 0.3);
    transform: translateY(-2px);
}

.light-theme .filter-btns button.active,
.light-theme .filter-btns button:hover {
    background: rgba(155, 155, 155, 0.3);
    border-color: #999;
    box-shadow: 0 5px 15px rgba(155, 155, 155, 0.2);
    color: #000;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.project-card {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: 0.4s ease;
}

.light-theme .project-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.project-card.show { display: flex; }

.project-card:hover {
    transform: translateY(-10px);
    border-color: #4f6cf5;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.light-theme .project-card:hover {
    border-color: #999;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
    height: 220px;
    background: #1e428a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.project-info h3 { font-size: 1.2em; margin-bottom: 5px; }
.project-info span { color: #cad7fd; font-size: 0.9em; opacity: 0.8; margin-bottom: 15px; display: block; }

.light-theme .project-info h3 {
    color: #333;
}

.light-theme .project-info span {
    color: #666;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(79, 108, 245, 0.2);
    border: 1px solid #4f6cf5;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85em;
    transition: 0.3s ease;
}

.light-theme .view-btn {
    background: rgba(155, 155, 155, 0.2);
    border: 1px solid #999;
    color: #333;
}

.view-btn:hover {
    background: #4f6cf5;
    box-shadow: 0 4px 12px rgba(79, 108, 245, 0.4);
}

.light-theme .view-btn:hover {
    background: rgba(155, 155, 155, 0.3);
    box-shadow: 0 4px 12px rgba(155, 155, 155, 0.2);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.card-btns {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.card-btns .view-btn { flex: 1; padding: 5px; }
.card-btns .icon-link {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 108, 245, 0.1);
    border: 1px solid #4f6cf5;
    color: white;
    border-radius: 8px;
    transition: 0.3s;
    text-decoration: none;
}

.light-theme .card-btns .icon-link {
    background: rgba(155, 155, 155, 0.1);
    border: 1px solid #999;
    color: #333;
}

/* المودال المصغر */
.modal-wrapper {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}
.modal-box {
    position: relative;
    background: #1a1a1a;
    width: 95%;
    max-width: 550px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 10;
    transition: all 0.5s ease;
}

.light-theme .modal-box {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    background: none; border: none;
    color: white; font-size: 30px;
    cursor: pointer; z-index: 15;
}

.light-theme .close-btn {
    color: #333;
}

.modal-img-holder img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.modal-txt-holder { padding: 25px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
#modal-year { color: #4f6cf5; font-weight: bold; font-size: 0.9em; }
#modal-desc { color: #ccc; font-size: 0.95em; line-height: 1.6; margin: 15px 0; }

.light-theme #modal-desc {
    color: #666;
}

/* 9. Contact Section */
#contact {
    min-height: 60vh;
    margin: 1em;
    background: var(--card-gradient);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.light-theme #contact {
    background: var(--card-gradient-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2em;
}

.contact-content h1 { font-size: 3em; text-align: center; margin-bottom: 0.2em; }
.contact-content h1 span { color: var(--primary-blue); }
.contact-content p { font-size: 1.2em; color: rgba(255, 255, 255, 0.7); text-align: center; }

.light-theme .contact-content p {
    color: rgba(0, 0, 0, 0.7);
}

.icons { display: flex; justify-content: center; gap: 25px; flex-wrap: wrap; }

.icons a {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 2em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.light-theme .icons a {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.icons a:hover {
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    rotate: 10deg;
}

.light-theme .icons a:hover {
    background: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 10. Footer Section */
footer {
    margin: 2em;
    padding: 4em 2em 1em 2em;
    background-color: var(--glass-bg);
    border-radius: 20px;
    transition: all 0.5s ease;
}

.light-theme footer {
    background-color: var(--glass-bg-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 3em;
}

.footer-logo { font-weight: 700; font-size: 1.8em; color: white; text-decoration: none; letter-spacing: 1px; }
.footer-logo span { color: var(--primary-blue); }
.footer-brand p { margin-top: 15px; color: rgba(255, 255, 255, 0.6); line-height: 1.6; font-size: 0.95em; }

.light-theme .footer-logo {
    color: #333;
}

.light-theme .footer-brand p {
    color: rgba(0, 0, 0, 0.6);
}

.footer-links h3, .footer-newsletter h3 { color: white; font-size: 1.2em; margin-bottom: 20px; font-weight: 500; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a { color: rgba(255, 255, 255, 0.6); text-decoration: none; transition: 0.3s; }
.footer-links ul li a:hover { color: var(--primary-blue); padding-left: 10px; }

.light-theme .footer-links h3,
.light-theme .footer-newsletter h3 {
    color: #333;
}

.light-theme .footer-links ul li a {
    color: rgba(0, 0, 0, 0.6);
}

.light-theme .footer-links ul li a:hover {
    color: var(--primary-blue);
}

.footer-newsletter p { color: rgba(255, 255, 255, 0.6); margin-bottom: 10px; }

.light-theme .footer-newsletter p {
    color: rgba(0, 0, 0, 0.6);
}

.footer-bottom {
    text-align: center;
    padding-top: 2em;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.4);
}

.light-theme .footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.4);
}

.footer-bottom span { color: var(--primary-blue); }

/* Custom Context Menu Style */
.custom-cm {
    position: fixed;
    width: 200px;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
    z-index: 10000;
    transform: scale(0.9);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

.light-theme .custom-cm {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.custom-cm.active {
    display: block;
    transform: scale(1);
    opacity: 1;
}

.cm-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s;
}

.light-theme .cm-item {
    color: #666;
}

.cm-item i {
    width: 20px;
    color: #4f6cf5;
}

.light-theme .cm-item i {
    color: #666;
}

.cm-item:hover {
    background: rgba(79, 108, 245, 0.2);
    color: white;
}

.light-theme .cm-item:hover {
    background: rgba(155, 155, 155, 0.2);
    color: #000;
}

.cm-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
}

.light-theme .cm-divider {
    background: rgba(0, 0, 0, 0.1);
}

.cm-item.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* مودال الـ QR Code */
.qr-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(79, 108, 245, 0.3);
    z-index: 10001;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.light-theme .qr-modal {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(155, 155, 155, 0.3);
}

.qr-modal.active {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.qr-modal img {
    border: 10px solid white;
    border-radius: 10px;
    margin-bottom: 15px;
    width: 200px;
}

.qr-modal h3 { font-size: 1.2rem; color: #4f6cf5; margin-bottom: 10px; }

.light-theme .qr-modal h3 {
    color: #666;
}
