@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ===== PAGE LOADER ===== */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#page-loader.fade-out {
  opacity: 0; visibility: hidden;
}
.loader-logo {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
}
.loader-logo img {
  width: 80px; height: auto;
  filter: drop-shadow(0 0 20px rgba(255,106,0,0.6));
  animation: loader-pulse 1.5s ease-in-out infinite;
}
@keyframes loader-pulse {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(255,106,0,0.4)); transform: scale(1); }
  50%       { filter: drop-shadow(0 0 35px rgba(255,106,0,0.9)); transform: scale(1.05); }
}
.loader-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem; font-weight: 500;
  color: rgba(255,255,255,0.5); letter-spacing: 0.15em;
  text-transform: uppercase;
}
.loader-text span.cursor {
  display: inline-block; width: 8px; height: 14px;
  background: #ff6a00; margin-left: 4px; vertical-align: middle;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; } 50% { opacity: 0; }
}
.loader-bar-wrap {
  width: 200px; height: 2px;
  background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden;
}
.loader-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ff6a00, #ffae00);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255,106,0,0.7);
  animation: load-progress 1.8s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes load-progress {
  0%   { width: 0%; }
  40%  { width: 55%; }
  70%  { width: 78%; }
  100% { width: 100%; }
}
/* Circuit lines decorative */
.loader-circuits {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.loader-circuits::before, .loader-circuits::after {
  content: ''; position: absolute;
  background: rgba(255,106,0,0.12);
}
.loader-circuits::before {
  width: 1px; height: 40vh; top: 0; left: 30%;
  box-shadow: 200px 0 0 rgba(255,106,0,0.08), -150px 0 0 rgba(255,106,0,0.06);
}
.loader-circuits::after {
  height: 1px; width: 30vw; top: 40%; right: 0;
  box-shadow: 0 200px 0 rgba(255,106,0,0.06), 0 -180px 0 rgba(255,106,0,0.05);
}


/* ===== CSS VARIABLES ===== */
:root {
  --bg: #000000;
  --bg-card: #0a0a0a;
  --bg-card-hover: #111111;
  --text: rgba(255,255,255,0.95);
  --text-muted: rgba(255,255,255,0.65);
  --text-dim: rgba(255,255,255,0.4);
  --accent: #ff6a00;
  --accent-glow: rgba(255,106,0,0.15);
  --border: rgba(255,255,255,0.12);
  --border-hover: rgba(255,255,255,0.25);
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 16px;
  --radius-sm: 12px;
  --transition: all 0.3s cubic-bezier(0.23,1,0.32,1);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-sans); line-height: 1.6;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }

/* ===== PARTICLE CANVAS ===== */
#particleCanvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  opacity: 0.35; /* Kaburkan di hero section */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 100vh, rgba(0,0,0,0.05) 150vh);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 100vh, rgba(0,0,0,0.05) 150vh);
}

/* ===== LAYOUT ===== */
.wrapper { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== NAVIGATION ===== */
@media (min-width: 769px) {
  body { padding-left: 220px; }
  .nav {
    position: fixed; top: 0; left: 0; bottom: 0; width: 220px; z-index: 100;
    border-right: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.4); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  }
  .nav-inner {
    display: flex; flex-direction: column; align-items: center;
    padding: 50px 20px; height: 100%;
  }
  .nav-logo { margin-bottom: 2.5rem; display: flex; justify-content: center; width: 100%; }
  .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.8rem;
    margin-bottom: auto; width: 100%; padding-left: 10px;
  }
  .nav-logo img { height: auto; width: 160px; }
  .nav-controls { margin-top: 3rem; }
}

@media (max-width: 768px) {
  .nav {
    position: absolute; top: 0; left: 0; right: 0; z-index: 100;
    padding: 24px 0;
  }
  .nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
  }
  .nav-links { display: none; }
}

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text);
}
/* Mobile: keep logo small */
@media (max-width: 768px) {
  .nav-logo img { height: 40px; width: auto; object-fit: contain; }
}
/* Desktop: large centered logo */
@media (min-width: 769px) {
  .nav-logo img { width: 160px; height: auto; object-fit: contain; display: block; }
}
.nav-links a {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em;
  transition: color 0.2s, transform 0.2s; display: inline-block;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); transform: translateX(5px); }
