/* jarv.is-faithful static theme — rebuilt for Kukuh Laksana */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 0.625rem;

  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --primary: #171717;
  --primary-foreground: #fafafa;
  --secondary: #f5f5f5;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --accent: #f5f5f5;
  --accent-foreground: #171717;
  --border: #e5e5e5;
  --ring: #737373;
  --destructive: #e40014;
  --link: #1c64c4;
  --popover: #ffffff;
  --popover-foreground: #0a0a0a;
}

.dark {
  --background: #000000;
  --foreground: #fafafa;
  --card: #171717;
  --primary: #e5e5e5;
  --primary-foreground: #171717;
  --secondary: #262626;
  --muted: #262626;
  --muted-foreground: #a1a1a1;
  --accent: #262626;
  --accent-foreground: #fafafa;
  --border: rgba(255, 255, 255, 0.1);
  --ring: #a1a1a1;
  --destructive: #ff6568;
  --link: #76affa;
  --popover: #171717;
  --popover-foreground: #fafafa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-feature-settings: "rlig" 1, "calt" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  transition: background-color .2s ease, color .2s ease;
}

.container { margin: 0 auto; width: 100%; max-width: 720px; padding: 0 20px; }

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

/* ---------- sticky header ---------- */
.nav-wrap {
  position: sticky; top: 0; z-index: 50; width: 100%;
  background: transparent; backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background-color .2s ease, backdrop-filter .2s ease, border-color .2s ease;
}
.nav-wrap[data-scrolled="true"] {
  background: color-mix(in srgb, var(--background) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--border);
}
header.bar {
  margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.bar-left { display: flex; align-items: center; gap: 12px; }
.brand {
  display: flex; align-items: center; gap: 10px; padding-right: 8px;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; color: color-mix(in srgb, var(--foreground) 85%, transparent); }
.avatar {
  width: 28px; height: 28px; border-radius: 9999px;
  border: 1px solid color-mix(in srgb, var(--ring) 30%, transparent);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: -0.03em;
  background: var(--accent); color: var(--accent-foreground);
  overflow: hidden;
}
.brand-name {
  font-size: 17.5px; font-weight: 500; letter-spacing: -0.0375em;
  white-space: nowrap;
}
.divider { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }
nav.menu { display: flex; align-items: center; gap: 8px; }
.bar-right { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  background: transparent; color: var(--foreground);
  cursor: pointer; user-select: none;
  transition: background-color .15s ease, color .15s ease;
  height: 32px; padding: 0 10px;
}
.btn:hover { background: var(--accent); text-decoration: none; }
.btn.icon-only { width: 32px; padding: 0; }
.btn svg { width: 16px; height: 16px; pointer-events: none; }
.btn[aria-current="page"] { background: var(--accent); }

/* ---------- main ---------- */
main { margin-top: 16px; width: 100%; }
.page-pad { padding-bottom: 8px; }

h1.title { font-size: 1.125rem; line-height: 1.55; font-weight: 500; letter-spacing: -0.025em; }
.wave {
  margin-left: 2px; display: inline-block; transform-origin: 65% 80%;
  font-size: 1.2rem; animation: wave 5s ease 1s infinite;
}
@media (prefers-reduced-motion: reduce) { .wave { animation: none; } }
@keyframes wave {
  0%, 30%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  15% { transform: rotate(-8deg); }
  20% { transform: rotate(14deg); }
  25% { transform: rotate(-4deg); }
}

.markdown { margin-top: 6px; }
.markdown p { font-size: .875rem; line-height: 1.5; letter-spacing: -0.0125em; color: var(--foreground); }
.markdown p + p { margin-top: 12px; }
.markdown a, a.inline { color: var(--link); }
.markdown a:hover, a.inline:hover { text-decoration: underline; text-underline-offset: 2px; }

section.block { margin: 12px 0; }
.section-label {
  font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted-foreground); margin-bottom: 10px;
}

ul.linklist { list-style: none; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) { ul.linklist { gap: 12px; } }

.item {
  display: flex; flex-direction: column; gap: 4px;
  border-radius: 6px; padding: 4px 0;
  transition: color .15s ease;
}
@media (min-width: 640px) {
  .item { flex-direction: row; align-items: center; gap: 16px; }
}
.item:hover { text-decoration: none; }
.item-head { display: flex; align-items: center; gap: 12px; }
.item-icon {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 26%;
  box-shadow: 0 0 0 1px var(--border);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff;
  font-family: var(--font-mono);
}
.item-name {
  font-size: .875rem; font-weight: 500; letter-spacing: -0.0125em;
  color: var(--primary);
}
.item:hover .item-name { text-decoration: underline; text-underline-offset: 4px; }
.item-desc {
  display: flex; align-items: center; gap: 4px;
  margin-left: 36px; font-size: .75rem; color: var(--muted-foreground);
  text-wrap: pretty;
}
@media (min-width: 640px) { .item-desc { margin-left: auto; } }
.item-desc svg { width: 11px; height: 11px; opacity: .7; }

.prose h2 { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; margin: 22px 0 8px; }
.prose p, .prose li { font-size: .875rem; line-height: 1.6; letter-spacing: -0.0125em; }
.prose ul { margin: 8px 0 0 18px; }
.prose li { margin: 4px 0; }
.note-date { color: var(--muted-foreground); font-size: .75rem; font-family: var(--font-mono); }

/* ---------- footer ---------- */
footer.site {
  margin-top: 32px; width: 100%;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: .75rem; line-height: 2;
  color: var(--muted-foreground);
}
footer.site a { color: var(--muted-foreground); }
footer.site a:hover { color: var(--foreground); }

/* ---------- contact popover (jarv.is-style) ---------- */
.popwrap { position: relative; display: inline-flex; }
.popover {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 248px;
  background: var(--popover); color: var(--popover-foreground);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 10px 38px -10px rgba(0,0,0,.22), 0 2px 8px -2px rgba(0,0,0,.10);
  padding: 6px; z-index: 60;
  transform-origin: top right;
  animation: popIn .16s cubic-bezier(.16,1,.3,1);
  max-height: min(72vh, 560px); overflow-y: auto; overscroll-behavior: contain;
}
.popover::-webkit-scrollbar { width: 0; }
.popover { scrollbar-width: none; }
.dark .popover { box-shadow: 0 10px 38px -8px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03); }
.popover[hidden] { display: none; }
.pop-arrow {
  position: absolute; top: -6px; right: 13px;
  width: 11px; height: 11px; background: var(--popover);
  border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: rotate(45deg); border-radius: 2px 0 0 0;
}
.pop-label {
  font-size: .6875rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted-foreground);
  padding: 8px 10px 6px;
}
.pop-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 9px;
  color: var(--popover-foreground);
  transition: background-color .12s ease;
}
.pop-item:hover { background: var(--accent); text-decoration: none; }
.pop-item .pic {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-foreground);
}
.pop-item .pic svg { width: 16px; height: 16px; }
.pop-item .meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.pop-item .meta b { font-size: .8125rem; font-weight: 500; letter-spacing: -0.01em; }
.pop-item .meta small { font-size: .6875rem; color: var(--muted-foreground); }
.pop-sep { height: 1px; background: var(--border); margin: 5px 8px; }
@media (prefers-reduced-motion: reduce) { .popover { animation: none; } }
@keyframes popIn {
  from { opacity: 0; transform: scale(.94) translateY(-6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.theme-ico .sun { display: none; }
.theme-ico .moon { display: block; }
.dark .theme-ico .sun { display: block; }
.dark .theme-ico .moon { display: none; }

/* view transitions between static pages (progressive enhancement) */
@view-transition { navigation: auto; }
