body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,"Segoe UI", Roboto, sans-serif;
  /* background-color: rgb(9, 3, 25); */
  background: linear-gradient(150deg, #08080e, #081f4e);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  padding-top: calc(var(--topnav-height) + var(--topnav-gap) + 10px);

}


* {
  box-sizing: border-box;
}

:root {
  --topnav-height: 70px; 
  --topnav-gap: 25px;   
}


/* pembatas */
.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  margin-bottom: 90px;
}

.section-title {
  color: white;
  margin: 0;
}

.section-divider {
  width: 90%;
  margin-top: 10px;
  margin-bottom: -10px;
}

/* STATE AWAL (sembunyi) */
.section-header,
.section-divider {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s ease;
}

/* STATE SAAT MUNCUL */
.section-header.show,
.section-divider.show {
  opacity: 1;
  transform: translateY(0);
}



/* ================= NAVIGASI ================= */

.topnav {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translate(-50%, -150%);
  width: calc(100% - 50px);
  padding: 10px 19px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.6s ease, opacity 0.6s ease;

  opacity: 0;
  z-index: 9999;
}




.topnav.scrolled {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(255, 255, 0, 0.15);
}

/* --- glass navbar --- */
.topnav {
  position: fixed;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);

  width: calc(100% - 5px); 
  max-width: 1300px;      

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 10px 25px;
  border-radius: 1px;

  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  z-index: 9999;
}



/* sembunyi / geser ke atas */
.topnav.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.topnav.hide {
  transform: translate(-50%, -150%);
  opacity: 0;
}



/* --- NAV LINK BASE --- */
.topnav a,
.dropbtn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;

  font-family: inherit;
  font-size: 17px;
  font-weight: normal;
  color: white;

  padding: 14px 16px;
  margin: 0 10px;

  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}



/* ----------------------------------------------------------------------- */

/* --- UNDERLINE ONLY --- */
.nav-menu a::after,
.dropbtn::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 70%;
  height: 3px;
  background: yellow;
  border-radius: 2px;

  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after,
.dropdown:hover .dropbtn::after,
.dropdown.active .dropbtn::after {
  transform: translateX(-50%) scaleX(1);
}

/* aniamasi menu */
.nav-menu a,
.dropbtn {
  opacity: 0;
  transform: translateY(-20px);
  transition:
    transform 0.45s cubic-bezier(.4,0,.2,1),
    opacity 0.35s ease;
}

.topnav.show .nav-menu a,
.topnav.show .dropbtn {
  opacity: 1;
  transform: translateY(0);
}

.nav-menu a:nth-child(1) { transition-delay: 0.05s; }
.nav-menu a:nth-child(2) { transition-delay: 0.12s; }
.nav-menu a:nth-child(3) { transition-delay: 0.19s; }
.nav-menu a:nth-child(4) { transition-delay: 0.26s; }

.dropdown .dropbtn {
  transition-delay: 0.33s;
}


/* ----------------------------------------------------------------------- */

/* --- NAV MENU --- */
.nav-menu {
  display: flex;
  align-items: center;
}

/* --- HAMBURGER --- */
.hamburger {
  display: none;
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
  color: yellow;

  transition: transform 0.3s ease, opacity 0.2s ease;
}

.hamburger:active {
  transform: rotate(90deg) scale(1.1);
}

/* ================= DROPDOWN ================= */
.dropdown {
  position: relative;
}

/* tombol */
.dropbtn {
  position: relative;
  background: none;
  border: none;
  color: white;
  font-size: 17px;
  cursor: pointer;
  padding: 14px 16px;
}

/* underline */
.dropbtn::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 70%;
  height: 3px;
  background: yellow;
  transition: width 0.3s ease;
  transform: translateX(-50%);
}

/* garis tetap hidup selama dropdown aktif */
.dropdown:hover .dropbtn::after,
.dropdown.active .dropbtn::after {
  width: 60%;
  
}

/* dropdown menu */
.dropdown-content {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.25s ease;
  z-index: 999;
  
}

/* tampil */
.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* item menu */
.dropdown-content a {
  display: block;
  padding: 12px 18px;
  color: white;
  text-decoration: none;
  transition: background 0.25s ease, padding-left 0.25s ease;
}



/* --- ARROW --- */
.arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid white;
}

/* --- MOBILE --- */
/* desktop */
@media (min-width: 769px) {
  .hamburger {
    transition: transform 0.3s ease;
  }

  .hamburger:active {
    transform: rotate(90deg);
  }
}

/* mobile */
@media (max-width: 768px) {
  .hamburger {
    transition: none;
  }
}