.nav-links a.active { transform: translateX(8px) scale(1.05); font-weight: 700; }
.nav-links a::before {
  content: '>'; color: var(--accent); opacity: 0; margin-right: 8px;
  transition: opacity 0.2s;
}
.nav-links a:hover::before, .nav-links a.active::before { opacity: 1; }

.nav-controls { display: flex; gap: 8px; align-items: center; }
.nav-btn {
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-muted); cursor: pointer;
  transition: var(--transition); letter-spacing: 0.05em;
}
.nav-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,106,0,0.1); }


/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; padding: 120px 0 80px;
  gap: 3rem;
}
.hero-content { flex: 1; max-width: 600px; }
.hero-portrait {
  flex: 0 0 auto; display: flex; align-items: flex-end;
  justify-content: center; position: relative;
}
.hero-portrait img {
  max-height: 480px; width: auto; object-fit: contain;
  position: relative; z-index: 2;
}
/* Gradient circle behind portrait */
.hero-portrait::before {
  content: ''; position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%); width: 360px; height: 360px;
  background: radial-gradient(circle at 50% 60%, #ff6a00 0%, #1a0d0a 60%, transparent 100%);
  border-radius: 50%; z-index: 0; opacity: 0.35;
}
/* Outer ring */
.hero-portrait::after {
  content: ''; position: absolute; bottom: -10px; left: 50%;
  transform: translateX(-50%); width: 340px; height: 340px;
  border: 1px solid rgba(255,106,0,0.15); border-radius: 50%; z-index: 1;
}
@media (max-width: 768px) {
  .hero { flex-direction: column-reverse; text-align: center; padding-top: 100px; }
  .hero-portrait img { max-height: 300px; }
  .hero-meta { justify-content: center; }
}
.hero-label {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px;
}
.hero-label .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}
.hero-title {
  font-size: clamp(3.2rem, 7vw, 5.5rem); font-weight: 800;
  line-height: 1.05; letter-spacing: -0.04em; margin-bottom: 1rem;
}
.accent-glow {
  color: var(--accent);
  text-shadow: 0 0 40px rgba(255,106,0,0.3), 0 0 80px rgba(255,106,0,0.1);
}
.hero-tagline {
  font-family: var(--font-mono); font-size: 1rem; font-weight: 500;
  color: var(--accent); letter-spacing: 0.02em; margin-bottom: 1.2rem;
  opacity: 0.85;
}
.hero-desc {
  font-size: 1.05rem; color: var(--text-muted); line-height: 1.8;
  max-width: 520px; margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.btn-lg { padding: 16px 36px; font-size: 0.88rem; }
.hero-meta {
  display: flex; gap: 2rem; flex-wrap: wrap;
}
.hero-meta-item {
  display: flex; flex-direction: column; gap: 2px;
}
.hero-meta-item .label {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.12em;
}
.hero-meta-item .value {
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 3rem;
}
.section-header h2 {
  font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em;
}
.section-header h2 .accent { color: var(--accent); }
.section-header .line {
  flex: 1; height: 1px; background: var(--border);
}
.section-label {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

/* ===== BENTO GRID ===== */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  transition: var(--transition); position: relative; overflow: hidden;
}
.bento-item:hover {
  border-color: var(--border-hover); background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.bento-item.span-2 { grid-column: span 2; }
.bento-item.span-full { grid-column: 1 / -1; }
.bento-title {
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 1rem;
}
.bento-value {
  font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em;
  line-height: 1;
}
.bento-text { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.bento-text strong { color: var(--text); font-weight: 600; }

/* Terminal box */
.terminal {
  background: #050505; border-radius: var(--radius-sm); padding: 1.2rem;
  font-family: var(--font-mono); font-size: 0.78rem; line-height: 2;
  color: var(--text-muted); border: 1px solid var(--border);
}
.terminal .prompt { color: var(--accent); }
.terminal .cmd { color: var(--text); }

@media (max-width: 768px) {
  .bento { grid-template-columns: 1fr; }
  .bento-item.span-2 { grid-column: span 1; }
}

/* ===== PROJECT CARDS ===== */
.projects-grid { display: flex; flex-direction: column; gap: 2rem; }
.project-card {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition);
}
.project-card:hover {
  border-color: var(--border-hover); transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.project-card.reverse { direction: rtl; }
.project-card.reverse > * { direction: ltr; }
.project-img { position: relative; overflow: hidden; min-height: 300px; }
.project-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.project-card:hover .project-img img { transform: scale(1.04); }
.project-info { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.project-status {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 1rem; color: var(--text-dim);
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.status-live { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.4); }
.status-dev { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,0.4); }
.status-hold { background: #ef4444; }
.project-info h3 {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: 0.8rem;
}
.project-info p {
  color: var(--text-muted); font-size: 0.9rem; line-height: 1.7;
  margin-bottom: 1.5rem;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.5rem; }
.tag {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-muted); background: transparent;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600;
  padding: 12px 24px; border-radius: 999px; text-decoration: none;
  transition: var(--transition); border: none; cursor: pointer;
  letter-spacing: -0.01em;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #e63575; transform: translateY(-2px); box-shadow: 0 8px 25px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); transform: translateY(-2px); }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1EBE5A; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(37,211,102,0.3); }
.btn-sm { padding: 8px 18px; font-size: 0.78rem; }

@media (max-width: 768px) {
  .project-card, .project-card.reverse { grid-template-columns: 1fr; direction: ltr; }
  .project-img { min-height: 200px; max-height: 240px; }
  .project-info { padding: 1.5rem; }
}

/* ===== PLAYGROUND ===== */
.playground-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.playground-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition);
}
.playground-card:hover {
  border-color: var(--border-hover); transform: translateY(-4px);
  box-shadow: 0 16px 50px rgba(0,0,0,0.3);
}
.playground-card img { width: 100%; height: 180px; object-fit: cover; }
.playground-card-body { padding: 1.5rem; }
.playground-card-body h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; letter-spacing: -0.02em; }
.playground-card-body p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.6; }

