/* ===== Global Styles & Variables ===== */
:root {
  --bg: #0f0f1a;
  --text: #f5f5f5;
  --brand: #9d4edd;
  --brand-hover: #7b2cbf;
  --card: #1a1a2e;
  --border: #2a2a40;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

html { 
  scroll-behavior: smooth; 
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

/* Efek Glowing di Latar Belakang */
.bg-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(157, 78, 221, 0.15) 0%, transparent 70%);
  filter: blur(100px);
  transform: translate(-50%, -50%);
  z-index: -2;
  animation: bgGlowPulse 10s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes bgGlowPulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* ===== Links & Buttons ===== */
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

.button {
  display: inline-flex; /* Menggunakan inline-flex untuk alignment ikon */
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
}
.button.secondary { 
  border: 2px solid var(--brand); 
  color: var(--brand); 
}
.button.secondary:hover { 
  background: var(--brand); 
  color: #fff; 
}
/* Tombol kecil */
.button.small {
  padding: 0.5rem 1rem; /* Ukuran padding disesuaikan untuk tombol kecil */
  font-size: 0.9rem;
}

/* ===== Layout & Section Headers ===== */
.container { width: 90%; max-width: 1100px; margin: 0 auto; }
.section { padding: 5rem 0; position: relative; overflow: hidden; }
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(42, 42, 64, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 42, 64, 0.4) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  opacity: 0.3;
}
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, #c77dff, #e0aaff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 0.5rem;
}
.section-subtitle { font-size: 1.1rem; color: #a9a9a9; }

/* ===== Header & Navigation ===== */
.site-header {
  background: rgba(15, 15, 26, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { font-weight: 700; font-size: 1.3rem; color: var(--brand); }
.primary-nav ul { display: flex; list-style: none; gap: 1.5rem; }
.primary-nav a { position: relative; color: var(--text); font-weight: 500; transition: color 0.3s ease; }
.primary-nav a.active { color: var(--brand); font-weight: 600; }
.primary-nav a::after { content: ''; position: absolute; width: 100%; height: 2px; background: var(--brand); bottom: -5px; left: 0; transform: scaleX(0); transform-origin: center; transition: transform 0.4s ease; }
.primary-nav a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; }

/* ===== Hero Section ===== */
.hero { padding: 5rem 0; display: flex; align-items: center; min-height: 100vh; }
.hero-grid { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; align-items: center; }
.hero-text h1 { font-size: 3rem; }
.subtitle { margin: 1rem 0 2rem; font-size: 1.2rem; min-height: 50px; }
.hero-media { width: 350px; height: 350px; border-radius: 50%; position: relative; margin: 0 auto; overflow: hidden; box-shadow: 0 0 30px rgba(157, 78, 221, 0.6); transition: box-shadow 0.4s ease; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; transition: transform 0.3s ease; }
.hero-media::before { content: ''; position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: rgba(255, 255, 255, 0.3); transform: translateX(-100%) skewX(-30deg); transition: transform 0.8s ease; z-index: 1; }
.hero-media:hover { box-shadow: 0 0 50px rgba(157, 78, 221, 0.9); }
.hero-media:hover img { transform: scale(1.03); }
.hero-media:hover::before { transform: translateX(200%) skewX(-30deg); }

/* Penjajaran Tombol di Hero Section */
.hero-cta {
  display: flex;
  align-items: center; /* Kunci utama untuk membuatnya lurus */
  gap: 1rem;         /* Memberi jarak antar tombol */
  flex-wrap: wrap;     /* Memastikan tombol turun jika layar terlalu sempit */
}
/* ===== About Section ===== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: flex-start; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; display: flex; flex-direction: column; text-decoration: none; color: var(--text); position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.stat-icon { width: 48px; height: 48px; border-radius: 50%; background: rgba(157, 78, 221, 0.1); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; color: var(--brand); }
.stat-card .num { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.stat-card h3 { font-size: 1rem; font-weight: 600; margin-top: 0.5rem; margin-bottom: 0.5rem; }
.stat-card p { font-size: 0.9rem; opacity: 0.7; flex-grow: 1; }
.stat-arrow { align-self: flex-end; font-size: 1.5rem; line-height: 1; color: var(--brand); transition: transform 0.3s ease; }
.stat-card:hover .stat-arrow { transform: translateX(5px); }
.badge { display: inline-block; background: var(--brand); color: #fff; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.85rem; margin: 0.2rem; }
/* Membuat teks di bagian "Tentang Saya" rata kanan-kiri */
#about .two-col p {
  text-align: justify;
}
/* ===== Portfolio Tabs ===== */
.portfolio-tabs { display: flex; justify-content: center; border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem; margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.tab-button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 0.75rem 1rem; background-color: transparent; border: none; color: var(--text); font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 500; cursor: pointer; border-radius: 8px; transition: all 0.3s ease-in-out; }
.tab-button:hover:not(.active) { background-color: var(--card); color: #fff; }
.tab-button.active { background-color: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 4px 15px rgba(157, 78, 221, 0.4); }
.tab-button svg { transition: transform 0.3s ease; }
.tab-button.active svg { transform: scale(1.1); }
.tab-content { padding-top: 1rem; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Konten di dalam Tabs ===== */
.tech-stack-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.tech-item { background: var(--card); border-radius: 12px; width: 130px; height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; font-weight: 500; border: 1px solid var(--border); position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease; padding: 1rem; }
.tech-item:hover { transform: translateY(-5px); box-shadow: 0 0 25px rgba(157, 78, 221, 0.5); }
.tech-item img { width: 40px; height: 40px; object-fit: contain; transition: transform 0.3s ease; }
.tech-item:hover img { transform: scale(1.1); }
.certificates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.certificate-item { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; cursor: pointer; transition: transform 0.3s ease; }
.certificate-item:hover { transform: scale(1.05); }
.cert-img { width: 100%; height: auto; display: block; }
/* SESUDAH */
.grid.cards { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
  gap: 20px; 
}
.card { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 16px; /* Disesuaikan agar lebih rapi */
  overflow: hidden; 
  transition: transform 0.3s ease, box-shadow 0.3s ease; 
  display: flex; /* <-- PENTING */
  flex-direction: column; /* <-- PENTING */
}
.card:hover { 
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.card-media { 
  width: 100%; 
  height: 200px; 
  background-size: cover; 
  background-position: center; 
}
.card-body { 
  padding: 1.5rem; 
  flex-grow: 1; 
  display: flex; 
  flex-direction: column;
}
.card-body p { 
  flex-grow: 1; 
}
/* SESUDAH (di bagian Konten di dalam Tabs) */
.card-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end; /* Tetap rata kanan */
  /* gap: 0.5rem; --> Hapus atau nonaktifkan ini karena hanya ada 1 tombol */
}

/* ===== "Show More" Certificates ===== */
.certificate-item.hidden-item { display: none; }
.certificate-item.visible-item { display: block; animation: fadeIn 0.5s ease forwards; }
.show-more-container { text-align: center; margin-top: 2rem; }

/* ===== Contact Section ===== */
.contact-list li a { display: flex; align-items: center; gap: 0.75rem; }
.contact-socials { display: flex; gap: 1.5rem; margin-top: 1rem; }
.contact-form label { display: block; margin-bottom: 1rem; font-weight: 500; }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); }
/* Menghilangkan bullet point di daftar kontak */
.contact-list {
  list-style: none; /* Menghapus gaya daftar default (titik/bullet) */
  padding-left: 0;  /* Menghapus padding kiri bawaan dari <ul> */
}
/* ===== Lightbox ===== */
.lightbox { display: none; position: fixed; z-index: 9999; padding-top: 60px; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); }
#lightbox-img { margin: auto; display: block; max-width: 90%; max-height: 80vh; border-radius: 12px; }
.close { position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; }

