:root {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --text-white: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-white);
  line-height: 1.6;
}

/* Navbar Sticky */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 25px;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-link:hover { color: var(--text-white); }

.btn-nav {
  background: var(--primary);
  color: white !important;
  padding: 8px 16px;
  border-radius: 8px;
}

.hamburger {
  display: none;
  font-size: 1.4rem;
  cursor: pointer;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px 40px;
}

.badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.hero h1 {
  font-size: 3rem;
  margin: 20px 0 15px;
}

.highlight { color: var(--primary); }

.hero p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
  font-size: 1.1rem;
}

.hero-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
}

.primary-btn { background: var(--primary); color: white; }
.primary-btn:hover { background: var(--primary-hover); transform: translateY(-2px); }

.secondary-btn { background: transparent; color: var(--text-white); border: 1px solid var(--border); }
.secondary-btn:hover { background: var(--bg-card); transform: translateY(-2px); }

/* Section Base */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 20px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  position: relative;
}

/* About & Stats */
.about-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.stats {
  display: flex;
  gap: 40px;
  margin-top: 25px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.stat-item h3 { font-size: 1.8rem; color: var(--primary); }

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.skill-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.skill-card i { font-size: 2rem; color: var(--primary); }

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.project-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s;
}

.project-card:hover { transform: translateY(-6px); }

.project-img {
  height: 160px;
  background: linear-gradient(135deg, #312e81, #4338ca);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
}

.project-info { padding: 20px; }
.project-info p { color: var(--text-muted); font-size: 0.9rem; margin: 10px 0 15px; }

.tags { display: flex; gap: 8px; margin-bottom: 15px; }
.tags span {
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  color: var(--primary);
}

.project-links { display: flex; gap: 15px; }
.project-links a {
  color: var(--text-white);
  text-decoration: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Form Kontak */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input, .contact-form textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 8px;
  color: white;
  outline: none;
}

.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--primary);
}

footer {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Responsif Mobile */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-menu {
    position: fixed;
    top: 65px;
    left: -100%;
    background: var(--bg-card);
    width: 100%;
    flex-direction: column;
    padding: 20px;
    transition: 0.3s;
  }
  .nav-menu.active { left: 0; }
  .hero h1 { font-size: 2.2rem; }
}

/* Layout Kontak */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Membagi 2 kolom sama besar */
  gap: 30px;
  align-items: start;
  max-width: 950px;
  margin: 0 auto; /* Memposisikan seluruh section tepat di tengah */
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 18px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.info-card i {
  font-size: 1.4rem;
  color: var(--primary);
  width: 44px;
  height: 44px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-card h4 {
  font-size: 0.95rem;
  color: var(--text-white);
  margin-bottom: 2px;
}

.info-card p, .info-card a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.info-card a:hover {
  color: var(--primary);
}

/* Form Kontak (Pembaruan Lebar Penuh) */
.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input, 
.contact-form textarea {
  width: 100%; /* Memastikan kolom input memenuhi seluruh lebar kanan */
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: 12px;
  color: white;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form input:focus, 
.contact-form textarea:focus {
  border-color: var(--primary);
}

.contact-form button {
  width: 100%; /* Tombol dibuat melebar agar simetris dengan kartu di kiri */
  justify-content: center;
  padding: 14px;
  font-size: 0.95rem;
}

/* Responsif Layar HP */
@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Layout About Barisan 2 Kolom */
.about-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}

/* Mockup Code Editor */
.about-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.code-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-box pre {
  padding: 20px;
  font-family: 'Consolas', 'Fira Code', monospace;
  font-size: 0.88rem;
  color: var(--text-muted);
  overflow-x: auto;
}

.keyword { color: #f472b6; font-weight: bold; }
.string { color: #a7f3d0; }

/* Konten Deskripsi */
.about-content h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
}

.about-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.feature-item {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-item i {
  color: var(--primary);
}

@media (max-width: 768px) {
  .about-wrapper {
    grid-template-columns: 1fr;
  }
}

/* --- GAYA GALERI FOTO GRID --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  aspect-ratio: 4 / 3; /* Menjaga ukuran rasio foto tetap seragam */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Efek Zoom saat kursor menempel di foto */
.gallery-item:hover img {
  transform: scale(1.08);
}

/* Label keterangan foto di bagian bawah */
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
}