:root {
  --bg: #05090f;
  --panel: #0b111c;
  --panel-2: #0e1626;
  --line: #1c2942;
  --txt: #e6edf6;
  --dim: #8b98b0;
  --green: #00e5a0;
  --yellow: #ffd60a;
  --purple: #b388ff;
  --blue: #4cc9f0;
  --radius: 16px;
  --font-ui: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-ui);
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1140px, 92%); margin: 0 auto; }
.mono { font-family: var(--font-mono); font-size: 0.85rem; }
.c-green { color: var(--green); } .c-dim { color: var(--dim); }
.c-yellow { color: var(--yellow); } .c-purple { color: var(--purple); } .c-blue { color: var(--blue); }
.grad {
  background: linear-gradient(90deg, var(--green), var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* background fx */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 60%, transparent 100%);
}
.bg-glow { position: fixed; width: 520px; height: 520px; border-radius: 50%; filter: blur(140px); z-index: -1; opacity: .22; }
.glow-a { background: #00e5a055; top: -180px; left: -120px; }
.glow-b { background: #4c6fff55; top: 20%; right: -200px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(5,9,15,.72); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-family: var(--font-mono); font-weight: 600; }
.brand-prompt { color: var(--green); } .brand-cursor { color: var(--green); animation: blink 1.1s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-family: var(--font-mono); font-size: .85rem; color: var(--dim); transition: .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--green); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-toggle { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-toggle button { background: transparent; border: none; color: var(--dim); font-family: var(--font-mono); font-size: .72rem; font-weight: 600; padding: 7px 13px; cursor: pointer; transition: .2s; }
.lang-toggle button.active { background: var(--green); color: #04120c; }
.lang-toggle button:not(.active):hover { color: var(--txt); }
.status-pill { font-family: var(--font-mono); font-size: .75rem; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.6s infinite; }
.hamburger { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--txt); margin: 4px 0; }

/* buttons */
.btn { font-family: var(--font-mono); font-size: .85rem; padding: 12px 22px; border-radius: 10px; border: 1px solid var(--line); display: inline-block; transition: .2s; cursor: pointer; }
.btn-primary { background: var(--green); color: #04120c; border-color: var(--green); font-weight: 600; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,229,160,.3); }
.btn-ghost { color: var(--txt); background: transparent; }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-small { padding: 8px 16px; background: var(--txt); color: #000; font-weight: 600; }
.btn-small:hover { background: var(--green); }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; padding: 72px 0 48px; align-items: center; }
.breadcrumb { color: var(--dim); margin-bottom: 14px; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -2px; }
.role-line { margin: 14px 0; color: var(--green); min-height: 28px; }
.caret { animation: blink 1s infinite; color: var(--green); }
.hero-desc { color: var(--dim); max-width: 52ch; margin-bottom: 24px; }
.hero-desc strong { color: var(--txt); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-stats { display: flex; gap: 34px; }
.stat-num { font-size: 1.6rem; font-weight: 700; display: block; }
.stat-label { font-family: var(--font-mono); font-size: .72rem; color: var(--dim); }
.micro-note { color: #55617a; font-size: .72rem; margin-top: 12px; }

/* terminal */
.terminal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.r { background: #ff5f57; } .t-dot.y { background: #febc2e; } .t-dot.g { background: #28c840; }
.term-title { margin-left: 8px; color: var(--dim); font-size: .75rem; }
.term-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; font-size: .82rem; min-height: 260px; }
.json-line { padding-left: 22px; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero-badges span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--dim); font-size: .72rem; }

/* marquee */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 12px 0; color: var(--dim); background: rgba(255,255,255,.01); }
.marquee-track { display: flex; width: max-content; animation: scroll 28s linear infinite; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* sections */
.section { padding: 72px 0; }
.sec-tag { color: var(--dim); margin-bottom: 10px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -1px; }
.sec-sub { color: var(--dim); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.chip { background: transparent; border: 1px solid var(--line); color: var(--dim); border-radius: 999px; padding: 8px 18px; cursor: pointer; font-family: var(--font-mono); font-size: .8rem; transition: .2s; }
.chip:hover { border-color: var(--green); color: var(--txt); }
.chip.active { background: var(--green); color: #04120c; border-color: var(--green); font-weight: 600; }

/* project cards */
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.proj-grid .card:last-child { grid-column: 1 / -1; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .25s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); border-color: #2c3f63; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.card.hide { display: none; }
.card-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.card-tab { margin-left: 8px; color: var(--dim); font-size: .75rem; }
.card-img { background: #000; aspect-ratio: 16/9; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: .4s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; }
.card-body h3 { font-size: 1.35rem; letter-spacing: -.5px; }
.card-body p { color: var(--dim); font-size: .94rem; }
.feat { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; }
.feat li { font-family: var(--font-mono); font-size: .76rem; color: #b9c4d8; }
.feat li::before { content: "▸ "; color: var(--green); }
.card-links { display: flex; gap: 10px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.store-btn { font-family: var(--font-mono); font-size: .78rem; border: 1px solid var(--green); color: var(--green); padding: 9px 16px; border-radius: 9px; transition: .2s; }
.store-btn:hover { background: var(--green); color: #04120c; }
.store-btn.alt { border-color: var(--blue); color: var(--blue); }
.store-btn.alt:hover { background: var(--blue); color: #04120c; }
.store-btn.disabled { border-color: var(--line); color: var(--dim); cursor: default; }

/* indie apps */
.indie-grid { grid-template-columns: repeat(3, 1fr); }
.indie-img { position: relative; display: flex; align-items: center; justify-content: center; padding: 34px; background: radial-gradient(circle at 50% 30%, #12233d, #05090f 75%); aspect-ratio: auto; min-height: 220px; }
.indie-img img { width: 120px; height: 120px; border-radius: 28px; object-fit: cover; box-shadow: 0 18px 44px rgba(0,0,0,.55); }
.price-badge { position: absolute; top: 12px; right: 12px; background: var(--yellow); color: #221a00; font-size: .7rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.price-badge.free { background: var(--green); color: #04120c; }
.store-btn.shopee { border-color: #ee4d2d; color: #ff7337; }
.store-btn.shopee:hover { background: #ee4d2d; color: #fff; }

/* queue display mock (antrian loket card visual) */
.q-display { background: #020604; border: 1px solid #12351f; border-radius: 14px; padding: 26px 44px; text-align: center; box-shadow: inset 0 0 30px rgba(0,229,160,.12), 0 18px 44px rgba(0,0,0,.55); }
.q-num { display: block; font-size: 3rem; font-weight: 600; color: var(--green); text-shadow: 0 0 18px rgba(0,229,160,.7); letter-spacing: 4px; }
.q-loket { display: inline-block; margin-top: 8px; font-size: .75rem; letter-spacing: 3px; color: var(--yellow); border: 1px solid #5a4d00; border-radius: 6px; padding: 4px 14px; }

/* skills */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 24px; }
.code-block { background: #070c15; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; overflow-x: auto; font-size: .82rem; line-height: 1.8; }
.skill-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skill { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; transition: .2s; }
.skill:hover { border-color: var(--green); }
.skill strong { display: block; margin-bottom: 2px; }
.skill span { font-family: var(--font-mono); font-size: .75rem; color: var(--dim); }
.about { margin-top: 22px; background: var(--panel); border: 1px dashed #2c3f63; border-radius: var(--radius); padding: 20px 22px; color: #c4cede; line-height: 1.9; }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.contact-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; transition: .2s; }
.contact-card:hover { border-color: var(--green); transform: translateY(-3px); }
.contact-card strong { font-size: 1rem; word-break: break-all; }
.copy { cursor: pointer; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--dim); }
.foot-inner { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--green); color: #04120c; padding: 10px 20px; border-radius: 999px; font-weight: 600; opacity: 0; transition: .3s; pointer-events: none; z-index: 99; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .proj-grid { grid-template-columns: 1fr; }
  .proj-grid .card:last-child { grid-column: auto; }
  .indie-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0; background: var(--panel);
    flex-direction: column; padding: 18px 4%; gap: 16px; border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .status-pill { display: none; }
  .feat { grid-template-columns: 1fr; }
}