/* ===== Footer ===== */
.site-footer { background: #11111c; text-align: center; padding: 2rem 0; border-top: 1px solid var(--border); }
.footer-grid { display: flex; justify-content: center; align-items: center; }

/* ===== Responsive Design (Mobile) ===== */
@media (max-width: 768px) {
  .section { padding: 4rem 0; }
  .section-header h2 { font-size: 2.2rem; }
  .hero-grid, .two-col { grid-template-columns: 1fr; text-align: center; }
  .two-col > div { text-align: left; }
  .hero-text h1 { font-size: 2.5rem; }
  .hero-media { margin-top: 3rem; width: 280px; height: 280px; }
  .hero-cta { flex-direction: column; align-items: center; gap: 1rem; }
  .stats-grid { grid-template-columns: 1fr; text-align: left; }
  .stat-card { flex-direction: row; align-items: center; text-align: left; padding: 1rem; }
  .stat-card .num { font-size: 1.8rem; margin-left: 1rem; }
  .stat-card h3 { font-size: 0.9rem; margin-top: 0; }
  .stat-card p, .stat-arrow { display: none; }
  .portfolio-tabs { flex-direction: column; max-width: 90%; }
  .tab-button { width: 100%; }
  .badges, .contact-list, .hero-socials, .quick-facts, .contact-socials { justify-content: center; }
  .footer-grid { flex-direction: column; gap: 1rem; }
  .nav-toggle { display: block; background: none; border: none; cursor: pointer; width: 24px; height: 24px; position: relative; z-index: 1001; }
  .nav-toggle span { display: block; width: 100%; height: 2px; background: var(--text); position: absolute; transition: transform 0.3s ease, opacity 0.3s ease; }
  .nav-toggle span:nth-child(1) { top: 4px; }
  .nav-toggle span:nth-child(2) { top: 11px; }
  .nav-toggle span:nth-child(3) { top: 18px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .primary-nav ul { position: fixed; top: 0; right: 0; width: 70%; height: 100vh; background: var(--card); flex-direction: column; justify-content: center; align-items: center; transform: translateX(100%); transition: transform 0.3s ease; }
  .primary-nav ul.open { transform: translateX(0); }
}