@media (max-width: 640px) {
  #mainNavbar {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    box-sizing: border-box !important;
    border-radius: 0 0 1.2rem 1.2rem !important;
  }
}
/* Responsive tweaks for mobile */
@media (max-width: 640px) {
  .profile-photo,
  .about-hero img,
  .avatar-glow {
    width: 180px !important;
    height: 180px !important;
    min-width: 150px !important;
    min-height: 150px !important;
    max-width: 200px !important;
    max-height: 200px !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .about-hero {
    padding: 2.2rem 1.2rem 2.2rem 1.2rem !important;
  }
  .about-hero .grid {
    gap: 1.5rem !important;
  }
  .section-title {
    font-size: 1.5rem !important;
  }
  .about-quote {
    font-size: 1.15rem !important;
    padding: 1.1rem 1.2rem !important;
  }
  .portfolio-card {
    padding: 1rem !important;
  }
  .certificates-ekigrid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    align-items: center !important;
  }
  .cert-card img {
    max-width: 90vw !important;
    height: auto !important;
  }
  #certificate-modal .max-w-3xl {
    max-width: 95vw !important;
  }
  .glass-wide,
  .glass {
    padding: 1rem !important;
  }
  #mainContent {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  .form-input,
  .form-textarea {
    font-size: 1rem !important;
    padding: 0.75rem !important;
  }
  .btn-primary,
  .btn-outline {
    font-size: 1rem !important;
    padding: 0.5rem 1.2rem !important;
  }
  .mobile-menu-container {
    padding: 1rem !important;
  }
}

