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

/* === RESET & DASAR === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
  background: #000;
  color: #eee;
}

/* === SECTION ANIMATION === */
section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === POPUP === */
.popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.5);
}

.popup-content {
  background: #fff;
  color: #000;
  border-radius: 20px;
  padding: 30px 40px;
  text-align: center;
  width: 400px;
  animation: fadeIn 0.4s ease;
}

.popup-img {
  width: 150px;
  margin-bottom: 5px;
}

.popup-content h2 {
  margin: 5px 0;
}

.popup-content input {
  width: 90%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.popup-content button {
  background-color: #97c9fd;
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}
.popup-content button:hover {
  background-color: #0056b3;
}

/* === HEADER / NAVBAR === */
header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  z-index: 1000;
  padding: 20px 80px;
  transition: top 0.4s ease; /* tambahkan ini untuk animasi */
}

.logo img {
  width: 170px;
  height: auto;
  object-fit: contain;
  cursor: pointer;
}

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

.navbar ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 45px;
}

.navbar a {
  text-decoration: none;
  color: #b5b5b5;
  font-weight: 400;
  font-size: 18px;
  position: relative;
  transition: color 0.3s ease;
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background-color: #00ff7f;
  transition: width 0.3s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}

.navbar a:hover,
.navbar a.active {
  color: #fff;
}

/* === MENU TOGGLE === */
.menu-toggle {
  display: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  margin-left: 20px;
  z-index: 1100;
}

/* === HOME === */
#home {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 150px 10%;
  background-color: #000;
  flex-wrap: wrap;
  overflow: hidden; /* biar gambar tidak keluar dari area */
  min-height: 100vh;
}

.bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;       /* lebar penuh */
  height: auto;
  object-fit: cover; /* agar proporsi gambar tetap bagus */
  z-index: -1;       /* letakkan di belakang teks */
}

/*
#home::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../Img/Backg.jpg') center/cover no-repeat;
  z-index: -1;
}
*/

#greeting {
  font-weight: 600;
  font-size: 32px;
  margin-bottom: 10px;
  letter-spacing: 1px;
  animation: fadeInHello 0.8s ease-in-out;
}

#usernameDisplay {
  color: #00ff88;
  font-weight: 600;
}

.home-text {
  max-width: 550px;
}

.home-text h3 {
  color: #aaa;
  font-weight: 400;
}

.home-text h1 {
  font-size: 2.5rem;
  margin: 10px 0;
}

.home-text span {
  color: #00ff7f;
}

.home-text h4 {
  color: #888;
  font-weight: 400;
  margin-bottom: 20px;
}

.home-text p {
  line-height: 1.6;
  color: #fff;
  margin-bottom: 25px;
}

.buttons .btn {
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  margin-right: 10px;
  transition: 0.3s;
}

.btn.cv {
  background: #00ff7f;
  color: #000;
}
.btn.cv:hover {
  background: #00cc66;
}
.btn.outline {
  border: 1px solid #00ff7f;
  color: #00ff7f;
}
.btn.outline:hover {
  background: #00ff7f;
  color: #000;
}

.home-img img {
  width: 400px;
  border-radius: 20px;
}

/* === ABOUT === */
.about-section {
  background-color: #000;
  color: #eaeaea;
  padding: 80px 10%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
  max-width: 1200px;
  width: 100%;
}

.about-image img {
  width: 350px;
  border-radius: 500px;
  object-fit: cover;
  filter: brightness(0.9);
}

.about-content {
  flex: 1;
  max-width: 600px;
}

.about-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.about-content h3 {
  font-size: 1rem;
  color: #00ff88;
  font-weight: 600;
  margin-bottom: 20px;
}

.about-content h3 span {
  color: #ffffff;
}

.about-content p {
  font-size: 1rem;
  color: #cccccc;
  line-height: 1.8;
  margin-bottom: 25px;
}

.about-socials a {
  text-decoration: none;
  color: #fff;
  margin: 0 10px;
  font-size: 24px;
  transition: transform 0.2s ease, color 0.2s ease;
}
.about-socials a:hover {
  transform: scale(1.2);
  color: #00ff99;
}

/* === SKILLS === */
.skills {
  text-align: center;
  padding: 60px 20px;
  background-color: #000;
}
.skills h2 {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 40px;
}
.skills-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.skill {
  background: #1b1b1b;
  padding: 20px;
  border-radius: 15px;
  width: 120px;
  transition: 0.3s;
}
.skill:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 15px rgba(0,255,127,0.3);
}
.skill img {
  width: 50px;
  margin-bottom: 10px;
}
.skill p {
  color: #ccc;
}

