/* ==========================================================================
   1. DASAR, RESET & SCROLLBAR KUSTOM
   ========================================================================== */
:root {
  --brand-primary: #2563eb;
  --brand-glow: rgba(59, 130, 246, 0.25);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  /* Menjaga judul bagian tidak tertutup sticky navbar */
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

/* Scrollbar Modern Minimalis */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

html.dark ::-webkit-scrollbar-track {
  background: #090d16;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}

/* ==========================================================================
   2. HERO SECTION & PENYESUAIAN UKURAN FOTO CUTOUT TANPA BINGKAI
   ========================================================================== */

/* Pola Grid Teknis Halus pada Latar Hero */
.hero-grid-bg {
  background-size: 32px 32px;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, #000 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, #000 60%, transparent 100%);
}

html.dark .hero-grid-bg {
  background-image:
    linear-gradient(to right, rgba(51, 65, 85, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(51, 65, 85, 0.35) 1px, transparent 1px);
}

/* Foto Profil Cutout (Menempel Rata Bawah & Proporsional Rapat Kanan) */
.hero-cutout-img {
  display: block;
  margin-bottom: -1px;
  filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.12));
  transition: filter 0.3s ease, transform 0.3s ease;
}

/* Skala Khusus Layar HP Kecil (Rapi di Tengah Bawah) */
@media (max-width: 640px) {
  .hero-cutout-img {
    width: 74vw;
    max-width: 310px;
    margin-top: -0.5rem;
  }
}

/* Efek Rim-Light Halus agar Jas Hitam Tetap Kontras di Mode Gelap */
html.dark .hero-cutout-img {
  filter:
    drop-shadow(0 -2px 20px rgba(59, 130, 246, 0.25)) drop-shadow(0 10px 28px rgba(0, 0, 0, 0.7));
}

/* ==========================================================================
   3. KOMPONEN TAG KEAHLIAN (.skill-tag)
   ========================================================================== */
.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 0.375rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.1rem;
  background-color: #ffffff;
  color: #334155;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.skill-tag:hover {
  border-color: #3b82f6;
  color: #2563eb;
  background-color: #eff6ff;
  transform: translateY(-1px);
}

html.dark .skill-tag {
  background-color: #0f172a;
  color: #cbd5e1;
  border-color: #1e293b;
}

html.dark .skill-tag:hover {
  border-color: #60a5fa;
  color: #93c5fd;
  background-color: rgba(59, 130, 246, 0.12);
}

/* ==========================================================================
   4. INTERAKTIVITAS KARTU & MODAL LIGHTBOX RESPONSIVE
   ========================================================================== */
article,
.lightbox-trigger {
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

article:hover {
  border-color: rgba(59, 130, 246, 0.5);
}

button.lightbox-trigger:hover {
  transform: translateY(-1px);
}

/* Penyesuaian Gambar Pop-up di Layar HP & Desktop */
#lightbox-img {
  max-height: 85vh;
  max-width: 95vw;
  width: auto;
  height: auto;
  animation: zoomInImage 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#lightbox-modal:not(.hidden) {
  animation: fadeInModal 0.18s ease-out forwards;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes zoomInImage {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}