@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;900&display=swap");

:root {
  --neutral: #333; /*font colors*/
  --p2: #cb3066;
  --p3: #4C4B16;
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  /* border: 1px solid red; */
}

body {
  background-color: #fefefe;
  overflow-x: hidden;
  /* min-height: 5000px; */
}

.container {
  padding: 72px 88px;
}

/* BTN */
.btn-primary {
  display: inline-block;
  padding: 10px 32px;
  background: var(--p3);
  color: #fefefe;
  font-size: 16px;
  font-weight: 500;
  border-radius: 9999px;
  transition: all 300ms ease-in-out;
}

.btn-primary:hover {
  background: var(--p1);
  color: #000;
  border-radius: 9999px;
}

.type {
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.btn-text {
  margin-right: 12px;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 32px;
  border-style: solid;
  border-color: #4C4B16;
  color: var(--p3);
  font-size: 16px;
  font-weight: 500;
  border-radius: 9999px;
  transition: all 300ms ease-in-out;
}

.btn-secondary-icon {
  display: flex;
  align-items: center;
  color: var(--p3);
  font-size: 16px;
  font-weight: 500;
  border-radius: 9999px;
}

.btn-primary:hover,
.btn-secondary:hover {
  /* transform: translateY(-8px) scale(1.005) translateZ(0); */
  box-shadow: 0px 12px 30px 0px rgba(41, 41, 41, 0.2);
}

/* Nav */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* box-shadow: inset 0 -1px 0 0 rgba(0, 0, 0, 0.1); */
  background-color: rgb(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

nav {
  display: flex;
  justify-content: space-between;
  height: 88px;
  align-items: center;
  margin: 0 72px;
}

nav .logo a {
  font-size: 32px;
  color: var(--neutral);
  font-weight: 600;
}

nav ul {
  display: flex;
  list-style: none;
  width: 30%;
  justify-content: space-between;
}

nav ul li a {
  color: var(--neutral);
  font-size: 16px;
  font-weight: 400;
  position: relative;
}

nav ul li a:after {
  content: "";
  position: absolute;
  background-color: var(--p3);
  height: 3px;
  width: 0;
  left: 0;
  bottom: -10px;
  transition: 0.3s;
}

nav ul li a:hover {
  color: var(--p3);
}
nav ul li a:hover::after {
  width: 100%;
}

.title {
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--p3);
  /* background: linear-gradient(#ff6000, #cb3066);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; */
  font-size: 16px;
}

/* Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  height: 18px;
  justify-content: space-between;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: var(--neutral);
  border-radius: 3px;
  transition: all 0.3s;
}

.hamburger-active > span:nth-child(1) {
  transform-origin: 0 0;
  transform: rotate(45deg) translate(-1px, -3px);
}
.hamburger-active > span:nth-child(2) {
  transform: scale(0);
}
.hamburger-active > span:nth-child(3) {
  transform-origin: 0 100%;
  transform: rotate(-45deg) translate(-1px, 0);
}

/* Responsive Breakpoint */
/* Tablet */
@media screen and (max-width: 768px) {
  nav ul {
    width: 50%;
  }

  .about .row {
    flex-wrap: wrap;
    margin-top: 32px;
  }

  .about .row .about-img img {
    height: 12rem;
  }

  .about .row .content {
    padding: 0;
  }

  .about .row .content .about-title {
    margin-top: 40px;
    font-size: 24px;
  }

  .about .row .content .about-desc {
    /* margin-top: 40px; */
    font-size: 14px;
  }

  .about .row .content .about-btn {
    margin-top: 24px;
  }

  .work .row {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  }
}

/* Mobile */
@media screen and (max-width: 576px) {
  .work .row {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  }

  aside .card-about-me {
    /* padding: ; */
    margin: 0;
  }

  aside .card-about-me img {
    width: 100%;
  }

  footer .links a {
    font-size: 14px;
    margin: 8px;
  }

  nav {
    margin: 0 16px;
  }

  nav .logo {
    margin-left: 12px;
  }

  nav .logo a {
    font-size: 24px;
    color: var(--neutral);
    font-weight: 600;
  }

  .menu-toggle {
    display: flex;
    margin: 40px;
  }
  nav ul {
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    justify-content: space-evenly;
    flex-direction: column;
    align-items: center;
    background-color: #fefefe;
    /* z-index: ; */
    transform: translateX(100%);
    transition: all 1s;
    opacity: 0;
  }
  nav ul.slide {
    opacity: 1;
    transform: translateX(0);
  }

  .container {
    padding: 32px 16px;
  }
  .hero {
    padding-top: 25%;
  }
  .hero .hero-desc {
    font-size: 24px;
  }

  .about .row {
    margin-top: 1000px;
  }

  .about .row .about-img img {
    height: 12rem;
  }

  .about .row .content .about-title {
    margin-top: 16px;
  }

  .about .row .content .about-desc {
    /* margin-top: 40px; */
    font-size: 14px;
  }

  .about .row .content .about-btn {
    margin-top: 24px;
  }

  .btn-secondary-icon {
    font-size: 14px;
  }

  /* .contact .contact-title {
    margin-bottom: 16px;
    font-size: 12px;
  } */
}

/* About Section */
.about {
  margin-bottom: 40px;
  margin-top: 60px;
}
.about .row {
  display: flex;
  margin-top: 56px;
}

.about .row .about-img {
  flex: 1 1 45rem;
  text-align: center;
}
.about .row .about-img img {
  width: 90%;
  border-radius: 15px;
  box-shadow: 0px 0px 8px 0px rgba(41, 41, 41, 0.3);
}
.about .row .content {
  flex: 1 1 35rem;
  padding: 0 1rem;
}

.about-title {
  color: var(--neutral);
  /* color: #fefefe; */
  margin-bottom: 16px;
  font-size: 32px;
  font-weight: 600;
  /* width: 100; */
  /* padding: 24px 88px; */
}

.about-desc {
  font-size: 16px;
  color: var(--neutral);
  font-weight: 300;
  line-height: 1.5;
}

.about-btn {
  margin: 48px 0;
  text-transform: uppercase;
  transition: all 300ms ease-in-out;
}

.about-btn:hover {
  transform: translateY(-8px) scale(1.005) translateZ(0);
  /* box-shadow: 0px 12px 30px 0px rgba(41, 41, 41, 0.2); */
}

.about-aside {
  margin-top: 20px;
  padding: 15px;
  background-color: #fffdfd;
  text-align: center;
}

/* Service Section*/
.service {
  margin-bottom: 40px;
}
.service .service-desc {
  color: var(--neutral);
  margin: 12px 0 32px 0;
  text-align: center;
  /* margin: auto; */
  font-size: 24px;
  font-weight: 600;
  /* max-width: 29.5rem; */
}

.service .row {
  display: flex;
  flex-wrap: wrap;
  margin-top: 48px;
  justify-content: space-evenly;
}

.service .row .service-card {
  text-align: center;
  background-color: #F1E4C3;
  padding: 24px;
  border-radius: 24px;
  transition: all 300ms ease-in-out;
  margin: 16px 32px;
}

.service .row .service-card:hover {
  transform: translateY(-8px) scale(1.005) translateZ(0);
  cursor: pointer;
  box-shadow: 0px 12px 30px 0px rgba(41, 41, 41, 0.2);
}

.service .row .service-card .service-card-img {
  width: 8rem;
  height: auto;
}

.service .row .service-card .service-card-div {
  margin-top: 24px;
}

.service .row .service-card .service-card-div .service-card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--neutral);
}

