/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  font-family: "Poppins", sans-serif;
}
:root {
  --main-color: #033a80;
  --bg-color: #fff;
  --text-color: #0f0c27;
  --hover: hsl(260, 100%, 51%);

  --big-font: 3.2rem;
  --medium-font: 1.8rem;
  --p-font: 0.941rem;
}
section {
  padding: 50px 10%;
}
body.active {
  --text-color: #fff;
  --bg-color: #0f0c27;
}
body {
  background: var(--bg-color);
  color: var(--text-color);
}
*::selection {
  color: var(--bg-color);
  background: var(--main-color);
}
.heading {
  text-align: center;
}
.heading h2 {
  font-size: 30px;
}

.heading span {
  font-size: var(--p-font);
  color: rgb(2, 166, 70);
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-color);
  padding: 8px 5%;
  transition: 0.2s;
  backdrop-filter: blur(10px); /* Efek blur di background */
  box-shadow: -3px -3px 7px #ffffff73, 2px 2px 5px rgba(94, 104, 121, 0.288);
}

.menu-container {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
nav li {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

nav ul li a {
  text-decoration: none;
  font-family: "Segoe UI", sans-serif;
  color: #191919;
  font-weight: 600;
  padding: 8px 0;
  transition: all;
  transition-duration: 300ms;
}

nav ul li a:hover {
  color: blue;
}
.menu-container .bx-menu {
  display: none;
  font-size: 20px;
  cursor: pointer;
}

.navbar {
  display: flex;
  justify-content: space-between;
}
.navbar a {
  font-size: 1rem;
  padding: 10px 20px;
  color: var(--text-color);
  font-weight: 500;
}
.navbar a:hover {
  color: var(--hover);
}
#menu-icon {
  font-size: 24px;
  cursor: pointer;
  z-index: 10001;
  display: none;
}
#darkmode {
  font-size: 22px;
  cursor: pointer;
}
.home {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.2fr 1fr 1fr;
  align-items: center;
  gap: 1rem;
}
.home-img {
  order: 3;
}
.home-img img {
  width: 100%;
}
.home-text span {
  font-size: var(--medium-font);
  font-weight: 500;
}
.home-text h1 {
  font-size: var(--big-font);
}
.home-text h2 {
  font-size: 1.1rem;
  font-weight: 400;
}
.home-text p {
  font-size: var(--p-font);
  font-weight: 400;
  margin: 0.7rem 0 1rem;
}

.social {
  display: flex;
  flex-direction: column;
  align-items: center; /* Menambahkan align-items untuk memastikan ikon terpusat */
}

.social a {
  font-size: 22px;
  color: var(--text-color);
  transition: color 0.3s; /* Animasi transisi saat berubah warna */
}

.social a:hover {
  color: var(--hover); /* Warna saat hover */
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white; /* Default untuk mode terang */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: background-color 0.3s ease; /* Transisi yang mulus saat mode berubah */
}

/* Loader dalam dark mode */
body.dark-mode .loader {
  background-color: #0f0c27; /* Latar belakang untuk mode gelap */
}

/* From Uiverse.io by Pradeepsaranbishnoi */
.🤚 {
  --skin-color: #e4c560;
  --tap-speed: 0.6s;
  --tap-stagger: 0.1s;
  position: relative;
  width: 80px;
  height: 60px;
  margin-left: 80px;
}

.🤚:before {
  content: "";
  display: block;
  width: 180%;
  height: 75%;
  position: absolute;
  top: 70%;
  right: 20%;
  background-color: black;
  border-radius: 40px 10px;
  filter: blur(10px);
  opacity: 0.3;
}

.🌴 {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--skin-color);
  border-radius: 10px 40px;
}

.👍 {
  position: absolute;
  width: 120%;
  height: 38px;
  background-color: var(--skin-color);
  bottom: -18%;
  right: 1%;
  transform-origin: calc(100% - 20px) 20px;
  transform: rotate(-20deg);
  border-radius: 30px 20px 20px 10px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  border-left: 2px solid rgba(0, 0, 0, 0.1);
}

