html {
    scroll-behavior: smooth;
  }
  
  body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.5s, color 0.5s;
    padding-top: 60px; /* عشان ما يحصلش تداخل مع الـ navbar */
}

.navbar {
    position: fixed; /* يخليه ثابت في المكان ده */
    top: 0; /* يخليه فوق الصفحة */
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background-color: #000;
    box-shadow: 0 0 15px aqua;
    border-radius: 30px;
    margin: 20px;
    transition: background-color 0.5s, box-shadow 0.5s;
    z-index: 1000; /* يخليه فوق العناصر التانية */
}

.left, .right {
    display: flex;
    align-items: center;
    position: absolute;
    transition: 0.5s;
}

.left {
    left: 10px;
}

.right {
    right: 10px;
}

.logo {
    color: aqua;
    font-size: 30px;
    margin: 0;
    text-decoration: none;
    transition: 0.5s;
}

@media (max-width: 768px) {
  .logo {
      font-size: 21px;
  }
}
  
@media (max-width: 480px) {
  .logo {
      font-size: 19px;
  }
}

.right button {
    background: none;
    border: none;
    color: aqua;
    font-size: 20px;
    cursor: pointer;
    margin-left: 15px;
    transition: 0.3s;
}

.links {
    display: flex;
    gap: 20px;
    margin-left: 10px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.links a {
    text-decoration: none;
    color: aqua;
    font-size: 20px;
    transition: 0.3s;
}

@media (max-width: 768px) {
  .links a {
      font-size: 16px;
  }
}

@media (max-width: 480px) {
  .links a {
      font-size: 14px;
  }
}

.links a:hover {
    color: blue;
}

.light-mode {
    background-color: white;
    color: #111;
}

.dark-mode {
    background-color: #111;
    color: white;
}

a {
    color: aqua;
}

a:hover {
    color: blue;
}
/* الوضع الفاتح */
.light-mode .navbar {
    background-color: #f0f0f0;
    box-shadow: 0 0 15px #00aaff;
}

.light-mode .links a,
.light-mode .logo,
.light-mode .right button {
    color: #0077aa;
}

/* الوضع الداكن */
.dark-mode .navbar {
    background-color: #000;
    box-shadow: 0 0 15px aqua;
}

.dark-mode .links a,
.dark-mode .logo,
.dark-mode .right button {
    color: aqua;
}
.intro {
    text-align: center;
    margin-top: 100px;
    padding: 20px;
    transition: color 0.5s, background-color 0.5s;
}

.intro h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #aaa;
}

.intro h1 {
    font-size: 48px;
    margin: 0;
    background: linear-gradient(to right, #00ff88, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.intro p {
    font-size: 20px;
    margin-top: 10px;
    color: #ccc;
}

/* Light mode adjustments */
.light-mode .intro h2 {
    color: #555;
}

.light-mode .intro h1 {
    color: #0077aa;
}

.light-mode .intro p {
    color: #444;
}
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro h2,
.intro h1,
.intro p {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.intro h2 {
    animation-delay: 0.2s;
}

.intro h1 {
    animation-delay: 0.6s;
}

.intro p {
    animation-delay: 1s;
}
.intro {
    text-align: center;
    margin-top: 80px;
    animation: fadeInUp 1s ease-in-out;
}

.typing {
    font-weight: bold;
    font-size: 20px;
    color: aqua;
}

.whoami-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: aqua;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    color: black;
    box-shadow: 0 0 10px aqua, 0 0 20px aqua, 0 0 30px aqua;
    animation: glowPulse 1.5s infinite alternate;
}

/* تأثير التوهج النابض */
@keyframes glowPulse {
  from {
    box-shadow: 0 0 10px aqua, 0 0 20px aqua, 0 0 30px aqua;
  }
  to {
    box-shadow: 0 0 20px aqua, 0 0 30px aqua, 0 0 40px aqua;
  }
}


.whoami-btn:hover {
    background-color: #00cccc;
}

.about-section {
    padding: 80px 20px;
    text-align: center;
    animation: fadeIn 1.5s ease-in-out;
}

.about-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: aqua;
}

.about-text {
    max-width: 700px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
.light-mode .about-section h2 {
    color: #0077aa;
}

.light-mode .about-text {
    color: #333;
}

.light-mode .typing {
    color: #0077aa;
}
.light-mode .whoami-btn {
    background-color: #0077aa; /* لون الخلفية */
    color: white; /* لون النص */
    border: none; /* لو عايز تشيل البوردر */
}
body {
    font-family: 'Poppins', sans-serif;
}

/* ---------- Section Titles ---------- */
.tech-title,
.about-certificates h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: aqua;
}

.projects{
    font-size: 40px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: aqua;
}

.light-mode .projects {
    color: #0077aa;
}

/* في وضع Light Mode: غير اللون إلى أزرق */
body.light-mode .tech-title,
body.light-mode .about-certificates h2
body.light-mode .projects{
    color: blue;
}

/* ---------- About Tech Section ---------- */
.about-tech {
    padding: 20px;
    text-align: center;
    margin-top: 200px;
}

