:root {
  --ink: #f5f5f5;
  --ink-soft: #bdbdbd;
  --line: rgba(255, 255, 255, 0.18);
  --line-strong: rgba(255, 255, 255, 0.45);
  --panel: rgba(0, 0, 0, 0.55);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 5.25rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: #000;
  overflow-x: clip;
}

/* ===== Latar gradasi hitam-putih yang bergerak pelan ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 45% at 15% 15%, rgba(255,255,255,0.28), transparent 70%),
    radial-gradient(50% 45% at 90% 80%, rgba(255,255,255,0.22), transparent 70%),
    linear-gradient(135deg, #000 0%, #202020 28%, #7a7a7a 50%, #202020 72%, #000 100%);
  background-size: 140% 140%, 140% 140%, 300% 300%;
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { background-position: 0% 0%,   100% 100%, 0% 50%; }
  100% { background-position: 100% 60%, 0% 20%,  100% 50%; }
}

a { color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ===== Navigasi melayang berbentuk pil ===== */
.nav {
  position: fixed;
  top: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: min(70rem, calc(100% - 2rem));
  height: 3.6rem;
  padding: 0 0.7rem 0 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand-mark {
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 0.95rem; color: #000;
  background: linear-gradient(145deg, #fff, #8d8d8d);
}
.brand-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }

.nav ul { list-style: none; display: flex; gap: 0.15rem; margin: 0; padding: 0; }
.nav nav a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background .25s ease, color .25s ease;
}
.nav nav a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.nav nav a[aria-current="true"] { background: #fff; color: #000; }

/* Garis progres scroll (hanya jalan di browser yang mendukung) */
.progress { display: none; }
@supports (animation-timeline: scroll()) {
  .progress {
    display: block;
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30;
    background: #fff;
    transform-origin: left;
    transform: scaleX(0);
    animation: grow linear both;
    animation-timeline: scroll(root);
  }
  @keyframes grow { to { transform: scaleX(1); } }
}

.menu-toggle { position: absolute; opacity: 0; pointer-events: none; }
.menu-button { display: none; cursor: pointer; padding: 0.9rem 0.8rem; }
.menu-button span, .menu-button span::before {
  display: block; width: 1.4rem; height: 2px; background: #fff; position: relative;
}
.menu-button span::before { content: ""; position: absolute; top: 7px; left: 0; }
.menu-toggle:focus-visible + .menu-button { outline: 2px solid #fff; outline-offset: 2px; border-radius: 8px; }

/* ===== Tata letak kotak ===== */
main { padding: var(--nav-h) clamp(1rem, 4vw, 3rem) 2rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  max-width: 70rem;
  margin: 0 auto 1rem;
}
.s4 { grid-column: span 4; }
.s5 { grid-column: span 5; }
.s7 { grid-column: span 7; }
.s8 { grid-column: span 8; }
.s12 { grid-column: span 12; --zoom: 1.012; }

.box {
  --zoom: 1.03;
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.25rem, 3vw, 2rem);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform .45s cubic-bezier(.2, .7, .2, 1),
    box-shadow .45s ease,
    border-color .3s ease;
}
.box > * { position: relative; z-index: 1; }

/* Lapisan cahaya sorotan (tidak terlihat sampai di-hover) */
.box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg,
    transparent 38%, rgba(255, 255, 255, 0.26) 50%, transparent 62%);
  background-size: 300% 300%;
  background-position: 0% 0%;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .box:hover {
    transform: scale(var(--zoom));
    z-index: 5;
    border-color: var(--line-strong);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6);
  }
  .box:hover::before { animation: sweep 1.1s ease-out; }
}
@keyframes sweep {
  from { background-position: 0% 0%;     opacity: 1; }
  to   { background-position: 100% 100%; opacity: 1; }
}

.box h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.box p { margin: 0 0 0.9rem; color: var(--ink-soft); max-width: 40rem; }

