/* ============================================================
   Portfolio — GitHub-style theme
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-subtle: #f6f8fa;
  --bg-canvas-overlay: #ffffff;

  --ink: #1f2328;
  --ink-muted: #59636e;
  --ink-soft: #818b98;
  --link: #0969da;
  --link-hover: #0550ae;

  --border: #d1d9e0;
  --border-muted: #e6ebf0;
  --border-strong: #b1bac4;

  --accent: #1f2328;          /* primary accent (dark, like GitHub) */
  --verified: #e3b341;        /* verified badge — yellow (per request) */
  --verified-ring: #ffffff;   /* white border around verified badge */

  /* Contribution heatmap scale (GitHub greens) */
  --hm-0: #ebedf0;
  --hm-1: #9be9a8;
  --hm-2: #40c463;
  --hm-3: #30a14e;
  --hm-4: #216e39;

  /* Language dots */
  --dot-php: #777bb4;
  --dot-js: #f1e05a;
  --dot-node: #68a063;
  --dot-css: #563d7c;
  --dot-default: #6e7681;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 0 rgba(31, 35, 40, 0.04);
  --shadow: 0 3px 6px rgba(140, 149, 159, 0.15);
  --shadow-lg: 0 8px 24px rgba(140, 149, 159, 0.2);

  --max-w: 1012px;
  --max-w-narrow: 768px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Liquid Glass theme variables — Codepen KwpRaGr by Vadik Matveev */
  --c-glass: #bbbbbc;
  --c-light: #fff;
  --c-dark: #000;
  --c-content: #1f2328;
  --c-action: #0969da;
  --c-bg: #ffffff;
  --glass-reflex-light: 1;
  --glass-reflex-dark: 1;
  --saturation: 150%;

  /* Glass reflection palette (light) */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-highlight: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  --glass-thumb-grad: linear-gradient(135deg, #fff7ad 0%, #ffd86b 100%);
  --glass-thumb-icon: #f59e0b;
  --glass-track-from: #d8dde3;
  --glass-track-to: #b8c0c8;
}

/* ============================================================
   Dark theme
   ============================================================ */

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-subtle: #161b22;
  --bg-canvas-overlay: #0d1117;
  --ink: #e6edf3;
  --ink-muted: #8b949e;
  --ink-soft: #6e7681;
  --link: #58a6ff;
  --link-hover: #79c0ff;
  --border: #484f58;
  --border-muted: #30363d;
  --border-strong: #6e7681;
  --accent: #e6edf3;
  --verified: #f0b429;
  --verified-ring: #0d1117;
  --hm-0: #161b22;
  --hm-1: #0e4429;
  --hm-2: #006d32;
  --hm-3: #26a641;
  --hm-4: #39d353;

  /* Liquid Glass dark theme — Codepen KwpRaGr */
  --c-content: #e1e1e1;
  --c-action: #03d5ff;
  --c-bg: #1b1b1d;
  --glass-reflex-light: 0.3;
  --glass-reflex-dark: 2;

  /* Glass reflection palette (dark) */
  --glass-bg: rgba(22, 27, 34, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-thumb-grad: linear-gradient(135deg, #2d3142 0%, #1a1d2e 100%);
  --glass-thumb-icon: #e6edf3;
  --glass-track-from: #1f2937;
  --glass-track-to: #0f172a;
}

/* ============================================================
   Reset & base
   ============================================================ */

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

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  text-align: justify;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; color: var(--link-hover); }

button { font: inherit; cursor: pointer; }

code, pre, kbd { font-family: var(--font-mono); font-size: 12px; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; }

/* ============================================================
   Layout
   ============================================================ */

.gh-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}
.gh-container--narrow { max-width: var(--max-w-narrow); }

.gh-main { padding: 24px 0 64px; }

/* ============================================================
   Top bar
   ============================================================ */