.service .row .service-card .service-card-div .service-card-desc {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 300;
  color: var(--neutral);
  max-width: 17rem;
}

/* Work Section */
.work {
  margin-bottom: 40px;
}

.work .title {
  text-align: left;
}

.work .row {
  display: grid;
  /* grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr)); */
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.work .row .work-card {
  /* text-align: center; */
  border-radius: 24px;
  border: 1px solid #666;
  padding: 2rem;
  transition: all 300ms ease-in-out;
}

.work .row .work-card:hover {
  transform: translateY(-8px) scale(1.005) translateZ(0);
  box-shadow: 0px 12px 30px 0px rgba(41, 41, 41, 0.2);
}

.work .row .work-card img {
  /* height: 25rem; */
  width: 100%;
}

.work .work-desc {
  color: var(--neutral);
  margin: 12px 0 32px 0;
  text-align: left;
  font-size: 24px;
  font-weight: 600;
  max-width: 30rem;
}

.work .row .work-card .work-content {
  margin: 8px 0;
}
.work .row .work-card h1 {
  font-size: 20px;
  font-weight: 500;
  color: var(--neutral);
}

.work .row .work-card p {
  margin-top: 4px;
  font-size: 14px;
  color: #666;
}

.work .row .work-card .work-btn {
  margin-top: 16px;
  display: flex;
  justify-content: left;
  /* margin: 48px 0; */
}

/* Hover effect on image */
.work .row .work-card .work-img img {
  width: 100%;
  transition: transform 300ms ease-in-out;
}

.work .row .work-card:hover .work-img img {
  transform: scale(1.1);
}

/* Initially hide extra cards */
.work .row .work-card.hidden {
  display: none;
}


/* Toggle button styles */
#toggle-cards {
  margin-top: 16px;
  padding: 8px 16px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 200ms ease-in-out;
}

