:root {
  --primary-color: #0f3d5e;
  --secondary-color: #f4b942;
  --accent-color: #2a7ab9;
  --surface-color: #ffffff;
  --surface-soft: #f5f7fb;
  --surface-highlight: linear-gradient(135deg, #eef7ff 0%, #fff6dd 100%);
  --text-color: #172033;
  --text-muted: #5d6b82;
  --text-light: #f8fbff;
  --border-color: rgba(15, 61, 94, 0.12);
  --shadow-soft: 0 18px 40px rgba(15, 61, 94, 0.08);
  --shadow-hover: 0 22px 44px rgba(15, 61, 94, 0.16);
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --transition: 0.28s ease;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(42, 122, 185, 0.12), transparent 22%),
    linear-gradient(180deg, #f9fbfe 0%, #edf3f9 100%);
}

body.dark-mode {
  --primary-color: #d7e8ff;
  --secondary-color: #ffd36b;
  --accent-color: #5eb4ff;
  --surface-color: #132033;
  --surface-soft: #19273d;
  --surface-highlight: linear-gradient(135deg, #19273d 0%, #2c2233 100%);
  --text-color: #eef5ff;
  --text-muted: #aebed4;
  --text-light: #f8fbff;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.28);
  --shadow-hover: 0 22px 44px rgba(0, 0, 0, 0.36);
  background: linear-gradient(180deg, #0f1725 0%, #162235 100%);
}

section {
  scroll-margin-top: 96px;
}

.site-header {
  backdrop-filter: blur(12px);
}

.navbar {
  background: linear-gradient(120deg, #0f3d5e 0%, #2a7ab9 100%) !important;
  box-shadow: 0 10px 28px rgba(15, 61, 94, 0.16);
  border-bottom-left-radius: 1.25rem;
  border-bottom-right-radius: 1.25rem;
}

.navbar-brand span,
.navbar-nav .nav-link,
.navbar .btn {
  color: var(--text-light) !important;
}

.brand-avatar {
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.navbar-brand span {
  letter-spacing: 0.03em;
  font-size: 1.02rem;
}

.navbar-nav .nav-link {
  border-radius: 999px;
  padding: 0.55rem 1rem;
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.14);
  color: #fffbe8 !important;
  transform: translateY(-1px);
}

#toggle-theme {
  border-color: rgba(255, 255, 255, 0.45) !important;
}

.nav-cta {
  border-radius: 999px;
  padding-inline: 1rem;
}

#hero .bg-hero-custom {
  background: var(--surface-highlight);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  overflow: hidden;
  position: relative;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(244, 185, 66, 0.16), transparent 68%);
  pointer-events: none;
}

.hero-photo {
  width: 230px;
  height: 230px;
  object-fit: cover;
  object-position: center;
}

.hero-badges .badge {
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(15, 61, 94, 0.08);
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-socials .btn {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#hero h1,
h2,
.card-title,
h5,
h6 {
  color: var(--primary-color);
}

#hero .lead,
#hero p,
.text-muted,
.card-text,
small {
  color: var(--text-muted) !important;
}

.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(42, 122, 185, 0.24) !important;
}

h2.mb-4 {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 2rem !important;
}

#keahlian,
#organisasi,
#sertifikasi {
  background: transparent !important;
}

.skill-card {
  padding: 1.35rem 1rem;
  text-align: center;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.skill-card i {
  font-size: 2rem;
}

.skill-card p {
  margin: 0;
  font-weight: 600;
}

.experience-card,
.publication-card {
  padding: 1.5rem 1.25rem;
}

.experience-card {
  text-align: left;
}

.experience-card .text-center {
  text-align: center !important;
}

.experience-card .company-logo {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(42, 122, 185, 0.2);
}

.experience-card ul,
.publication-card p,
#project-pribadi .card-text,
#organisasi p {
  text-align: left;
}

.experience-card li,
.publication-card .card-text {
  line-height: 1.65;
}

.publication-card .publication-index,
#sertifikasi .rounded-circle,
#portofolio .rounded-circle {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
  color: #fff;
  font-weight: 700;
}

#publikasi .row,
#pengalaman .row {
  row-gap: 1.5rem;
}

#project-pribadi .card-img-top {
  height: 210px;
  object-fit: cover;
}

footer.bg-dark {
  background: linear-gradient(135deg, #0f3d5e 0%, #133a59 55%, #2a7ab9 100%) !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -12px 30px rgba(15, 61, 94, 0.12);
}

body.dark-mode .card,
body.dark-mode #hero .bg-hero-custom {
  color: var(--text-color);
}

body.dark-mode .btn-outline-dark,
body.dark-mode .btn-outline-secondary {
  color: var(--text-color);
  border-color: rgba(255, 255, 255, 0.28);
}

body.dark-mode .btn-outline-dark:hover,
body.dark-mode .btn-outline-secondary:hover {
  color: #101826;
  background-color: #f3f7ff;
}

@media (max-width: 991.98px) {
  .navbar-nav {
    gap: 0.25rem !important;
  }

  .navbar .btn {
    margin-top: 0.75rem;
  }

  .navbar-collapse {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }
}

@media (max-width: 767.98px) {
  #hero {
    padding-top: 2rem !important;
  }

  #hero h1.fw-bold.display-4 {
    font-size: 2.15rem;
    white-space: normal;
  }

  #hero .lead {
    font-size: 1rem;
  }

  #hero p.mb-4 {
    font-size: 0.96rem;
  }

  #hero .bg-hero-custom {
    padding: 2rem 1.25rem !important;
  }

  .hero-photo {
    width: 180px;
    height: 180px;
  }

  #hero .d-flex.justify-content-center.gap-3 {
    flex-wrap: wrap;
  }

  .experience-card,
  .publication-card,
  #project-pribadi .card-body,
  #organisasi .card,
  #portofolio .card,
  #sertifikasi .card {
    padding: 1.25rem 1rem !important;
  }

  #publikasi .row {
    --bs-gutter-x: 1rem;
  }
}

@media (max-width: 575.98px) {
  .container,
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .navbar-brand span {
    max-width: 190px;
    white-space: normal;
    line-height: 1.2;
  }

  .skill-card {
    min-height: 128px;
    padding: 0.95rem 0.7rem;
  }

  .experience-card .company-logo {
    width: 60px;
    height: 60px;
  }

  .experience-card,
  .publication-card {
    padding: 1.1rem 0.9rem !important;
  }

  .experience-card li,
  .publication-card .card-text,
  #organisasi p,
  #project-pribadi .card-text {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .hero-badges {
    justify-content: center !important;
  }

  .hero-badges .badge {
    font-size: 0.82rem;
    padding: 0.48rem 0.72rem;
  }

  .hero-socials {
    gap: 0.75rem !important;
  }

  #project-pribadi .card-img-top {
    height: 180px;
  }
}