.gh-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(8px);
}
.gh-topbar__inner {
  display: flex;
  align-items: center;
  height: 44px;
  gap: 12px;
  padding: 0 16px;
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
}
.gh-topbar__brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.gh-topbar__brand:hover { text-decoration: none; }
.gh-topbar__logo {
  height: 38px;
  width: auto;
  display: block;
}
.gh-topbar__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0;
  height: 32px;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 99em;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  flex: 0 0 auto;

  /* Liquid Glass — Codepen KwpRaGr by Vadik Matveev (preserved) */
  background-color: color-mix(in srgb, var(--c-glass, #bbbbbc) 12%, transparent);
  -webkit-backdrop-filter: blur(8px) url(#liquidGlass) saturate(var(--saturation, 150%));
  backdrop-filter: blur(8px) url(#liquidGlass) saturate(var(--saturation, 150%));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--c-light, #fff) calc(var(--glass-reflex-light, 1) * 10%), transparent),
    inset 1.8px 3px 0px -2px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 90%), transparent),
    inset -2px -2px 0px -2px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 80%), transparent),
    inset -3px -8px 1px -6px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 60%), transparent),
    inset -0.3px -1px 4px 0px color-mix(in srgb, var(--c-dark, #000) calc(var(--glass-reflex-dark, 1) * 12%), transparent),
    inset -1.5px 2.5px 0px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
    inset 0px 3px 4px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
    inset 2px -6.5px 1px -4px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
    0px 1px 5px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
    0px 6px 16px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 8%), transparent);
  transition:
    background-color 400ms cubic-bezier(1, 0, 0.4, 1),
    box-shadow 400ms cubic-bezier(1, 0, 0.4, 1);
}
.gh-topbar__nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  height: 100%;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 99em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 200ms ease, color 200ms ease;
}
.gh-topbar__nav a:hover {
  background-color: color-mix(in srgb, var(--c-light) 12%, transparent);
  color: var(--c-action);
}
.gh-topbar__nav a.is-active {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--c-light) 20%, transparent) 0%,
    color-mix(in srgb, var(--c-light) 0%, transparent) 50%);
  color: var(--link);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--c-light) 60%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--c-dark) 12%, transparent);
}
[data-theme="dark"] .gh-topbar__nav a.is-active {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--c-light) 14%, transparent) 0%,
    color-mix(in srgb, var(--c-light) 0%, transparent) 50%);
  color: var(--link);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--c-light) 30%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--c-dark) 30%, transparent);
}
.gh-topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.gh-topbar__actions .theme-switch { margin-left: 0; }
.gh-topbar__actions .lang-toggle { margin-left: 0; }

/* --- Hamburger button (mobile only) --- */
.gh-topbar__menu-btn {
  display: none; /* desktop: disembunyikan, nav pill tampil */
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.gh-topbar__menu-btn:hover {
  background: var(--bg-canvas-overlay);
  border-color: var(--border-strong);
}
/* Kotak hamburger digambar dengan 3 garis (span kosong + ::before/::after) */
.gh-topbar__menu-box,
.gh-topbar__menu-box::before,
.gh-topbar__menu-box::after {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform 250ms ease, opacity 200ms ease;
}
.gh-topbar__menu-box { position: relative; }
.gh-topbar__menu-box::before,
.gh-topbar__menu-box::after {
  content: "";
  position: absolute;
  left: 0;
}
.gh-topbar__menu-box::before { top: -5px; }
.gh-topbar__menu-box::after { top: 5px; }
/* State terbuka: garis berubah jadi X */
.gh-topbar.is-open .gh-topbar__menu-box { background: transparent; }
.gh-topbar.is-open .gh-topbar__menu-box::before { top: 0; transform: rotate(45deg); }
.gh-topbar.is-open .gh-topbar__menu-box::after { top: 0; transform: rotate(-45deg); }

/* --- Mobile menu panel (mobile only, hidden by default) --- */
.gh-topbar__mobile-menu {
  display: none; /* desktop: tidak pernah tampil */
}

@media (max-width: 834px) {
  /* Nav pill & tombol menu: tukar peran */
  .gh-topbar__nav { display: none; }
  .gh-topbar__menu-btn { display: inline-flex; align-items: center; justify-content: center; }

  /* Actions tetap terlihat (theme + lang) — pindah ke kiri tombol menu */
  .gh-topbar__actions { margin-left: auto; }
  .gh-topbar__menu-btn { margin-left: 0; }

  /* Panel menu: dropdown full-width tepat di bawah bar */
  .gh-topbar__mobile-menu {
    display: block;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid transparent;
    background: var(--bg);
    transition: max-height 280ms ease, border-color 280ms ease;
  }
  .gh-topbar__mobile-menu nav {
    display: flex;
    flex-direction: column;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 4px 16px 12px;
  }
  .gh-topbar__mobile-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    transition: background-color 200ms ease, color 200ms ease;
  }
  .gh-topbar__mobile-menu a:hover {
    background: var(--bg-subtle);
    color: var(--c-action);
    text-decoration: none;
  }
  .gh-topbar__mobile-menu a.is-active {
    background: var(--bg-subtle);
    color: var(--link);
    font-weight: 600;
  }
  /* Terbuka: tinggi cukup untuk 5 item + padding */
  .gh-topbar.is-open .gh-topbar__mobile-menu {
    max-height: 320px;
    border-bottom-color: var(--border);
  }
}

