@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap");
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: 'Poppins', serif;
    transition: background-color 0.3s, color 0.3s;
}

/* Light Theme */
body.light-theme {
    background-color: #f5f7fa;
    color: #2d3748;
}
body.light-theme .project-card {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
body.light-theme .project-overlay {
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
}

body.light-theme .project-overlay h3,
body.light-theme .project-overlay p {
    color: #2d3748;
    text-shadow: none;
}

body.light-theme .project-btn {
    background: rgba(0, 173, 181, 0.9);
    color: white;
}

body.light-theme .project-btn:hover {
    background: #00adb5;
}

body.light-theme .works {
    background: linear-gradient(135deg, #f5f7fa 0%, #e2e8f0 100%);
}

body.light-theme .title,
body.light-theme .AboutTitle {
    color: #00adb5;
    text-shadow: 0 0 10px rgba(0, 173, 181, 0.3);
}

body.light-theme .hireMe {
    background: #00adb5;
    color: white;
}

body.light-theme .cv {
    background: rgba(226, 232, 240, 0.9);
    color: #2d3748;
}

body.light-theme .modal-content {
    background: white;
    color: #2d3748;
}

body.light-theme .close-modal {
    color: #2d3748;
}

body.light-theme .close-modal:hover {
    color: #00adb5;
}
body.light-theme .navigation a,
body.light-theme .name,
body.light-theme .AboutName,
body.light-theme .Contact h3,
body.light-theme .Contact a,
body.light-theme footer p {
    color: #333;
}

body.light-theme .cv {
    background-color: rgba(206, 212, 218, 0.75);
    color: #333;
}

body.light-theme .works li {
    background-color: rgba(206, 212, 218, 0.5);
}

/* Dark Theme (Default) */
body {
    background-color: #222831;
    font-family: 'Tajawal', sans-serif;
}

body.dark-theme .navigation a,
body.dark-theme .name,
body.dark-theme .AboutName,
body.dark-theme .Contact h3,
body.dark-theme .Contact a,
body.dark-theme footer p {
    color: #eeeeee;
}

body.dark-theme .cv {
    background-color: rgba(57, 62, 70, 0.75);
    color: #eeeeee;
}

body.dark-theme .works li {
    background-color: rgba(57, 62, 70, 0.5);
}

/* RTL Support for Arabic */
body.rtl {
    direction: rtl;
}

/* Controls */
.controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.control-btn {
    background: rgba(57, 62, 70, 0.5);
    border: none;
    color: #eeeeee;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.control-btn:hover {
    transform: scale(1.1);
}

body.light-theme .control-btn {
    background: rgba(206, 212, 218, 0.5);
    color: #333;
}

/* Rest of your existing CSS remains the same */
/* ========== Enhanced Navbar with Theme Support ========== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(34, 40, 49, 0.95);
    width: 100%;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

body.light-theme header {
    background-color: rgba(248, 249, 250, 0.95);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-link {
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

.logo-link:hover {
    transform: scale(1.05) rotate(-5deg);
}

.logo {
    height: 50px;
    transition: all 0.3s;
}

.navigation ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-right: 2rem;
}

.navigation a {
    position: relative;
    color: #eeeeee;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

body.light-theme .navigation a {
    color: #333;
}

.navigation a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #00adb5;
    transition: width 0.3s ease;
}

.navigation a:hover::before {
    width: 100%;
}

.navigation a:hover {
    color: #00adb5;
    transform: translateY(-3px);
}

/* Controls Styling */
.controls {
    display: flex;
    gap: 0.8rem;
    margin-left: 1rem;
}

.control-btn {
    background: rgba(57, 62, 70, 0.5);
    border: none;
    color: #eeeeee;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

body.light-theme .control-btn {
    background: rgba(206, 212, 218, 0.5);
    color: #333;
}

.control-btn:hover {
    transform: scale(1.1);
}

/* RTL Support */
body.rtl .nav-controls {
    flex-direction: row-reverse;
}

body.rtl .controls {
    margin-left: 0;
    margin-right: 1rem;
}

body.rtl .navigation a::before {
    left: auto;
    right: 0;
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: #eeeeee;
    margin: 5px 0;
    transition: all 0.3s ease;
}

body.light-theme .hamburger span {
    background: #333;
}

/* Active States */
.navigation.active {
    transform: translateX(0) !important;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Scroll Effect */
header.scrolled {
    padding: 1rem 5%;
    background-color: rgba(34, 40, 49, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

body.light-theme header.scrolled {
    background-color: rgba(248, 249, 250, 0.98);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-controls {
        gap: 1rem;
    }
    
    .navigation ul {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .nav-controls {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 30px;
        height: 100vh;
        background: rgba(34, 40, 49, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        transition: transform 0.5s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }
    
    body.light-theme .nav-controls {
        background: rgba(248, 249, 250, 0.98);
    }
    
    body.rtl .nav-controls {
        right: auto;
        left: -100%;
    }
    
    .nav-controls.active {
        transform: translateX(-100%);
    }
    
    body.rtl .nav-controls.active {
        transform: translateX(100%);
    }
    
    .navigation {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .navigation ul {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .navigation a {
        font-size: 1.3rem;
        padding: 0.8rem 1.5rem;
        display: block;
    }
    
    .controls {
        margin: 2rem auto 0;
        justify-content: center;
    }
    
    body.rtl .controls {
        margin-right: auto;
    }
}
hr{
    opacity: 10%;
}
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 5rem auto;
    max-width: 1200px;
}
.arrow {
    position: absolute;
    transform: translateX(-5.5rem) translateY(1.5rem);
}
.heroSub {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.name {
    font-size: 3rem;
    color: #eeeeee;
}
.title {
    font-size: 4rem;
    color: #00adb5;
}
.herobuttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.hireMe {
    background-color: #00adb5;
    color: #eeeeee;
    border-radius: 24px;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.5);
}
.cv {
    background-color: rgba(57, 62, 70, 0.75);
    color: #eeeeee;
    border-radius: 24px;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(4px);
}
.AboutMe {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 5rem auto;
    max-width: 1200px;
    gap: 10rem;
}
.textContainer {
    display: flex;
    flex-direction: column;
}
.textTitle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 2rem;
}
.AboutName {
    color: #eeeeee;
}
.AboutTitle {
    color: #00adb5;
}
.aboutMePar {
    text-align: justify;
    color: rgba(238, 238, 238, 0.75);
}
body.light-theme .aboutMePar {
    color: rgba(51, 51, 51, 0.75);
}
.works {
    background-image: url(svg/background.svg);
    padding: 10rem 10rem;
    margin: 5rem 0rem;
}
.worksContainer {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: left;
    margin: 5rem auto;
    max-width: 1200px;
}
.projectTitle {
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 5px;
    font-size: 2rem;
}
.works ul {
    display: flex;
    list-style-type: none;
    gap: 15px;
    list-style-type: none;
    align-items: center;
    justify-content: space-between;
}
.works li {
    border-radius: 16px;
    background-color: rgba(57, 62, 70, 0.5);
    backdrop-filter: blur(4px);
    padding: 1rem 4rem;
}
.works li img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    transition: transform 0.2s;
}
.works li img:hover {
    transform: scale(1.3);
}
.ContactContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}
.ContactTitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 2rem;
}
.Contact {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5rem;
    gap: 20rem;
}
.Contact h3 , .Contact a {
    color: #eeeeee;
    text-decoration: none;
}
.EmailAndPhone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.socialmedia {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}
.socialmedia a {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50 px;
    background-color: rgba(57, 62, 70, 0.5);
    backdrop-filter: blur(4px);
    padding: 1rem;
}
.socialmedia img {
    width: 24px;
    height: 24px;
}

.JK {
    text-decoration: none;
    background-color: #00adb5; 
    color: white; 
    font-size: 16px; 
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1.5rem; 
    border: none; 
    border-radius: 24px; 
    cursor: pointer; 
    transition: background-color 0.3s ease; 
    margin-top: 10px; 
    transition: transform 0.2s;
}

.JK:hover {
    background-color: #005f87; 
    transform: scale(1.1);
}

footer {
    text-align: center; 
    padding: 20px 0; 
    color: white; 
}

@media (max-width: 1023px) {
    header {
      margin-left: 1rem;
      margin-right: 1rem;
    }
    .hero {
      flex-direction: column;
      align-items: center;
      gap: 2rem;
    }
    .heroImg {
      width: 400px;
    }
    .name,
    .title {
      font-size: 2rem;
    }
    .arrow {
      display: none;
    }
    .AboutMe {
      flex-direction: column-reverse;
      align-items: center;
      gap: 2rem;
    }
    .textContainer {
      align-items: center;
      margin: 0rem 5rem;
      gap: 1rem;
    }
    .AboutName,
    .AboutTitle {
      font-size: 2rem;
    }
    .light {
      width: 60px;
    }
    .AboutMeImg {
      width: 400px;
    }
    .works {
      padding: 0;
    }
    .worksContainer {
      padding: 5rem 0rem;
      gap: 3rem;
    }
    .projectTitle {
      margin-left: 1rem;
    }
    .works ul {
      flex-direction: column;
      gap: 1rem;
    }
    .ContactContainer {
      margin: 10rem 5rem;
      gap: 2rem;
    }
    .Contact {
      flex-direction: column;
      gap: 1rem;
      margin-right: 0;
    }
    .controls {
        top: 10px;
        right: 10px;
    }
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Apply Animations */
header {
    animation: fadeIn 1s ease-out;
}

.heroSub {
    animation: slideInLeft 1s ease-out;
}

.heroImg {
    animation: slideInRight 1s ease-out;
}

.AboutMeImg {
    animation: slideInLeft 1s ease-out;
}

.textContainer {
    animation: slideInRight 1s ease-out;
}

.works li {
    animation: fadeIn 1s ease-out;
    animation-fill-mode: both;
}

.works li:nth-child(1) { animation-delay: 0.2s; }
.works li:nth-child(2) { animation-delay: 0.4s; }
.works li:nth-child(3) { animation-delay: 0.6s; }
.works li:nth-child(4) { animation-delay: 0.8s; }

.JK {
    animation: pulse 2s infinite;
}

/* Hover Effects */
.navigation a:hover {
    transform: translateY(-3px);
    transition: all 0.3s;
}

.works li:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 320px;
    perspective: 1000px;
    transform-style: preserve-3d;
    background: var(--dark);
}
.project-card::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 173, 181, 0.7) 0%, rgba(108, 99, 255, 0.7) 100%);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1;
}
.project-card:hover::before {
    opacity: 1;
}
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
    transform: translateY(20px);
}
.project-card:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
}
.project-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.project-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}
.project-buttons {
    display: flex;
    gap: 1rem;
}

