/* =============================================================
   styles.css — Portfolio profesional
   Palet: navy · off-white · aksen emas
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  --navy: #0d233b;
  --navy-900: #081729;
  --navy-700: #143454;
  --accent: #b3853a;
  --accent-soft: rgba(179, 133, 58, 0.12);

  --ink: #16202c;
  --ink-soft: #4a586a;
  --ink-muted: #74839a;
  --line: #e3e7ee;
  --bg: #ffffff;
  --bg-alt: #f6f7fa;
  --bg-tint: #eef1f6;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(13, 35, 59, 0.06), 0 4px 14px rgba(13, 35, 59, 0.05);
  --shadow-md: 0 10px 30px rgba(13, 35, 59, 0.09);
  --shadow-lg: 0 24px 60px rgba(13, 35, 59, 0.16);

  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Fraunces", "Georgia", "Times New Roman", serif;

  --container: 1140px;
  --header-h: 76px;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --navy: #0f1b2d;          /* dipakai sbg surface gelap dekoratif */
  --navy-900: #0a1420;
  --navy-700: #1c3350;
  --accent: #d0a25a;        /* emas sedikit lebih terang agar kontras */
  --accent-soft: rgba(208, 162, 90, 0.16);

  --ink: #e8edf5;           /* teks utama terang */
  --ink-soft: #b3becd;
  --ink-muted: #8493a6;
  --line: #26313f;
  --bg: #0c141f;            /* latar utama gelap */
  --bg-alt: #111b28;
  --bg-tint: #18232f;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

/* transisi lembut saat berganti tema */
body,
.site-header,
.card,
.section-alt,
.tag,
.field-input,
.btn-outline {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ---------- Loading overlay (menunggu Supabase) ---------- */
.app-loading {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
  color: var(--ink-muted);
  font-size: 0.9rem;
  transition: opacity 0.3s ease;
}

.app-loading.is-done {
  opacity: 0;
  pointer-events: none;
}

.app-loading-spinner,
.editor-loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: app-spin 0.8s linear infinite;
}

.editor-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 22px;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.editor-loading-spinner {
  width: 20px;
  height: 20px;
  border-width: 2px;
  flex: 0 0 auto;
}

@keyframes app-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .app-loading-spinner,
  .editor-loading-spinner {
    animation-duration: 2s;
  }
}

/* Penyesuaian komponen di dark mode -------------------------- */

/* header: brand-mark tetap kontras */
[data-theme="dark"] .brand-mark {
  background: var(--accent);
  color: var(--navy-900);
}

/* kartu putih -> surface gelap */
[data-theme="dark"] .card,
[data-theme="dark"] .cert-panel {
  background: var(--bg-alt);
}

/* tombol outline putih */
[data-theme="dark"] .btn-outline {
  background: var(--bg-alt);
  color: var(--ink);
}

/* eyebrow hero (chip putih) */
[data-theme="dark"] .eyebrow {
  background: var(--bg-alt);
}

/* header saat scroll */
[data-theme="dark"] .site-header {
  background: rgba(12, 20, 31, 0.82);
}

/* badge foto */
[data-theme="dark"] .photo-badge {
  background: rgba(24, 35, 47, 0.96);
  color: var(--ink);
}

/* input editor & login */
[data-theme="dark"] .field-input,
[data-theme="dark"] .pw-toggle,
[data-theme="dark"] .editor-close {
  background: var(--bg-alt);
  color: var(--ink);
  border-color: var(--line);
}

/* highlight-card & contact-card sudah gelap (navy) — cukup pertahankan,
   tapi pastikan border terlihat */
[data-theme="dark"] .highlight-card,
[data-theme="dark"] .contact-card {
  border: 1px solid var(--line);
}

/* to-top & fab */
[data-theme="dark"] .to-top {
  background: var(--bg-alt);
  color: var(--ink);
}

/* placeholder foto & skeleton di dark */
[data-theme="dark"] .photo-bg {
  background-color: transparent;
}

/* Judul & teks yang di-hardcode navy -> jadikan terang di dark mode
   (navy tetap dipakai sebagai warna surface gelap di tempat lain). */
