@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap");

:root {
  --bg-dark: #07090e;
  --bg-card: rgba(17, 24, 39, 0.7);
  --primary: #38bdf8;
  --accent: #818cf8;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", sans-serif;
  scroll-behavior: smooth;
}
body {
  background: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- CINEMATIC PAGE TRANSITION --- */
body {
  animation: pageEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes pageEnter {
  0% {
    opacity: 0;
    filter: blur(15px);
    transform: scale(0.97);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
  }
}
body.page-exit {
  animation: pageLeave 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes pageLeave {
  0% {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
  }
  100% {
    opacity: 0;
    filter: blur(15px);
    transform: scale(1.03);
  }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: -50px;
  right: 30px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #07090e;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4);
  transition: all 0.4s ease;
  opacity: 0;
  pointer-events: none;
}
.back-to-top.show {
  bottom: 30px;
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.6);
}

/* Scroll Reveal Animasi */
.animate {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate.show {
  opacity: 1;
  transform: translateY(0);
}

/* --- NAVBAR --- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 6%;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
}
.logo h2 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}
nav ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
nav ul li a {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: 0.3s;
  position: relative;
}
nav ul li a:hover,
nav ul li a.active {
  color: var(--primary);
}
nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}
nav ul li a.active::after,
nav ul li a:hover::after {
  width: 100%;
}
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}
.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: 0.3s;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 2.5rem;
  margin-top: 4rem;
  background: rgba(11, 15, 25, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  font-weight: 500;
  color: var(--text-muted);
}

@media screen and (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 75%;
    background: #0b0f19;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
    transition: 0.4s;
  }
  nav ul.slide {
    right: 0;
  }
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}