.project-btn {
    padding: 0.7rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: #222831;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.project-btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.project-btn i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.project-card {
    animation: cardEntrance 0.8s ease-out;
    animation-fill-mode: both;
}
.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; }

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 3;
    backdrop-filter: blur(5px);
}
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #222831;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 16px;
    max-width: 600px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.close-modal:hover {
    color: #00adb5;
}
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff9a9e 0%, #fad0c4 100%);
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 
      0 0 15px #ff9a9e, /* إضاءة وردية */
      0 0 30px rgba(255, 154, 158, 0.5);
    transition: all 0.5s ease-out;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8) rotate(20deg);
  }
  
  #backToTopBtn.show {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    animation: float 3s ease-in-out infinite; /* طفو خفيف */
  }
  
  @keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
  }
  
  #backToTopBtn:hover {
    background: linear-gradient(145deg, #a18cd1 0%, #fbc2eb 100%);
    box-shadow: 
      0 0 20px #a18cd1, 
      0 0 40px rgba(251, 194, 235, 0.7);
    transform: scale(1.1) !important;
  }
  #backToTopBtn:active {
    transform: scale(0.95); /* تأثير الضغط */
  }

/* Enhanced Header */
header {
    padding: 1rem 2rem;
    background-color: rgba(34, 40, 49, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Enhanced Hero Section */
.hero {
    min-height: 90vh;
}

.heroSub {
    max-width: 600px;
}

/* Glowing Effect for Titles */
.title, .AboutTitle {
    text-shadow: 0 0 10px rgba(0, 173, 181, 0.5);
}

/* Gradient Background for Works Section */
.works {
    background: linear-gradient(135deg, #222831 0%, #393e46 100%);
}

/* Smooth Transitions */
a, button, .project-card, .works li {
    transition: all 0.3s ease;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .heroSub, .textContainer {
        align-items: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
  }
  .bounce {
    animation: bounce 1.5s infinite;
  }
  
  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
  }
  #backToTopBtn {
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.3));
  }
  .card, .navbar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
  }
  
  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  }
  .neon-text {
    color: #fff;
    text-shadow: 
      0 0 5px #fff,
      0 0 10px #fff,
      0 0 20px #6e48aa,
      0 0 30px #6e48aa;
    animation: flicker 1.5s infinite alternate;
  }
  
  @keyframes flicker {
    0%, 19%, 21%, 23%, 25%, 100% { opacity: 1; }
    20%, 24% { opacity: 0.8; }
  }
  .btn-magic {
    background: #000;
    color: #fff;
    position: relative;
    overflow: hidden;
  }
  
  .btn-magic::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
  }
  
  @keyframes shine {
    0% { left: -100%; }
    20%, 100% { left: 100%; }
  }
  .card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 12px;
    overflow: hidden;
  }
  
  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  }
  .fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
  }
  
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }

.separator {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.separator {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@media (max-width: 768px) {
    .controls {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .nav-controls {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* تحسين تخطيط الـ Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

/* تعديل عناصر التحكم */
.controls {
    display: flex;
    gap: 10px;
    margin-left: auto; /* تدفع الأزرار لليمين */
}

/* للهواتف */
@media (max-width: 768px) {
    .nav-controls {
        position: fixed;
        right: -100%;
        top: 0;
        width: 80%;
        height: 100vh;
        padding-top: 80px;
        transition: transform 0.5s;
    }
    
    .nav-controls.active {
        transform: translateX(-100%);
    }
    
    .controls {
        margin: 1rem auto 0;
        justify-content: center;
    }
}
















/* تأثيرات جامدة فشخ */
:root {
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-purple: #9d00ff;
    --matrix-green: #00ff41;
  }
  
  /* Particle.js Background */
  #particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
  }
  
  /* Glitch Effect */
  .glitch-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      45deg,
      var(--neon-blue) 0%,
      transparent 50%,
      var(--neon-pink) 100%
    );
    opacity: 0.05;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
    animation: glitch 5s infinite alternate;
  }
  
  @keyframes glitch {
    0% { opacity: 0.03; filter: hue-rotate(0deg); }
    20% { opacity: 0.05; transform: skew(0.5deg); }
    40% { opacity: 0.07; filter: hue-rotate(10deg); }
    60% { opacity: 0.04; transform: skew(-0.5deg); }
    80% { opacity: 0.06; filter: hue-rotate(-5deg); }
    100% { opacity: 0.03; filter: hue-rotate(0deg); }
  }
  
  /* تأثيرات النيون للعناوين */
  .title, .AboutTitle {
    position: relative;
    text-shadow: 
      0 0 5px var(--neon-blue),
      0 0 10px var(--neon-blue),
      0 0 20px var(--neon-blue),
      0 0 40px var(--neon-purple);
    animation: neon-flicker 2s infinite alternate;
  }
  
  @keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
      text-shadow:
        0 0 5px var(--neon-blue),
        0 0 10px var(--neon-blue),
        0 0 20px var(--neon-blue),
        0 0 40px var(--neon-purple);
    }
    20%, 24%, 55% {        
      text-shadow: none;
    }
  }
  
  /* تأثيرات الأزرار الجامدة */
  .hireMe, .cv, .project-btn, .JK {
    position: relative;
    overflow: hidden;
    border: none;
    transition: all 0.4s;
    box-shadow: 
      0 0 10px var(--neon-blue),
      0 0 20px rgba(0, 173, 181, 0.3);
  }
  
  .hireMe:hover, .cv:hover, .project-btn:hover, .JK:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
      0 0 15px var(--neon-blue),
      0 0 30px var(--neon-purple),
      0 5px 15px rgba(0, 0, 0, 0.3);
  }
  
  .hireMe::after, .cv::after, .project-btn::after, .JK::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
      to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.8) 50%,
      rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: shine 3s infinite;
  }
  
  @keyframes shine {
    0% { left: -60%; }
    100% { left: 140%; }
  }
  
  .project-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 243, 255, 0.2);
  }
  .project-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 
      0 20px 40px rgba(0, 0, 0, 0.3),
      0 0 30px var(--neon-purple),
      0 0 60px var(--neon-blue);
  }
  body {
    cursor: url('custom-cursor.png'), auto;
  }
  a, button {
    cursor: url('custom-cursor-pointer.png'), pointer;
  }
  .matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
  }
  /* تأكد من وجود هذه المتغيرات في :root */