[data-theme="dark"] .brand-text strong,
[data-theme="dark"] .hero-name,
[data-theme="dark"] .hero-meta-item,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .section-title,
[data-theme="dark"] .card-title,
[data-theme="dark"] .info-row dd,
[data-theme="dark"] .job-role,
[data-theme="dark"] .cert-item strong,
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.is-active,
[data-theme="dark"] .editor-header h2,
[data-theme="dark"] .field-check .check,
[data-theme="dark"] .array-item > summary,
[data-theme="dark"] .login-brand-text strong,
[data-theme="dark"] .login-title {
  color: var(--ink);
}

/* highlight-card & contact-card memakai gradient navy sebagai latar gelap;
   di dark mode buat sedikit lebih pekat dari bg agar tetap menonjol */
[data-theme="dark"] .highlight-card,
[data-theme="dark"] .contact-card {
  background: linear-gradient(165deg, #13233a 0%, #0a1626 100%);
}

/* ---- Dark mode: halaman admin (login + editor full-page) ---- */
[data-theme="dark"] .login-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
}

[data-theme="dark"] .login-brand,
[data-theme="dark"] .login-disclaimer {
  border-color: var(--line);
}

[data-theme="dark"] .login-disclaimer code,
[data-theme="dark"] .login-disclaimer,
[data-theme="dark"] .field-hint {
  color: var(--ink-muted);
}

[data-theme="dark"] .login-disclaimer code {
  background: var(--bg-tint);
}

[data-theme="dark"] .editor-pane {
  background: var(--bg-alt);
}

/* Tag (keahlian terkait, skill, dll) di dark mode: teks terang + latar kontras */
[data-theme="dark"] .tag {
  background: var(--bg-tint);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .section-alt .tag {
  background: var(--bg);
}

/* docked editor panel (live preview di halaman utama saat login) */
[data-theme="dark"] .editor-panel {
  background: var(--bg);
  border-left-color: var(--line);
}

[data-theme="dark"] .editor-header {
  border-bottom-color: var(--line);
}

[data-theme="dark"] .editor-header h2 {
  color: var(--ink);
}

[data-theme="dark"] .editor-tabs,
[data-theme="dark"] .editor-footer,
[data-theme="dark"] .editor-preview-bar {
  background: var(--bg-alt);
  border-color: var(--line);
}

[data-theme="dark"] .editor-preview {
  background: var(--bg);
}

[data-theme="dark"] .editor-tab {
  color: var(--ink-soft);
}

[data-theme="dark"] .editor-tab:hover {
  background: var(--bg-tint);
  border-color: var(--line);
}

[data-theme="dark"] .editor-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--navy-900);
}

[data-theme="dark"] .array-item,
[data-theme="dark"] .field-array {
  background: var(--bg-tint);
  border-color: var(--line);
}

[data-theme="dark"] .array-item[open] > summary {
  background: var(--bg);
}

[data-theme="dark"] .mini-btn,
[data-theme="dark"] .image-preview {
  background: var(--bg-tint);
  border-color: var(--line);
  color: var(--ink-soft);
}

/* dashed border pakai token --line agar terlihat di dark */
[data-theme="dark"] .info-row,
[data-theme="dark"] .cert-item {
  border-color: var(--line);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

body.editor-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/* Atribut `hidden` harus selalu menyembunyikan elemen, meskipun ada
   aturan display lain (mis. .editor-app/.editor-fab/.editor-panel).
   Tanpa ini, elemen ber-`hidden` tetap tampil karena display-nya ditimpa. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.icon {
  flex: 0 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.86rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(179, 133, 58, 0.28);
}

.btn-primary:hover {
  background: #9c7130;
}

.btn-outline {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--navy);
  background: var(--bg-tint);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(13, 35, 59, 0.06);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.brand-text strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text small {
  font-size: 0.74rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;               /* isi ruang antara brand dan tombol tema */
  justify-content: flex-end;
}

/* daftar link di tengah ruang nav; CTA tetap di kanan */
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;        /* dorong ul ke tengah bila ada isinya */
}

.site-nav ul:empty {
  margin: 0;             /* kosong -> tak makan ruang, CTA tetap kanan */
}

.nav-cta {
  flex: 0 0 auto;
}