/* Fix for mobile menu overlay */
#mobile-menu[aria-hidden="false"] {
  opacity: 1 !important;
  pointer-events: auto !important;
}
/* FINAL override: Remove ALL border/outline/shadow from resume section */
#portfolio, .fade-section#portfolio, section#portfolio {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: none !important;
}
#portfolio, .fade-section#portfolio, section#portfolio {
  border: 1.5px solid transparent !important;
  box-shadow: none !important;
}
/* Hilangkan border pada section resume */
#portfolio, .fade-section#portfolio, section#portfolio {
  border: none !important;
  box-shadow: none !important;
}
/* Animasi pop/hover untuk tombol tab resume */
.portfolio-tab {
  transition: background 0.22s cubic-bezier(.4,0,.2,1), color 0.18s, box-shadow 0.22s, transform 0.18s cubic-bezier(.4,0,.2,1), filter 0.18s;
  will-change: transform, box-shadow, filter;
  overflow: hidden;
  position: relative;
}
.portfolio-tab::before {
  content: '';
  position: absolute;
  left: -60%;
  top: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.38s cubic-bezier(.4,0,.2,1), opacity 0.22s cubic-bezier(.4,0,.2,1);
  z-index: 2;
  border-radius: inherit;
}
.portfolio-tab:not(.active):hover::before {
  transform: translateX(180%);
  opacity: 1;
  transition: transform 0.38s cubic-bezier(.4,0,.2,1), opacity 0.22s cubic-bezier(.4,0,.2,1);
}
.portfolio-tab:not(.active):hover {
  /* pastikan z-index di atas ::before */
  z-index: 3;
}
.portfolio-tab:not(.active):hover {
  background: linear-gradient(135deg, #181f2e 80%, #232b3b 100%);
  color: #60a5fa;
  border: 2.2px solid #60a5fa;
  box-shadow: 0 0 0 2px #60a5fa33, 0 2px 12px 0 rgba(30,64,175,0.10);
  text-shadow: 0 0 8px #60a5fa88, 0 1px 0 #fff2;
  filter: none;
  transform: none;
  animation: tabBtnGlow 0.18s cubic-bezier(.4,0,.2,1);
}
@keyframes tabBtnGlow {
  0% { color: #cbd5e1; border-color: rgba(147,197,253,0.35); text-shadow: none; }
  100% { color: #60a5fa; border-color: #60a5fa; text-shadow: 0 0 8px #60a5fa88; }
}
@keyframes tabBtnPop {
  0% { transform: scale(1) translateY(0); box-shadow: 0 2px 12px 0 rgba(30,64,175,0.13); }
  100% { transform: scale(1.08) translateY(-2px); box-shadow: 0 8px 28px 0 rgba(30,64,175,0.18); }
}
/* Fade in/out for tab switching */
.fade-in {
  animation: fadeInTab 0.35s cubic-bezier(0.4,0,0.2,1);
}
.fade-out {
  animation: fadeOutTab 0.25s cubic-bezier(0.4,0,0.2,1);
}
@keyframes fadeInTab {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeOutTab {
  from { opacity: 1; }
  to { opacity: 0; }
}
@media (max-width: 640px) {
  section {
    padding-left: 1.2rem !important;
    padding-right: 1.2rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }
}
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden !important;
  }
  section, section.fade-section, #home, #about, #contact {
/* Grid certificates mirip akmal ray */
.certificates-ekigrid {
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 0 2rem 0;
  background: none;
  border-radius: 0;
}
@media (max-width: 900px) {
  .certificates-ekigrid {
  flex-direction: column;
  gap: 2rem 0;
  padding: 1.2rem 0.5rem;
  }
}
    /* box-sizing: border-box; */
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .glass, .glass-wide, .about-hero {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
    padding-left: 2rem !important;
    padding-right: 1rem !important;
  }
}
/* Underline animasi pada hover navbar */
/* Hapus definisi .nav-link yang salah/duplikat di sini, gunakan hanya definisi modern di bawah */
.cert-card:hover {
  box-shadow: 0 20px 56px 0 rgba(37,99,235,0.22), 0 2px 8px 0 rgba(30,64,175,0.10);
  transform: scale(1.035);
}

/* Fix: Only one definition for .cert-thumb, always object-fit: contain, visible, and styled */
/* Gambar sertifikat tampil full di card */
.cert-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
@media (max-width: 900px) {
  .cert-card {
    max-width: 98vw;
  }
}
  object-position: center center;
  display: block;
  border-radius: 1rem;
  box-shadow: 0 4px 24px 0 rgba(30,64,175,0.13);
  background: #181f2e;
  margin: 0 auto 0.5rem auto;
  padding: 0;
  border: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.cert-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16/9;
  border: none;
  background: linear-gradient(120deg, #232b3b 60%, #181f2e 100%);
  border-radius: 1rem;
  box-shadow: 0 8px 32px 0 rgba(30,64,175,0.18);
  overflow: hidden;
  position: relative;
  display: block;
  font-size: 0;
  line-height: 0;
  transition: box-shadow 0.2s, transform 0.2s;
}
.cert-card:hover {
  box-shadow: 0 16px 48px 0 rgba(37,99,235,0.18), 0 2px 8px 0 rgba(30,64,175,0.10);
  transform: scale(1.03);
}
.cert-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16/9;
  border: 1.5px solid #e5e7eb;
  background: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: block;
  font-size: 0;
  line-height: 0;
}
.cert-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16/9;
  border: 1.5px solid #e5e7eb;
  background: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: block;
  font-size: 0;
  line-height: 0;
}
/* Grid certificates mirip eki */
.certificates-ekigrid {
  display: grid;
    grid-template-columns: repeat(3, minmax(420px, 1fr));
  gap: 2.5rem;
  justify-content: center;
  justify-items: center;
  align-items: start;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2vw 2rem 2vw;
}
/* Sertifikat Card Style seperti lampiran */
/* Sertifikat Card Style seperti gambar lampiran */
.cert-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4/3;
  background:
    radial-gradient(900px 300px at 85% 60%, rgba(59,130,246,0.14), transparent 60%),
    radial-gradient(800px 260px at 15% 30%, rgba(99,102,241,0.12), transparent 55%),
    rgba(15, 23, 42, 0.55);
  border-radius: 1rem;
  box-shadow: 0 10px 40px 0 rgba(30,64,175,0.15);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-radius: 1.5rem;
  box-shadow: 0 0 0 2px #3b4260, 0 8px 32px 0 rgba(30,64,175,0.18);
  border: 1.5px solid #3b4260;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: #e5e7eb;
  font-family: 'Montserrat', 'Quicksand', sans-serif;
  font-weight: 400;
  text-align: center;
  margin: 0 auto;
  padding: 2.2rem 1.2rem 2.2rem 1.2rem;
  letter-spacing: 0.02em;
  transition: box-shadow 0.2s, transform 0.2s;
}
.cert-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: contain;
  object-position: center center;
  display: block;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  margin: 0 auto 0.5rem auto;
  padding: 0;
  border: none;
  transition: none;
}
.cert-card:hover {
  box-shadow: 0 20px 56px 0 rgba(37,99,235,0.22), 0 2px 8px 0 rgba(30,64,175,0.10);
  transform: scale(1.035);
}
.cert-view-btn {
  pointer-events: auto;
  border-radius: 0;
  font-size: 1.5rem;
  font-weight: bold;
  transition: opacity 0.2s;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  color: #fff;
}
.cert-card:hover .cert-view-btn {
  opacity: 1;
}
/* Certificate Card Style ala contoh */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 2.5rem 2rem;
}
.certificates-grid .portfolio-card {
  background: #181f2e;
  border-radius: 1.25rem;
  box-shadow: 0 8px 32px 0 rgba(30,64,175,0.18);
  border: 2.5px solid #232b3b;
  padding: 2.2rem 1.5rem 1.5rem 1.5rem;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.certificates-grid .card-media {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #232b3b;
  border-radius: 1rem;
  box-shadow: 0 2px 16px 0 rgba(30,64,175,0.10);
  margin-bottom: 0;
  display: block;
}
.certificates-grid .relative.group {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cert-view-btn {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(0,0,0,0.32);
  color: #fff;
  font-weight: bold;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  pointer-events: auto;
  transition: opacity 0.22s cubic-bezier(.4,0,.2,1);
  z-index: 2;
  text-shadow: 0 2px 8px #000a;
}
.relative.group:hover .cert-view-btn,
.relative.group:focus-within .cert-view-btn {
  opacity: 1;
}
/* Perbesar grid project agar mirip eki */
/* Grid project benar-benar wrap setelah 3 item, seperti sertifikat */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(340px, 1fr));
  gap: 2.5rem 2rem;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2vw 2rem 2vw;
  justify-content: center;
  justify-items: stretch;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(340px, 1fr));
  }
}
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem 0;
    padding: 1.2rem 0.5rem;
  }
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem 0;
    padding: 1.2rem 0.5rem;
  }
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem 0;
    padding: 1.2rem 0.5rem;
  }
}
.projects-grid .portfolio-card {
  min-height: 440px;
  padding: 2.5rem 2rem 2rem 2rem;
  max-width: 100%;
  width: 100%;
  margin: 0;
}
.projects-grid .card-media {
  max-height: 210px;
  min-height: 160px;
  width: 100%;
  object-fit: cover;
  margin-bottom: 1.25rem;
  background: #232b3b;
  border-radius: 0.75rem;
}
.portfolio-card:hover .no-anim {
  transform: none !important;
  filter: none !important;
}
/* Modern portfolio card animation and hover ala eki */
/* Pastikan card project tidak membatasi grid */
.portfolio-card {
  position: relative;
  background:
    radial-gradient(900px 300px at 85% 60%, rgba(59,130,246,0.14), transparent 60%),
    radial-gradient(800px 260px at 15% 30%, rgba(99,102,241,0.12), transparent 55%),
    rgba(15, 23, 42, 0.55);
  border-radius: 1rem;
  box-shadow: 0 10px 40px 0 rgba(30,64,175,0.15);
  border: 1px solid rgba(255,255,255,0.15);
  transition: box-shadow 0.3s, background 0.3s, transform 0.25s cubic-bezier(.4,0,.2,1), filter 0.25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-width: 0;
}
.portfolio-card:hover, .portfolio-card:focus-within {
  box-shadow: 0 16px 48px 0 rgba(37,99,235,0.18), 0 2px 8px 0 rgba(30,64,175,0.10);
  /* transform: translateY(-6px) scale(1.035); */
  transform: scale(1.035);
  filter: brightness(1.07) saturate(1.08);
}
.portfolio-card .card-media {
  transition: transform 0.32s cubic-bezier(.4,0,.2,1), filter 0.32s cubic-bezier(.4,0,.2,1);
}
.portfolio-card:hover .card-media {
  /* transform: translateY(12px) scale(1.04) rotate(-1deg); */
  /* filter: brightness(1.08) saturate(1.1); */
  /* Animasi hover di-nonaktifkan sesuai permintaan user */
  transform: none;
  filter: none;
}
.portfolio-card .btn-primary {
  margin-top: 0.5rem;
}
.portfolio-card .btn-primary, .portfolio-card a {
  transition: box-shadow 0.2s, background 0.2s, color 0.2s, transform 0.2s;
}
.portfolio-card .btn-primary:hover {
  box-shadow: 0 2px 12px 0 rgba(59,130,246,0.18);
  transform: scale(1.06);
}
.portfolio-card .btn-primary:active {
  transform: scale(0.98);
}
.portfolio-card .group-hover\:opacity-100 {
  opacity: 1 !important;
}
.portfolio-card .group-hover\:opacity-100, .portfolio-card button {
  transition: opacity 0.22s cubic-bezier(.4,0,.2,1);
}
/* Fade/slide-in animation for cards on tab switch */
.portfolio-card {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  filter: blur(10px);
  animation: none;
}
.portfolio-card.card-animate-in {
  animation: cardFadeIn 0.55s cubic-bezier(.4,0,.2,1) forwards;
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
}
@keyframes cardFadeIn {
  0% { opacity: 0; transform: scale(0.97); filter: blur(10px); }
  60% { opacity: 1; transform: scale(1.03); filter: blur(2px); }
  100% { opacity: 1; transform: scale(1.01); filter: none; }
}
/* Simple fade-in for tab content */
.tab-fade-in {
  opacity: 0;
  animation: tabFadeIn 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes tabFadeIn {
  to { opacity: 1; }
}
/* Hilangkan blur navbar saat hamburger menu ditutup */
#mainNavbar.menu-opened {
  filter: blur(2px) brightness(0.95);
  transition: filter 0.22s cubic-bezier(0.22,1,0.36,1);
}
#mainNavbar {
  transition: filter 0.22s cubic-bezier(0.22,1,0.36,1);
}
/* Animasi underline pada hover navbar */