:root {
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-purple: #9d00ff;
    --matrix-green: #00ff41;
    --dark-bg: #222831;
    --light-bg: #f5f7fa;
    --dark-text: #eeeeee;
    --light-text: #2d3748;
  }
  
  /* تعديل تأثيرات الجليتش لثيم الضوء */
  body.light-theme .glitch-effect {
    background: linear-gradient(
      45deg,
      rgba(0, 173, 181, 0.1) 0%,
      transparent 50%,
      rgba(108, 99, 255, 0.1) 100%
    );
    mix-blend-mode: multiply;
  }
  
  /* تعديل تأثيرات النيون لثيم الضوء */
  body.light-theme .title,
  body.light-theme .AboutTitle {
    text-shadow: 
      0 0 5px rgba(0, 173, 181, 0.5),
      0 0 10px rgba(0, 173, 181, 0.4),
      0 0 20px rgba(0, 173, 181, 0.3);
    color: #00adb5;
  }
  
  /* تعديل الأزرار لثيم الضوء */
  body.light-theme .hireMe,
  body.light-theme .cv,
  body.light-theme .project-btn,
  body.light-theme .JK {
    box-shadow: 
      0 0 10px rgba(0, 173, 181, 0.3),
      0 0 20px rgba(0, 173, 181, 0.1);
  }
  
  body.light-theme .hireMe:hover,
  body.light-theme .cv:hover,
  body.light-theme .project-btn:hover,
  body.light-theme .JK:hover {
    box-shadow: 
      0 0 15px rgba(0, 173, 181, 0.4),
      0 0 30px rgba(108, 99, 255, 0.2),
      0 5px 15px rgba(0, 0, 0, 0.1);
  }
  
  /* تعديل الكروت لثيم الضوء */
  body.light-theme .project-card {
    border: 1px solid rgba(0, 173, 181, 0.2);
  }
  
  body.light-theme .project-card:hover {
    box-shadow: 
      0 20px 40px rgba(0, 0, 0, 0.1),
      0 0 30px rgba(0, 173, 181, 0.2),
      0 0 60px rgba(108, 99, 255, 0.1);
  }
  
  /* تعديل خلفية الجسيمات لثيم الضوء */
  body.light-theme #particles-js {
    background: radial-gradient(ellipse at bottom, #E4E7EB 0%, #C3C6CB 100%);
  }
  
  /* تعديل تأثير الشاين (اللمعة) لثيم الضوء */
  body.light-theme .hireMe::after,
  body.light-theme .cv::after,
  body.light-theme .project-btn::after,
  body.light-theme .JK::after {
    background: linear-gradient(
      to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.6) 50%,
      rgba(255, 255, 255, 0) 100%
    );
  }
