.projects {
  padding: 80px 80px;
  background: #0b0b0e;
}

.projects-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 100px;
}

.projects-header h2 {
  font-size: 42px;
  margin-bottom: 16px;
}

.projects-header h2 span {
  background: linear-gradient(
    90deg,
    #B16CEA,
    #FF5E69,
    #FF8A56,
    #FFA84B
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.projects-header p {
  color: #9ca3af;
  font-size: 20px;
}

/* PROJECT ITEM */
.project {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-areas: "text image";
  gap: 80px;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 100px;
}

.project.reverse {
  grid-template-columns: 1fr 1.1fr;
  grid-template-areas: "image text";
}

.project-text {
  grid-area: text;
}

.project-image {
  grid-area: image;
}


/* .project.reverse .project-text {
  grid-column: 2;
}

.project.reverse .project-image {
  grid-column: 1;
} */


.project-text h3 {
  font-size: 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}


.project-title {
  background: linear-gradient(
    90deg,
    #B16CEA,
    #FF5E69,
    #FF8A56
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}
.project-text hr {
  border: none;
  height: 1px;
  /* width: 48px; */
  background: gray;
  margin: 20px 0 22px;
  opacity: 0.5;
}

.project-text p {
  color: #FCFCFC;
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.project-meta {
  display: flex;
  flex-direction: column;
  font-size: 18px;
  color: #fcfcfc;
}

.meta-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  align-items: start;
}

.meta-label {
  color: #9ca3af;
  font-weight: 500;
}

.meta-value {
  line-height: 1.6;
  font-weight: 500;
}

.project-meta hr {
  border: none;
  height: 1px;
  background: rgba(255,255,255,0.15);
}


/* PROJECT IMAGE */
.project-image {
  position: relative;        /* wajib untuk circle */
  display: inline-flex;      /* 🔥 ikut ukuran gambar */
  justify-content: center;
  align-items: center;
  border-radius: 16px;
}

.project-link {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 16px;
}

.project-link > img {
  width: 627px;
  max-width: 100%;
  height: 545px;
  border-radius: 16px;
  display: block;
  transition: 0.35s ease;
}

.project-circle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transform: scale(0.8);
  transition: all 0.35s ease;

  pointer-events: none; /* ✅ aman karena <a> parent */
}
.project-link:hover .project-circle {
  opacity: 1;
  transform: scale(1);
}

.project-link:hover > img {
  filter: brightness(0.25);
  transform: scale(1.02);
}



.project-image img {
  width: 644px;              /* 🔥 kontrol ukuran di sini */
  max-width: 100%;
  height: 536px;
  border-radius: 16px;
 
  display: block;
}

/* CIRCLE OVERLAY */
.project-circle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transform: scale(0.8);
  transition: all 0.35s ease;
  pointer-events: none;
}

.project-circle img {
  width: 150px;
  height: 150px;
  animation: spin 10s linear infinite;
}


/* HOVER EFFECT */
.project-image:hover .project-circle {
  opacity: 1;
  transform: scale(1);
}

/* OPTIONAL: IMAGE SEDIKIT GELAP SAAT HOVER */
.project-image:hover > img {
  filter: brightness(0.2);
  transform: scale(1.02);
  transition: 0.35s ease;
}
/* ===== TABLET ===== */
@media (max-width: 1024px) {
  .projects {
    padding: 100px 40px;
  }

  .projects-header {
    margin-bottom: 70px;
  }

  .projects-header h2 {
    font-size: 36px;
  }

  .project {
    gap: 48px;
  }

  .project-image img {
    width: 100%;
    height: auto;
  }
}

/* ===== MOBILE & TABLET KECIL ===== */
@media (max-width: 900px) {
  .projects {
    padding: 80px 24px;
  }

  .project,
  .project.reverse {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "text";
    gap: 36px;
  }

  .project-text h3 {
    font-size: 20px;
  }

  .project-text p {
    font-size: 14px;
  }

  .project-meta {
    font-size: 13px;
  }

  .project-image {
    width: 100%;
    justify-content: center;
  }

  .project-image img {
    width: 100%;
    height: auto;
    border-radius: 14px;
  }

  /* Hover efek tetap aman di mobile */
  .project-image:hover > img {
    transform: none;
    filter: brightness(1);
  }

  .project-circle {
    display: none; /* circle ga perlu di mobile */
  }
}

/* ===== MOBILE KECIL ===== */
@media (max-width: 480px) {
  .projects-header h2 {
    font-size: 28px;
  }

  .projects-header p {
    font-size: 14px;
  }

  .project-text h3 {
    font-size: 18px;
  }

  .project-text hr {
    margin: 14px 0 18px;
  }

  .project-meta li {
    margin-bottom: 6px;
  }
}