/* Navbar underline modern ala akmal ray */
.nav-link {
  position: relative;
  display: inline-block;
  cursor: pointer;
  color: #2563eb !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none;
  border-radius: 0;
  padding: 0.4rem 1.2rem;
  margin: 0 0.3rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  transition: color 0.22s cubic-bezier(0.22,1,0.36,1), background 0.22s, transform 0.18s cubic-bezier(0.22,1,0.36,1);
  overflow: visible;
  border-bottom: 0 !important;
  background: none !important;
  position: relative;
}
.nav-link::after {
  content: '';
  display: block;
  position: absolute;
  left: 18%;
  width: 64%;
  bottom: 6px;
  height: 3px;
  background: linear-gradient(90deg, #2563eb 60%, #60a5fa 100%);
  border-radius: 2px;
  opacity: 0;
  transform: scaleX(0.6);
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s cubic-bezier(0.22,1,0.36,1);
}
.nav-link:hover,
.nav-link:focus {
}
.nav-link:hover::after,
.nav-link:focus::after {
  opacity: 1;
  transform: scaleX(1);
  color: #60a5fa !important;
  transform: scale(1.08);
}
/* Shine effect for button */
.btn-shine {
  position: absolute;
  left: -75%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.0) 100%);
  pointer-events: none;
  border-radius: inherit;
  filter: blur(1px);
  z-index: 2;
}

