/* ==========================================================================
   style.css : Tata Letak Modern, Tipografi & Responsif (Mobile-First)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.22vw, 1.125rem);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p, ul { margin-top: 0; }

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; border-radius: 999px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Latar Belakang ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
#fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Navigasi Mengambang (Floating Pill) ---------- */
.nav {
  position: sticky; top: 0.75rem; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0.75rem auto 0;
  width: calc(100% - 1.5rem);
  padding: 0.45rem clamp(0.85rem, 2.5vw, 1.5rem);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-logo { font-size: 1.25rem; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 0.35rem; }
.nav-toggle {
  min-height: 44px; min-width: 44px; font-size: 1.45rem;
  background: transparent; border: 0; color: inherit;
}
.nav-links {
  display: none; flex-direction: column; width: 100%; gap: 0.25rem;
  padding: 0.5rem 0 0.75rem;
}
.nav-links.is-open { display: flex; }
.nav-links a {
  display: flex; align-items: center; min-height: 44px; padding: 0 1rem;
  border-radius: 999px; font-weight: 700; font-size: 0.96rem;
  transition: background 0.25s, color 0.25s, transform 0.2s, box-shadow 0.25s;
}
.nav-links a:hover { transform: translateY(-1px); }

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  max-width: 1140px; margin: 0 auto;
  padding: clamp(1.25rem, 3.5vw, 2.5rem) clamp(0.85rem, 3vw, 1.5rem) 4rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}

.hero-card {
  display: flex; flex-direction: column-reverse; align-items: center; justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3.2rem);
  padding: clamp(1.6rem, 4vw, 3rem);
  border-radius: 32px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
}

.hero-pills {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  justify-content: center; margin-bottom: 0.9rem;
}
.pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.28rem 0.85rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.01em;
}

.hero-hello { font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.35rem); font-weight: 800; margin-bottom: 0.2rem; opacity: 0.95; }
.hero-name { font-size: clamp(2.35rem, 1.5rem + 4.4vw, 4.4rem); line-height: 1.06; margin-bottom: 0.45rem; font-weight: 700; }
.hero-role { font-size: clamp(1.15rem, 1rem + 1.1vw, 1.75rem); font-weight: 700; min-height: 1.6em; margin-bottom: 0.85rem; }
.tagline { max-width: 38rem; margin: 0 auto 1.4rem; font-size: clamp(0.98rem, 0.94rem + 0.3vw, 1.14rem); opacity: 0.94; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 48px; padding: 0.68rem 1.55rem; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 1.02rem;
  transition: transform 0.22s, box-shadow 0.25s, background 0.25s;
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:active { transform: scale(0.98); }
.btn-small { min-height: 44px; padding: 0.42rem 1.15rem; font-size: 0.94rem; }

.hero-art { display: flex; justify-content: center; flex-shrink: 0; }
.avatar-frame { position: relative; width: clamp(220px, 56vw, 350px); z-index: 1; }
.avatar-frame img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 22px;
}
.orbit {
  position: absolute;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
}
.o1 { top: 2%; left: -4%; } .o2 { top: 8%; right: -5%; } .o3 { bottom: 8%; left: -5%; } .o4 { bottom: 2%; right: -2%; }

/* Strip Ringkasan Statistik */
.stats-strip {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
  padding: 1rem 1.25rem; border-radius: 24px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.stat-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0.35rem 0.5rem;
}
.stat-num { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); font-weight: 700; line-height: 1.15; }
.stat-label { font-size: 0.82rem; font-weight: 700; opacity: 0.88; margin-top: 0.15rem; }

.scroll-hint {
  position: absolute; bottom: 0.4rem; left: 50%; font-size: 2.2rem; line-height: 1;
  min-height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center;
}

/* ---------- Bagian Utama & Heading ---------- */
main { max-width: 1140px; margin: 0 auto; padding: 0 clamp(0.85rem, 3vw, 1.5rem) 3.5rem; }
.section-head { text-align: center; margin: 1.5rem 0 2.2rem; }
.section-kicker {
  display: inline-block; padding: 0.22rem 0.85rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
}
.section-head h2, .contact h2 { font-size: clamp(1.85rem, 1.3rem + 2.6vw, 2.8rem); margin-bottom: 0.35rem; font-weight: 700; }
.block { margin-top: 3.5rem; }

