/* === IMPORT FONT DARI GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* === RESET & GLOBAL STYLE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2c7a7b;
  --primary-light: #4fd1c5;
  --accent: #d4af37;
  --dark: #2d3748;
  --light: #fafafa;
  --gray: #a0aec0;
  --white: #ffffff;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.7;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.section {
  padding: 4rem 0;
  position: relative;
}

.section h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  color: var(--primary);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* === NAVBAR === */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 5%;
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-brand {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  position: relative;
  padding: 0.4rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

/* === HOME SECTION === */
.home {
  background: linear-gradient(135deg, #f0fdfc, #e6fffa);
  padding: 5rem 0;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .profile {
    flex-direction: row;
    text-align: left;
    gap: 3rem;
  }
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.profile-img:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

.about h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.about p {
  font-size: 1.1rem;
  color: var(--dark);
  max-width: 600px;
}

/* === PROJECT & ALBUM GRID - POSISI TENGAH DI BAWAH JUDUL === */
.project-grid,
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  justify-content: center; /* ← ini yang penting: center-kan kolom grid */
  width: 100%;
  max-width: 1200px; /* sesuaikan dengan container */
  margin: 0 auto; /* pastikan grid-nya sendiri juga center */
}

/* Pastikan item grid (foto) tidak melebar tak terkendali */
.project-item,
.media-item {
  display: flex;
  justify-content: center;
}

.project-item img,
.album-grid img {
  width: 100%;
  max-width: 270px; /* batasi lebar maksimal foto */
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.project-item img:hover,
.album-grid img:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(44, 122, 123, 0.25);
}

/* === PROJECT GRID (tetap fleksibel & centered) === */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  justify-content: center;
}

/* === ALBUM GRID (3 kolom eksplisit, 2 baris: 3 di atas, 3 di bawah) === */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  justify-content: center;
  max-width: 820px; /* 3 * 260px + gap ≈ 820px */
  margin: 0 auto;
}

/* Pastikan item album tidak melebar */
.album-grid .media-item,
.album-grid img {
  width: 125%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.album-grid img:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(44, 122, 123, 0.25);
}

/* Responsif: di HP kecil, jadi 2 atau 1 kolom */
@media (max-width: 768px) {
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .album-grid {
    grid-template-columns: 1fr;
  }
}

/* === KEAHLIAN === */
.skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.skills span {
  background: var(--primary);
  color: white;
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(44, 122, 123, 0.2);
}

.skills span:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-3px);
}

/* === PENGALAMAN (TABLE) === */
.experience-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem auto;
  max-width: 900px;
}

.experience-table th {
  background: var(--primary);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.experience-table td {
  padding: 1.1rem;
  border-bottom: 1px solid #edf2f7;
}

.experience-table tr:last-child td {
  border-bottom: none;
}

.experience-table tr:hover td {
  background: #f8fdfe;
}

/* === CONTACT === */
.contact-info {
  text-align: center;
  font-size: 1.15rem;
  margin-top: 1.5rem;
}

.contact-info p {
  margin: 1rem 0;
}

.contact-info a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.contact-info a:hover {
  color: var(--accent);
}

/* === FOOTER SPACE (opsional) === */
body::after {
  content: '';
  display: block;
  height: 3rem;
}

/* === RESPONSIVE UNTUK MOBILE === */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section h2 {
    font-size: 1.8rem;
  }

  .project-grid,
  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .skills span {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
  }

}

/* === CONTACT BARU - WORKING VERSION === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
  margin-top: 2rem;
}

.contact-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.6rem;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  border-left: 4px solid var(--accent);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.contact-icon {
  font-size: 1.8rem;
  color: var(--primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(37, 50, 72, 0.04); /* soft background */
  border-radius: 12px;
}

.contact-content h3 {
  margin: 0 0 0.6rem 0;
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 600;
}

.contact-content a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: color 0.2s;
}

.contact-content a:hover {
  color: var(--accent);
}