.👍:after {
  width: 20%;
  height: 60%;
  content: "";
  background-color: rgba(255, 255, 255, 0.3);
  position: absolute;
  bottom: -8%;
  left: 5px;
  border-radius: 60% 10% 10% 30%;
  border-right: 2px solid rgba(0, 0, 0, 0.05);
}

.👉 {
  position: absolute;
  width: 80%;
  height: 35px;
  background-color: var(--skin-color);
  bottom: 32%;
  right: 64%;
  transform-origin: 100% 20px;
  animation-duration: calc(var(--tap-speed) * 2);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  transform: rotate(10deg);
}

.👉:before {
  content: "";
  position: absolute;
  width: 140%;
  height: 30px;
  background-color: var(--skin-color);
  bottom: 8%;
  right: 65%;
  transform-origin: calc(100% - 20px) 20px;
  transform: rotate(-60deg);
  border-radius: 20px;
}

.👉:nth-child(1) {
  animation-delay: 0;
  filter: brightness(70%);
  animation-name: tap-upper-1;
}

.👉:nth-child(2) {
  animation-delay: var(--tap-stagger);
  filter: brightness(80%);
  animation-name: tap-upper-2;
}

.👉:nth-child(3) {
  animation-delay: calc(var(--tap-stagger) * 2);
  filter: brightness(90%);
  animation-name: tap-upper-3;
}

.👉:nth-child(4) {
  animation-delay: calc(var(--tap-stagger) * 3);
  filter: brightness(100%);
  animation-name: tap-upper-4;
}

@keyframes tap-upper-1 {
  0%,
  50%,
  100% {
    transform: rotate(10deg) scale(0.4);
  }

  40% {
    transform: rotate(50deg) scale(0.4);
  }
}

@keyframes tap-upper-2 {
  0%,
  50%,
  100% {
    transform: rotate(10deg) scale(0.6);
  }

  40% {
    transform: rotate(50deg) scale(0.6);
  }
}

@keyframes tap-upper-3 {
  0%,
  50%,
  100% {
    transform: rotate(10deg) scale(0.8);
  }

  40% {
    transform: rotate(50deg) scale(0.8);
  }
}

@keyframes tap-upper-4 {
  0%,
  50%,
  100% {
    transform: rotate(10deg) scale(1);
  }

  40% {
    transform: rotate(50deg) scale(1);
  }
}

/* Dark Mode Icons Style */
body.dark-mode .social a {
  color: rgba(0, 0, 0, 0); /* Atur warna ikon di dark mode */
}

.social a:hover {
  color: #f0f0f0; /* Warna saat hover */
}

.social a:hover {
  color: var(--hover);
}

.about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.about-container > div {
  opacity: 0;
  animation: fadeIn 1s forwards;
}

.about-img img {
  width: 80%;
  border-radius: 0.5rem;
}
.about-text p {
  font-size: var(--p-font);
  font-weight: 400;
  text-align: justify;
  animation-delay: 0.4s; /* Muncul kedua */
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.information {
  margin: 1rem 0 1.4rem;
  animation-delay: 0.6s; /* Muncul ketiga */
}
.information .info-box {
  display: flex;
  align-items: center;
  margin-bottom: 1.4rem;
  animation-delay: 0.8s; /* Muncul keempat */
}
.information .info-box .bx {
  font-size: 22px;
}
.information .info-box span {
  font-weight: 400;
  margin-left: 1rem;
}
.skills-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
}
.skills-img img {
  width: 80%;
  padding-left: 4rem;
  object-position: center;
}
.bars-box {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 1rem;
}
.bars-box h3,
span {
  font-size: 1.1rem;
  font-weight: 500;
}
.light-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.5rem;
  background: hsla(260, 100%, 44%, 0.4);
  border-radius: 0.5rem;
}
.percent-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 0.5rem;
  background: var(--main-color);
  border-radius: 0.5rem;
}
.html-bar {
  width: 94%;
}
.css-bar {
  width: 84%;
}
.js-bar {
  width: 74%;
}
.react-bar {
  width: 80%;
}
.services-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, auto));
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}
.services-box {
  padding: 20px;
  width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 0.5rem;
  border-bottom: 2px solid var(--main-color);
  box-shadow: 0 2px 7px rgb(14 55 54 / 15%);
}
.services-box:hover {
  background-color: #02225a;
}