.tech-container {
    border: 2px solid aqua;
    border-radius: 12px;
    padding: 20px;
    margin: 40px auto;
    max-width: 1000px;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

body.light-mode .tech-container {
    border-color: blue;
}

.tech-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

.tech-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.tech-item:hover {
    transform: scale(1.1);
}

.tech-item .tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0); /* يبدأ من الحجم الأصغر */
    margin-top: 6px;
    background-color: #333;
    color: white;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease; /* إضافة transition لـ scale */
}

.tech-item:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1); /* عندما يظهر الـ tooltip يكبر */
}


/* ---------- Certificates Section ---------- */
.about-certificates {
    padding: 20px;
    text-align: center;
    color: aqua;
    margin-top: 100px;
}

.light-mode .about-certificates,
.light-mode .about-certificates h2 {
    color: #0077aa;
}

.certificates {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 70px;
}

.certificate-item {
    position: relative;
    width: 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    margin-bottom: 200px;
}

.image-wrapper {
    width: 100%;
    height: 150px;
    border: 2px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper:hover {
    transform: scale(1.1);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tooltip {
    margin-top: 10px;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* تخلي الرسالة تظهر لما تعمل hover على الصورة */
.image-wrapper:hover + .tooltip {
    opacity: 1;
}
/* popup overlay */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    padding: 20px;
}

.popup img {
    max-width: 80vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.close-icon {
    color: white;
    font-size: 36px;
    cursor: pointer;
    position: absolute;
    top: 20px;
    left: 30px;
    z-index: 10000;
}
.section-title {
    color: blue;
    font-size: 32px;
    font-weight: bold;
    margin-top: 60px;
    text-align: center;
    transition: color 0.3s ease;
}

body.dark-mode .section-title {
    color: aqua;
}
.games-title {
    text-align: center;
    font-size: 32px;
    margin-top: 60px;
    font-weight: bold;
    color: white;
    transition: color 0.3s ease;
}

body.light-mode .games-title {
    color: black;
}

.games-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    padding: 30px;
    border: 3px solid aqua;
    border-radius: 12px;
    margin: 30px auto;
    max-width: 1200px;
    transition: border-color 0.3s ease;
}

body.light-mode .games-wrapper {
    border-color: blue;
}

.game-item {
    position: relative;
    width: 200px;
    height: 180px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.game-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.game-item:hover {
    transform: scale(1.05);
}

/* Tooltip */
.game-item .tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, bottom 0.3s ease;
}

.game-item:hover .tooltip {
    opacity: 1;
    bottom: -5px;
}
.models-title {
    font-size: 24px;
    font-weight: bold;
    margin-top: 60px;
    margin-bottom: 20px;
    text-align: center;
    color: white;
}

body.light-mode .models-title {
    color: black;
}

.about-3dmodels {
    padding: 20px;
    text-align: center;
}

.models-container {
    border: 2px solid aqua;
    border-radius: 12px;
    padding: 20px;
    margin: 40px auto;
    max-width: 1000px;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

body.light-mode .models-container {
    border-color: blue;
}

.model-item {
    position: relative;
    width: 300px;
    height: 250px;
    background-color: #222;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

model-viewer {
    width: 100%;
    height: 100%;
    background-color: transparent;
}

.model-item:hover {
    transform: scale(1.05);
}

.model-item .tooltip {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.model-item:hover .tooltip {
    opacity: 1;
}
/* ------- Contact Me Section ------- */
.contact-me-section {
    margin-top: 100px;
    padding: 40px 20px;
    text-align: center;
  }
  
  .contact-title {
    color: aqua;
    font-size: 32px;
    margin-bottom: 20px;
    transition: color 0.3s ease;
  }
  
  .light-mode .contact-title {
    color: #0077aa;
  }
  
  .contact-frame {
    border: 3px solid aqua;
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 15px;
    transition: border-color 0.3s ease;
  }
  
  .light-mode .contact-frame {
    border-color: #0077aa;
  }
  
  .contact-email {
    font-size: 20px;
    text-decoration: none;
    display: block;
    margin-bottom: 30px;
    transition: color 0.3s ease;
    color: aqua;
  }
  
  .contact-email:hover {
    color: #0077aa;
  }
  
  .light-mode .contact-email {
    color: #0077aa;
  }
  
  .light-mode .contact-email:hover {
    color: aqua;
  }
  
  .social-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
  }
  
  .icon-wrapper {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
  }
  
  .icon-wrapper img {
    width: 40px;
    height: 40px;
    filter: brightness(0) saturate(100%) invert(62%) sepia(91%) saturate(500%) hue-rotate(160deg) brightness(110%) contrast(110%);
    transition: filter 0.3s ease, transform 0.3s ease;
  }
  
  .icon-wrapper:hover img {
    transform: scale(1.2);
    filter: brightness(0) saturate(100%) invert(32%) sepia(97%) saturate(1173%) hue-rotate(180deg) brightness(95%) contrast(110%);
  }
  
  /* Light mode colors reversed */
  .light-mode .icon-wrapper img {
    filter: brightness(0) saturate(100%) invert(32%) sepia(97%) saturate(1173%) hue-rotate(180deg) brightness(95%) contrast(110%);
  }
  
  .light-mode .icon-wrapper:hover img {
    filter: brightness(0) saturate(100%) invert(62%) sepia(91%) saturate(500%) hue-rotate(160deg) brightness(110%) contrast(110%);
  }
  
  .tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(10px);
  }
  
  .icon-wrapper:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  .material-icons {
    font-size: 40px;
    color: aqua;
    transition: color 0.3s ease, transform 0.3s ease;
  }
  
  .icon-wrapper:hover .material-icons {
    transform: scale(1.2);
    color: #0077aa;
  }
  
  /* Light mode adjustments */
  .light-mode .material-icons {
    color: #0077aa;
  }
  
  .light-mode .icon-wrapper:hover .material-icons {
    color: aqua;
  }
  .social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
  }
  
  .icon-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .icon-wrapper i {
    font-size: 40px;
    color: aqua;
    transition: color 0.3s ease, transform 0.3s ease;
  }
  
  .icon-wrapper:hover i {
    transform: scale(1.2);
    color: #0077aa;
  }
  
  .light-mode .icon-wrapper i {
    color: #0077aa;
  }
  
  .light-mode .icon-wrapper:hover i {
    color: aqua;
  }
  
  /* Tooltip styling */
  .tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translate(-50%, 10px); /* دي أهم حاجة */
    background-color: #333;
    color: white;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }  
  
  .icon-wrapper:hover .tooltip {
    opacity: 1;
    transform: translate(-50%, 0); /* تحت الشعار بالظبط */
  }
  #lang-toggle {
    padding: 8px 16px;
    border: none;
    background-color: transparent;
    color: aqua;
    font-size: 32px;
    cursor: pointer;
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.3s ease;
  }

  @media (max-width: 768px) {
    #lang-toggle {
        font-size: 21px;
    }
  }
  
  @media (max-width: 480px) {
    #lang-toggle {
        font-size: 19px;
    }
  }

  /* شيل الخط تحت لو اتحول لرابط بدل زرار */
  #lang-toggle:focus,
  #lang-toggle:visited,
  #lang-toggle:hover {
    text-decoration: none;
    outline: none;
  }

  /* لايت مود */
  body.light-mode #lang-toggle {
    color: #007bff; /* أزرق */
}
:root {
    --particle-light: #00FFFF;   /* أكوا */
    --particle-dark: #007bff;    /* أزرق */
    --particle-color: var(--particle-light); /* الوضع الافتراضي */
  }
  
  /* الوضع الفاتح */
  .light-mode {
    --particle-color: var(--particle-light);
  }
  
  /* الوضع الداكن */
  .dark-mode {
    --particle-color: var(--particle-dark);
  }
  
  #particles-js {
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    background-color: transparent;
    z-index: -1;
  }
  .footer {
    position: relative;
    background: linear-gradient(to top, #007bff, #00ffff);
    color: white;
    text-align: center;
    padding: 60px 20px 20px;
    font-size: 16px;
    overflow: hidden;
  }
  
  .footer .waves {
    position: absolute;
    top: -80px;
    left: 0;
    width: 100%;
    height: 80px;
    background: transparent;
    z-index: 1;
  }
  
  .wave {
    position: absolute;
    width: 200%;
    height: 100%;
    background: url('https://raw.githubusercontent.com/Shehab-Saad-Dev/wave-svg/main/wave.png') repeat-x;
    background-size: 50% 100%;
    opacity: 0.5;
    animation: waveAnim 8s linear infinite;
  }
  
  #wave1 { z-index: 4; opacity: 1; animation-delay: 0s; }
  #wave2 { z-index: 3; opacity: 0.5; animation-delay: -2s; }
  #wave3 { z-index: 2; opacity: 0.3; animation-delay: -4s; }
  #wave4 { z-index: 1; opacity: 0.2; animation-delay: -6s; }
  
  @keyframes waveAnim {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }
/* يخلي الفيديو يغطي الشاشة */
#video-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 9999;
    overflow: hidden;
  }
  
  #video-intro video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* إخفاء المحتوى في البداية */
  .hidden {
    display: none;
  }
  
  /* مثال بسيط للtypewriter */
  .typewriter {
    font-family: monospace;
    font-size: 40px;
    color: aqua;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid aqua;
    width: 0;
    animation:
      typing 2s steps(7, end) forwards,
      blink 0.75s step-end infinite alternate;
    animation-delay: 0s; /* هتتغير بالـ JS */
  }
  
  @keyframes typing {
    from { width: 0 }
    to { width: 7ch }
  }
  
  @keyframes blink {
    50% { border-color: transparent }
  }
  .cv-button {
    position: relative;
    display: inline-block;
    margin-left: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
  }

  .cv-button:hover {
    transform: scale(1.2);
  }

  .cv-tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background-color: #222;
    color: #fff;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .cv-button:hover .cv-tooltip {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }

  .material-icons {
    font-size: 24px;
    color: white;
  }
