.logo {
  display: flex;
  align-items: center;
  gap: 8px; /* jarak antara logo dan teks */
  font-weight: bold;
  font-size: 1.2rem;
}

.logo-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 50%; /* opsional, bikin lebih halus */
}

/* Reset default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
  background-color: #fafafa;
  color: #333;
}

/* Header and Navigation */
header {
  background-color: #333;
  color: #fff;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  margin-left: 2rem;
  transition: color 0.3s ease;
  font-size: 1rem;
}

.nav-link:hover {
  color: #ddd;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #000;
  background-color: #f4f4f4;
  /* Tambahkan gambar transparan di background */
  background-image: url("bg1.jpg"); /* ganti dengan nama file kamu */
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed; /* efek parallax lembut */
}
/* Tambahkan overlay lembut biar teks tetap jelas dibaca */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(
    255,
    255,
    255,
    0.5
  ); /* bisa diganti ke 0.3-0.7 sesuai kontras */
  z-index: 1;
}

/*konten hero diatas overlay*/
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 90%;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: 2rem;
}

.hero-btn {
  display: inline-block;
  background-color: #333;
  color: #fff;
  border: none;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.hero-btn:hover {
  background-color: #555;
  transform: scale(1.05);
}

/* ========================= */
/* 📱 RESPONSIVE DESIGN */
/* ========================= */

/* Tablet (lebar max 992px) */
@media (max-width: 992px) {
  .hero {
    background-attachment: scroll; /* matikan efek parallax agar lancar di tablet */
  }

  .hero-content h1 {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .hero-content p {
    font-size: 1.1rem;
  }
}

/* Mobile (lebar max 600px) */
@media (max-width: 600px) {
  .hero {
    padding: 1.5rem;
    background-position: top;
    background-size: cover;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-content button {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* About Section */
.about {
  padding: 4rem 0;
  display: flex;
  align-items: center;
  justify-content: left;
  flex-direction: column;
  text-align: left;
}

.about-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  max-width: 1000px;
  flex-wrap: wrap;
}

.about-content img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
}

.about-text {
  max-width: 500px;
}

.about-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

/* Portfolio Section */
.portfolio {
  padding: 4rem 2rem;
  text-align: center;
}
.portfolio h2 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
}
/* grid layout*/
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
/*individual project card*/
.project-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.4s ease;
  transform: scale(1);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-card h3 {
  padding: 1rem;
  font-size: 1.2rem;
}
.project-details h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}
.project-details {
  padding: 1.5rem 1rem;
}
.project-details p {
  font-size: 1rem;
  color: #555;
}

/* Resume Section */
.resume {
  padding: 60px 20px;
  background-color: #f9f9f9;
  text-align: center;
}

.resume h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #333;
}

/* Timeline Card Style */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto 60px;
}

.timeline-item {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.timeline-item h3 {
  margin-bottom: 10px;
  color: #222;
  font-weight: 600;
}

/* Separate Education and Experience Sections */
.education-section,
.experience-section {
  margin-bottom: 60px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .timeline {
    padding: 0 10px;
  }

  .timeline-item {
    font-size: 0.95rem;
  }
}

/* Contact Section */
.contact {
  padding: 4rem 0;
  text-align: center;
}

.contact form {
  max-width: 600px;
  margin: 0 auto;
}

.contact input,
.contact textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contact button {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact button:hover {
  background-color: #555;
}

.contact .social-media {
  margin-top: 2rem;
}

.contact .social-media a {
  display: inline-block;
  margin: 0 0.5rem;
}

.contact .social-media img {
  width: 30px;
  height: 30px;
}

/* Footer */
footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-content img {
    margin-bottom: 1rem;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
  }

  .nav-link {
    margin: 0.5rem 0;
  }
}

.add-project {
  max-width: 600px;
  margin: 2rem auto;
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.add-project h3 {
  margin-bottom: 1rem;
}

.add-project form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.add-project input,
.add-project textarea,
.add-project button {
  padding: 0.8rem;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.add-project button {
  background-color: #333;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.add-project button:hover {
  background-color: #555;
}

.project-details [contenteditable="true"] {
  border-bottom: 1px dashed #ccc;
  outline: none;
}

.delete-btn {
  margin-top: 0.5rem;
  background: crimson;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
}

.delete-btn:hover {
  background: darkred;
}

/* Back to Home link style */
header .logo {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
}

header nav {
  background-color: #333; /* supaya kontras dengan teks putih */
  padding: 1rem;
}

header .logo:hover {
  color: #ddd;
}

/* Certificates Section */
.certificate-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
  text-align: center;
}

.certificate-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
}

.certificate-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ===== Achievements Section ===== */
.achievements-section {
  text-align: center;
  padding: 50px 20px;
}
.achievements-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
  text-align: center;
}
.achievements-header i {
  font-size: 28px;
  color: #222;
}
.achievements-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

/* Kartu Sertifikat */
.cert-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.cert-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 350px;
  flex: 1 1 300px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* Gambar sertifikat */
.cert-card img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

/* Tombol Add Certificate */
.add-cert-btn {
  margin-top: 20px;
  padding: 10px 20px;
  border: none;
  background: #222;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

.add-cert-btn:hover {
  background-color: #444;
}
/* Form popup */
.cert-form {
  display: none;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 20px;
  width: 300px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}
.cert-form input {
  width: 100%;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.form-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.cert-form button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#saveCert {
  background: #28a745;
  color: white;
}

#cancelCert {
  background: #ccc;
}

/* ===== Navbar ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2c2c2c;
  color: white;
  padding: 10px 40px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
}

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

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.logo h1 {
  font-size: 18px; /* jangan terlalu besar */
  font-weight: 600;
}

/* ===== Daftar Menu ===== */
.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #f1c40f;
}

/* ===== Tombol Hamburger ===== */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== Responsif (Mobile) ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 40px;
    background: #333;
    padding: 15px;
    border-radius: 10px;
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  /* Animasi tombol hamburger saat aktif */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
  }
}

