/* ==========================================================================
   PORTOFOLIO MAHASISWA ANALITIKA DATA KEUANGAN SEKTOR PUBLIK PKN STAN
   Aturan Desain:
   - Satu warna aksen: #0b5fa5
   - Latar netral: #ffffff, #f8fafc, #f1f5f9
   - Tipografi: Font sistem (tanpa unduh eksternal)
   - Bebas pustaka CDN (offline-ready)
   - Aksesibilitas WCAG AA (kontras > 4.5:1, target sentuh >= 44px, :focus-visible)
   ========================================================================== */

:root {
  --primary: #0b5fa5;
  --primary-hover: #084980;
  --primary-light: #e8f2fa;
  --primary-border: #bfdbfe;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container-width: 1140px;
}

/* Reset & Basis */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Navigasi Keyboard / Aksesibilitas Fokus */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* Utilitas Container */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Navigasi Atas */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.15rem;
  min-height: 44px;
  padding: 0 4px;
}

.brand-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

/* Hero & Profil */
.hero-section {
  padding: 60px 0 50px 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
}

.profile-avatar-wrapper {
  text-align: center;
}

.profile-photo {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--primary-light);
  box-shadow: var(--shadow-lg);
  display: block;
  margin: 0 auto;
}

.profile-meta-tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
}

.hero-content h1 {
  font-size: 2.3rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}

.hero-institution {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.hero-bio {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* Tombol Aksesibel (Target Sentuh >= 44px) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
}

/* Seksi & Judul */
.section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 45px auto;
}

.section-header h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  background-color: var(--primary);
  margin: 10px auto 0 auto;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Kartu Keahlian (Skills Grid) */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.skill-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.skill-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.skill-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-item {
  position: relative;
  padding-left: 18px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.skill-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
}

/* Kartu Proyek (Project Cards Grid) */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 460px 1fr;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-border);
}

.project-visual {
  background-color: #0f172a;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.project-period {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.project-role-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
}

.project-body h3 {
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.project-section-block {
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.block-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-right: 4px;
}

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

/* Hasil Terukur Menonjol (Key Metric Highlight) */
.metric-box {
  background-color: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
}

.metric-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.metric-number {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.3;
}

.metric-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Simpulan & Footer Kartu */
.project-conclusion {
  font-size: 0.95rem;
  color: var(--text-dark);
  background-color: var(--bg-alt);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-style: italic;
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.btn-sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.875rem;
}

/* Seksi Unduh CV */
.cv-section {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.cv-card {
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.cv-card h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-weight: 700;
}

.cv-card p {
  color: var(--text-muted);
  margin-bottom: 22px;
  font-size: 1rem;
}

.cv-meta-info {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 14px;
}

/* Seksi Kontak */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-weight: bold;
  font-size: 1.2rem;
}

.contact-type {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 500;
  word-break: break-word;
}

/* Footer & Penutup */
.footer {
  margin-top: auto;
  background-color: #0f172a;
  color: #94a3b8;
  padding: 40px 0 30px 0;
  border-top: 1px solid #1e293b;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left p {
  font-size: 0.9rem;
  color: #cbd5e1;
}

.footer-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
}

.back-to-top {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background-color: #1e293b;
  transition: background-color 0.15s ease;
}

.back-to-top:hover {
  background-color: var(--primary);
}

/* ==========================================================================
   RESPONSIVITAS (Mobile 375px sampai Desktop 1440px)
   ========================================================================== */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .project-card {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none; /* Navigasi disederhanakan untuk ponsel */
  }
  .hero-content h1 {
    font-size: 1.75rem;
  }
  .hero-subtitle {
    font-size: 1.05rem;
  }
  .profile-photo {
    width: 180px;
    height: 180px;
  }
  .project-body {
    padding: 20px;
  }
  .metric-number {
    font-size: 1.1rem;
  }
  .cv-card {
    padding: 24px 16px;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