.services-box h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.7rem 0 0.4rem;
}
.services-box:hover h3 {
  color: #fff;
}
.services-box .bx {
  padding-top: 2rem;
  font-size: 54px;
  color: var(--main-color);
}
.services-box:hover .bx {
  color: #22cf91;
}
.services-box a {
  color: var(--main-color);
  font-size: var(--p-font);
  font-weight: 500;
}
.services-box:hover a {
  color: #8b8a8f;
}
.portfolio-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, auto));
  gap: 1rem;
  margin-top: 2rem;
}
.portfolio-img {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  cursor: pointer;
}
.portfolio-img img {
  width: 100%;
  display: block;
  transition: transform 0.5s;
}
.portfolio-img img:hover {
  transform: scale(1.1);
}
.portfolio-img .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.portfolio-img:hover .overlay {
  opacity: 1;
}
.portfolio-img .overlay span {
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.modal {
  display: none;
  position: fixed;
  z-index: 50;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

.modal-content-wrapper {
  text-align: center;
  color: white;
  padding: 20px;
  max-width: 900px;
  width: 90%;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: bold;
}

.modal-image {
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border-radius: 5px;
}

.modal-description {
  font-size: 1rem;
  margin-top: 10px;
  color: #d3d3d3;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

.modal-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.modal-navigation button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s;
}

.modal-navigation button:hover {
  background: rgba(255, 255, 255, 0.4);
}

form input,
textarea {
  padding: 15px;
  border-radius: 0.5rem;
  width: 100%;
  border: none;
  outline: none;
  background: hsla(260, 100%, 44%, 0.1);
  margin-bottom: 1rem;
  color: var(--text-color);
}
form input::placeholder,
textarea::placeholder {
  color: var(--text-color);
}
form textarea {
  resize: none;
  height: 200px;
}

/* Making Responsive */
@media (max-width: 991px) {
  header {
    padding: 18px 4%;
  }
  section {
    padding: 50px 4%;
  }
}
@media (max-width: 881px) {
  :root {
    --big-font: 2.7rem;
    --medium-font: 1.4rem;
  }
}
@media (max-width: 768px) {
  :root {
    --big-font: 2.4rem;
    --medium-font: 1.2rem;
  }
  header {
    padding: 11px 4%;
  }
  #menu-icon {
    display: initial;
    color: var(--text-color);
  }
  header .navbar {
    position: absolute;
    top: -500px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    box-shadow: 0 4px 4px rgb(0 0 0 / 10%);
    transition: 0.2s ease;
    text-align: center;
  }
  .navbar.active {
    top: 100%;
  }
  .navbar a {
    padding: 1rem;
    display: block;
    background: var(--bg-color);
  }

  #darkmode {
    position: absolute;
    top: 1.4rem;
    right: 2rem;
  }
  .scroll-down {
    display: none;
  }
  .home {
    grid-template-columns: 0.5fr 3fr;
  }
  .home-text {
    grid-column: 1/3;
    padding-left: 1.4rem;
  }
  .home-img {
    order: initial;
  }
  .about-container {
    grid-template-columns: 1fr;
  }
  .about-img {
    display: flex;
    justify-content: center;
  }

  .about-img img {
    filter: blur(10px); /* Blur default dengan intensitas tinggi */
    transition: filter 0.3s ease-in-out; /* Transisi halus saat berubah */
  }

  .about-img img:hover {
    filter: blur(0); /* Hilangkan blur saat kursor berada di atas gambar */
  }

  .skills-container {
    grid-template-columns: 1fr;
  }
  .skills-img img {
    padding-left: 0;
  }
  .skills-img {
    padding-top: 2rem;
    display: flex;
    justify-content: center;
  }
  .contact-form form {
    width: 300px;
  }
  .contact-button {
    margin-left: 25%;
  }
}
@media (max-width: 340px) {
  :root {
    --big-font: 1.7rem;
    --medium-font: 1.1rem;
  }
  .home-text span {
    font-size: 1rem;
  }
  .home-text h2 {
    font-size: 1rem;
    font-weight: 500;
  }
  .information .info-box span {
    font-size: 1rem;
  }
  .portfolio-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, auto));
  }
  .contact-form form {
    width: 300px;
  }
  .contact-button {
    margin-left: 25%;
  }
}