#toggle-cards:hover {
  background-color: #555;
}

/* Contact Section */
.contact {
  margin-bottom: 40px;
}

.contact .contact-title {
  margin-bottom: 24px;
  font-size: 40px;
  font-weight: 700;
  color: #333;
}

.contact .contact-desc {
  font-size: 16px;
  color: #333;
}

.contact p {
  font-size: 16px;
  color: #333;
}

.contact p span {
  font-size: 16px;
  color: var(--p3);
  font-weight: 600;
}

.contact p span:hover {
  cursor: pointer;
}

/* Footer */
footer {
  background-color: #333;
  text-align: center;
  margin: 2rem;
  border-radius: 24px;
  padding: 64px 0;
}

footer .social-media {
  padding: 1rem;
}

footer .social-media a {
  color: #fefefe;
  margin: 1rem;
}

footer .credit {
  padding: 24px;
}

footer .credit p {
  font-size: 14px;
  color: #fefefe;
}

/* back to top */
.back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  border-radius: 12px;
  padding: 10px;
  background-color: rgba(44, 44, 44, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 400ms ease;
}

.back-top .back-top-link {
  display: flex;
  font-weight: 500;
  align-items: center;
  color: #fefefe;
  margin: auto;
}

.back-top .back-top-link span {
  margin-right: 8px;
  font-size: 14px;
}

.back-top .back-top-link .feather {
  width: 18px;
  height: 18px;
  stroke-width: 3;
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}

.logo-image {
  width: 40px; 
  height: 40px; 
  margin-right: 8px; 
  object-fit: cover;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: black;
  }
}

.typing-animation {
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  border-right: 0.15em solid black;
  width: 20ch;
  animation: typing 3.5s steps(20, end), blink-caret 0.75s step-end infinite;
}

.header-action-area {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  color: white;
  background-color: #403e34; 
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #23272b; 
}

/* Modal styling */
.modal {
  display: none; /* Tersembunyi secara default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Background transparan */
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  background: white; /* Warna latar belakang konten modal */
  padding: 1rem;
  width: 80%;
  max-width: 800px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}


.close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

.close-btn:hover {
  color: #ff0000; /* Merah saat di-hover */
}