@media (max-width: 420px) {
  /* Layar sangat sempit: kecilkan kontrol agar logo + 2 toggle + tombol muat */
  .gh-topbar__inner { gap: 8px; padding: 0 12px; }
  .gh-topbar__actions { gap: 8px; }
  .gh-topbar__logo { height: 30px; }
}

/* ============================================================
   Profile header
   ============================================================ */

.profile-header {
  display: flex;
  gap: 16px;
  padding: 24px 0 16px;
}
@media (min-width: 768px) {
  .profile-header { gap: 24px; padding: 24px 0 24px; }
}

.profile-avatar {
  flex: 0 0 auto;
  position: relative;
  width: 96px;
  height: 96px;
}
@media (min-width: 768px) {
  .profile-avatar { width: 296px; height: 296px; }
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #ffffff;
  object-fit: cover;
}
.profile-avatar__verified {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
}
@media (min-width: 768px) {
  .profile-avatar__verified { width: 40px; height: 40px; font-size: 20px; }
}
.profile-avatar__verified svg { width: 100%; height: 100%; display: block; }

.profile-body { min-width: 0; flex: 1 1 auto; }

.profile-name {
  font-size: 26px;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 2px;
}
@media (min-width: 768px) {
  .profile-name { font-size: 26px; }
}
.profile-username {
  font-size: 20px;
  font-weight: 300;
  color: var(--ink-muted);
  margin: 0 0 16px;
}
.profile-bio {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 8px;
  max-width: 600px;
}
.profile-motto {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-style: italic;
}
.profile-motto__quote {
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
}
.profile-motto__sep { color: var(--ink-soft); }
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0 0 16px;
}
.profile-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }
.profile-meta .meta-ico { width: 16px; height: 16px; flex: 0 0 auto; fill: var(--ink-muted); }
.profile-meta .meta-ico--img { width: 18px; height: 18px; object-fit: contain; border-radius: 2px; }

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease;
}
.btn:hover { background: #f3f4f6; text-decoration: none; }
.btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--primary:hover { background: #32383f; color: var(--bg); }
[data-theme="dark"] .btn--primary:hover { background: #d0d7de; }

/* ============================================================
   Tabs (sticky)
   ============================================================ */

.gh-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  margin: 0 -16px;
  padding: 0 16px;
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.gh-tab {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}
.gh-tab:hover { color: var(--ink); text-decoration: none; }
.gh-tab.is-active { color: var(--ink); border-bottom-color: #fd8c73; font-weight: 600; }

/* ============================================================
   Section / cards
   ============================================================ */

.gh-section { padding: 24px 0; border-bottom: 1px solid var(--border-muted); }
.gh-section:last-of-type { border-bottom: 0; }
.gh-section__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.gh-section__desc {
  color: var(--ink-muted);
  margin: 0 0 16px;
  font-size: 14px;
}

.gh-pinned {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .gh-pinned { grid-template-columns: 1fr 1fr; }
}

.pinned {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg);
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
}
.pinned:hover { border-color: #b1bac4; box-shadow: var(--shadow-sm); }

.pinned__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.pinned__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pinned__title:hover { text-decoration: underline; }
.pinned__public { color: var(--ink-muted); font-size: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 0 7px; line-height: 20px; }

.pinned__desc {
  font-size: 12px;
  color: var(--ink-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.pinned__preview {
  width: 100%;
  height: 140px;
  border-radius: var(--radius);
  border: 1px solid var(--border-muted);
  background: var(--bg-subtle);
  object-fit: cover;
  margin-bottom: 12px;
}

.pinned__meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 6px;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: auto;
}
.pinned__langs,
.pinned__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
/* Tanggal: di baris chips, selalu terdorong ke kanan */
.pinned__chips .pinned__date {
  margin-left: auto;
}
@media (max-width: 420px) {
  .pinned__meta { font-size: 11px; }
}
@media (max-width: 420px) {
  .pinned__meta { font-size: 11px; }
}
.pinned__lang { display: inline-flex; align-items: center; gap: 5px; }
.pinned__lang::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot-default);
  display: inline-block;
}
.pinned__lang[data-lang="php"]::before { background: var(--dot-php); }
.pinned__lang[data-lang="js"]::before { background: var(--dot-js); }
.pinned__lang[data-lang="node"]::before { background: var(--dot-node); }
/* Versi icon: gambar logo asli menggantikan dot (class .pinned__lang--ico) */
.pinned__lang--ico { gap: 4px; }
.pinned__lang--ico::before { display: none; }
.pinned__lang--ico .pinned__langimg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: middle;
  display: block; /* kill baseline whitespace issues */
}
[data-theme="dark"] .pinned__lang--ico .pinned__langimg {
  filter: invert(1) hue-rotate(180deg);
}

.pinned__topics { display: flex; flex-wrap: wrap; gap: 4px; }
.topic-chip {
  font-size: 11px;
  color: var(--ink-muted);
  background: rgba(175, 184, 193, 0.2);
  padding: 0 7px;
  border-radius: 12px;
  line-height: 22px;
  white-space: nowrap;
}

/* ============================================================
   Skills table
   ============================================================ */

.gh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.gh-table th, .gh-table td {
  text-align: left;
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--border-muted);
  vertical-align: top;
}
.gh-table th { font-weight: 600; color: var(--ink); }
.gh-table tr:last-child td { border-bottom: 0; }
.gh-table td:last-child, .gh-table th:last-child { padding-right: 0; }
.gh-table code {
  background: var(--bg-subtle);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
/* Sel stack: pills diatur sebagai flex-wrap agar baris rapat & rata */
.gh-table td.stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  row-gap: 6px;
}
/* Mobile: label & stack pindah ke layout blok (label di atas) */
@media (max-width: 768px) {
  .gh-table th, .gh-table td { display: block; width: 100%; padding: 8px 0; }
  .gh-table thead { display: none; }
  .gh-table tr {
    display: block;
    border-bottom: 1px solid var(--border-muted);
    padding: 8px 0;
  }
  .gh-table code { display: inline-block; margin-bottom: 6px; }
  .gh-table td.stack { row-gap: 8px; }
}
/* Wadah pill per baris supaya wrap rapi: gap konsisten, tidak
   ada margin per-pill yang bikin baris pertama/terakhir tak sejajar */
.gh-table td .pill-row,
.gh-table td {
  /* fallback: td langsung berisi pill */
}
.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.6;
  white-space: nowrap;
  vertical-align: middle;
}
.skill-pill--text { /* no icon — looks identical but cleaner */ }
.skill-ico {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: middle;
}
/* Dark mode: invert dark icons so they stay visible on dark background */
[data-theme="dark"] .skill-ico {
  filter: invert(1) hue-rotate(180deg);
}
/* KiloCode & OpenCode icons are black-on-transparent PNGs and need
   explicit invert in dark mode. Hermes Agent is greyscale and looks
   fine as-is. */