.btn-primary, .btn-outline {
  position: relative;
  overflow: hidden;

}
/* Animasi smooth ala Framer Motion */

.animated-box {
  opacity: 0;
  transform: scale(0.7) rotate(-10deg);
  background: linear-gradient(135deg, #fff 60%, #a0e7e5 100%);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 40px;
  margin: 60px auto;
  max-width: 420px;
  text-align: center;
  font-size: 1.3rem;
  transition: 
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.animated-box.visible {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  background: linear-gradient(135deg, #f9f871 60%, #ffb5e8 100%);
}
/* Inputs for contact form */
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(15,23,42,0.55);
  color: #e2e8f0;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-input::placeholder,
.form-textarea::placeholder { color: #9db4d1; }
.form-input:focus,
.form-textarea:focus {
  border-color: rgba(99,102,241,0.45);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
}
#portfolio-tabs.tab-group {
  position: relative;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(15,23,42,0.40);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 24px rgba(30,64,175,0.10);
}
#portfolio-tabs.tab-group::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(59,130,246,0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* Custom scrollbar biru modern */
html {
  scrollbar-width: thin;
  scrollbar-color: #2563eb #e0eaff;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
body::-webkit-scrollbar, html::-webkit-scrollbar {
  width: 10px;
  background: #e0eaff;
}
body::-webkit-scrollbar-thumb, html::-webkit-scrollbar-thumb {
  background: #2563eb;
  border-radius: 8px;
}
body::-webkit-scrollbar-track, html::-webkit-scrollbar-track {
  background: #e0eaff;
  border-radius: 8px;
}
/* Navbar Atas Simple Modern ala akmal ray */
#mainNavbar {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 92vw;
    max-width: 100%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px 0 rgba(30,64,175,0.10), 0 1.5px 4px 0 rgba(30,64,175,0.08);
  padding: 0.7rem 2.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  border: 1px solid rgba(255,255,255,0.22);
  transition: background 0.4s, box-shadow 0.4s;
  overflow-x: hidden !important;
}
body.dark-mode #mainNavbar {
  background: rgba(30,41,59,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 24px 0 rgba(30,64,175,0.18), 0 1.5px 4px 0 rgba(30,64,175,0.12);
}
#mainNavbar .navbar-title,
#mainNavbar .navbar-badge,
#mainNavbar .nav-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #2563eb !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none;
  border-radius: 0;
  padding: 0.4rem 1.2rem;
  margin: 0 0.3rem;
  transition: color 0.3s, background 0.3s;
}
body.dark-mode #mainNavbar .navbar-title,
body.dark-mode #mainNavbar .navbar-badge,
body.dark-mode #mainNavbar .nav-link {
  color: #fff !important;
}
#mainNavbar .nav-link:hover {
  color: #fff !important;
  color: #2563eb !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}
body.dark-mode #mainNavbar .nav-link:hover {
  color: #2563eb !important;
  background: linear-gradient(90deg, #fff 60%, #60a5fa 100%);
}
#mainContent {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  box-sizing: border-box;
  transition: margin 0.3s;
}

