/* ============================================================
       DESIGN TOKENS & WEB VIEW STYLES
============================================================ */
:root {
  --primary: #6c63ff;
  --primary-light: #8075ff;
  --dark-bg: #080c18;
  --card-bg: #0d1225;
  --border: rgba(108, 99, 255, 0.2);
  --text: #f8f9fa;
  --text-muted: rgba(248, 249, 250, 0.6);
  --accent: #ff6584;
}

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

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--dark-bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

.page-header {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.page-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--dark-bg);
  border-radius: 100% 100% 0 0;
}
.page-header .blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.blob-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -80px;
}
.blob-2 {
  width: 200px;
  height: 200px;
  bottom: -60px;
  left: -40px;
}
.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}
.page-header .subtitle {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}
.header-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  background: white;
  color: var(--primary);
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-download:hover {
  background: var(--dark-bg);
  color: white;
  transform: translateY(-2px);
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.btn-back:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

.resume-container {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.resume-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 2rem;
}
.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.profile-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
}
.profile-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.profile-role {
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.contact-list {
  list-style: none;
  text-align: left;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.contact-list li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  word-break: break-all;
}
.contact-list li a:hover {
  color: var(--primary-light);
}
.contact-list i {
  color: var(--primary-light);
  width: 16px;
  flex-shrink: 0;
}
.sidebar-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-light);
  margin-bottom: 1rem;
}
.skill-tag {
  display: inline-block;
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--text);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.78rem;
  margin: 3px;
}
.language-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.language-name {
  font-size: 0.85rem;
}
.language-level {
  font-size: 0.75rem;
  color: var(--primary-light);
}

.section {
  margin-bottom: 2.5rem;
}
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-light);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.summary-text {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.8;
}
.entry {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 1.75rem;
}
.entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}
.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.15rem;
  flex-wrap: wrap;
}
.entry-title {
  font-size: 0.95rem;
  font-weight: 600;
}
.entry-date {
  font-size: 0.78rem;
  color: var(--primary-light);
  white-space: nowrap;
  flex-shrink: 0;
}
.entry-subtitle {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.entry-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.entry-desc ul {
  padding-left: 1rem;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: block;
}
.project-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.project-card-type {
  font-size: 0.75rem;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}
.project-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .resume-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   ATS PDF DOWNLOAD (PRINT ONLY) - STRICT BLACK & WHITE
============================================================ */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm; /* Margin kertas standar */
  }

  /* 1. Paksa 100% Hitam Putih & Hapus Background */
  *,
  *::before,
  *::after {
    color: #000000 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-family: Arial, sans-serif !important;
    font-size: 10pt !important;
    line-height: 1.3 !important; /* Jarak antar baris lebih rapat */
  }

  /* 2. Sembunyikan elemen UI Website */
  .page-header,
  .profile-img,
  .entry::before,
  .contact-list i,
  .blob,
  .sidebar-section,
  .section:nth-child(5) {
    display: none !important;
  }

  .resume-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 3. Perbaikan Grid & Lebar Penuh (Solusi Garis Putus) */
  .resume-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important; /* Memaksa semua anak elemen melebar 100% */
    width: 100% !important;
  }

  .sidebar,
  .main-content {
    display: contents !important;
  }

  /* Pastikan setiap bagian mengambil lebar penuh */
  .section,
  .skills-print-row,
  .cert-print-row,
  .lang-print-row {
    width: 100% !important;
    display: block !important;
    margin-bottom: 2px !important; /* Jarak antar section sangat dirapatkan */
  }

  /* 4. Urutan Konten (Bahasa Paling Bawah) */
  .profile-card {
    order: 1;
  }
  .section:nth-child(1) {
    order: 2;
  } /* Tentang Saya */
  .section:nth-child(2) {
    order: 3;
  } /* Pendidikan */
  .section:nth-child(3) {
    order: 4;
  } /* Pengalaman Proyek */
  .section:nth-child(4) {
    order: 5;
  } /* Project Pilihan */
  .skills-print-row {
    order: 6;
  } /* Keterampilan */
  .cert-print-row {
    order: 7;
  } /* Sertifikasi */
  .lang-print-row {
    order: 8;
  } /* Bahasa */

  /* 5. Header (Nama & Kontak) */
  .profile-card {
    border-bottom: 2px solid #000 !important;
    text-align: center !important;
    padding: 0 0 8px 0 !important;
    margin-bottom: 12px !important;
  }
  .profile-name {
    font-size: 18pt !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    margin-bottom: 2px !important;
  }
  .profile-role {
    font-size: 10.5pt !important;
    margin-bottom: 5px !important;
    text-transform: uppercase !important;
  }
  .contact-list {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 0 15px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .contact-list li,
  .contact-list li a {
    font-size: 9pt !important;
    text-decoration: none !important;
  }

  /* 6. Garis Pembatas - Konsisten Lebar Penuh */
  .section-title {
    display: block !important;
    width: 100% !important; /* Garis dipaksa membentang penuh */
    font-size: 11pt !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    border-bottom: 1.5px solid #000 !important;
    padding-bottom: 2px !important;
    margin-top: 5px !important;
    margin-bottom: 3px !important; /* Jarak judul ke isi dirapatkan */
  }

  /* 7. Styling Isi (Lebih Rapat) */
  .summary-text {
    text-align: justify !important;
    font-size: 10pt !important;
    margin: 0 !important;
  }

  .entry {
    margin-bottom: 8px !important;
    padding-left: 0 !important;
  }
  .entry-header {
    display: flex !important;
    justify-content: space-between !important;
    font-weight: bold !important;
    margin-bottom: 1px !important;
  }
  .entry-title {
    font-size: 10pt !important;
  }
  .entry-date {
    font-size: 9pt !important;
    font-weight: normal !important;
  }
  .entry-subtitle {
    font-style: italic !important;
    font-size: 9.5pt !important;
    margin-bottom: 2px !important;
  }
  .entry-desc {
    text-align: justify !important;
    font-size: 9.5pt !important;
  }
  .entry-desc ul {
    padding-left: 15px !important;
    margin: 0 !important;
  }
  .entry-desc li {
    margin-bottom: 1px !important;
  }

  /* 8. Project Pilihan (2 Kolom) */
  .project-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px 15px !important;
  }
  .project-card {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .project-card-name {
    font-weight: bold !important;
    font-size: 9.5pt !important;
  }
  .project-card-name::after {
    content: " — ";
    font-weight: normal !important;
  }
  .project-card-type {
    display: inline !important;
    font-style: italic !important;
    font-size: 9.5pt !important;
  }
  .project-card-desc {
    font-size: 9.5pt !important;
    margin-top: 1px !important;
  }

  /* 9. Keterampilan (3 Kolom) */
  .spr-cols {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 10px !important;
  }
  .spr-group-title {
    font-weight: bold !important;
    margin-bottom: 2px !important;
    font-size: 9.5pt !important;
  }
  .spr-group-list {
    font-size: 9pt !important;
    line-height: 1.4 !important;
  }

  /* 10. Bahasa & Sertifikasi */
  .lang-list-print {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }
  .lang-item-print {
    font-size: 9.5pt !important;
  }
}
