@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f6f6f7;
  --border: #e8e8ea;
  --text: #111113;
  --muted: #62626b;
  --accent: #111113;
  --accent-text: #ffffff;
  --green: #16a34a;
  --radius: 14px;
  --sun: none;
  --moon: block;
  color-scheme: light;
}
/* Mode gelap: default ikut browser; tombol di menu menimpa lewat data-theme="light|dark" */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c;
    --surface: #151517;
    --border: #232326;
    --text: #ededef;
    --muted: #9a9aa2;
    --accent: #ededef;
    --accent-text: #0b0b0c;
    --green: #22c55e;
    --sun: block;
    --moon: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --surface: #151517;
  --border: #232326;
  --text: #ededef;
  --muted: #9a9aa2;
  --accent: #ededef;
  --accent-text: #0b0b0c;
  --green: #22c55e;
  --sun: block;
  --moon: none;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; } /* <picture> tidak mengubah layout; aturan "… img" tetap berlaku */
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-text); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 16px; }

/* ---------- Navigasi ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner, main, .footer-inner { max-width: 680px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.nav-inner { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav nav { display: flex; gap: 18px; font-size: 14px; color: var(--muted); overflow-x: auto; scrollbar-width: none; margin-left: auto; min-width: 0; }
.tools { display: flex; align-items: center; gap: 2px; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px;
  border: 0; border-radius: 8px; background: none; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--surface); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun { display: var(--sun); }
.theme-toggle .moon { display: var(--moon); }
.nav nav a { white-space: nowrap; }
.nav nav a:hover { color: var(--text); }

main { padding-top: 56px; padding-bottom: 48px; }
section + section { margin-top: 64px; }

/* ---------- Hero ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center;
  font-weight: 600; font-size: 20px; letter-spacing: -.02em; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }

h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.hero h1 { margin-top: 24px; }
.role { color: var(--muted); margin-top: 2px; }
.intro { margin-top: 20px; }
.intro p + p { margin-top: 12px; }
.muted, .lead { color: var(--muted); }
.lead { margin-top: 8px; font-size: 16px; }

.now { margin-top: 16px; font-size: 14px; }
.now span { display: inline-block; font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; margin-right: 6px; }
.now a { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.now a:hover { text-decoration-color: currentColor; }

.services { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.services li { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.services h3 { font-size: 14px; font-weight: 600; }
.services p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; list-style: none; }
.stack li { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--border); transition: opacity .15s, background .15s;
}
.btn:hover { background: var(--surface); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.primary:hover { opacity: .85; }

/* ---------- Judul section ---------- */
.head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
h2 { font-size: 16px; font-weight: 600; }
.head a, .more a { font-size: 13px; color: var(--muted); }
.head a:hover, .more a:hover { color: var(--text); }
.back { display: inline-block; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.back:hover { color: var(--text); }

/* ---------- Bingkai gambar UI ---------- */
.shot { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.shot-bar { height: 26px; display: flex; align-items: center; gap: 5px; padding: 0 10px; border-bottom: 1px solid var(--border); background: var(--bg); }
.shot-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.shot-bar span { margin-left: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.shot-empty {
  aspect-ratio: 16 / 10; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--a), color-mix(in srgb, var(--a) 55%, #fff));
}
.shot-empty span { color: #fff; font-weight: 600; font-size: 15px; letter-spacing: -.01em; padding: 6px 12px; border-radius: 8px; background: rgb(0 0 0 / .18); }

/* ---------- Kartu proyek ---------- */
.cards { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lead + .cards { margin-top: 28px; }
.card { display: block; border-radius: var(--radius); }
.card .shot { transition: transform .2s, box-shadow .2s; }
.card:hover .shot { transform: translateY(-2px); box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
.card-body { padding: 12px 2px 0; }
.card h3 { font-size: 15px; font-weight: 500; }
.card p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.card .card-highlight { font-size: 13px; font-weight: 500; color: color-mix(in srgb, var(--green) 70%, var(--text)); margin-top: 6px; }
.card .card-highlight::before { content: "↑ "; }
.card .card-role { font-size: 13px; color: var(--text); margin-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span { font-size: 12px; color: var(--muted); }
.tags span + span::before { content: "·"; margin-right: 6px; }

/* ---------- Pengalaman ---------- */
.exp { list-style: none; }
.exp li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.exp li:first-child { border-top: 1px solid var(--border); }
.exp .where { font-weight: 500; }
.exp .where a:hover { text-decoration: underline; text-underline-offset: 3px; }
.exp .where span { color: var(--muted); font-size: 12px; }
.exp .what { font-size: 14px; }
.exp .type { color: var(--muted); font-size: 13px; }
.exp .summary { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.exp .clients { font-size: 13px; margin-top: 4px; }
.exp .clients a { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.exp .clients a:hover { text-decoration-color: currentColor; }
.exp .when { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Tulisan ---------- */
.posts { list-style: none; display: grid; gap: 10px; }
.post { display: flex; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); transition: background .15s; }
.post:hover { background: var(--surface); }
.post img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface); }
.post-meta { font-size: 12px; color: var(--muted); }
.post h3 { font-size: 15px; font-weight: 500; line-height: 1.4; margin-top: 2px; }
.post p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.embeds { display: grid; gap: 16px; }
.posts + .embeds { margin-top: 16px; }
.embed { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.embed iframe { display: block; width: 100%; border: 0; }
.more { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.empty { color: var(--muted); font-size: 14px; }

/* ---------- Detail proyek ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px 20px; margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { font-size: 14px; font-weight: 500; }
.project > .shot { margin-top: 28px; }
.prose { margin-top: 32px; }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-size: 18px; margin-top: 32px; }
.prose h3 { font-size: 16px; font-weight: 600; margin-top: 24px; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li + li { margin-top: 4px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 12px; border: 1px solid var(--border); }
.prose code { font-size: 13px; background: var(--surface); padding: 1px 5px; border-radius: 5px; }
.gallery { display: grid; gap: 16px; margin-top: 32px; }
.next { display: flex; flex-direction: column; margin-top: 48px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); transition: background .15s; }
.next:hover { background: var(--surface); }
.next span { font-size: 12px; color: var(--muted); }
.next strong { font-weight: 500; }

.notfound { padding: 48px 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 32px; font-size: 13px; color: var(--muted); }
.footer-inner nav { display: flex; gap: 16px; }
.footer-inner a:hover { color: var(--text); }

/* ---------- Animasi halus (CSS saja) ----------
   Semua animasi hanya aktif kalau pengunjung tidak memilih "kurangi animasi" di perangkatnya.
   Browser yang belum mendukung suatu efek tetap menampilkan halaman normal. */
.arr { display: inline-block; transition: transform .2s ease; }
.dot { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  /* 1. Pindah halaman: fade halus, dan screenshot kartu "terbang" ke gambar utama halaman proyek */
  @view-transition { navigation: auto; }
  .nav { view-transition-name: nav; }
  ::view-transition-group(*) { animation-duration: .3s; }

  /* 2. Screenshot bergulir pelan saat kartu di-hover (hanya terasa untuk screenshot full-page) */
  @media (hover: hover) {
    .card .shot img { transition: object-position .6s ease; }
    .card:hover .shot img { object-position: bottom; transition: object-position 4s ease-in-out .3s; }
  }

  /* 3. Titik hijau "Available" berdenyut pelan */
  .dot::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green);
    animation: denyut 2.4s ease-out infinite;
  }

  /* 4. Panah bergeser sedikit ke arah tujuannya saat link di-hover */
  a:hover .arr-r { transform: translateX(3px); }
  a:hover .arr-l { transform: translateX(-3px); }
  a:hover .arr-ur { transform: translate(2px, -2px); }

  /* 5. Ikon tema berputar sekali saat tombol diklik */
  .theme-toggle.spin svg { animation: putar .45s ease; }

  /* Kartu & item muncul pelan saat masuk layar */
  @supports (animation-timeline: view()) {
    .cards > li, .services > li, .exp > li, .posts > li, .gallery > .shot {
      animation: muncul linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}
@keyframes muncul {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes denyut {
  from { transform: scale(1); opacity: .5; }
  to { transform: scale(3); opacity: 0; }
}
@keyframes putar {
  from { transform: rotate(-90deg) scale(.6); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (max-width: 560px) {
  main { padding-top: 36px; }
  h1 { font-size: 24px; }
  .brand { display: none; }
  .nav-inner { gap: 10px; }
  .nav nav { gap: 14px; margin-left: 0; }
  .cards, .services { grid-template-columns: 1fr; }
  .exp li { flex-direction: column; gap: 2px; }
  .post img { width: 72px; height: 56px; }
}