/* ===== Beranda ===== */
.profile { display: flex; gap: 1.75rem; align-items: center; }
.avatar {
  flex: none; width: 8.5rem; height: 8.5rem; border-radius: 14px;
  display: grid; place-items: center; object-fit: cover;
  font-family: var(--serif); font-size: 3rem; font-weight: 600; color: #000;
  background: linear-gradient(145deg, #fff, #8d8d8d);
}
.profile h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  animation: reveal 1.2s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes reveal { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
.box .role { color: #fff; font-weight: 500; margin-bottom: 0.4rem; }
.profile .lead { margin-bottom: 1.25rem; }

.button {
  display: inline-block; padding: 0.7rem 1.5rem; border: 1px solid #fff; border-radius: 10px;
  background: #fff; color: #000; text-decoration: none; font-weight: 600;
  transition: background .2s, color .2s;
}
.button:hover { background: transparent; color: #fff; }

.quick { list-style: none; margin: 0; padding: 0; }
.quick li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.quick li:last-child { border-bottom: 0; }
.quick span { display: block; font-size: 0.82rem; color: var(--ink-soft); }

/* ===== Data diri ===== */
.facts { margin: 0; }
.facts div { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-size: 0.82rem; color: var(--ink-soft); }
.facts dd { margin: 0; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.1rem 0 0; padding: 0; }
.tags li { padding: 0.3rem 0.85rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.88rem; }

/* ===== Pendidikan ===== */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.5rem; border-left: 1px solid var(--line-strong); }
.timeline li { position: relative; padding-bottom: 1.75rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.5rem - 5px); top: 0.5rem;
  width: 9px; height: 9px; border-radius: 50%; background: #fff;
}
.timeline time { display: block; font-size: 0.85rem; color: var(--ink-soft); }
.timeline h3 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 0.2rem; }
.timeline p { margin: 0; }

/* ===== Keahlian ===== */
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { margin-bottom: 1.1rem; }
.bars li:last-child { margin-bottom: 0; }
.bars span { display: block; font-size: 0.93rem; margin-bottom: 0.35rem; }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.15); overflow: hidden; }
.bar::after { content: ""; display: block; height: 100%; width: var(--lv); border-radius: 99px; background: linear-gradient(90deg, #8d8d8d, #fff); }
.lv-60 { --lv: 60%; }
.lv-70 { --lv: 70%; }
.lv-80 { --lv: 80%; }
.lv-90 { --lv: 90%; }

/* ===== Sertifikat ===== */
.cert { display: flex; flex-direction: column; }
.cert-badge
{
  width: 3rem; height: 3rem; border-radius: 12px; margin-bottom: 1rem;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem; color: #000;
  background: linear-gradient(145deg, #fff, #8d8d8d);
}
.cert-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 800 / 566;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 1rem;
}
.cert h3 { font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; margin: 0 0 0.3rem; }
.box .issuer { margin-bottom: 0; }
.box .meta {
  margin: auto 0 0;
  padding-top: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.6;
  border-top: 1px solid var(--line);
}
.cert .issuer { margin-bottom: 1rem; }
.meta a { color: #fff; text-underline-offset: 4px; }
.meta a:hover { text-decoration-thickness: 2px; }

/* ===== Kontak ===== */
.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.25rem; }
.box-link {
  display: block; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; word-break: break-word;
  transition: background .2s, border-color .2s;
}
.box-link span { display: block; font-size: 0.82rem; color: var(--ink-soft); }
.box-link:hover { background: rgba(255,255,255,0.1); border-color: var(--line-strong); }

.footer { text-align: center; padding: 1rem 1rem 2.5rem; color: var(--ink-soft); font-size: 0.88rem; }
.footer p { margin: 0; }

/* ===== Responsif ===== */
@media (max-width: 900px) {
  .s4, .s5, .s7, .s8 { grid-column: span 12; }
  .profile { flex-direction: column; align-items: flex-start; }
  .contact { grid-template-columns: 1fr; }
}

@media (min-width: 901px) and (max-width: 1050px) {
  .cert.s4 { grid-column: span 6; }
}

@media (max-width: 900px) {
  .nav { border-radius: 28px; }
  .menu-button { display: block; }

  .nav nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0; right: 0;
    background: rgba(0, 0, 0, 0.94);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height .35s ease, opacity .25s ease, visibility .35s;
  }
  .nav ul { flex-direction: column; gap: 0.2rem; padding: 0.6rem; }
  .nav nav a { padding: 0.85rem 1rem; font-size: 1rem; }
  .menu-toggle:checked ~ nav { max-height: 26rem; opacity: 1; visibility: visible; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before, .profile h1 { animation: none; }
  .box, .nav nav a { transition: none; }
}