:root {

  --circle-size: 2rem;
  --gap: 6rem;
  --line-width: 0.15rem;

  /* dark mode color*/
  --color-bg-gradient-start: #25124d;
  --color-bg-gradient-end: #22174a;
  --color-section-bg: #1f143c;
  --color-text: #e6e0ff;
  --color-icon: #c7b3ff;
  --color-line: rgba(200, 180, 255, 0.4);
  --color-circle: #9a5fff;
  --color-circle-active: #c6a3ff;
  --color-card: #9a5fff4b;


  /* Project specific colors for dark mode (UPDATED TO CYAN) */
  --project-card-bg: rgba(255, 255, 255, 0.05);
  --project-card-border: rgba(198, 163, 255, 0.25);
  --project-title-color: #CDA8FF;
  --project-button-bg: #B784FF;
  --project-button-text: #ffffff;
}




html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 200vh;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: var(--color-text);
  background: linear-gradient(135deg, var(--color-bg-gradient-start), var(--color-bg-gradient-end));
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Arvo", serif;
  font-weight: 800;
  font-style: normal;
}

section {
  background: var(--color-section-bg);
  border-radius: 1rem;
  padding: 1rem;
  margin: 2rem auto;
  width: 80%;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

section:hover {
  box-shadow: 0 0.8rem 2rem rgba(127, 63, 242, 0.3);
}



/* ------------------------------------ main menu ------------------------ */
.main-menu {
  width: 12%;
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap);
  z-index: 999;
}

.menu-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.menu-track::before {
  content: "";
  position: absolute;
  left: calc(var(--circle-size) / 2);
  top: calc(var(--circle-size) / 2);
  bottom: calc(var(--circle-size) / 2);
  width: var(--line-width);
  background: var(--color-line);
  transform: translateX(-50%);
  z-index: 0;
}

.circle-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  z-index: 9999;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--color-text);
  position: relative;
  z-index: 3;
}

.circle-button {
  width: var(--circle-size);
  height: var(--circle-size);
  border-radius: 50%;
  background: var(--color-circle);
  box-shadow: inset hsla(0, 0%, 0%, 0.4) 0 0 0 0.0625rem,
    0 0.3rem 0.6rem rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, background-color 0.25s ease;
  z-index: 4;
}

.clickedButton {
  background: var(--color-circle-active);
  transform: scale(1.3);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
}

.label {
  color: var(--color-text);
  position: relative;
  z-index: 4;
}

.main-menu,
.main-menu * {
  box-sizing: border-box;
}

/* ------------------------------------ content ------------------------ */

.content {
  width: 88%;
  margin-right: 10%;
}

/* ------------------------------------ section  ------------------------ */
/* ------------------------------------ intro section ------------------------ */

#intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
  height: 70vh;
  background: var(--color-section-bg);
  overflow: hidden;
}

.intro-label {
  color: var(--color-text);
  z-index: 2;
}


.intro-icon {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.float-icon {
  position: absolute;
  font-size: 3.5rem;
  opacity: 0.8;
  animation: floatAnim 6s ease-in-out infinite;
  color: var(--color-text);
}


.float-icon:nth-child(1) {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.float-icon:nth-child(2) {
  top: 30%;
  left: 70%;
  animation-delay: .7s;
}

.float-icon:nth-child(3) {
  top: 66%;
  left: 15%;
  animation-delay: 1.4s;
}

.float-icon:nth-child(4) {
  top: 80%;
  left: 10%;
  animation-delay: 2.1s;
}

.float-icon:nth-child(5) {
  top: 80%;
  left: 80%;
  animation-delay: 2.8s;
}

.float-icon:nth-child(6) {
  top: 75%;
  left: 40%;
  animation-delay: 3.5s;
}

.float-icon:nth-child(7) {
  top: 12%;
  left: 55%;
  animation-delay: 4.2s;
}

.float-icon:nth-child(8) {
  top: 65%;
  left: 70%;
  animation-delay: 4.9s;
}

.float-icon:nth-child(9) {
  top: 40%;
  left: 5%;
  animation-delay: 5.6s;
}

.float-icon:nth-child(10) {
  top: 78%;
  left: 10%;
  animation-delay: 6.3s;
}

.float-icon:nth-child(11) {
  top: 5%;
  left: 85%;
  animation-delay: 7s;
}


@keyframes floatAnim {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(12px, -18px) rotate(5deg);
  }

  50% {
    transform: translate(-10px, 15px) rotate(-4deg);
  }

  75% {
    transform: translate(8px, -10px) rotate(3deg);
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* ------------------------about me-------------- */
#about_me p {
  color: var(--color-text);
  font-size: 1.2rem;

}

#about_me img {
  display: inline;
  max-width: 60%;
  border-radius: 15%;
  height: auto;
  overflow: hidden;
  float: right;
}

/* ------------------------ my_skills -------------- */


/* .skill-cards-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
} */

section h1 {
  color: var(--color-text) !important;
}

#my_skills .row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.skill-card {
  flex: 1 1 220px;
  box-sizing: border-box;
  margin: 0.5rem;
  background: var(--color-card) !important;
  border-radius: 1rem !important;
  padding: 1.2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);

  color: var(--color-text);
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.15);
  transition: 0.3s ease;
}


.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.8rem 1.7rem rgba(0, 0, 0, 0.25),
    0 0 12px var(--color-circle-active);
}

.skill-card.technical i {
  color: #ffd75e;
}