.section-panel {
  padding: clamp(1.4rem, 3.5vw, 2.6rem);
  border-radius: 30px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.section-panel .section-head { margin-top: 0; }

/* ---------- Timeline Perjalanan (Story Mode) ---------- */
.journey { position: relative; padding-left: 3rem; display: grid; gap: 2.2rem; }
.journey::before {
  content: ''; position: absolute; left: 1.1rem; top: 0.5rem; bottom: 0.5rem; width: 5px; border-radius: 5px;
}
.stage { position: relative; }
.stage-node {
  position: absolute; left: -3rem; top: 1.1rem; z-index: 3;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.05rem;
}
.stage-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 26px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.28s, box-shadow 0.28s, border-color 0.28s, background 0.28s;
}
.stage-card:hover { transform: translateY(-5px); }

.stage-img { position: relative; padding: 0.85rem 0.85rem 0; }
.stage-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.stage-lvl-badge {
  position: absolute; right: 1.45rem; bottom: 0.65rem;
  padding: 0.22rem 0.75rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
}

.stage-body { padding: 1.15rem 1.3rem 1.45rem; }
.stage-tag {
  display: inline-block; padding: 0.22rem 0.85rem; border-radius: 999px;
  font-weight: 600; font-size: 0.84rem; margin-bottom: 0.55rem;
}
.stage-body h3 { font-size: clamp(1.28rem, 1.1rem + 1vw, 1.7rem); margin-bottom: 0.45rem; line-height: 1.25; }
.stage-body p { margin-bottom: 0.85rem; opacity: 0.95; }

