/* ==========================================================================
   Portofolio Eksekutif - Yopam Yanandra Nabiel
   Responsif (375px - 1440px) & Aksesibilitas Penuh (WCAG AA)
   - Warna Aksen Tunggal: #0b5fa5 (Kontras >= 4.5:1)
   - Tipografi Font Sistem Lokal (Zero External Request / 100% Offline)
   - Sasaran Sentuh Minimal: 44x44px
   - Aksesibilitas Keyboard (Sorotan Fokus Terlihat Jelas)
   ========================================================================== */

:root {
  /* Warna Aksen Tunggal (Kontras 6.59:1 terhadap putih) */
  --accent: #0b5fa5;
  --accent-hover: #084980;
  --accent-soft: #f0f7fc;
  --accent-soft-border: #b8daf5;

  /* Palet Netral Berkontras Tinggi (Seluruhnya >= 4.5:1) */
  --bg-body: #f9fafb;
  --bg-surface: #ffffff;
  --bg-subtle: #f3f4f6;
  --bg-dark: #111827;
  --bg-dark-subtle: #1f2937;

  --text-primary: #111827;     /* Kontras 16.1:1 terhadap putih */
  --text-secondary: #374151;   /* Kontras 10.4:1 terhadap putih */
  --text-muted: #4b5563;       /* Kontras 7.17:1 terhadap putih */
  --text-inverse: #ffffff;

  --border-light: #e5e7eb;
  --border-medium: #cbd5e1;

  /* Radius & Bayangan */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);

  /* Layout & Tipografi Sistem */
  --max-width: 1140px;
  --system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--system-font);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* Mencegah gulir horizontal */
  width: 100%;
}

/* --------------------------------------------------------------------------
   Aksesibilitas Papan Tik: Sorotan Fokus Jelas (Ketentuan 6)
   -------------------------------------------------------------------------- */
:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--accent) !important;
  outline-offset: 3px !important;
  border-radius: var(--radius-sm);
}

/* Skip to main content link untuk navigasi papan tik */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent);
  color: var(--text-inverse);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  z-index: 9999;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 1rem;
  outline: 3px solid #ffffff !important;
  outline-offset: 2px !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* --------------------------------------------------------------------------
   Header & Navigasi (Sasaran Sentuh Min 44x44px - Ketentuan 2)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.brand-logo span {
  color: var(--accent);
  margin-left: 0.2rem;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.nav-list a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.6rem 0.85rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-list a:hover {
  color: var(--accent);
  background-color: var(--accent-soft);
}

/* --------------------------------------------------------------------------
   Tata Letak Seksi & Judul (Hierarki Semantik h1 -> h2 -> h3 - Ketentuan 5)
   -------------------------------------------------------------------------- */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Tombol (Sasaran Sentuh Min 44x44px - Ketentuan 2)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  min-width: 44px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--text-inverse);
}

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

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-secondary:hover {
  background-color: var(--accent-soft);
}

/* --------------------------------------------------------------------------
   Seksi 1: Profil
   -------------------------------------------------------------------------- */
.section-profil {
  background-color: var(--bg-surface);
}

.profil-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3.5rem;
  align-items: center;
}

.profil-media {
  display: flex;
  justify-content: center;
}

.foto-profil-img {
  width: 220px;
  height: 220px;
  max-width: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-subtle);
  box-shadow: var(--shadow-sm);
}

.badge-role {
  display: inline-block;
  background-color: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-soft-border);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
}

.profil-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.profil-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.profil-subtitle strong {
  color: var(--text-primary);
}

.profil-bio {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  background: var(--bg-body);
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.profil-bio strong {
  color: var(--text-primary);
}

.profil-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Seksi 2: Keahlian
   -------------------------------------------------------------------------- */
.keahlian-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.keahlian-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.keahlian-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: auto;
}

.keahlian-list li {
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.badge {
  background-color: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-soft-border);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* --------------------------------------------------------------------------
   Seksi 3: Proyek Unggulan (Grid Rata & Konsisten - Ketentuan 3)
   -------------------------------------------------------------------------- */
.proyek-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.proyek-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.proyek-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

/* Tangkapan Layar Seragam (16:9 Aspect Ratio) */
.proyek-screenshot {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-light);
}

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

.proyek-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.proyek-tag {
  background-color: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-soft-border);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.proyek-period {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.proyek-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.35rem;
  min-height: 3.2rem;
}