[data-theme="dark"] img[src*="kilocode"],
[data-theme="dark"] img[src*="opencode"] {
  filter: invert(1) hue-rotate(180deg);
}

.gh-section__subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.agentic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 640px) {
  .agentic-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .agentic-grid { grid-template-columns: 1fr; }
}
.agentic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.agentic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.agentic-card__img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 10px;
  border-radius: 8px;
}
.agentic-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.agentic-card__role {
  font-size: 12px;
  color: var(--ink-muted);
}

/* ============================================================
   Certifications
   ============================================================ */

.certs {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.cert {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.cert:last-child { border-bottom: 0; }
.cert__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: var(--bg-subtle);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  padding: 4px;
}
/* Dark mode: cert logo container goes solid (near-white) for max contrast */
[data-theme="dark"] .cert__logo {
  background: #f3f4f6;
  border-color: #d0d7de;
}
/* Invert SVG logos in dark mode (default fill is dark); PNG colors stay as-is */
[data-theme="dark"] .cert__logo[src$=".svg"] {
  filter: invert(1) hue-rotate(180deg);
}
.cert__body { min-width: 0; }
.cert__issuer {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  display: block;
}
.cert__name {
  font-size: 12px;
  color: var(--ink-muted);
  display: block;
  margin-top: 2px;
}
.cert__date {
  font-size: 12px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ============================================================
   Background timeline
   ============================================================ */

.timeline {
  border-left: 2px solid var(--border);
  padding-left: 16px;
  margin-left: 4px;
}
.timeline__item {
  position: relative;
  padding: 0 0 20px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border-strong);
}
.timeline__date {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink-muted);
  display: block;
  margin-bottom: 4px;
}
.timeline__title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.timeline__logo { width: 28px; height: 28px; flex: 0 0 auto; object-fit: contain; border-radius: 4px; }
.timeline__sub { font-size: 14px; color: var(--ink-muted); }