@media (max-width: 768px) {

  .hamburger {
    display: block;
    margin-right: auto;
  }


  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .nav-menu.show {
    max-height: 500px;
  }

  /* dropdown mobile */
  .dropdown-content {
    position: relative;
    box-shadow: none;
    padding-left: 20px;

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .dropdown-content.show {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}


/* <!------------------------------------------------------------------------------------------------------------> */

.project-header {
  margin-bottom: 60px;
  padding-left: 80px; 
}

.project-title {
  font-size: 34px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.project-line {
  display: block;
  width: 100px;
  height: 4px;
  background: yellow;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(255, 255, 0, 0.6);
}


.project-timeline {
  position: relative;
  padding: 30px 8% 40px 60px;
}

/* GARIS VERTIKAL */
.project-timeline::before {
  content: "";
  position: absolute;
  left: 65px; 
  top: 0;
  bottom: 40px;
  width: 3px;
  background: rgba(255, 255, 0, 0.85);
}


/* ITEM */
.project-timeline-item {
  position: relative;
  margin-bottom: 60px;
}

/* DOT */
.timeline-dot {
  position: absolute;
  left: 6px; /* 🔥 HARUS SAMA */
  top: 95px;
  width: 16px;
  height: 16px;
  background: yellow;
  border-radius: 50%;
  transform: translateX(-50%); 
  box-shadow: 0 0 0 6px rgba(255, 255, 0, 0.25);
}


/* CARD PROJECT */
.project-card {
  display: flex;
  gap: 30px;
  background: #081f4e;
  border-radius: 15px;
  padding: 25px;
  margin-left: 60px;
  box-shadow: 0 5px 10px rgba(77, 163, 255, 0.6);
  border: 2px solid rgba(58, 167, 240, 0.8) !important;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}



/* IMAGE */
.project-image {
  flex: 0 0 240px;
  height: 160px;
  border-radius: 14px;
  overflow: hidden;
  align-self: center;

}


.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}



/* CONTENT */
.project-content h2 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #fff;
}

.project-content p {
  font-size: 14px;
  line-height: 1.7;
  color: #dce3ff;
  margin-bottom: 10px;
}

.project-tech {
  font-size: 13px;
  color: yellow;
  letter-spacing: 1px;
}

/* LINK */
.project-links {
  display: flex;
  gap: 14px;
  margin-top: 14px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #081f4e;
  background: yellow;
  border-radius: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.project-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(77, 163, 255, 0.6);

}

/* SECONDARY LINK */
.project-link.secondary {
  background: transparent;
  color: yellow;
  border: 1px solid yellow;
}

.project-link.secondary:hover {
  background: yellow;
  color: #081f4e;
}

/* default semua hidden */
.project-header,
.project-line,
.project-timeline-item {
  opacity: 0;
  transform: translateY(40px); /* offset default */
  transition: all 0.6s ease;
}

/* header slide-left */
.project-header.active {
  opacity: 1;
  transform: translateX(0);
}

/* line ikut scale */
.project-header.active .project-line {
  opacity: 1;
  transform: scaleX(1);
}

/* timeline items slide-up */
.project-timeline-item.active {
  opacity: 1;
  transform: translateY(0);
}

/* fade */
/* header slide left */
.project-header {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.6s ease;
}

.project-header.active {
  opacity: 1;
  transform: translateX(0);
}

/* line ikut scale */
.project-header.active .project-line {
  opacity: 1;
  transform: scaleX(1);
  transition: all 0.6s ease;
}

/* timeline items slide up */
.project-timeline-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.project-timeline-item.active {
  opacity: 1;
  transform: translateY(0);
}


.timeline-dot {
  animation: pulseDot 1.6s infinite;
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 6px rgba(255, 255, 0, 0.25);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 255, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 0 6px rgba(255, 255, 0, 0.25);
  }
}

.project-card {
  will-change: transform;
}



/* ================= MOBILE (<= 768px) ================= */
@media (max-width: 768px) {

  /* HEADER */
  .project-header {
    padding-left: 0;
    text-align: center;
    margin-bottom: 40px;
  }

  .project-title {
    font-size: 26px;
    letter-spacing: 2px;
  }

  .project-line {
    margin: 0 auto;
    width: 80px;
  }

  /* TIMELINE */
  .project-timeline {
    padding: 20px 16px;
  }

  .project-timeline::before {
    left: 20px;
    bottom: 20px;
  }

  /* ITEM */
  .project-timeline-item {
    position: relative;
    margin-bottom: 50px;
  }

  /* DOT → CENTER VERTIKAL CARD */
  .timeline-dot {
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
  }

  /* CARD */
  .project-card {
    flex-direction: column;
    margin-left: 40px;
    gap: 18px;
    padding: 20px;
    text-align: center;
  }

  /* IMAGE */
  .project-image {
    width: 100%;
    height: 180px;
  }

  /* CONTENT */
  .project-content h2 {
    font-size: 20px;
    margin-top: -0.5px;
  }

  .project-content p {
    font-size: 14px;
  }

  .project-tech {
    font-size: 12px;
  }

  /* LINKS */
  .project-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .project-link {
    font-size: 12px;
    padding: 7px 14px;
  }
}


@media (max-width: 480px) {

  .project-title {
    font-size: 22px;
  }

  .project-card {
    margin-left: 36px;
    padding: 16px;
  }

  .project-image {
    height: 150px;
  }

}





/* ================= FOOTER ================= */

.footer {
  margin-top: 30px;
  padding: 20px 20px 20px;
  text-align: center;
  background: linear-gradient(180deg, #081f4e, #040b1f);

}

.footer-copy {
  font-size: 0.9rem;
  color: #b5c7ff;
  opacity: 0.8;
}


@media (max-width: 480px) {
  .footer-title {
    font-size: 1.6rem;
  }

  .footer-social a {
    font-size: 1.5rem;
  }
}