.proyek-role {
  font-size: 0.86rem;
  color: var(--text-secondary);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.proyek-role strong {
  color: var(--text-primary);
}

.proyek-detail {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex-grow: 1;
}

.detail-item strong {
  color: var(--text-primary);
  display: inline;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   HASIL TERUKUR DENGAN PENEKANAN VISUAL JELAS (Ketentuan 4)
   -------------------------------------------------------------------------- */
.proyek-hasil-terukur {
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.1rem 0.85rem;
  margin: 1.25rem 0 1rem;
  text-align: center;
}

.hasil-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.25rem;
}

.stat-callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-desc {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.35;
  margin-top: 0.25rem;
  max-width: 95%;
}

.proyek-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  gap: 0.5rem;
}

.asset-pill {
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

/* Sasaran sentuh tautan minimal 44px (Ketentuan 2) */
.link-action {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
}

.link-action:hover {
  text-decoration: underline;
  color: var(--accent-hover);
  background-color: var(--accent-soft);
}

/* --------------------------------------------------------------------------
   Seksi 4: Unduhan CV
   -------------------------------------------------------------------------- */
.section-unduhan-cv {
  background-color: var(--bg-surface);
}

.cv-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  gap: 2.5rem;
}

.cv-info {
  flex: 1;
}

.cv-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.cv-meta-list {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.cv-meta-list li {
  background: var(--bg-surface);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  word-break: break-word;
}

.cv-meta-list li strong {
  color: var(--text-primary);
}

.btn-download {
  background-color: var(--accent);
  color: var(--text-inverse);
  padding: 0.95rem 1.8rem;
  font-size: 0.95rem;
  white-space: nowrap;
  min-height: 44px;
  min-width: 44px;
}

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

/* --------------------------------------------------------------------------
   Seksi 5: Kontak
   -------------------------------------------------------------------------- */
.kontak-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.kontak-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kontak-item h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

/* Sasaran Sentuh Kontak Min 44x44px (Ketentuan 2) */
.kontak-link {
  font-weight: 600;
  color: var(--accent);
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  padding: 0.65rem 1rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  word-break: break-all;
  text-decoration: none;
  transition: all 0.15s ease;
}

.kontak-link:hover {
  background-color: #e2effa;
  color: var(--accent-hover);
}

.kontak-note {
  display: block;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Seksi 6: Penutup (Footer)
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-dark);
  color: #9ca3af;
  padding: 3.5rem 0 2rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-info {
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-inverse);
  margin-bottom: 0.5rem;
}

.footer-closing-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #d1d5db;
}

.footer-bottom {
  border-top: 1px solid var(--bg-dark-subtle);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: #9ca3af;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   Responsivitas (Layar 375px - Tablet - 1440px)
   Bebas dari Gulir Mendatar (Ketentuan 1)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .proyek-grid,
  .keahlian-grid,
  .kontak-grid {
    grid-template-columns: 1fr;
  }

  .profil-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

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

  .profil-bio {
    border-left: 1px solid var(--border-light);
    border-top: 4px solid var(--accent);
  }

  .cv-card {
    flex-direction: column;
    text-align: center;
  }

  .cv-meta-list {
    justify-content: center;
  }

  .proyek-title {
    min-height: auto;
  }
}

/* Optimasi Khusus Layar Ponsel & Lebar 375px (Ketentuan 1 & 2) */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .header-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
  }

  .nav-list a {
    padding: 0.5rem 0.65rem;
    font-size: 0.88rem;
  }

  .foto-profil-img {
    width: 180px;
    height: 180px;
  }

  .profil-title {
    font-size: 1.85rem;
    word-break: break-word;
  }

  .profil-subtitle {
    font-size: 0.95rem;
  }

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

  .profil-actions .btn {
    width: 100%;
  }

  .proyek-card {
    padding: 1.25rem 1rem;
  }

  .proyek-hasil-terukur {
    padding: 0.9rem 0.5rem;
  }

  .stat-number {
    font-size: 2.1rem;
  }

  .cv-card {
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }

  .cv-meta-list {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .cv-action {
    width: 100%;
  }

  .btn-download {
    width: 100%;
  }

  .kontak-item {
    padding: 1.5rem 1rem;
  }

  .kontak-link {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