/* ============================================================
   Contact list
   ============================================================ */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-muted);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list .key { color: var(--ink-soft); width: 80px; }
.contact-list a { color: var(--link); }
.contact-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: var(--ink-muted);
  margin-right: 4px;
  vertical-align: middle;
}
.contact-list li { display: flex; align-items: center; }

/* ============================================================
   Contribution heatmap
   ============================================================ */

.heatmap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg);
  overflow-x: auto;
}
.heatmap__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}
.heatmap__year-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  min-width: 48px;
  text-align: center;
}
.heatmap__year-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink-muted);
  cursor: pointer;
}
.heatmap__year-btn:hover { background: var(--bg-subtle); color: var(--ink); }
.heatmap__year-btn svg { width: 14px; height: 14px; fill: currentColor; }
.heatmap__year-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.heatmap__scroll { min-width: 720px; }
.heatmap__months {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 3px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--ink-muted);
  height: 14px;
}
.heatmap__month-slot { white-space: nowrap; }
.heatmap__year {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0 0 8px;
  font-weight: 500;
}
.heatmap__grid {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 3px;
  margin-bottom: 8px;
}
.heatmap__cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--hm-0);
  cursor: pointer;
}
.heatmap__cell[data-level="1"] { background: var(--hm-1); }
.heatmap__cell[data-level="2"] { background: var(--hm-2); }
.heatmap__cell[data-level="3"] { background: var(--hm-3); }
.heatmap__cell[data-level="4"] { background: var(--hm-4); }
.heatmap__cell--pad { background: transparent; cursor: default; }
.heatmap__cell--milestone { box-shadow: inset 0 0 0 1px rgba(31, 35, 40, 0.25); }

.heatmap__legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 8px;
  justify-content: flex-end;
}
.heatmap__legend-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

.heatmap__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
  font-size: 14px;
}
.heatmap__stat strong { color: var(--ink); font-weight: 600; }
.heatmap__stat span { color: var(--ink-muted); margin-left: 4px; }

/* ============================================================
   Footer (GitHub-like)
   ============================================================ */

.gh-footer {
  border-top: 1px solid var(--border-muted);
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
}
.gh-footer a { color: var(--link); }