.nav-link {
  position: relative;
  display: block;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: color 0.18s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-link:hover {
  color: var(--navy);
}

.nav-link.is-active {
  color: var(--navy);
  font-weight: 600;
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

/* ---------- Side-nav (garis vertikal + tooltip) ---------- */
.side-nav {
  position: fixed;
  top: 50%;
  right: 26px;
  transform: translateY(-50%);
  z-index: 80;
}

.side-nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 26px;
  padding-right: 2px;
}

.side-nav-dot {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-muted);
  opacity: 0.45;
  transition: width 0.22s ease, background 0.22s ease, opacity 0.22s ease;
}

.side-nav-item:hover .side-nav-dot {
  width: 30px;
  opacity: 0.85;
  background: var(--accent);
}

.side-nav-item.is-active .side-nav-dot {
  width: 34px;
  opacity: 1;
  background: var(--accent);
}

.side-nav-tip {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.side-nav-item:hover .side-nav-tip,
.side-nav-item.is-active .side-nav-tip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

[data-theme="dark"] .side-nav-tip {
  background: var(--bg-tint);
  color: var(--ink);
  border: 1px solid var(--line);
}

/* Header nav: desktop menampilkan hanya item terpilih & bila diaktifkan.
   Default (desktop): sembunyikan semua link header. */
#headerNavList > li {
  display: none;
}
#headerNavList[data-show-header="1"] > li.is-header-pick {
  display: block;
}

/* field checklist (pilih beberapa section utk header) */
.field-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.check-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* di halaman editor & mode docked, side-nav disembunyikan */
.editor-page-mode .side-nav,
.editor-docked .side-nav {
  display: none;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  margin-left: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* tampilkan ikon sesuai tema: bulan di light (ajakan ke dark),
   matahari di dark (ajakan ke light) */
.theme-toggle .theme-icon-sun {
  display: none;
}
.theme-toggle .theme-icon-moon {
  display: block;
}
[data-theme="dark"] .theme-toggle .theme-icon-sun {
  display: block;
}
[data-theme="dark"] .theme-toggle .theme-icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 72px) 0 64px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 520px at 82% -8%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 460px at 8% 6%, rgba(13, 35, 59, 0.07), transparent 62%),
    linear-gradient(180deg, var(--bg-alt), var(--bg) 72%);
  z-index: -1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 7px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-name {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  color: var(--navy);
  margin-bottom: 12px;
}

.hero-role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.hero-role-sep {
  color: var(--ink-muted);
}

.hero-tagline {
  max-width: 58ch;
  margin: 0 0 28px;
  font-size: 1.04rem;
  color: var(--ink-soft);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-bottom: 32px;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.hero-meta-item .icon {
  color: var(--accent);
}

.hero-meta-item small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* foto */
.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
}

.photo-frame {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-700) 100%);
  padding: 10px;
  box-shadow: var(--shadow-lg);
}

/* Foto sebagai background-image (proteksi ringan: tak bisa di-"save image",
   tak bisa di-drag). Div kosong -> tidak ada <img> untuk diunduh langsung. */
.photo-bg {
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius-lg) - 6px);
  background-color: transparent;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* Lapisan dasar: fade-in halus hanya saat pertama kali dimuat */
#profilePhoto {
  opacity: 0;
  transition: opacity 0.5s ease;
}
#profilePhoto.is-loaded {
  opacity: 1;
}

/* Lapisan atas untuk crossfade placeholder -> foto asli */
.photo-bg-next {
  opacity: 0;
  transition: opacity 0.55s ease;
  z-index: 1;
}
.photo-bg-next.is-visible {
  opacity: 1;
}

/* Skeleton shimmer saat foto masih dimuat */
.photo-frame.is-loading::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border-radius: calc(var(--radius-lg) - 6px);
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  background-size: 220% 100%;
  animation: photo-shimmer 1.3s ease-in-out infinite;
  pointer-events: none;
}

[data-theme="dark"] .photo-frame.is-loading::before {
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  background-size: 220% 100%;
}

@keyframes photo-shimmer {
  0% {
    background-position: 180% 0;
  }
  100% {
    background-position: -80% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #profilePhoto,
  .photo-bg-next {
    transition: opacity 0.2s ease;
  }
  .photo-frame.is-loading::before {
    animation: none;
  }
}

/* Lapisan pelindung transparan di atas foto: menangkap klik-kanan/drag,
   sehingga interaksi menyimpan gambar mengenai overlay kosong ini. */
.photo-shield {
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius-lg) - 6px);
  z-index: 2;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  background: transparent;
}