/* ===== ECOSYSTEM ===== */
.ecosystem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ecosystem-card {
  display: flex; align-items: center; gap: 1.2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: var(--transition); text-decoration: none; color: var(--text);
}
.ecosystem-card:hover {
  border-color: var(--border-hover); transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.eco-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; flex-shrink: 0; }
.eco-logo-placeholder {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  background: var(--accent-glow); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem; color: var(--accent);
}
.eco-info h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; letter-spacing: -0.01em; }
.eco-info p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 4px; }
.eco-link { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); }

/* ===== SKILLS GRID ===== */
.skills-row {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.skill-chip {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-muted); background: var(--bg-card);
  transition: var(--transition);
}
.skill-chip:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-glow);
}
.skill-chip i { font-size: 1.1rem; }

/* ===== CONTACT ===== */
.contact-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 3rem; text-align: center;
}
.contact-box h3 {
  font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 1rem;
}
.contact-box p { color: var(--text-muted); max-width: 450px; margin: 0 auto 2rem; }
.contact-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 0; border-top: 1px solid var(--border); margin-top: 4rem;
  text-align: center;
}
.footer-socials { display: flex; gap: 12px; justify-content: center; margin-bottom: 1rem; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: var(--transition);
}
.footer-socials a:hover { border-color: var(--accent); color: var(--accent); }
.footer-copy {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text-dim); letter-spacing: 0.05em;
}

/* ===== SECTIONS SPACING ===== */
.section-block { padding: 100px 0; }

/* ===== ANIMATIONS ===== */
.anim { opacity: 0; transform: translateY(30px); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* ===== MOBILE CENTERING TWEAKS ===== */
@media (max-width: 768px) {
  .hero-label { justify-content: center; }
  .hero-cta { justify-content: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .section-header { justify-content: center; }
  .section-header .line { display: none; }
}