/* Mobile Nav Container */
.mobile-nav-container {
    position: relative;
    display: none;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-content {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #222831;
    z-index: 999;
    padding: 80px 20px 20px;
    transition: all 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    overflow-y: auto;
}

body.light-theme .mobile-nav-content {
    background: #f5f7fa;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    width: 30px;
    height: 25px;
    position: relative;
    z-index: 1000;
    cursor: pointer;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #eeeeee;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all 0.3s ease;
}

body.light-theme .hamburger span {
    background: #333;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2),
.hamburger span:nth-child(3) {
    top: 10px;
}

.hamburger span:nth-child(4) {
    top: 20px;
}

.hamburger.active span:nth-child(1) {
    top: 10px;
    width: 0%;
    left: 50%;
}

.hamburger.active span:nth-child(2) {
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
}

.hamburger.active span:nth-child(4) {
    top: 10px;
    width: 0%;
    left: 50%;
}

/* Mobile Navigation */
.mobile-nav-content .navigation ul {
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.mobile-nav-content .navigation a {
    font-size: 1.2rem;
    padding: 0.8rem 1rem;
    display: block;
    border-radius: 8px;
    transition: all 0.3s;
}

.mobile-nav-content .navigation a:hover {
    background: rgba(0, 173, 181, 0.2);
    transform: translateX(5px);
}

.mobile-controls {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Active States */
.mobile-nav-container.active .mobile-nav-overlay {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-container.active .mobile-nav-content {
    right: 0;
}

/* RTL Support */
body.rtl .mobile-nav-content {
    right: auto;
    left: -100%;
}

body.rtl .mobile-nav-container.active .mobile-nav-content {
    right: auto;
    left: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-nav-container {
        display: block;
    }
    
    .hamburger {
        display: inline-block;
    }
    
    .nav-controls {
        display: none;
    }
    
    header {
        padding: 1rem;
    }
    
    .logo {
        height: 40px;
    }
}