[data-photo-shape="arch"] .photo-frame,
[data-photo-shape="arch"] .photo-bg,
[data-photo-shape="arch"] .photo-shield {
  border-radius: 190px 190px 20px 20px;
}

[data-photo-shape="circle"] .photo-frame,
[data-photo-shape="circle"] .photo-bg,
[data-photo-shape="circle"] .photo-shield {
  border-radius: 50%;
}

[data-photo-shape="circle"] .photo-frame {
  aspect-ratio: 1 / 1;
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: -18px -18px 24px 24px;
  border: 1px solid var(--accent);
  border-radius: inherit;
  opacity: 0.5;
  z-index: -1;
}

.photo-glow {
  position: absolute;
  inset: auto -12% -8% -12%;
  height: 40%;
  background: radial-gradient(60% 100% at 50% 100%, var(--accent-soft), transparent 70%);
  filter: blur(6px);
  z-index: -1;
  pointer-events: none;
}

.photo-badge {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 92%;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
}

.photo-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f9e5f;
  box-shadow: 0 0 0 4px rgba(47, 158, 95, 0.18);
  flex: 0 0 auto;
}

/* statistik */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 64px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 700;
  color: var(--navy);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* ---------- Section umum ---------- */
.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-eyebrow {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  color: var(--navy);
  margin-bottom: 14px;
}

.section-subtitle {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink-soft);
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 1.12rem;
  color: var(--navy);
  margin-bottom: 14px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 40px;
  align-items: start;
}

.about-body p {
  font-size: 1.03rem;
  color: var(--ink-soft);
  margin-bottom: 1.15rem;
}

.about-body p:first-child::first-letter {
  font-family: var(--font-serif);
  font-size: 3.1rem;
  font-weight: 700;
  line-height: 0.9;
  float: left;
  margin: 6px 12px 0 0;
  color: var(--accent);
}

.info-card {
  padding: 26px 28px;
}

.about-highlights {
  margin-top: 26px;
}

.about-highlights .check-list {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px 34px;
}

.info-list {
  display: grid;
  gap: 14px;
}

.info-row {
  display: grid;
  gap: 2px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

.info-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.info-row dt {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.info-row dd {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.45;
}

.highlight-card {
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-900) 100%);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.86);
}

.highlight-card .card-title {
  color: #fff;
}

.check-list {
  display: grid;
  gap: 13px;
}

.check-list li {
  display: flex;
  gap: 11px;
  font-size: 0.94rem;
  line-height: 1.55;
}

.check-list .icon {
  margin-top: 3px;
  color: var(--accent);
}

/* ---------- Expertise ---------- */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

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

.expertise-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(179, 133, 58, 0.4);
}

.expertise-card p {
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.expertise-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 26px;
  padding-left: 34px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--line));
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  position: absolute;
  top: 30px;
  left: -34px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--line);
}

.timeline-item.is-current .timeline-marker {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.job-card {
  padding: 30px;
  transition: box-shadow 0.24s ease, transform 0.24s ease;
}

.job-card:hover {
  box-shadow: var(--shadow-md);
}

.job-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 24px;
  margin-bottom: 14px;
}

.job-role {
  font-size: 1.22rem;
  color: var(--navy);
  margin-bottom: 5px;
}

.job-company {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.job-meta {
  font-weight: 500;
  color: var(--ink-muted);
}

.job-period {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.pill {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.job-summary {
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.job-points {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.job-points li {
  position: relative;
  padding-left: 22px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.job-points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-700);
}

.section-alt .tag {
  background: #fff;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

.skill-card .card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.skill-card .card-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- Education ---------- */
.education-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: start;
}

.education-list {
  display: grid;
  gap: 22px;
}

.education-card {
  display: flex;
  gap: 20px;
}

.education-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
}

.education-body {
  min-width: 0;
}

.education-body .card-title {
  margin-bottom: 5px;
}

.education-school {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--accent);
}

.education-meta {
  margin: 0 0 16px;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.education-meta .dot {
  color: var(--line);
}

.cert-panel {
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--bg-alt), var(--bg-tint));
  border: 1px solid var(--line);
}

.cert-list {
  display: grid;
  gap: 16px;
}

.cert-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}