@media (max-width: 1024px) {
  #mainContent {
    max-width: 94vw;
    padding-left: 1rem;
    padding-right: 1rem;
    margin: 0 auto;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
  }
  #home {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0.5rem 2rem 0.5rem;
    min-height: calc(100vh - 120px);
    gap: 2.5rem;
  }
  #home .profile-photo {
    display: block;
    margin: 0 auto 1.2rem auto;
    order: -1;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 16px 0 rgba(30,64,175,0.10);
  }
}
@media (max-width: 768px) {
  #mainContent {
    margin-left: 0;
  }
}
.sidebar-btn {
  color: #fff;
  transition: color 0.3s;
}
.sidebar-btn.active {
  color: #2563eb;
}
/* Fix overlap antara section home dan tentang saya */
#home {
  position: relative;
  z-index: 2;
  margin-bottom: 3rem;
  min-height: 80vh;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#about {
  position: relative;
  z-index: 1;
  margin-top: 4rem;
  min-height: 60vh;
  padding-top: 4rem;
}
.glass {
  margin-top: 2rem;
  padding-top: 2.5rem;
  max-width: 900px;
  width: 98%;
  min-width: 320px;
  margin-left: auto;
  margin-right: auto;
  padding: 2.5rem 2.5rem 2.5rem 2.5rem;
}
/* iOS 16/17/26 style hamburger bars */

/* Hamburger button: blue in light, white in dark */
.hamburger-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
  border: none !important;
  box-shadow: 0 2px 8px 0 rgba(30,64,175,0.10);
  transition: background 0.3s, box-shadow 0.3s;
}

.dark .hamburger-gradient,
body.dark-mode .hamburger-gradient {
  background: rgba(30,41,59,0.35) !important; /* glassy dark blur */
  border: 1.5px solid rgba(255,255,255,0.18) !important;
  box-shadow: 0 2px 8px 0 rgba(30,64,175,0.10);
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Hamburger bars: white in light, blue in dark */
.hamburger-bar {
  fill: #fff !important;
  filter: drop-shadow(0 1px 2px rgba(30,64,175,0.10));
  transition: fill 0.3s;
}
.dark .hamburger-bar,
body.dark-mode .hamburger-bar {
  fill: #ffffff !important;
  filter: drop-shadow(0 1px 2px rgba(37,99,235,0.10));
}

/* Blur effect for background when menu is open */
.menu-blur {
  filter: blur(8px);
  transition: filter 0.3s;
  z-index: 0 !important;
  position: relative;
}
/* Mobile menu stays sharp and always on top */
/* Full overlay menu */
#mobile-menu {
  opacity: 0;
  pointer-events: none;
}
#mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

/* Fancy enter animations for overlay content */
#mobile-menu .mobile-menu-container {
  /* transform: translateY(12px); */
  opacity: 0;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease;
}
#mobile-menu.open .mobile-menu-container {
  transform: translateY(0);
  opacity: 1;
}

#mobile-menu .mobile-menu-title {
  letter-spacing: 0.04em;
}

