/* ── Reveal on scroll ── */
.js .reveal { opacity: 0; }
.js .reveal.in { opacity: 1; animation: rise .7s cubic-bezier(.2,.7,.2,1) var(--d, 0ms) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ── Spotlight mengikuti kursor ── */
.spot { position: relative; overflow: hidden; }
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--c, #7EB3FF) 14%, transparent), transparent 70%);
}
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; }

/* ── Nav aktif ── */
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transition: transform .25s;
}
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }

/* ── Umum ── */
.sec-sub { margin-top: 14px; max-width: 560px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-family: 'DM Mono', monospace; font-size: 11px; padding: 5px 12px; border-radius: 100px;
  border: 0.5px solid var(--border2); background: var(--bg3); color: var(--muted); transition: all .18s;
}
.pill:hover { color: var(--text); border-color: var(--accent); }
.pill.hl { color: var(--green); border-color: rgba(111,223,178,.35); background: rgba(111,223,178,.08); }

/* ── STACK ── */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 48px; }
.stack-card {
  background: var(--bg2); border: 0.5px solid var(--border); border-radius: var(--rl);
  padding: 24px 22px; transition: border-color .25s, transform .25s;
}
.stack-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.stack-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.stack-ico {
  width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 0.5px solid color-mix(in srgb, var(--c) 28%, transparent);
}
.stack-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.stack-sub { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.stack-skill { margin-bottom: 16px; }
.stack-skill:last-child { margin-bottom: 0; }
.stack-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.stack-name { font-size: 13px; color: var(--muted); transition: color .2s; }
.stack-card:hover .stack-name { color: var(--text); }
.stack-pct { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--c); opacity: .85; }
.stack-bar { height: 3px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.stack-bar i {
  display: block; height: 100%; border-radius: inherit; transform-origin: left;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), var(--c));
}
.js .stack-bar i { transform: scaleX(0); transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
.js .stack-card.in .stack-bar i { transform: scaleX(1); }
.js .stack-card.in .stack-skill:nth-child(1) .stack-bar i { transition-delay: .35s; }
.js .stack-card.in .stack-skill:nth-child(2) .stack-bar i { transition-delay: .45s; }
.js .stack-card.in .stack-skill:nth-child(3) .stack-bar i { transition-delay: .55s; }
.js .stack-card.in .stack-skill:nth-child(4) .stack-bar i { transition-delay: .65s; }

.stack-more { margin-top: 32px; padding-top: 28px; border-top: 0.5px solid var(--border); }
.stack-more-label { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }

/* ── EXPERIENCE ── */
.xp-list { position: relative; margin-top: 48px; padding-left: 34px; }
.xp-list::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; opacity: .4;
  background: linear-gradient(to bottom, var(--accent), var(--green) 50%, var(--amber));
}
.xp-item { position: relative; margin-bottom: 16px; }
.xp-item:last-child { margin-bottom: 0; }
.xp-dot {
  position: absolute; left: -34px; top: 28px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--c); border: 2px solid var(--bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 16%, transparent);
}
.xp-card {
  background: var(--bg2); border: 0.5px solid var(--border); border-radius: var(--rl);
  padding: 24px 26px; transition: border-color .25s, transform .25s;
}
.xp-card:hover { border-color: color-mix(in srgb, var(--c) 40%, transparent); transform: translateX(4px); }
.xp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.xp-type {
  font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 100px; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.xp-period { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); }
.xp-role { font-size: 18px; font-weight: 700; line-height: 1.35; }
.xp-org { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--c); margin: 4px 0 14px; }
.xp-points { list-style: none; }
.xp-points li { position: relative; padding-left: 20px; margin-bottom: 7px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.xp-points li:last-child { margin-bottom: 0; }
.xp-points li::before { content: ""; position: absolute; left: 0; top: .85em; width: 8px; height: 1px; background: var(--c); }
.xp-tags { margin-top: 18px; }

/* ── CREDENTIALS ── */
.cred-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0; }
.cred-chip {
  font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 100px; border: 0.5px solid var(--border2);
  background: transparent; color: var(--muted); cursor: pointer; transition: all .18s;
}
.cred-chip span { margin-left: 6px; color: var(--dim); }
.cred-chip:hover { color: var(--text); background: var(--bg3); }
.cred-chip.active { color: var(--text); border-color: var(--text); background: var(--bg3); }
.cred-chip.active span { color: var(--accent); }

.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.cred-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg2); border: 0.5px solid var(--border); border-radius: var(--r); padding: 18px 20px;
  box-shadow: inset 0 2px 0 color-mix(in srgb, var(--c) 50%, transparent);
  transition: border-color .25s, transform .25s;
}
.cred-card[hidden] { display: none; }
.cred-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.cred-badge {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 700; font-size: 16px; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 0.5px solid color-mix(in srgb, var(--c) 28%, transparent);
}
.cred-issuer { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.cred-name { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 10px; }
.cred-year {
  display: inline-block; font-family: 'DM Mono', monospace; font-size: 10px; color: var(--c);
  padding: 2px 9px; border-radius: 100px; background: color-mix(in srgb, var(--c) 10%, transparent);
}

@media (max-width: 768px) {
  .xp-list { padding-left: 26px; }
  .xp-dot { left: -26px; }
  .xp-card { padding: 20px; }
  .xp-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; }
  .js .reveal.in { animation: none; }
  .js .stack-bar i { transform: none; transition: none; }
}

.cred-link { margin-left: 8px; font-family: 'DM Mono', monospace; font-size: 10px; color: var(--muted); }
.cred-link:hover { color: var(--text); }

/* Skill tanpa angka: tampil sebagai chip */
.stack-list { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-skill { margin: 0; }
.stack-top { margin: 0; }
.stack-pct, .stack-bar { display: none; }
.stack-name {
  display: inline-block; font-size: 12.5px; padding: 6px 14px; border-radius: 100px;
  border: 0.5px solid color-mix(in srgb, var(--c) 28%, var(--border2));
  background: color-mix(in srgb, var(--c) 8%, transparent);
  color: var(--text); transition: all .18s;
}
.stack-name:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }

/* Kartu sertifikat yang punya link: seluruh kartu bisa diklik */
a.cred-card { color: inherit; text-decoration: none; cursor: pointer; }
a.cred-card:hover .cred-name { color: var(--c); }
a.cred-card:focus-visible { outline: 1px solid var(--c); outline-offset: 2px; }
.cred-link { display: inline-block; margin-left: 8px; font-family: 'DM Mono', monospace; font-size: 10px; color: var(--muted); }
a.cred-card:hover .cred-link { color: var(--c); }

/* Tag tech stack: kontras tinggi + warna sesuai kategori */
.project-tag {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  border: 0.5px solid var(--border2);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
}

.project-card:has(.badge-ai-ds) .project-tag,
#modalContent header:has(.badge-ai-ds) .project-tag {
  color: var(--purple);
  background: rgba(184, 155, 245, .10);
  border-color: rgba(184, 155, 245, .30);
}

.project-card:has(.badge-fullstack) .project-tag,
#modalContent header:has(.badge-fullstack) .project-tag {
  color: var(--accent);
  background: rgba(126, 179, 255, .10);
  border-color: rgba(126, 179, 255, .30);
}

.project-card:has(.badge-iot) .project-tag,
#modalContent header:has(.badge-iot) .project-tag {
  color: var(--amber);
  background: rgba(245, 190, 113, .10);
  border-color: rgba(245, 190, 113, .30);
}