/* Bottom Navigation Adjustment */
nav.fixed.bottom-0 {
  z-index: 50; /* Pastikan ini lebih tinggi dari elemen lain */
}

/* Sembunyikan Menu di Mobile */
@media (max-width: 768px) {
  .menu-container {
    display: none; /* Menu hilang di Android */
    background-color: #036580;
  }
}

@media (max-width: 768px) {
  .header {
    display: none; /* Sembunyikan header di Android */
  }

  .bottom-navigation-main {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    background-color: #fff;
    padding: 10px 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .bottom-navigation-main a {
    color: #333;
    font-size: 18px;
  }

  .darkmode-toggle {
    display: block;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1001;
  }
}

@media (max-width: 768px) {
  .darkmode-toggle {
    display: block;
    position: fixed;
    top: 10px;
    right: 10px;
  }
}

@media (min-width: 768px) {
  header {
    background-color: rgba(255, 255, 255, 0.8); /* Transparan di desktop */
    transition: background-color 0.3s ease;
  }

  .navbar a:hover {
    color: #000; /* Teks navbar berubah warna saat hover */
  }
}

/* Dark mode styling */
/* Styling untuk switch dan dark mode */
/* Dark Mode */
/* CSS untuk Dark Mode */

/* Body dengan dark mode */
body.dark-mode {
  background-color: #040429; /* Latar belakang gelap */
  color: #e0e0e0; /* Teks terang */
  transition: background-color 0.3s, color 0.3s;
}

/* Header pada mode gelap */
body.dark-mode header {
  background: #1c1c1c; /* Latar belakang header gelap */
  color: #e0e0e0; /* Teks header terang */
  box-shadow: -3px -3px 7px rgba(255, 255, 255, 0.3), 2px 2px 5px rgba(94, 104, 121, 0.288);
}

/* Logo Container */
body.dark-mode .logo-container {
  color: #e0e0e0; /* Teks logo terang */
}

/* Menu Container */
body.dark-mode .menu-container {
  background-color: transparent; /* Latar belakang navbar lebih gelap */
}

/* Menu Items */
body.dark-mode nav ul li a {
  color: #e0e0e0;
}

body.dark-mode nav ul li a:hover {
  color: #f39c12; /* Hover warna kuning */
  border-bottom: 1px solid #f39c12; /* Border bawah saat hover kuning */
}

/* Navbar */
body.dark-mode .navbar a {
  color: #e0e0e0; /* Teks navbar terang */
}

body.dark-mode .navbar a:hover {
  color: #f39c12; /* Hover warna navbar menjadi kuning */
}

/* Icon menu untuk mode gelap */
body.dark-mode .menu-container .bx-menu {
  color: #e0e0e0; /* Warna ikon menu terang */
}

/* Menu Toggle */
body.dark-mode #menu-icon {
  color: #e0e0e0; /* Warna ikon menu toggle terang */
}

/* Dark mode untuk efek hover pada menu */
body.dark-mode nav ul li a:hover {
  color: #f39c12; /* Hover warna kuning */
  border-bottom: 1px solid #f39c12; /* Border bawah kuning */
}

