/* =========================================================
   OGA — site.css (clean rewrite)
   - Light/Dark variables
   - Layout + cards
   - Top nav (desktop) + Bottom nav (mobile)
========================================================= */

[hidden] { display: none !important; }

/* Theme tokens */
:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#0b1220;
  --muted:#5b6475;
  --line:#e2e8f0;

  --blue:#2563eb;
  --blue2:#1d4ed8;
  --green:#16a34a;

  --pill:#e8f2ff;
  --term:#0b1020;
  --termText:#c7f9ff;

  --shadow: 0 10px 24px rgba(15, 23, 42, .06);
  --shadow2: 0 18px 40px rgba(15, 23, 42, .08);

  --radius: 18px;
}

html.dark, body.dark{
  --bg:#070a12;
  --card:#0c1222;
  --text:#ffffff;
  --muted:#aab1bd;
  --line:#1f2937;

  --blue:#38bdf8;
  --blue2:#60a5fa;
  --green:#22c55e;

  --pill:#082a3a;
  --term:#020617;
  --termText:#a5f3fc;

  --shadow: 0 10px 24px rgba(0,0,0,.25);
  --shadow2: 0 18px 40px rgba(0,0,0,.35);
}

/* Base */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  background:var(--bg);
  color:var(--text);
}

a{ color: inherit; }

/* Layout */
.wrap{
  max-width:1120px;
  margin:0 auto;
  padding: 18px 18px 50px;
}

/* Buttons */
.btn{
  border:1px solid var(--line);
  background:var(--card);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  font-size:12px;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  user-select:none;
}
.btn:hover{ transform:translateY(-1px); box-shadow: var(--shadow); }

.btn.primary{
  border-color: transparent;
  background: linear-gradient(180deg, var(--blue), var(--blue2));
  color:#fff;
}

/* toggle icon by theme (CSS-based, anti-bug) */
.iconBtn { display:inline-flex; align-items:center; justify-content:center; }
.iconBtn svg { display:none; width:16px; height:16px; }

html:not(.dark) .iconBtn .icon-moon { display:block; } /* light -> moon */
html.dark .iconBtn .icon-sun { display:block; }       /* dark  -> sun */


/* =========================================================
   Top Navbar
========================================================= */
.navTop{
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0 12px;
  margin: 0 0 10px;
  background: linear-gradient(to bottom, rgba(245,247,251,.92), rgba(245,247,251,.55), transparent);
  backdrop-filter: blur(10px);
}
body.dark .navTop{
  background: linear-gradient(to bottom, rgba(7,10,18,.85), rgba(7,10,18,.55), transparent);
}

.navBar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.navLeft{
  display:flex;
  align-items:center;
  gap:14px;
  min-width: 0; /* allow shrink */
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 0; /* allow ellipsis */
}

.logo{
  width:44px;
  height:44px;
  border-radius:14px;
  background:var(--blue);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  letter-spacing:-.03em;
  box-shadow: var(--shadow);
  flex:0 0 auto;
}

.brandText{ min-width:0; }
.brandTitle{ font-weight:800; letter-spacing:-.02em; }
.brandSub{
  font-size:12px;
  color:var(--muted);
  margin-top:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 420px;
}