.cert-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.cert-item .icon {
  margin-top: 3px;
  color: var(--accent);
}

.cert-item strong {
  display: block;
  font-size: 0.94rem;
  color: var(--navy);
  line-height: 1.4;
}

.cert-item small {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* ---------- Contact ---------- */
.section-contact {
  padding-bottom: 96px;
}

.contact-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 56px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 320px at 88% 10%, rgba(179, 133, 58, 0.22), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-lg);
}

.contact-card .section-title {
  color: #fff;
}

.contact-card .section-subtitle {
  color: rgba(255, 255, 255, 0.78);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-item > a,
.contact-item > div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.contact-item > a:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(179, 133, 58, 0.6);
  transform: translateX(4px);
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(179, 133, 58, 0.2);
  color: #e9c789;
}

.contact-info {
  display: grid;
  min-width: 0;
}

.contact-info small {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.contact-info strong {
  font-size: 0.96rem;
  color: #fff;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 30px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}

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

.footer-copy {
  margin: 0;
  font-size: 0.87rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--navy);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---------- To top ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

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

.to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

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

body.editor-open .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover,
  .expertise-card:hover,
  .contact-item > a:hover {
    transform: none;
  }
}

/* =============================================================
   EDITOR PANEL
   ============================================================= */
.editor-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border: none;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, background 0.2s ease;
}

.editor-fab:hover {
  transform: translateY(-2px);
  background: var(--navy-700);
}

.editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(8, 23, 41, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.editor-overlay.is-open {
  opacity: 1;
}

.editor-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(8, 23, 41, 0.2);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-panel.is-open {
  transform: translateX(0);
}

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.editor-header h2 {
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.editor-status {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}

.editor-status.is-flash {
  color: #2f9e5f;
  font-weight: 600;
}

.editor-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 1.25rem;
  line-height: 1;
}

.editor-close:hover {
  color: var(--navy);
  background: var(--bg-tint);
}

.editor-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 22px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  scrollbar-width: thin;
}

.editor-tab {
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.editor-tab:hover {
  background: #fff;
  border-color: var(--line);
}

.editor-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.editor-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 28px;
}

.editor-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  resize: vertical;
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea.field-input {
  line-height: 1.6;
}

.field-lines {
  font-size: 0.88rem;
}

.field-hint {
  font-size: 0.76rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.field-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
}

.field-check .check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

.field-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.field-color {
  display: flex;
  gap: 10px;
  align-items: center;
}

.field-color input[type="color"] {
  width: 48px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}