/* ============================================================
   Bilingual (ID/EN)
   ============================================================ */

html.lang-en .lang-id { display: none; }
html.lang-id .lang-en { display: none; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}
.lang-toggle button {
  background: transparent;
  border: 0;
  padding: 4px 10px;
  font: inherit;
  color: var(--ink-muted);
  cursor: pointer;
}
.lang-toggle button.is-active {
  background: var(--ink);
  color: var(--bg);
}

/* ============================================================
   Scroll reveal (kept minimal)
   ============================================================ */

.reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.4s ease, transform 0.4s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .profile-header { flex-direction: column; align-items: flex-start; }
  .profile-avatar { width: 96px; height: 96px; }
  .profile-name { font-size: 22px; }
  .profile-username { font-size: 18px; }
  .cert { grid-template-columns: 40px 1fr; }
  .cert__date { grid-column: 2; padding-left: 0; }
  .heatmap__scroll { min-width: 0; }
}

/* ============================================================
   Liquid Glass theme switcher (Codepen KwpRaGr inspired)
   ============================================================ */

/* Codepen KwpRaGr by Vadik Matveev — Liquid Glass Switcher
   fieldset-based pill with sliding thumb (::after). */
.theme-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  width: 70px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
  border-radius: 99em;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;

  /* Liquid glass track (Codepen KwpRaGr style) */
  background-color: color-mix(in srgb, var(--c-glass, #bbbbbc) 12%, transparent);
  -webkit-backdrop-filter: blur(8px) url(#liquidGlass) saturate(var(--saturation, 150%));
  backdrop-filter: blur(8px) url(#liquidGlass) saturate(var(--saturation, 150%));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--c-light, #fff) calc(var(--glass-reflex-light, 1) * 10%), transparent),
    inset 1.8px 3px 0px -2px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 90%), transparent),
    inset -2px -2px 0px -2px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 80%), transparent),
    inset -3px -8px 1px -6px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 60%), transparent),
    inset -0.3px -1px 4px 0px color-mix(in srgb, var(--c-dark, #000) calc(var(--glass-reflex-dark, 1) * 12%), transparent),
    inset -1.5px 2.5px 0px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
    inset 0px 3px 4px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
    inset 2px -6.5px 1px -4px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
    0px 1px 5px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
    0px 6px 16px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 8%), transparent);
  transition:
    background-color 400ms cubic-bezier(1, 0, 0.4, 1),
    box-shadow 400ms cubic-bezier(1, 0, 0.4, 1);
}
.theme-switch__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}
.theme-switch__input {
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
}
.theme-switch__option {
  --c: var(--c-content, #224);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 99em;
  opacity: 1;
  cursor: pointer;
  transition: color 160ms;
}
.theme-switch__icon {
  display: block;
  width: 14px;
  height: 14px;
  color: var(--c);
  transition: scale 200ms cubic-bezier(0.5, 0, 0, 1);
}
.theme-switch__option:hover .theme-switch__icon { scale: 1.2; }
.theme-switch__option:has(input:checked) .theme-switch__icon { scale: 1; }
.theme-switch::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  display: block;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 99em;
  background-color: color-mix(in srgb, var(--c-glass, #bbbbbc) 36%, transparent);
  z-index: 0;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 10%), transparent),
    inset 2px 1px 0px -1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 90%), transparent),
    inset -1.5px -1px 0px -1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 80%), transparent),
    inset -2px -6px 1px -5px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 60%), transparent),
    inset -1px 2px 3px -1px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent),
    inset 0px -4px 1px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent),
    0px 3px 6px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 8%), transparent);
  transition:
    background-color 400ms cubic-bezier(1, 0, 0.4, 1),
    box-shadow 400ms cubic-bezier(1, 0, 0.4, 1),
    translate 400ms cubic-bezier(1, 0, 0.4, 1);
}
.theme-switch:has(input[value="dark"]:checked)::after {
  translate: calc(100% + 0px) 0;
}
.theme-switch__option { z-index: 1; }
  transform: rotate(0deg) scale(1);
}
.theme-switch:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