.skill-card.design i {
  color: #6ef3ff;
}

.skill-card.soft i {
  color: #bfff92;
}

.skill-card.language i {
  color: #ff9ddf;
}

.skill-card i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-icon);
}

.skill-card h3 {
  margin: 0.5rem 0 1rem;
  font-size: 1.2rem;
  color: var(--color-text);
}


.progress {
  height: 0.6rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  overflow: hidden;
}

.skill-card.advanced .progress-bar {
  width: 90%;
  /*  */
  background: var(--color-circle) !important;
}

.skill-card.intermediate .progress-bar {
  width: 60%;
  /*  */
  background: var(--color-circle) !important;
}

/* .progress-bar {
  width: 70%; 
  background: var(--color-circle) !important;
  
} */



/* ------------------------ my_projects -------------- */


.projects-title {
  text-align: center;
  margin-bottom: 3rem;
}

/* ===== Carousel Layout ===== */

#projectCarousel {
  position: relative;
}

#projectCarousel .carousel-inner {

  gap: 1.5rem;
  overflow: hidden;
  scroll-behavior: smooth;
}

/* #projectCarousel .carousel-item {
  flex: 0 0 calc(100% / 3);
} */

/* ===== Card ===== */

.project-card {
  background: var(--project-card-bg);
  border-radius: 1.2rem;
  padding: 1.2rem;
  text-align: center;
  transition: 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 20px rgba(154, 95, 255, 0.35);
}

.project-card img {
  width: 100%;
  height: 30rem;
  object-fit: contain;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.project-card h3 {
  margin-bottom: 0.5rem;
  color: var(--project-title-color);
}

.project-card p {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 1rem;
  color: var(--color-text);

}

.project-card a {
  display: inline-block;
  padding: 0.5rem 1.4rem;
  border-radius: 2rem;
  background: var(--project-button-bg);
  color: var(--project-button-text);
  text-decoration: none;
  font-weight: 600;
}

/* ===== Controls ===== */

.carousel-control-prev,
.carousel-control-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-circle-active);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.carousel-control-prev {
  left: -1.5rem;
}

.carousel-control-next {
  right: -1.5rem;
}

/* --------gallery-------- */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg,
      var(--color-bg-gradient-start),
      var(--color-bg-gradient-end));
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Analys & Deshin System MyBook */
.gallery-content {
  background: var(--color-section-bg);
  padding: 2rem;
  border-radius: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 85%;
  border: 1px solid var(--project-card-border);
  box-shadow: 0 0 30px rgba(154, 95, 255, 0.35);
}


.gallery-content img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 1rem;
  background: var(--color-card);
}


.close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--color-circle);
  color: var(--color-text);
  font-size: 2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s ease;
}

.close-btn:hover {
  background: var(--color-circle-active);
  transform: scale(1.1);
}

/* ===== Contact ===== */
#contact_me {
  padding: 60px 0;
}

.contact-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-text);
}

.contact-info h3 {
  color: var(--color-circle-active);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--color-text);
  opacity: 0.9;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-item i {
  font-size: 1.8rem;
  color: var(--color-circle);
}

.contact-item h5 {
  margin: 0;
  color: var(--color-text);
}

.contact-item a {
  color: var(--color-text);
  opacity: 0.85;
  text-decoration: none;
}

.contact-item a:hover {
  opacity: 1;
  color: var(--color-circle-active);
}

.contact-card {
  background-color: var(--project-card-bg);
  border-radius: 1.2rem;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.contact-card label {
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.contact-card .form-control {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--project-card-border);
  color: var(--color-text);
}

.contact-card .form-control::placeholder {
  color: rgba(230, 224, 255, 0.6);
}

.contact-card .form-control:focus {
  border-color: var(--color-circle);
  box-shadow: none;
  background-color: rgba(255, 255, 255, 0.08);
}

.contact-card .btn-primary {
  background-color: var(--project-button-bg);
  border: none;
  font-weight: 600;
}

.contact-card .btn-primary:hover {
  filter: brightness(1.1);
}


/* ===== Responsive ===== */

@media (max-width: 992px) {
  #projectCarousel .carousel-item {
    flex: 0 0 50%;
  }
}

@media (max-width: 576px) {
  #projectCarousel .carousel-item {
    flex: 0 0 100%;
  }

  .content {
    /* height: 50%; */
    width: auto;
  }

  .main-menu {
    padding: 1rem 1rem 0;
   
    top: 97%;
    right: 0;
    width: 100%;
    height: 10rem;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    
    background-color: var(--color-bg-gradient-start);
 
  
  }

  .menu-track {
    flex-direction: row;
    gap: 2rem;
    position: relative;
    min-width: max-content;
    /* important for scroll */
  }

  .menu-track::before {
    /* top: calc(var(--circle-size) / 2);
    left: calc(var(--circle-size) / 2);
    width: calc(100% - var(--circle-size));
    height: var(--line-width);
    transform: translateY(-50%); */

  content: "";
  position: absolute;
  left: 0; /* بداية من أول دائرة */
  top: calc(var(--circle-size)/2); 
  width: calc(100% - var(--circle-size)); /* ينتهي عند آخر دائرة */
  height: var(--line-width);
  background: var(--color-line);
  transform: translateY(-50%);
  z-index: 0;

  
  }

  .circle-wrapper {
    display: inline-flex;
  }

  .menu-item {
    flex-direction: column;
    align-items: center;
  }


}