/* ==========================================
   1. RESET & VARIABLES
   ========================================== */
@font-face {
  font-family: "Poppins";
  font-display: swap;
}

:root {
  --primary-color: #3b82f6;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --bg-secondary: #ffffff;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --font-main: "Poppins", sans-serif;
  --transition: all 0.3s ease;
}

body.dark-mode {
  --bg-color: #0f172a;
  --bg-secondary: #1e293b;
  --text-color: #f8fafc;
  --text-muted: #94a3b8;
  --card-bg: #1e293b;
  --border-color: #334155;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: var(--transition);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ==========================================
   2. NAVBAR & NAVIGATION
   ========================================== */
.navbar {
  position: sticky;
  top: 0;
  background-color: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 15px 0;
  transition: var(--transition);
}

body.dark-mode .navbar {
  background-color: rgba(15, 23, 42, 0.85);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-theme {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  display: flex;
  align-items: center;
  padding: 4px;
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  padding: 4px;
  display: none !important; /* Tersembunyi penuh di Desktop */
}

/* ==========================================
   3. HERO SECTION
   ========================================== */
.hero-section {
  padding: 100px 0 60px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text {
  flex: 1;
}

.badge {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-text h1 {
  font-size: 2.8rem;
  margin: 10px 0 5px;
}

.hero-text h2 {
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 15px;
}

.hero-text p {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-block;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
}

.hero-image img {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
}

/* ==========================================
   4. SECTIONS COMMON & SKILLS
   ========================================== */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 8px auto 0;
  border-radius: 2px;
}

.skills-section,
.about-section {
  background-color: var(--bg-secondary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.skill-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-5px);
}

.skill-card .material-symbols-outlined {
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* ==========================================
   5. PROJECTS STYLING (WITH IMAGES)
   ========================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-info h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  margin-top: auto;
}

.tags span {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ==========================================
   6. CONTACT & FOOTER
   ========================================== */
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-top: -30px;
  margin-bottom: 30px;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg);
  color: var(--text-color);
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary-color);
}

.footer {
  padding: 30px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  color: var(--text-muted);
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--primary-color);
}

/* ==========================================
   7. RESPONSIVE MOBILE MENU & OPTIMIZATION
   ========================================== */
@media (max-width: 768px) {
  .navbar {
    backdrop-filter: none;
    background-color: var(--bg-color);
  }

  .hamburger {
    display: flex !important; /* Hanya aktif saat di HP */
    align-items: center;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: var(--bg-color);
    padding: 40px 20px;
    transition: left 0.3s ease-in-out;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image img {
    width: 240px;
    height: 240px;
  }

  .footer-container {
    flex-direction: column;
  }
}

/* ==========================================
   8. BOTTOM NAVIGATION BAR (KHUSUS MOBILE)
   ========================================== */
.bottom-nav {
  display: none; /* Tersembunyi penuh di Desktop/Laptop */
}

@media (max-width: 768px) {
  /* Sembunyikan navigasi atas di Mobile */
  .nav-menu {
    display: none;
  }

  /* Berikan padding bawah pada body agar konten footer tidak tertutup bottom nav */
  body {
    padding-bottom: 70px;
  }

  /* Container Bottom Nav Melayang */
  .bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 5px 0;
  }

  .bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    flex: 1;
    transition: var(--transition);
  }

  .bottom-nav-link .material-symbols-outlined {
    font-size: 24px;
    margin-bottom: 2px;
    transition: var(--transition);
  }

  /* Status Aktif / Hover */
  .bottom-nav-link.active,
  .bottom-nav-link:hover {
    color: var(--primary-color);
  }

  .bottom-nav-link.active .material-symbols-outlined {
    transform: translateY(-2px);
  }

  /* Penyesuaian Hero Section di Mobile */
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image img {
    width: 220px;
    height: 220px;
  }

  .footer-container {
    flex-direction: column;
  }
}