#mobile-menu .mobile-menu-links a {
  position: relative;
  transition: color 180ms ease;
}
#mobile-menu .mobile-menu-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 220ms ease;
  border-radius: 2px;
}
#mobile-menu .mobile-menu-links a:hover {
  color: #93c5fd;
}
#mobile-menu .mobile-menu-links a:hover::after {
  width: 40px;
}
@media (max-width: 768px) {
  /* placeholder: aturan khusus mobile jika diperlukan */
}
/* Mobile Menu Button */
.mobile-menu-link {
  margin-bottom: 1.2rem;
  color: #2563eb !important;
}
body.dark-mode .mobile-menu-link {
  color: #fff !important;
  background: transparent !important;
  border: none !important;
  font-weight: 600;
  border-radius: 0.75rem !important;
  box-shadow: none !important;
  padding: 0.45rem 1.7rem !important;
  font-size: 1rem !important;
  letter-spacing: 0.01em;
  transition: background 0.3s, color 0.3s;
  outline: none;
  display: inline-block;
  min-width: 90px;
  min-height: 38px;
}
@media (prefers-color-scheme: dark) {
  .mobile-menu-link {
    color: #fff !important;
    background: transparent !important;
    border: none !important;
    font-weight: 600;
    border-radius: 0.75rem !important;
    box-shadow: none !important;
    transition: background 0.3s, color 0.3s;
  }
}
@media (max-width: 768px) {
  #sideNavbar {
    display: none !important;
  }
  .mobile-menu-link:active, .mobile-menu-link:hover {
    background: #e0eaff !important;
    color: #2563eb !important;
    box-shadow: none !important;
    filter: none !important;
  }
}
/* Overlay transition for mobile menu */
/* overlay dihapus untuk dropdown */
/* Typing cursor animation */
.typed-cursor {
  font-weight: bold;
  animation: blink-cursor 0.5s steps(1) infinite;
}
@keyframes blink-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
/* Fade for portfolio tab switch */
.fade-section-portfolio {
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1);
}
.fade-section-portfolio.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1);
}
.fade-section-portfolio.fade-in {
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1);
}
/* Social card hover */
.glass .grid a {
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), background 0.3s cubic-bezier(0.4,0,0.2,1);
}
.glass .grid a:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px 0 rgba(30,64,175,0.10), 0 1.5px 4px 0 rgba(30,64,175,0.08);
  background: rgba(59,130,246,0.08);
}
@media (max-width: 640px) {
  html, body {
    font-size: 15px;
    padding: 0;
    margin: 0;
    overflow-x: hidden !important;
    max-width: 100vw;
    width: 100vw !important;
    box-sizing: border-box;
  }
  section, section.fade-section, #home, #about, #contact {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }
}
  #mainNavbar, #mainFooter {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .portfolio-card {
    min-width: 0;
    box-sizing: border-box;
  }
  .portfolio-grid {
    grid-template-columns: 1fr !important;
  }
  .glass {
    padding: 1rem !important;
  }
  .section-title {
    font-size: 1.3rem !important;
  }
  .sidebar-dot {
  width: 6px;
  height: 40px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #6366f1 0%, #a78bfa 100%);
  margin-left: 8px;
  margin-right: 0;
  display: inline-block;
  vertical-align: middle;
  }

/* Mobile menu link color fix for dark/light mode (moved to index.html for full control) */
/* Kembali ke semula: tidak ada scroll snap, hanya min-height section */
section.fade-section {
  /* min-height: 100vh; */
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
/* Fade-in and fade-out animation for each section on scroll (lebih jelas) */
/* Animasi masuk section lebih pop dan cepat */
.fade-section {
  opacity: 0;
  transform: scale(0.96);
  filter: blur(12px);
  transition: opacity 0.45s cubic-bezier(.4,0,.2,1), transform 0.45s cubic-bezier(.4,0,.2,1), filter 0.45s cubic-bezier(.4,0,.2,1);
  will-change: opacity, transform, filter;
  pointer-events: none;
  z-index: 1;
}
.fade-section.visible {
  opacity: 1;
  transform: translateY(0) scale(1.04);
  filter: blur(0);
  pointer-events: auto;
  z-index: 2;
}
.fade-section-leave {
  opacity: 0;
  transform: scale(0.98);
  filter: blur(8px);
  transition: opacity 0.5s, transform 0.5s, filter 0.5s;
  z-index: 0;
}

/* visible state already defined above */
/* Fade-in animation for portfolio grid on tab switch */
.portfolio-grid {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s, transform 0.5s;
}
.portfolio-grid.fadein {
    opacity: 0;
  transform: scale(0.98);
    pointer-events: none;
}
/* Portfolio Card Box (reverted to last working state before fade/grid animation changes) */
/* Match portfolio cards to About Me theme */
.portfolio-card {
    background:
      radial-gradient(900px 300px at 85% 60%, rgba(59,130,246,0.14), transparent 60%),
      radial-gradient(800px 260px at 15% 30%, rgba(99,102,241,0.12), transparent 55%),
      rgba(15, 23, 42, 0.55);
    border-radius: 1rem;
    box-shadow: 0 10px 40px 0 rgba(30,64,175,0.15);
    border: 1px solid rgba(255,255,255,0.15);
    transition: box-shadow 0.3s, background 0.3s, transform 0.25s ease;
}

/* Media inside cards: keep aspect ratio and prevent over-stretching */
.card-media {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  border-radius: 0.75rem; /* match rounded-lg */
}
/* Removed duplicate definitions for .cert-thumb and .cert-card */

.certificates-grid .card-media {
  height: 100%;
  object-fit: contain;
}
 
body.dark-mode .portfolio-card {
    background:
      radial-gradient(900px 300px at 85% 60%, rgba(59,130,246,0.18), transparent 60%),
      radial-gradient(800px 260px at 15% 30%, rgba(99,102,241,0.16), transparent 55%),
      rgba(15, 23, 42, 0.65);
    box-shadow: 0 10px 40px 0 rgba(30,64,175,0.18);
    border: 1px solid rgba(255,255,255,0.18);
}
/* Navbar text color fix for dark mode, smooth transition */
body #mainNavbar .navbar-title,
body #mainNavbar .navbar-badge,
body #mainNavbar .nav-link {
    transition: color 0.3s;
}
body.dark-mode #mainNavbar .navbar-title,
body.dark-mode #mainNavbar .navbar-badge,
body.dark-mode #mainNavbar .nav-link {
    color: #fff !important;
}
body:not(.dark-mode) #mainNavbar .navbar-title,
body:not(.dark-mode) #mainNavbar .navbar-badge,
body:not(.dark-mode) #mainNavbar .nav-link {
    color: #2563eb !important;
}
body #mainNavbar .nav-link:hover {
    color: #1d4ed8 !important;
}
body.dark-mode #mainNavbar .nav-link:hover {
    color: #fff !important;
}
 
 