.xp { margin: 0.85rem 0 1.05rem; }
.xp-label { display: flex; justify-content: space-between; font-size: 0.84rem; font-weight: 700; margin-bottom: 0.32rem; }
.xp-bar { height: 13px; border-radius: 999px; overflow: hidden; }
.xp-bar i, .skill-bar i {
  display: block; position: relative; height: 100%; width: 0;
  border-radius: 999px; overflow: hidden;
  transition: width 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.stage-top-split { display: flex; flex-direction: column; }
.repair-grid {
  display: grid; grid-template-columns: 1fr; gap: 0.85rem;
  padding: 0 1.2rem 1.35rem;
}
.repair {
  padding: 0.95rem 1.05rem; border-radius: 18px;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.repair:hover { transform: translateY(-3px); }
.repair h4 { margin-bottom: 0.45rem; font-size: 1.02rem; }
.repair ul { margin: 0; padding-left: 1.15rem; font-size: 0.93rem; }
.repair li + li { margin-top: 0.25rem; }

/* ---------- Skill Grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center; margin-bottom: 1.5rem; }
.chip {
  min-height: 44px; padding: 0.4rem 1.2rem; border-radius: 999px;
  font-weight: 600; transition: background 0.25s, box-shadow 0.25s, transform 0.2s;
}
.chip:hover { transform: translateY(-2px); }
.skills-grid { display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
.skill {
  padding: 0.95rem 1.15rem; border-radius: 18px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, background 0.25s;
}
.skill:hover { transform: translateY(-4px); }
.skill.is-hidden { display: none; }
.skill-top { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.55rem; font-weight: 700; }
.skill-icon { font-size: 1.55rem; }
.skill-pct { margin-left: auto; font-family: var(--font-display); font-size: 0.9rem; color: var(--butter); }
.skill-bar { height: 10px; border-radius: 999px; background: rgba(10, 4, 24, 0.55); overflow: hidden; }

/* ---------- Badge Grid ---------- */
.badges-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
.badge {
  padding: 1.05rem 0.8rem; border-radius: 20px; text-align: center;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, background 0.25s;
}
.badge:hover { transform: translateY(-5px) rotate(-1.5deg); }
.badge-icon { display: block; font-size: 2.25rem; margin-bottom: 0.3rem; }
.badge strong { display: block; font-family: var(--font-display); font-size: 0.98rem; }
.badge span.badge-desc { display: block; font-size: 0.82rem; opacity: 0.88; margin-top: 0.2rem; }

/* ---------- Kontak & Footer ---------- */
.contact {
  text-align: center; padding: 2rem 1.5rem; border-radius: 28px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 1rem; }
.contact-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 48px; padding: 0.6rem 1.4rem; border-radius: 999px;
  font-weight: 700; transition: transform 0.2s, background 0.25s;
}
.contact-link:hover { transform: translateY(-3px); }

.footer { text-align: center; padding: 1.6rem 1rem 2.4rem; backdrop-filter: blur(10px); }
.footer-credits { max-width: 780px; margin: 0.45rem auto 0; font-size: 0.78rem; opacity: 0.82; line-height: 1.5; }

/* ---------- Maskot Pojok (Wikipe-tan Non-AI) ---------- */
.mascot-dock {
  position: fixed; left: 0.85rem; bottom: 0; z-index: 45;
  display: none; align-items: flex-end;
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.mascot-dock img {
  width: 96px; height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s ease;
}
.mascot-dock:hover img { transform: translateY(-6px) scale(1.05); }
.mascot-bubble {
  position: absolute; left: 88px; bottom: 72px;
  width: max-content; max-width: 210px;
  padding: 0.45rem 0.75rem; border-radius: 16px 16px 16px 4px;
  font-size: 0.78rem; font-weight: 700; line-height: 1.35;
  opacity: 0; transform: translateY(6px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.mascot-dock:hover .mascot-bubble,
.mascot-dock:focus-visible .mascot-bubble {
  opacity: 1; transform: translateY(0) scale(1);
}

.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%; border: 0; font-size: 1.35rem;
}
.to-top[hidden] { display: none; }

/* ---------- Modal ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(92vw, 640px); width: 100%; color: inherit; }
.modal-box { position: relative; padding: 1.6rem 1.4rem; border-radius: 26px; max-height: 85vh; overflow-y: auto; }
.modal-close { position: absolute; right: 0.8rem; top: 0.8rem; width: 44px; height: 44px; border-radius: 50%; border: 0; font-size: 1.1rem; }
.modal-box h3 { font-size: 1.55rem; padding-right: 3rem; margin-bottom: 0.4rem; }
.modal-box h4 { margin: 1rem 0 0.3rem; color: var(--butter); }
.modal-box ul { padding-left: 1.2rem; margin: 0; }

/* ---------- Efek Muncul Saat Scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.75s ease, transform 0.75s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Kursor Sparkle ---------- */
.sparkle { position: fixed; z-index: 90; pointer-events: none; font-size: 1rem; animation: sparkle-out 0.9s ease-out forwards; }
@keyframes sparkle-out { to { opacity: 0; transform: translateY(24px) scale(0.2) rotate(120deg); } }

/* ---------- Tablet (>= 768px) ---------- */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; flex-direction: row; width: auto; padding: 0; gap: 0.2rem; }
  .nav-links a { padding: 0 0.95rem; }

  .hero-card { flex-direction: row; text-align: left; }
  .hero-text { flex: 1 1 56%; }
  .hero-art { flex: 0 0 38%; }
  .hero-pills { justify-content: flex-start; }
  .tagline { margin-left: 0; }
  .hero-cta { justify-content: flex-start; }

  .stats-strip { grid-template-columns: repeat(4, 1fr); }
  .stat-item + .stat-item { border-left: 1px solid rgba(255, 198, 235, 0.2); }

  .journey { padding-left: 0; gap: 2.4rem; }
  .journey::before { left: 50%; transform: translateX(-50%); }
  .stage-node { left: 50%; transform: translateX(-50%); top: 1.6rem; }
  .stage-card { width: calc(50% - 2.3rem); }
  .stage:nth-child(even) .stage-card { margin-left: auto; }

  /* Kartu puncak SMA tampil lebar penuh (boss showcase) */
  .stage-final { margin-top: 1.2rem; }
  .stage-final .stage-node { top: -1.2rem; width: 2.8rem; height: 2.8rem; font-size: 1.2rem; }
  .stage-final .stage-card { width: 100%; margin-left: 0; }
  .stage-top-split { flex-direction: row; align-items: center; }
  .stage-top-split .stage-img { flex: 0 0 44%; padding: 1.1rem 0 1.1rem 1.1rem; }
  .stage-top-split .stage-body { flex: 1; padding: 1.35rem 1.5rem; }
  .repair-grid { grid-template-columns: repeat(3, 1fr); padding: 0.2rem 1.1rem 1.25rem; }

  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .badges-grid { grid-template-columns: repeat(3, 1fr); }
  .mascot-dock { display: flex; }
}

/* ---------- Desktop (>= 1024px) ---------- */
@media (min-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .badges-grid { grid-template-columns: repeat(4, 1fr); }
  .stage-card { width: calc(50% - 2.8rem); }
  .stage-final .stage-card { width: 100%; }
  .mascot-dock img { width: 112px; }
}

@media (min-width: 1280px) {
  .hero-card { padding: 3.2rem 3.6rem; }
}

/* ---------- Aksesibilitas Gerak ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