/* Gaya untuk switch (tombol pengubah mode) */
.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 3.5em;
  height: 2em;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  background-color: #2185d6;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
  transition: 0.4s;
  border-radius: 30px;
  box-shadow: 0 0 0 rgba(33, 133, 214, 0);
  transition: all 0.4s ease;
}
.slider:hover {
  box-shadow: 0 0 15px rgba(33, 133, 214, 0.5);
}

.slider::before {
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  border-radius: 50%;
  left: 10%;
  bottom: 15%;
  box-shadow: inset 15px -4px 0px 15px #fdf906;
  background-color: #28096b;
  transition: all 0.4s ease;
  transform-origin: center;
}
.slider:hover::before {
  transform: rotate(45deg);
}

.switch:hover .slider::before {
  transform: rotate(45deg); /* Efek rotasi saat hover */
}

/* Animasi awan pada mode gelap */
.clouds_stars {
  position: absolute;
  content: "";
  border-radius: 50%;
  height: 10px;
  width: 10px;
  left: 70%;
  bottom: 50%;
  background-color: #fff;

  transition: all 0.3s;
  box-shadow: -12px 0 0 0 white, -6px 0 0 1.6px white, 0.3px 16px 0 white, -6.5px 16px 0 white;
  filter: blur(0.55px);
}
.switch input:checked ~ .clouds_stars {
  transform: translateX(-20px);
  height: 2px;
  width: 2px;
  border-radius: 50%;
  left: 80%;
  top: 15%;
  background-color: #fff;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
  box-shadow: -7px 10px 0 #fff, 8px 15px 0 #fff, -17px 1px 0 #fff, -20px 10px 0 #fff, -7px 23px 0 #fff, -15px 25px 0 #fff;
  filter: none;
  animation: twinkle 2s infinite;
}
.switch input:checked + .slider {
  background-color: #28096b !important;
}
.switch input:checked + .slider::before {
  transform: translateX(100%);
  box-shadow: inset 8px -4px 0 0 #fff;
}
.switch input:checked + .slider:hover::before {
  transform: translateX(100%) rotate(-45deg);
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* Mengubah warna ikon pada mode gelap */
body.dark-mode #darkmode i,
body.dark-mode #darkmode-desktop i {
  color: #fff;
}

/* Mengubah warna untuk elemen yang mengontrol dark mode */
body.dark-mode #darkmode {
  color: #f39c12;
}

body:not(.dark-mode) #darkmode {
  color: #2c3e50;
}

/* Mengatur warna background pada button switch saat aktif */
body.dark-mode #darkmode-desktop {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  transition: color 0.3s ease;
}

#darkmode-desktop:hover {
  color: gray;
}

#typing-text {
  overflow: hidden; /* hide the text initially */
  white-space: nowrap; /* preserve whitespace and line breaks */
  font-family: monospace;
  font-size: 3.9em; /* Ukuran font untuk desktop */
  font-weight: bold; /* Teks lebih tebal */
}

@keyframes typing {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}

/* Media query untuk desktop (lebih besar dari 768px) */
@media screen and (min-width: 768px) {
  #typing-text {
    font-size: 3.9em; /* Ukuran font lebih besar untuk desktop */
  }
}

/* Media query untuk perangkat tablet atau lebih kecil (lebar maksimum 768px) */
@media screen and (max-width: 768px) {
  #typing-text {
    font-size: 2.9em; /* Ukuran font sedikit lebih kecil pada tablet */
  }
}

/* Media query untuk perangkat ponsel Android (lebar maksimum 600px) */
@media screen and (max-width: 600px) {
  #typing-text {
    font-size: 2.9em; /* Ukuran font lebih kecil di perangkat ponsel Android */
  }
}

/* Media query untuk ponsel dengan layar lebih kecil (lebar maksimum 400px, seperti ponsel kecil) */
@media screen and (max-width: 400px) {
  #typing-text {
    font-size: 2.5em; /* Ukuran font lebih kecil lagi di ponsel */
  }
}
