/* ========== RESET & WARNA ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-1: #9edaf8;
  --color-2: #7cbfe1;
  --color-3: #4ea1ca;
  --color-4: #f6e5d9;
  --color-5: rgb(246, 236, 230);
  --color-6: #f06344;
}

li {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--color-2);
}

body {
  background-color: var(--color-4);
  font-family: 'Roboto', sans-serif;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========== NAVBAR ========== */
nav {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-2);
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
}

.boxKitty {
  max-width: 1000px;
  width: 100%;
  padding: 0 0 0 25px;
} 

.kitty {
  max-height: 40px;
  margin-right: 10px;
}

nav ul {
  list-style: none;
  display: none;
  gap: 30px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: var(--color-1);
}

/* ========== STRUKTUR UTAMA ========== */
main {
  max-width: 1000px;
  width: 90%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* ========== BAGIAN SAPA ========== */
.sapa {
  display: grid;
  grid-template-columns: 1fr auto;
  background-color: var(--color-2);
  color: white;
  border-radius: 8px;
  border: 3px solid var(--color-3);
  padding: 20px;
  align-items: center;
}

.sapa h1 {
  font-size: 26pt;
  margin-bottom: 10px;
}

.sapa p {
  font-family: 'Inter', sans-serif;
  margin-bottom: 10px;
}

.pp {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 3px solid var(--color-3);
  object-fit: cover;
}

/* ========== MY EXPERIENCE ========== */
.boxSegmen-1 {
  background-color: var(--color-5);
  border-radius: 8px;
  border: 3px solid black;
  padding: 20px;
}

.parentBoxExperience {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.boxExperience {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--color-6);
  border-radius: 6px;
  border: 3px solid #000;
  padding: 15px;
  height: 235px;
  color: white;
  text-align: center;
  transition: transform 0.3s;
}

.boxExperience h3 {
  font-weight: bold;
  font-size: 14pt;
  line-height: 1.2em;
  margin: auto;
  
  /* kalau teks kepanjangan, potong dan tambahkan titik */
  display: -webkit-box;
  -webkit-line-clamp: 2;      /* tampil maksimal 2 baris */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boxExperience:hover {
  transform: scale(1.03);
}

.box-imgExperience {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.imgExperience{
  height: auto;
  width: 100%;
}

/* ========== MY PROJECT (SLIDESHOW) ========== */
.boxSegmen-2 {
  background-color: var(--color-2);
  border-radius: 8px;
  border: 3px solid var(--color-3);
  color: white;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  
  gap: 20px;
}

.slideshow-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  border: 3px solid var(--color-3);
  line-height: 0;
}

.slides-wrapper {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.slide {
  min-width: 100%;
}

.slide img {
  width: 100%;
  display: block;
}

.boxSegmen-3 {
  color: rgb(0, 0, 0);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 20px;
}

/* === SLIDESHOW FADE === */
.slideshow-fade {
  position: relative;
  width: 90%;
  max-width: 800px;
  margin: auto;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid black;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  aspect-ratio: 16/9; /* biar proporsional di semua layar */
}

.fade-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.fade-item.fade-active {
  opacity: 1;
  z-index: 1;
}

.fade-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsif */
@media (max-width: 600px) {
  .fade-caption {
    font-size: 12pt;
    padding: 6px;
  }
}

/* ========== SECTION DUA BAGIAN ========== */
.boxSegmen-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.btn-portfolio {
  position: relative;
  padding: 5px;
  background-color: var(--color-6);
  color: #ffffff;
  border: 2px solid black;
  border-radius: 5px;
  margin: 20px;
}

.btn-portfolio :hover {
  transform: scale(1.2);
}

/* Overlay */
.portfolio-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 100;
}
.portfolio-overlay h2{
  margin: 25px 0 0 0;
}

/* Box isi overlay */
.portfolio-box {
  background: white;
  padding: 30px;
  border-radius: 10px;
  width: 85%;
  max-width: 900px;
  color: #333;
  position: relative;
  animation: slideUp 0.4s ease;
  max-height: 90vh;
  overflow-y: auto;
}

/* Tombol close */
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24pt;
  color: var(--color-6);
  cursor: pointer;
  transition: transform 0.2s;
}
.close-btn:hover {
  transform: scale(1.2);
}

/* Grid foto */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 25px;
}

.photo-card {
  background: #f9f9f9;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.photo-card:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.photo-card img {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: contain;
}

/* Animasi */
@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsif */
@media (max-width: 600px) {
  .photo-card img {
    height: 140px;
  }
}

/* ========== FOOTER ========== */
footer {
  width: 100%;
  height: 50px;
  margin: 20px 0 0 0;
  /* background-color: var(--color-6); */
}

/* ========== STYLE BLOG ========== */
.articleBox {
  margin: 0 0 20px 0;
}

.articleBox h1 {
  margin: 0 0 10px 0;
}

.articleBox p {
  text-align: justify;
  margin: 0 0 10px 0;
}

.box-img {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 10px 0;
  
}
.defaultimg {
  width: auto;
  height: 100%;
  max-height: 600px;
  max-width: 600px;
  margin: 0;
  border: 3px solid black;
  border-radius: 5px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 800px) {
  .sapa {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pp {
    margin: 10px auto;
  }

  .boxSegmen-2 {
    grid-template-columns: 1fr;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }
}
