/* Apple-Style CSS — style.css */

:root {
  --bg-light: #ffffff;
  --bg-dark: #1d1d1f;
  --text-light: #000000;
  --text-dark: #f5f5f7;
  --accent: #0071e3;
  --transition: 0.4s ease-in-out;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background-color var(--transition), color var(--transition);
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

.nav {
  position: relative;
  top: 0;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(10px);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 1.25rem;
  z-index: 1100;
  transition: var(--transition);
}

body.dark .nav {
  background-color: rgba(29, 29, 31, 0.8);
}

.nav.scrolled {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* === NAVIGATION === */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  position: relative;
  top: 0;
  z-index: 999;
}


/* Desktop Menu */
.nav-menu.desktop {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu.desktop a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  position: relative;
}

.nav-menu.desktop a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent, #0071e3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-menu.desktop a:hover::after {
  opacity: 1;
}

/* Hamburger Toggle */
/* Tombol hamburger tetap muncul & selalu di atas menu */
.nav-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: none;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  /* HARUS di atas .mobile-menu-overlay */
  cursor: pointer;
}

.icon-line {
  display: block;
  position: absolute;
  left: 0;
  height: 3px;
  width: 100%;
  background: #333;
  border-radius: 2px;
  transition: 0.3s ease;
  pointer-events: none;
}

.icon-line.top {
  top: 6px;
}

.icon-line.middle {
  top: 14px;
}

.icon-line.bottom {
  top: 22px;
}

.nav-toggle.active .top {
  transform: rotate(45deg);
  top: 14px;
}

.nav-toggle.active .middle {
  opacity: 0;
}

.nav-toggle.active .bottom {
  transform: rotate(-45deg);
  top: 14px;
}

/* Mobile Overlay Menu */
/* Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.mobile-menu-overlay.active {
  display: block;
}

.mobile-menu-panel {
  background: #fff;
  width: 75%;
  max-width: 300px;
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  padding: 2rem;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease-out forwards;
  z-index: 1001;
}

/* Close button inside overlay */
.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: #333;
  z-index: 1002;
  cursor: pointer;
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}


@keyframes slideIn {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

.nav-menu.mobile {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-menu.mobile a {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
}

/* Responsive rules */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu.desktop {
    display: none;
  }
}




.hero {
  text-align: center;
  padding: 10vh 2rem 6rem;
  background-color: var(--bg-light);
}

body.dark .hero {
  background-color: var(--bg-dark);
}

section:not(.parallax-section) {
  padding: 5rem 2rem;
  max-width: 1000px;
  margin: auto;
}

.parallax-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120vh;
  /* sedikit lebih tinggi untuk efek parallax */
  z-index: 0;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  will-change: transform;
  transition: transform 0.1s linear;
}

.overlay-text {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

.overlay-text h2 {
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  color: #fff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  margin: 0;
}


.fade-section {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease-out;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.carousel {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow-x: hidden;
  position: relative;
}

.carousel-items {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
}

.item {
  min-width: 250px;
  padding: 2rem;
  background: #f2f2f2;
  border-radius: 1rem;
  scroll-snap-align: start;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  flex-shrink: 0;
}

body.dark .item {
  background: #2a2a2c;
  color: var(--text-dark);
}

.carousel-prev,
.carousel-next {
  background: var(--accent);
  border: none;
  color: white;
  font-size: 1.5rem;
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.rotate-box {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 3rem;
  background-color: #f5f5f5;
  border-radius: 1rem;
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.rotate-box:hover {
  transform: rotateY(10deg) rotateX(5deg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body.dark .rotate-box {
  background-color: #2a2a2c;
  color: var(--text-dark);
}

.project-list,
.cert-list {
  list-style: none;
  padding-left: 0;
}

.project-list li,
.cert-list li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--bg-light);
  font-size: 0.9rem;
  color: #888;
}

body.dark .footer {
  background-color: var(--bg-dark);
  color: #aaa;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 1rem 0;
}

.hero-img {
  width: 250px;
  height: 250px;
  align-items: center;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 1.2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.project-item:hover {
  transform: translateY(-4px);
}

.project-item img {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.project-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 768px) {
  .project-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .project-text {
    text-align: center;
  }
}

.cert-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.cert-item:hover {
  transform: translateY(-4px);
}

.cert-item img {
  width: 150px;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
}

.cert-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cert-text a {
  color: var(--accent);
  font-weight: 500;
}

@media (max-width: 768px) {
  .cert-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cert-text {
    text-align: center;
  }
}