/* =====================================================
   Portfolio | Tugas UTS Cloud Computing
   Custom style di atas Bootstrap 5
   ===================================================== */

:root {
  --brand: #4f46e5;
  --brand-2: #06b6d4;
  --brand-soft: rgba(79, 70, 229, 0.08);
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --surface: #ffffff;
  --surface-alt: #f6f7fb;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

[data-bs-theme="dark"] {
  --ink: #e8ecf6;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.1);
  --surface: #10131c;
  --surface-alt: #0a0c13;
  --brand-soft: rgba(99, 102, 241, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --bs-primary: #818cf8;
  --bs-primary-rgb: 129, 140, 248;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: var(--bs-body-font-family);
  background-color: var(--surface);
  color: var(--ink);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.03em;
}

a {
  text-decoration: none;
  color: var(--brand);
}

a:hover {
  color: var(--brand-2);
}

.text-secondary {
  color: var(--muted) !important;
}

/* ---------- Buttons ---------- */
.btn {
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  --bs-btn-bg: #4f46e5;
  --bs-btn-border-color: #4f46e5;
  --bs-btn-hover-bg: #4338ca;
  --bs-btn-hover-border-color: #4338ca;
  --bs-btn-active-bg: #3730a3;
  --bs-btn-active-border-color: #3730a3;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.34);
}

.btn-outline-secondary {
  --bs-btn-color: var(--ink);
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-bg: var(--surface-alt);
  --bs-btn-hover-border-color: var(--line);
  --bs-btn-hover-color: var(--ink);
  --bs-btn-active-bg: var(--surface-alt);
  --bs-btn-active-border-color: var(--line);
  --bs-btn-active-color: var(--ink);
  background-color: var(--surface);
}

/* ---------- Navbar ---------- */
.nav-blur {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.nav-blur.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.navbar-brand {
  font-size: 1.15rem;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.navbar-brand:hover {
  color: var(--ink);
}

.brand-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.navbar .nav-link {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.94rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: 999px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--ink);
  background-color: var(--brand-soft);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 130px 0 90px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.hero-glow-1 {
  width: 420px;
  height: 420px;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.4), transparent 70%);
}

.hero-glow-2 {
  width: 360px;
  height: 360px;
  bottom: -100px;
  left: -80px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.32), transparent 70%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  border-radius: 999px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.text-gradient {
  background: linear-gradient(120deg, var(--brand) 10%, var(--brand-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.social-row .social-link {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 0.18s ease;
}

.social-row .social-link:hover {
  color: var(--brand);
}

.hero-card {
  max-width: 380px;
  margin-inline: auto;
  box-shadow: var(--shadow-lg);
}

.avatar {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.3);
}

.mini-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

.mini-stat-value {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.2;
}

.mini-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- Shared surfaces ---------- */
.card-soft {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--surface-alt);
}

.section-kicker {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.section-title {
  font-size: clamp(1.7rem, 3.1vw, 2.4rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 1rem;
}

/* ---------- About ---------- */
.list-check {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.list-check li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.list-check i {
  color: var(--brand);
  flex-shrink: 0;
  margin-top: 2px;
}

.info-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 25%, transparent);
}

.icon-box {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.25rem;
  color: var(--brand);
  background: var(--brand-soft);
}

.icon-box.icon-sm {
  width: 40px;
  height: 40px;
  font-size: 1rem;
  border-radius: 12px;
}

/* ---------- Skills ---------- */
.skill-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.skill-icon {
  font-size: 1.9rem;
  color: var(--brand);
}

.skill-card .progress {
  height: 6px;
  border-radius: 999px;
  background: var(--brand-soft);
}

.skill-card .progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

/* ---------- Projects ---------- */
.project-card {
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 25%, transparent);
}

.project-thumb {
  height: 170px;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  color: #fff;
}

.thumb-1 { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.thumb-2 { background: linear-gradient(135deg, #0ea5e9, #06b6d4); }
.thumb-3 { background: linear-gradient(135deg, #f97316, #f43f5e); }

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.link-arrow {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.18s ease;
}

.link-arrow:hover {
  gap: 10px;
}

/* ---------- CTA ---------- */
.cta-card {
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(120deg, #4f46e5 0%, #6d5cf0 45%, #0ea5e9 100%);
  box-shadow: 0 24px 60px rgba(79, 70, 229, 0.32);
}

.cta-text {
  color: rgba(255, 255, 255, 0.86);
}

/* ---------- Contact ---------- */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-list a,
.contact-list span {
  font-weight: 500;
  font-size: 0.95rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.form-control {
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-sm);
  border-color: var(--line);
  background-color: var(--surface-alt);
  color: var(--ink);
}

.form-control:focus {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: 0 0 0 4px var(--brand-soft);
  background-color: var(--surface);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-social a {
  color: var(--muted);
  font-size: 1.05rem;
  transition: color 0.18s ease, transform 0.18s ease;
  display: inline-block;
}

.footer-social a:hover {
  color: var(--brand);
  transform: translateY(-2px);
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 1030;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  color: #fff;
  background: #4338ca;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hero {
    min-height: auto;
    padding: 120px 0 70px;
  }

  .navbar-collapse {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 575.98px) {
  .hero-card {
    margin-top: 8px;
  }

  .btn-lg {
    padding: 0.65rem 1.2rem;
    font-size: 0.95rem;
  }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