/* Darkmode / Lightmode */
body {
  overflow: visible !important;
  min-height: 100vh;
  /* Gradient + pola blur seperti akmal ray, tetap light mode */
  background: linear-gradient(120deg, #e0eaff 0%, #bcd0ff 60%, #f0f4ff 100%);
  position: relative;
  color: #1e293b;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  top: -120px;
  left: -120px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #60a5fa55 0%, #818cf855 60%, transparent 100%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  bottom: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #2563eb33 0%, #818cf833 60%, transparent 100%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}
body.dark-mode {
  background: linear-gradient(120deg, #0f172a 0%, #1e293b 60%, #1e293b 100%);
  color: #f1f5f9;
}
body.dark-mode::before {
  background: radial-gradient(circle, #2563eb33 0%, #818cf833 60%, transparent 100%);
}
body.dark-mode::after {
  background: radial-gradient(circle, #60a5fa22 0%, #818cf822 60%, transparent 100%);
}

/* Glassmorphism Effect */
/* Unify all card/box backgrounds to match About Me theme */
.glass {
    background:
      radial-gradient(900px 300px at 85% 60%, rgba(59,130,246,0.18), transparent 60%),
      radial-gradient(800px 260px at 15% 30%, rgba(99,102,241,0.14), transparent 55%),
      rgba(15, 23, 42, 0.55);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(30, 64, 175, 0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.4s ease, border 0.4s ease, box-shadow 0.4s ease;
}

/* Wider glass variant for desktop sections like Contact */
.glass-wide {
  max-width: 1200px;
  width: 100%;
}

/* Glassmorphism effect for dark mode */
/* Dark-mode variant keeps the same vibe */
body.dark-mode .glass {
    background:
      radial-gradient(900px 300px at 85% 60%, rgba(59,130,246,0.22), transparent 60%),
      radial-gradient(800px 260px at 15% 30%, rgba(99,102,241,0.18), transparent 55%),
      rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Ensure readable text on light mode over dark glass backgrounds */
body:not(.dark-mode) .glass p,
body:not(.dark-mode) .glass li,
body:not(.dark-mode) .glass span,
body:not(.dark-mode) .portfolio-card p,
body:not(.dark-mode) .portfolio-card li,
body:not(.dark-mode) .about-hero p,
body:not(.dark-mode) .about-hero li,
body:not(.dark-mode) .about-hero span {
  color: rgba(255,255,255,0.96);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
body:not(.dark-mode) .glass a,
body:not(.dark-mode) .portfolio-card a,
body:not(.dark-mode) .about-hero a,
body:not(.dark-mode) .contact-list a {
  color: #b7d7ff;
}

 

/* Sidebar */
.modern-sidebar {
  left: 2.2rem;
  top: 50%;
  transform: translateY(-50%);
  position: fixed;
  z-index: 50;
  background: transparent;
  box-shadow: none;
  border-radius: 2rem;
  padding: 2rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .modern-sidebar {
    left: 0.5rem;
    padding: 1.2rem 0.2rem;
    border-radius: 1.2rem;
    gap: 2rem;
  }
}
.sidebar-btn.active {
  color: #2563eb;
  background: none;
  box-shadow: none;
  /* no transform, just color */
}
.sidebar-btn:hover {
  color: #60a5fa;
  /* no transform, just color */
}
.sidebar-dot.active {
    background-color: #2563eb;
    border-color: #2563eb;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* Gaya kustom lainnya */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #2563eb;
    margin-bottom: 1.5rem;
}

/* Reusable button styles to match About Me theme */
/* Base shape and typography applied to all buttons */
.btn,
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;               /* konsisten tinggi pill */
  padding: 0 20px;            /* kiri-kanan */
  border-radius: 12px;        /* sudut seperti About Me (rounded-xl) */
  font-weight: 800;           /* tebal seperti contoh */
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  gap: 0.5rem;
  text-decoration: none !important;
}
.btn-primary {
  color: #fff;
  background-image: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 24px rgba(30,64,175,0.25), 0 2px 6px rgba(37,99,235,0.25);
  transition: transform 120ms ease, box-shadow 200ms ease, background 200ms ease, filter 200ms ease;
}
.btn-primary:hover {
  background-image: linear-gradient(135deg, #7c7cf2 0%, #4f8ef8 100%);
  /* transform: translateY(-1px); */
  filter: saturate(1.05);
}

.btn-outline {
  color: #93c5fd;
  border: 1.5px solid rgba(147,197,253,0.35);
  background: rgba(15,23,42,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 6px 16px rgba(30,64,175,0.15);
  transition: background 180ms ease, color 180ms ease, transform 120ms ease, box-shadow 200ms ease;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.06);
  color: #f1f5f9;
  /* transform: translateY(-1px); */
}

/* About hero styling (ala eki) */
.about-hero {
  background: radial-gradient(1200px 400px at 85% 60%, rgba(59,130,246,0.18), transparent 60%),
              radial-gradient(1000px 300px at 20% 30%, rgba(99,102,241,0.14), transparent 55%),
              rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 10px 40px rgba(30,64,175,0.15);
}
.avatar-glow {
  background: radial-gradient(circle, rgba(59,130,246,0.35) 0%, rgba(15,23,42,0) 70%);
  filter: blur(24px);
}
.about-quote {
  background: linear-gradient(90deg, rgba(99,102,241,0.15), rgba(59,130,246,0.15));
  border: 1px solid rgba(255,255,255,0.15);
}
.portfolio-tab {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0 1.6rem;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, #232b3b 60%, #181f2e 100%);
  color: #cbd5e1;
  border: 1.5px solid rgba(147,197,253,0.35);
  box-shadow: 0 2px 12px 0 rgba(30,64,175,0.13), 0 1.5px 6px 0 rgba(37,99,235,0.10);
  transition: background 0.22s cubic-bezier(.4,0,.2,1), color 0.18s, box-shadow 0.22s, transform 0.18s, filter 0.18s;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
  margin-right: 1.1rem;
  filter: saturate(1.02);
}
.portfolio-tab span {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 6px !important;
}
.portfolio-tab i { font-size: 18px; opacity: 0.75; }
.portfolio-tab.active i { opacity: 1; }
.portfolio-tab:hover {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
}
.portfolio-tab:last-child {
    margin-right: 0;
}
.portfolio-tab.active {
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(30,64,175,0.18), 0 2px 6px rgba(37,99,235,0.18);
  border: 1.5px solid rgba(255,255,255,0.12);
  filter: saturate(1.08) brightness(1.08);
  /* transform: translateY(-1px); */
}
.portfolio-tab:not(.active):hover {
  background: linear-gradient(135deg, #232b3b 60%, #232b3b 100%);
  color: #60a5fa;
  box-shadow: 0 4px 18px 0 rgba(30,64,175,0.13), 0 2px 8px 0 rgba(37,99,235,0.10);
  transform: scale(1.045);
  filter: saturate(1.12);
}



.portfolio-grid {
  min-height: 320px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.2rem;
  align-items: stretch;
  filter: brightness(0.98) saturate(1.2);
  transform: scale(0.98);
  box-shadow: 0 2px 8px 0 rgba(30,64,175,0.10);
}

.portfolio-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.portfolio-card > .relative {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background:
    radial-gradient(900px 300px at 85% 60%, rgba(59,130,246,0.14), transparent 60%),
    radial-gradient(800px 260px at 15% 30%, rgba(99,102,241,0.12), transparent 55%),
    rgba(15, 23, 42, 0.55);
  border-radius: 1rem;
  box-shadow: 0 10px 40px 0 rgba(30,64,175,0.15);
  border: 1px solid rgba(255,255,255,0.15);
  transition: box-shadow 0.3s, background 0.3s, transform 0.25s cubic-bezier(.4,0,.2,1), filter 0.25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  z-index: 1;
}