.navLinks{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.navLink{
  display:inline-flex;
  align-items:center;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid transparent;
  text-decoration:none;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}
.navLink:hover{
  color:var(--text);
  border-color: var(--line);
  background: rgba(2,6,23,.02);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
body.dark .navLink:hover{ background: rgba(255,255,255,.04); }

.navLink.active{
  color: var(--text);
  border-color: rgba(37,99,235,.20);
  background: rgba(37,99,235,.08);
}
body.dark .navLink.active{
  border-color: rgba(56,189,248,.22);
  background: rgba(56,189,248,.10);
}

.navRight{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

/* Mobile: top nav ringkas */
@media(max-width:920px){
  .navLinks{ display:none; }
  .navRight .btn:not(.iconBtn){ display:none; } /* hide LinkedIn + email */
  .brandSub{ max-width: 160px; }
}

/* =========================================================
   Hero grid + content
========================================================= */
.hero{
  display:grid;
  grid-template-columns: 1.35fr .85fr;
  gap:18px;
  margin-top:18px;
}
@media(max-width:920px){ .hero{ grid-template-columns:1fr; } }

.pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  background: #dcfce7;
  color:#065f46;
  border:1px solid #bbf7d0;
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}
body.dark .pill{
  background: rgba(34,197,94,.12);
  color: rgba(167,243,208,1);
  border:1px solid rgba(34,197,94,.25);
}
.dot{
  width:8px;
  height:8px;
  border-radius:99px;
  background:var(--green);
}

h1{
  margin:14px 0 0;
  font-size:44px;
  line-height:1.08;
  letter-spacing:-.03em;
}
@media(max-width:520px){ h1{ font-size:34px; } }

.lead{
  margin:12px 0 0;
  color:var(--muted);
  font-size:13.5px;
  line-height:1.7;
  max-width:760px;
}

/* Cards */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
}
.card + .card{ margin-top:14px; }

.sectionTitle{
  font-weight:800;
  letter-spacing:-.02em;
  margin-bottom:10px;
}

.miniGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.mini{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background: rgba(2,6,23,.02);
}
body.dark .mini{ background: rgba(255,255,255,.03); }

.k{ font-size:11px; color:var(--muted); }
.v{ margin-top:6px; font-weight:800; }

/* Terminal */
.termWrap{
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:16px;
  background:var(--card);
  box-shadow: var(--shadow);
  margin-top:14px;
}

.termHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
  gap:10px;
}
.dots{ display:flex; gap:7px; align-items:center; }
.d{ width:10px; height:10px; border-radius:99px; }
.d.r{ background:#ff5f57; }
.d.y{ background:#febc2e; }
.d.g{ background:#28c840; }

.tag{
  font-size:11px;
  padding:6px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(2,6,23,.02);
  color:var(--text);
}
body.dark .tag{ background: rgba(255,255,255,.03); }

.terminal{
  background:
    radial-gradient(1200px 500px at 30% 10%, rgba(56,189,248,.18), transparent 60%),
    radial-gradient(900px 400px at 70% 30%, rgba(99,102,241,.14), transparent 55%),
    var(--term);
  color: var(--termText);
  border-radius:14px;
  padding:14px;
  font-size:12.5px;
  line-height:1.65;
  overflow:auto;
  white-space:pre-wrap;
}

/* CTA row */
.ctaRow{ display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }

/* Portfolio tiles */
.tiles{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
@media(max-width:520px){ .tiles{ grid-template-columns:1fr; } }

.tile{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background: rgba(2,6,23,.02);
  text-decoration:none;
  color:var(--text);
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
body.dark .tile{ background: rgba(255,255,255,.03); }
.tile:hover{ transform:translateY(-1px); box-shadow: var(--shadow2); opacity:.98; }

.tileTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.tileName{ font-weight:800; }
.tileDesc{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  line-height:1.55;
}

.chip{
  font-size:11px;
  padding:5px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  background: var(--pill);
  color: var(--text);
  white-space:nowrap;
}
body.dark .chip{
  background: rgba(56,189,248,.10);
  border-color: rgba(56,189,248,.20);
}

/* Footer */
.footer{
  margin-top:22px;
  padding-top:16px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
}

/* Helpers */
.link{ color:var(--blue); text-decoration:none; font-weight:700; }
.link:hover{ text-decoration:underline; }
.copyNote{ font-size:11px; color:var(--muted); }

/* =========================================================
   Mobile Bottom Nav (sticky)
========================================================= */
.bottomNav{
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 9999;

  margin: 0 auto;
  width: min(520px, calc(100% - 22px));

  border:1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow2);
  padding: 10px 10px 8px;

  display:none; /* desktop off */
}
body.dark .bottomNav{
  background: rgba(12,18,34,.85);
}

.bottomRow{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.bottomItem{
  text-decoration:none;
  color: var(--muted);
  border-radius: 14px;
  padding: 10px 8px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  font-size:11px;
  font-weight:700;
}
.bottomItem:hover{
  transform: translateY(-1px);
  border-color: var(--line);
  background: rgba(2,6,23,.03);
}
body.dark .bottomItem:hover{ background: rgba(255,255,255,.05); }

.bottomItem.active{
  color: var(--text);
  border-color: rgba(37,99,235,.20);
  background: rgba(37,99,235,.10);
}
body.dark .bottomItem.active{
  border-color: rgba(56,189,248,.22);
  background: rgba(56,189,248,.12);
}

.icon{ width:18px; height:18px; display:block; }

@media(max-width:920px){
  .bottomNav{ display:block; }
  .wrap{ padding-bottom: 120px; } /* prevent content being hidden */
}


html.is-loading body { cursor: progress; }
html.is-loading #appMain { opacity: .65; transition: opacity .12s ease; }
