/* ==========================================================================
   DESIGN SYSTEM & CUSTOM STYLING
   Biodata & Portofolio Mahasiswa (Single-Page Dark Mode Elegant)
   Tech Stack: HTML5, Custom CSS3, Vanilla JS
   Font Pair: Poppins (Headings) & Inter (Body)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES & COLOR PALETTE
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Dark Mode Elegant */
  --bg-dark: #0D0D12;
  --bg-card: #161622;
  --bg-card-hover: #1E1E2E;
  --bg-nav: rgba(13, 13, 18, 0.85);

  /* Primary Accent - High Contrast Teal (#2DD4BF) */
  --accent: #2DD4BF;
  --accent-hover: #14B8A6;
  --accent-rgb: 45, 212, 191;
  --accent-glow: rgba(45, 212, 191, 0.25);
  --accent-subtle: rgba(45, 212, 191, 0.08);

  /* Secondary Accent - Electric Blue (#4F8EF7) for tags */
  --accent-blue: #4F8EF7;
  --accent-blue-subtle: rgba(79, 142, 247, 0.12);

  /* Text Colors (WCAG AA Compliant) */
  --text-main: #F5F5F5;
  --text-muted: #A0A0AC;
  --text-dim: #6E6E7E;

  /* Card Borders & Glassmorphism */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(45, 212, 191, 0.4);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(45, 212, 191, 0.2);

  /* Typography */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing & Layout */
  --nav-height: 72px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  color-scheme: dark;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY & CLAMP UTILITIES
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw + 1rem, 3.6rem);
  font-weight: 700;
}

.section-title {
  font-size: clamp(1.75rem, 3vw + 0.8rem, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.text-accent {
  color: var(--accent);
}

.text-gradient {
  background: linear-gradient(135deg, #F5F5F5 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   4. CONTAINER & LAYOUT STRUCTURE
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

section {
  padding-top: 5rem;
  padding-bottom: 5rem;
  position: relative;
}

/* --------------------------------------------------------------------------
   5. STICKY NAVBAR
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: background var(--transition-normal);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-main);
  transition: color var(--transition-fast);
}

.brand-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent);
  border-radius: var(--radius-full);
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Hamburger Button */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  color: var(--text-main);
}

.hamburger-box {
  width: 24px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. HERO SECTION (#beranda)
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 3rem;
  background: radial-gradient(circle at 80% 20%, rgba(45, 212, 191, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(79, 142, 247, 0.04) 0%, transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--accent-subtle);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: var(--radius-full);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(45, 212, 191, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent);
  color: #0B1318;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(45, 212, 191, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-subtle);
  transform: translateY(-2px);
}

.hero-avatar-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-avatar-card {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, rgba(79, 142, 247, 0.5) 100%);
  box-shadow: var(--shadow-glow);
  transition: transform var(--transition-normal);
}

.hero-avatar-card:hover {
  transform: scale(1.03);
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background-color: var(--bg-card);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scroll-mouse {
  width: 20px;
  height: 32px;
  border: 2px solid var(--text-dim);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollAnim 1.8s infinite;
}

@keyframes scrollAnim {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* --------------------------------------------------------------------------
   7. BIODATA SECTION (#biodata)
   -------------------------------------------------------------------------- */
.biodata-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
}

.biodata-card-summary {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  position: sticky;
  top: calc(var(--nav-height) + 30px);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-normal), transform var(--transition-normal);
}

.biodata-card-summary:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
}

.profile-thumb-box {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  padding: 4px;
  border: 2px dashed var(--accent);
}

.profile-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.biodata-name-tag {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.biodata-role {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.stat-pills {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.pill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.pill-label {
  color: var(--text-muted);
}

.pill-val {
  font-weight: 600;
  color: var(--text-main);
}

/* Biodata Details List */
.biodata-details-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.data-item-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: all var(--transition-fast);
}

.data-item-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateX(4px);
}

.data-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background-color: var(--accent-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.data-icon svg {
  width: 22px;
  height: 22px;
}

.data-content {
  flex: 1;
}

.data-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.data-value {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-main);
  word-break: break-word;
}

.placeholder-text {
  color: #5EEAD4;
  font-weight: 600;
  background: rgba(45, 212, 191, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   8. GALERI SECTION (#galeri)
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.gallery-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
  box-shadow: var(--shadow-card);
}

.gallery-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
}

.gallery-image-box {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  background-color: #12121B;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-caption {
  padding: 1.25rem 1.5rem;
}

.gallery-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.gallery-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   9. KONTAK SECTION (#kontak)
   -------------------------------------------------------------------------- */
.contact-wrapper {
  background: linear-gradient(135deg, var(--bg-card) 0%, #11111A 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.contact-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-fast);
}

.contact-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.contact-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.contact-card:hover .contact-icon-box {
  transform: scale(1.1);
  background-color: var(--accent);
  color: #0D0D12;
}

.contact-type {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   10. FOOTER
   -------------------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-tech {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   11. INTERACTION & ANIMATION CLASSES (Intersection Observer)
   -------------------------------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay helpers */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* --------------------------------------------------------------------------
   12. RESPONSIVE BREAKPOINTS (Mobile-First Strategy)
   -------------------------------------------------------------------------- */

/* Tablet Breakpoint (< 1024px) */
@media (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .biodata-grid {
    grid-template-columns: 1fr;
  }

  .biodata-card-summary {
    position: relative;
    top: 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Breakpoint (< 768px) */
@media (max-width: 767px) {
  :root {
    --nav-height: 64px;
  }

  section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background-color: rgba(13, 13, 18, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
  }

  .nav-links.is-active {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.25rem;
  }

  .hero-avatar-card {
    width: 220px;
    height: 220px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .data-item-card {
    padding: 1rem;
    gap: 0.85rem;
  }

  .data-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .data-icon svg {
    width: 18px;
    height: 18px;
  }
}

/* Small Phone Screen (< 375px) */
@media (max-width: 374px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}