.field-icon-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-icon-preview {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

/* field gambar */
.field-image {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.image-preview {
  width: 96px;
  height: 118px;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-tint);
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-controls {
  display: grid;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.file-btn {
  cursor: pointer;
}

/* array */
.field-array {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  gap: 12px;
}

.field-array-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.array-items {
  display: grid;
  gap: 10px;
}

.array-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.array-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

.array-item > summary::-webkit-details-marker {
  display: none;
}

.array-item[open] > summary {
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.array-item-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.array-item-title small {
  font-weight: 500;
  color: var(--ink-muted);
}

.array-item-actions {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.mini-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1;
}

.mini-btn:hover {
  color: var(--navy);
  border-color: var(--navy);
}

.mini-danger:hover {
  color: #c0392b;
  border-color: #c0392b;
}

.array-item-body {
  display: grid;
  gap: 14px;
  padding: 14px 13px;
}

.array-item-body .field-array {
  background: var(--bg-tint);
}

.editor-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}

.editor-footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-danger {
  color: #c0392b;
}

.btn-danger:hover {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
}

/* =============================================================
   HALAMAN ADMIN: LOGIN & MODE EDITOR
   ============================================================= */
.admin-page {
  min-height: 100vh;
}

.login-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 420px at 80% 0%, rgba(179, 133, 58, 0.22), transparent 62%),
    radial-gradient(620px 380px at 10% 100%, rgba(179, 133, 58, 0.1), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
  z-index: -1;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 34px 30px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.login-brand .brand-mark {
  width: 44px;
  height: 44px;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.login-brand-text strong {
  font-size: 0.98rem;
  color: var(--navy);
}

.login-brand-text small {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.login-head {
  margin-bottom: 24px;
}

.login-title {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-password {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.login-password .field-input {
  flex: 1;
  min-width: 0;
}

.pw-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-muted);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.pw-toggle:hover {
  color: var(--navy);
  border-color: var(--ink-muted);
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.25);
  color: #a3271b;
  font-size: 0.86rem;
  font-weight: 600;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.login-back {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-left: auto;
}

.login-back:hover {
  color: var(--accent);
}

.login-disclaimer {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

.login-disclaimer code {
  font-size: 0.95em;
  background: var(--bg-tint);
  padding: 1px 5px;
  border-radius: 4px;
}

/* bar mode editor */
.admin-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 150;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  height: 52px;
  padding: 0 20px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
}

.admin-bar-left,
.admin-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-badge {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-hint {
  font-size: 0.79rem;
  color: rgba(255, 255, 255, 0.62);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-bar .btn-ghost {
  color: rgba(255, 255, 255, 0.8);
}

.admin-bar .btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.admin-bar .btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.admin-bar .btn-outline:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(179, 133, 58, 0.25);
}

.admin-bar .btn-danger {
  color: #ffb4a8;
}

.admin-bar .btn-danger:hover {
  color: #fff;
  background: rgba(192, 57, 43, 0.35);
}

/* status sinkronisasi cloud */
.cloud-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.cloud-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.cloud-status.is-ok {
  color: #7fe0a5;
}

.cloud-status.is-warn {
  color: #ffce7a;
}

.cloud-status.is-err {
  color: #ff9d8f;
}

.admin-bar .btn-primary {
  box-shadow: none;
}

/* =============================================================
   HALAMAN EDITOR FULL-PAGE (admin.html setelah login)
   ============================================================= */
.editor-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.editor-app .admin-bar {
  position: static;
  flex: 0 0 auto;
  height: 56px;
}

.editor-app-body {
  flex: 1;
  display: grid;
  grid-template-columns: var(--pane-w, 420px) 7px 1fr;
  min-height: 0;
}

/* kolom kiri: form editor */
.editor-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border-right: 1px solid var(--line);
}

.editor-pane .editor-tabs {
  flex: 0 0 auto;
}

.editor-pane .editor-body {
  flex: 1;
  min-height: 0;
}

.editor-pane .editor-footer {
  flex: 0 0 auto;
}

/* divider yang bisa digeser */
.editor-resizer {
  position: relative;
  cursor: col-resize;
  background: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  touch-action: none;
}

.editor-resizer:hover,
.editor-resizer.is-dragging {
  background: var(--accent);
}

.editor-resizer-grip {
  width: 3px;
  height: 34px;
  border-radius: 3px;
  background: var(--ink-muted);
  opacity: 0.55;
}

.editor-resizer:hover .editor-resizer-grip,
.editor-resizer.is-dragging .editor-resizer-grip {
  background: #fff;
  opacity: 0.9;
}

.editor-resizer:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* kolom kanan: pratinjau langsung */
.editor-preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-tint);
}

.editor-preview-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f9e5f;
  box-shadow: 0 0 0 4px rgba(47, 158, 95, 0.18);
}

.preview-size {
  margin-left: 2px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.preview-presets {
  margin-left: auto;
  display: inline-flex;
  gap: 4px;
}

.preset-btn {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.preset-btn:hover {
  color: var(--navy);
  border-color: var(--ink-muted);
}

.preset-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.editor-preview-frame {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg);
}

/* saat pratinjau dibatasi lebarnya (mode device), pusatkan & beri bingkai */
.editor-preview-frame.is-constrained {
  padding: 16px;
  display: flex;
  justify-content: center;
}

.editor-preview-frame.is-constrained > .preview-iframe {
  width: var(--preview-w, 100%);
  max-width: 100%;
  flex: 0 0 auto;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

/* saat menggeser divider, nonaktifkan seleksi teks & pointer di preview */
body.is-resizing {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing .editor-preview-frame {
  pointer-events: none;
}

/* di halaman editor full-page, header portfolio jangan fixed
   (biar ikut men-scroll dalam kolom pratinjau) */
.editor-page-mode .site-header {
  position: sticky;
  top: 0;
}

.editor-page-mode .to-top,
.editor-page-mode .editor-fab {
  display: none !important;
}

/* saat mode editor aktif, halaman digeser ke bawah admin bar */
body.is-authenticated {
  overflow: hidden;
}

/* =============================================================
   DOCKED SIDEBAR (live preview di index.html saat login)
   ============================================================= */
@media (min-width: 1180px) {
  body.editor-docked #app {
    margin-right: 460px;
  }

  body.editor-docked .site-header {
    right: 460px;
  }
}

#app {
  transition: margin-right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* di layar sempit panel menutupi konten, jadi overlay dipakai */
@media (max-width: 1179px) {
  body.editor-docked .editor-overlay {
    display: block;
  }
}

/* halaman editor full-page: tumpuk vertikal di layar sempit */
@media (max-width: 900px) {
  .editor-app {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .editor-app-body {
    grid-template-columns: 1fr;
  }

  .editor-resizer {
    display: none;
  }

  .editor-preview-frame.is-constrained {
    padding: 0;
    display: block;
  }

  .editor-preview-frame.is-constrained > .preview-iframe {
    width: 100% !important;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .editor-pane {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .editor-pane .editor-body {
    max-height: 60vh;
  }

  body.is-authenticated {
    overflow: auto;
  }

  .editor-page-mode .site-header {
    position: static;
  }
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr 0.9fr;
    gap: 36px;
  }

  .about-grid,
  .education-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-card {
    grid-template-columns: 1fr;
    padding: 44px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 860px) {
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 18px 24px 26px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-140%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.28s ease, opacity 0.22s ease, visibility 0.22s ease;
    flex: none;
  }

  /* rapikan header sempit: toggle tema + hamburger menempel ke kanan */
  .theme-toggle {
    margin-left: auto;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
  }

  /* di mobile, hamburger menampilkan SEMUA section (side-nav disembunyikan) */
  #headerNavList > li,
  #headerNavList[data-show-header="0"] > li {
    display: block;
  }

  .side-nav {
    display: none;
  }

  .nav-link {
    padding: 12px 10px;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .nav-link::after {
    display: none;
  }

  .nav-cta {
    align-self: flex-start;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--header-h) + 44px);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-media {
    order: -1;
  }

  .photo-frame {
    width: min(78%, 300px);
  }

  .section {
    padding: 72px 0;
  }

  .section-head {
    margin-bottom: 36px;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 18px;
  }

  .brand-text small {
    display: none;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 44px;
  }

  .stat {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }

  .stat-value {
    min-width: 84px;
  }

  .card,
  .job-card,
  .cert-panel {
    padding: 22px;
  }

  .contact-card {
    padding: 30px 22px;
  }

  .timeline {
    padding-left: 26px;
  }

  .timeline-marker {
    left: -26px;
    width: 13px;
    height: 13px;
  }

  .about-body p:first-child::first-letter {
    font-size: 2.6rem;
  }

  .education-card {
    flex-direction: column;
    gap: 14px;
  }

  .editor-fab span {
    display: none;
  }

  .editor-fab {
    padding: 14px;
  }

  .to-top {
    bottom: 84px;
    right: 18px;
  }

  .field-image {
    flex-direction: column;
  }

  .image-preview {
    width: 100%;
    height: 180px;
  }
}

/* =============================================================
   PRINT (CV-friendly)
   ============================================================= */
@media print {
  .site-header,
  .nav-toggle,
  .editor-fab,
  .editor-panel,
  .editor-overlay,
  .to-top,
  .hero-actions,
  .contact-actions {
    display: none !important;
  }

  body {
    font-size: 11pt;
    color: #000;
  }

  .hero {
    padding: 0 0 18pt;
  }

  .hero-bg,
  .photo-frame::after,
  .photo-glow {
    display: none;
  }

  .section {
    padding: 18pt 0;
    break-inside: avoid;
  }

  .section-alt,
  .card,
  .cert-panel {
    background: #fff !important;
    box-shadow: none !important;
  }

  .highlight-card,
  .contact-card {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
  }

  .highlight-card .card-title,
  .contact-card .section-title,
  .contact-card .section-subtitle,
  .contact-info small,
  .contact-info strong {
    color: #000 !important;
  }

  .timeline-item,
  .card {
    break-inside: avoid;
  }

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

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
}
