/* === GLOBAL === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

/* === Background === */
#animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(-45deg, #0F2027, #203A43, #221754, #2a1a79);
  background-size: 600% 600%;
  animation: bgAnimation 5s ease infinite;
  z-index: -1;
}

@keyframes bgAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === Navigation === */
.top-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1.2rem;
}

.menu-wrapper {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.menu-btn {
  padding: 10px 22px;
  background: linear-gradient(to right, #00d2ff, #3a7bd5);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 10px rgba(0, 210, 205, 0.3);
}

.menu-btn:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 16px rgba(59, 205, 238, 0.5);
}

.menu-btn:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(0, 210, 255, 0.7);
}


/* === Header Bar === */
.project-header-bar {
  width: 80%;
  max-width: 720px;
  height: 16px;
  background: linear-gradient(to right, #00d2ff, #3a7bd5);
  border-radius: 50px;
  margin: 20px auto 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-header-bar span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #00d2ff;
  padding: 10px 40px;
  border-radius: 30px;
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
}

/* === Project Selection === */
.project-selection {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
}


.arrow {
  background: transparent;
  border: none;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  transition: transform 0.3s;
  z-index: 2;
}

.arrow:hover {
  transform: scale(1.2);
}

.project-track-container {
  width: 100%;
  overflow: hidden;
  display: flex;
  height: 330px; /* Tinggi lebih besar agar kartu tidak terpotong */
  align-items: center;
  scroll-behavior: smooth;
}

.project-card-wrapper {
  display: flex;
  gap: 1.5rem;
  padding: 0 25vw; /* ini penting agar posisi aktif bisa pas di tengah */
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  align-items: center;
}


/* === Project Card === */
.project-card {
  background: linear-gradient(to bottom, #060b24, #0f1e45);
  border-radius: 20px;
  width: 220px;
  min-width: 220px;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transform: scale(0.9);
  opacity: 0.6;
  transition: transform 0.5s ease, opacity 0.5s ease;
  flex-shrink: 0;
}

.project-card.active {
  transform: scale(1.25);  /* Lebih besar dan mencolok */
  opacity: 1;
  border: 3px solid #00d2ff;
  z-index: 2;
}

.project-card img {
  width: 100%;
  border-radius: 12px;
  height: 150px;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.project-card h3 {
  color: white;
  font-size: 1rem;
  margin: 0;
}

/* === Lihat Project Button === */
.see-button {
  text-align: center;
  margin-top: 1.5rem;
}

#seeProjectBtn {
  padding: 12px 30px;
  background: linear-gradient(to right, #00c6ff, #0072ff);
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

#seeProjectBtn:hover {
  transform: scale(1.05);
}

/* === Overlay === */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 8, 28, 0.96);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99;
  padding: 2rem;
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
  color: white;
  flex-wrap: wrap;
}

.overlay-column {
  flex: 1;
  background: #111a3a;
  padding: 1rem;
  border-radius: 10px;
  overflow-y: auto;
  max-height: 80vh;
}

.overlay-column h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.overlay-column.desc p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.overlay-column.preview {
  text-align: center;
}

.overlay-column.preview img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.close-btn {
  margin-top: 1rem;
  padding: 14px 40px;
  background: linear-gradient(to right, #00d2ff, #3a7bd5);
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.close-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
}


/* === Dokumentasi Gallery === */
.doc-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-gallery img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.doc-gallery img:hover {
  transform: scale(1.05);
}


/* === Responsive === */
@media (max-width: 768px) {
  .project-selection {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .arrow {
    display: block;
    font-size: 2rem;
    background: none;
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0 0.5rem;
  }
  
  .menu-wrapper button {
    width: 100%;
    max-width: 100px;
    font-size: 0.9rem;
    padding: 10px 10px;
  }

  .menu-btn:nth-child(1) { order: 1; } /* About me */
  .menu-btn:nth-child(2) { order: 3; } /* Project */
  .menu-btn:nth-child(3) { order: 2; } /* Home */
  .menu-btn:nth-child(4) { order: 4; } /* Contact */
  .menu-btn:nth-child(5) { order: 5; } /* Produk */

  .project-track-container {
    overflow: hidden;
    flex-grow: 1;
  }

  .project-card-wrapper {
    display: flex;
    gap: 1rem;
    transform: none !important;
    padding: 1rem 0;
    transition: transform 0.3s ease-in-out;
  }

  .project-card {
    width: 160px;
    min-width: 160px;
    transform: scale(0.9);
    opacity: 0.7;
  }

  .project-card.active {
    transform: scale(1);
    opacity: 1;
    border: 2px solid #00d2ff;
  }

  .project-card img {
    height: 100px;
  }

    .overlay {
    align-items: flex-start;
    overflow-y: auto;
    padding: 1.2rem;
  }

  .overlay-content {
    flex-direction: column;
    gap: 1.2rem;
    max-height: none;
  }
}