/* === PROJECTS === */
.projects, #projects {
  text-align: center;
  padding: 60px 20px;
  background-color: #000;
  opacity: 1 !important;
  transform: translateY(0) !important;
  position: relative;
  z-index: 1;
}
.section-title {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 10px;
}
.section-subtitle {
  color: #ccc;
  margin-bottom: 20px;
}
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.filter-btn {
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  background-color: white;
  cursor: pointer;
  font-weight: 600;
}
.filter-btn.active {
  background-color: #00b050;
  color: white;
}
.project-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
  margin-top: 20px;
}
.project-card {
  background-color: #2b2b2b;
  border-radius: 10px;
  padding: 20px;
  color: white;
  width: 350px;
  height: 370px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  text-decoration: none;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-5px);
}
.project-image {
  height: 200px;
  border-radius: 8px;
  margin-bottom: 15px;
  width: 100%;
  overflow: hidden;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.project-card:hover .project-image img {
  transform: scale(1.05);
}

/* === CONTACT === */
.contact-section {
  background-color: #121212;
  color: #eaeaea;
  padding: 80px 10%;
}
.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  margin: 0 auto;
}
.contact-info {
  flex: 1;
  min-width: 260px;
}
.contact-info h2 {
  font-size: 2.2rem;
  margin-bottom: 5px;
  color: #fff;
}
.contact-info .subtitle {
  color: #a1a1a1;
  margin-bottom: 30px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}
.contact-item i {
  font-size: 1.5rem;
  color: #00ff88;
}
.contact-item h4 {
  margin-bottom: 3px;
  font-size: 1rem;
  color: #fff;
}
.contact-item p {
  font-size: 0.95rem;
  color: #bdbdbd;
}
.contact-form {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.form-row {
  display: flex;
  gap: 15px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  color: #eaeaea;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border: 1px solid #00ff88;
}
.contact-form textarea {
  resize: none;
  min-height: 120px;
}
.btn-submit {
  background-color: #00ff88;
  color: #000;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
  box-shadow: 0 4px 10px rgba(0, 255, 136, 0.2);
}
.btn-submit:hover {
  background-color: #00cc6d;
  transform: translateY(-2px);
}
#formStatus {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.3s ease;
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid #222;
  background-color: #000;
}
footer p {
  color: #aaa;
  margin-bottom: 10px;
}
.socials a {
  color: #00ff7f;
  margin: 0 10px;
  font-size: 1.4rem;
  transition: 0.3s;
}
.socials a:hover {
  color: #fff;
}

/* === ANIMATION === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .popup-content {
    width: 60%;              /* otomatis menyesuaikan lebar layar */
    padding: 10px 10px;      /* kurangi padding agar tidak terlalu besar */
    border-radius: 12px;     /*0kecilkan radius sudut */
    aspect-ratio: 1 / 1;
  }

  .popup-img {
    width: 80px;            /* perkecil gambar di popup */
  }

  .popup-content input {
    padding: 8px;            /* sesuaikan ukuran input */
  }

  .popup-content button {
    padding: 8px 20px;       /* lebih proporsional di layar kecil */
    font-size: 12px;         /* teks tombol lebih pas di mobile */
  }
  .popup-content h2 {
    font-size: 15px;          /* kecilin judul */
    margin: 4px 0;
  }
  .popup-content p{
    font-size: 15px;
  }

  header {
    padding: 15px 25px;
  }
  .menu-toggle {
    display: block;
  }
  .navbar ul {
    position: absolute;
    top: 70px;
    right: -100%;
    background: #111;
    flex-direction: column;
    gap: 25px;
    width: 220px;
    padding: 30px 0;
    text-align: center;
    border-radius: 10px;
    transition: right 0.4s ease;
  }
  .navbar.active ul {
    right: 25px;
  }
  .home {
    flex-direction: column-reverse;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
  }
  .bg-img {
    height: 100vh; /* pastikan tetap penuh */
    object-position: center; /* fokus di tengah gambar */
  }
  .home-img img {
    width: 220px;
    margin-bottom: 30px;
  }
  .skills-container {
    gap: 25px;
  }
  .skill {
    width: 100px;
    padding: 15px;
  }
  .about-container {
    flex-direction: column;
    text-align: center;
  }
  .about-image img {
    width: 250px;
  }
  .about-content h2 {
    font-size: 2rem;
  }
  .contact-container {
    flex-direction: column;
  }
  .form-row {
    flex-direction: column;
  }
  .btn-submit {
    align-self: center;
  }
  .contact-info {
    text-align: center;
  }
  .project-container {
    flex-direction: column;
    align-items: center;
  }
  .project-card {
    width: 100%;
    max-width: 350px;
    max-height: 500px;
  }
    .contact-item {
    justify-content: flex-start; /* biar ikon + teks tetap sejajar kiri */
  }

  .contact-item div {
    align-items: flex-start;
    text-align: left;
  }

  .contact-item i {
    font-size: 20px;
  }
}

@media (max-width: 500px) {
  .home-text h1 {
    font-size: 1.8rem;
  }
  .home-text h4 {
    font-size: 0.9rem;
  }
  .btn {
    font-size: 0.9rem;
  }
}
