/* Root Variables */
  :root {
      --primary-blue: #4A90E2;
      --accent-red: #2f65ef;
      --light-bg: #f9f9f9;
      --dark-gray: #333;
      --accent-blue: #007bff;
      --accent-hover-blue: #0056b3;
      --shadow-color: rgba(0, 0, 0, 0.1);
      --heading-font: "Arial", sans-serif;
      --body-font: "Verdana", sans-serif;
      --secondary-text: #555;
      --card-bg: #fff;
      --button-bg: var(--accent-blue);
      --button-text: #fff;
      --button-hover: var(--accent-hover-blue);
  }

  /* الألوان عند تفعيل الوضع الداكن */
  .dark-mode {
      --primary-bg: #1e1e1e;
      --primary-text: #f1f1f1;
      --secondary-text: #c7c7c7;
      --card-bg: #2e2e2e;
      --button-bg: #4A90E2;
      --button-text: #fff;
      --button-hover: #357ABD;
  }

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

  body {
      font-family: var(--body-font);
      font-size: 16px;
      background-color: var(--light-bg);
      color: var(--dark-gray);
      line-height: 1.8;
      transition: background-color 0.3s ease, color 0.3s ease;

  }

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

  a:hover {
      color: var(--accent-red);
      text-decoration: none !important;

  }




  /* Navigation Bar */
  nav {
      background-color: #003366;
      color: white;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 20px;
      position: sticky;
      top: 0;
      z-index: 1000;
  }

  .navbar.scrolled {
      background-color: rgba(2, 36, 69, 0.7);
      /* شفاف عند التمرير */
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      /* تأثير ظل خفيف */
      backdrop-filter: blur(5px);
      /* تأثير Blur */
  }

  nav .logo {
      font-size: 1.5rem;
      font-weight: bold;
  }

  nav ul {
      display: flex;
      list-style: none;
  }

  nav ul li {
      margin: 0 10px;
  }

  nav ul li a {
      color: white;
      font-size: 1rem;
  }

  nav ul li a:hover {
      text-decoration: underline;
  }

  #dark-mode-toggle {
      color: var(--primary-text);
      font-size: 1rem;
      cursor: pointer;
      transition: color 0.3s ease;
  }

  #dark-mode-toggle:hover {
      background-color: black;
  }

  body.dark-mode {
      background-color: #121212;
      color: #ffffff;
  }

  body.dark-mode .skills .skill span,
  body.dark-mode p {
      color: #ffffff;
  }

  body.dark-mode .progress-bar.custom-progress {
      background-color: #007bff;
  }

  /* Header Section */
  header {
      text-align: center;
      padding: 50px 20px;
      background-image: url(/img/html-css-collage-concept.jpg);
      background-size: cover;
      background-position: center center;
      color: white;
  }

  header h1 {
      font-size: 3rem;
      margin-bottom: 10px;
  }

  header p {
      font-size: 1.5rem;
  }

  header .social-icons {
      margin-top: 20px;
  }

  header .social-icons a {
      color: white;
      font-size: 1.5rem;
      margin: 0 10px;
      display: inline-block;
  }

  header .social-icons a:hover {
      color: var(--light-bg);
  }


  body.dark-mode {
      background-color: #121212;
      color: #f1f1f1;
  }

  /* Section Styling */
  .container {
      max-width: 1100px;
      margin: 20px auto;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 30px;
  }

  section {
      background: white;
      border-radius: 10px;
      padding: 20px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  section h2 {
      margin-bottom: 15px;
      font-family: var(--heading-font);
      color: var(--primary-blue);
  }

  /* About Me Section */
  .about-me {
      background-color: #f9f9f9;
      padding: 60px 20px;
      overflow: hidden;
  }

  .about-container {
      display: flex;
      flex-wrap: wrap;
      gap: 40px;
      max-width: 1100px;
      margin: 0 auto;
      align-items: center;
  }

  .about-profile {
      text-align: center;
      flex: 1;
      max-width: 300px;
      padding: 20px;
      background: #fff;
      border-radius: 10px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      background-color: var(--secondary-bg);

  }

  .about-profile img {
      width: 150px;
      height: 150px;
      border-radius: 50%;
      margin-bottom: 15px;
      object-fit: cover;
      border: 3px solid var(--btn-bg);
  }

  .about-profile h2 {
      font-size: 1.5rem;
      color: var(--primary-text);
      margin: 10px 0;
  }

  .about-profile p {
      font-size: 1rem;
      margin-bottom: 20px;
      color: var(--secondary-text);
  }

  .social-links {
      margin: 15px 0;
  }

  .social-links .social-icon {
      font-size: 1.5rem;
      margin: 0 10px;
      color: var(--btn-bg);
      transition: color 0.3s;
  }

  .social-links .social-icon:hover {
      color: var(--primary-blue);
  }

  .cta-btn {
      background: var(--primary-blue);
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 5px;
      font-size: 1rem;
      cursor: pointer;
      transition: background 0.3s;
  }

  .cta-btn:hover {
      background: var(--accent-red);
  }

  /* About Details */
  .about-details {
      flex: 2;
      text-align: left;
  }

  .about-details h3 {
      font-size: 2rem;
      color: var(--primary-blue);
      margin-bottom: 15px;
  }

  .about-details p {
      font-size: 1rem;
      color: #555;
      line-height: 1.6;
      margin-bottom: 20px;
  }

  .about-details h4 {
      font-size: 1.5rem;
      color: var(--accent-red);
      margin-bottom: 10px;
  }

  /* Custom Progress Bar Styling */
  .progress-bar.custom-progress {
      background-color: var(--primary-blue);
      /* Custom color */
      border-radius: 5px;
      color: white;
      font-size: 0.8rem;
      text-align: right;
      padding-right: 5px;
      animation: grow 2s ease-out;
  }

  /* Keyframe for custom animation */
  @keyframes grow {
      from {
          width: 0;
      }

      to {
          width: 100%;
      }
  }

  /* Skill Section Styling */
  .skills {
      margin-top: 20px;
  }

  .skill {
      margin-bottom: 15px;
  }

  .skill span {
      display: block;
      font-size: 0.9rem;
      margin-bottom: 5px;
      color: #333;
  }

  .progress {
      background-color: #e0e0e0;
      height: 20px;
      border-radius: 5px;
      overflow: hidden;
      position: relative;
  }


  /* Projects Section */

  .projects-section {
      padding: 3rem 1rem;
      text-align: center;
      background-color: #f9f9f9;
      border-radius: 10px;
      box-shadow: 0 4px 15px var(--shadow-color);
      margin: 2rem 0;
  }

  .section-title {
      font-size: 2.5rem;
      color: var(--primary-blue);
      margin-bottom: 2rem;
  }

  .projects-container {
      display: flex;
      flex-wrap: wrap;
      gap: 2rem;
      justify-content: center;
  }

  .project-card {
      width: 280px;
      border: 1px solid #ddd;
      border-radius: 10px;
      box-shadow: 0 2px 10px var(--shadow-color);
      overflow: hidden;
      transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
      background-color: var(--card-bg);
      color: var(--primary-text);
  }

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

  .project-card img {
      width: 100%;
      height: 180px;
      object-fit: cover;
  }

  .card-content {
      padding: 1rem;
      text-align: left;
  }

  .card-content h3 {
      font-family: var(--heading-font);
      font-size: 1.5rem;
      color: var(--primary-blue);
      margin-bottom: 10px;
  }

  .card-content p {
      font-size: 1rem;
      color: #555;
      margin-bottom: 1rem;
  }

  .card-content button {
      padding: 0.5rem 1rem;
      background-color: var(--accent-blue);
      color: #fff;
      border: none;
      border-radius: 5px;
      cursor: pointer;
      transition: background-color 0.3s ease;
  }

  .card-content button:hover {
      background-color: var(--accent-hover-blue);
  }

  .stats {
      display: flex;
      justify-content: center;
      gap: 2rem;
      flex-wrap: wrap;
  }

  .stat {
      text-align: center;
  }

  .stat h2 {
      font-size: 2.5rem;
      color: var(--accent-blue);
      margin-bottom: 0.5rem;
  }

  .stat p {
      font-size: 1.2rem;
      color: #555;
  }


  /* Contact Section */
  .contact form {
      display: flex;
      flex-direction: column;
      gap: 15px;
  }

  .contact input,
  .contact textarea {
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 5px;
  }

  .contact button {
      background: var(--primary-blue);
      color: white;
      padding: 10px;
      border: none;
      border-radius: 5px;
      cursor: pointer;
      transition: background 0.3s;
  }

  .contact button:hover {
      background: var(--accent-red);
  }

  .contact input,
  .contact textarea {
      background-color: var(--card-bg);
      color: var(--primary-text);
      border: 1px solid var(--secondary-text);
      transition: background-color 0.3s ease, color 0.3s ease;
  }

  .contact input::placeholder,
  .contact textarea::placeholder {
      color: var(--secondary-text);
  }

  .contact input:focus,
  .contact textarea:focus {
      border-color: var(--button-bg);
  }

  /* Media Queries */
  @media (max-width: 768px) {
      header h1 {
          font-size: 2rem;
      }

      header p {
          font-size: 1rem;
      }

      nav ul {
          flex-direction: column;
          gap: 10px;
      }

      .about-container {
          flex-direction: column;
          text-align: center;
      }

      .about-profile,
      .about-details {
          max-width: 100%;
      }

      .projects-container {
          flex-direction: column;
          gap: 30px;
      }

      .project-card {
          width: 100%;
      }
  }



/*footer*/

  /* Elegant Footer Styling */
  .elegant-footer {
      background-color: var(--light-bg);
      color: var(--dark-gray);
      padding: 1rem 0;
      text-align: center;
      border-top: 1px solid var(--shadow-color);
      font-family: var(--body-font);
      font-size: 0.85rem;
      transition: background-color 0.3s ease, color 0.3s ease;
  }

  .elegant-footer .footer-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
  }

  .elegant-footer .footer-social {
      display: flex;
      gap: 1rem;
  }

  .elegant-footer .footer-social a {
      color: var(--dark-gray);
      font-size: 1.2rem;
      transition: color 0.3s ease, transform 0.3s ease;
  }

  .elegant-footer .footer-social a:hover {
      color: var(--primary-blue);
      transform: scale(1.1);
  }

  /* Dark Mode for Elegant Footer */
  body.dark-mode .elegant-footer {
      background-color: #121212;
      color: #ffffff;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  body.dark-mode .elegant-footer .footer-social a {
      color: #ffffff;
  }

  body.dark-mode .elegant-footer .footer-social a:hover {
      color: #007bff;
  }




  .hero,
  .projects-section,
  .about-me,
  .contact {
      background-color: var(--card-bg);
      box-shadow: 0 4px 15px var(--shadow-color);
      transition: background-color 0.3s ease, box-shadow 0.3s ease;
  }