:root {
  --primary: #00e5ff;
  --secondary: #ff9100;
  --accent: #ff00ff;
  --bg-dark: #050510;
  --bg-card: rgba(10, 10, 26, 0.6);
  --border-dark: #1e1e3f;
}

html,
body {
  background-color: var(--bg-dark);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
  margin: 0;
  padding: 0;
}

.retro-font {
  font-family: 'Press Start 2P', cursive;
  line-height: 1.5;
}

/* BACKGROUND BARU: Starfield Retro */
.space-bg {
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(2px 2px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 130px 80px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0, 0, 0, 0));
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: twinkle 4s infinite alternate;
}

@keyframes twinkle {
  0% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

/* BACKGROUND BARU: Efek Hujan Meteor Pixelated */
.meteor {
  position: absolute;
  width: 3px;
  height: 25px;
  opacity: 0;
  animation: meteor-fall linear infinite;
}
.meteor::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 3px;
  height: 3px;
}

@keyframes meteor-fall {
  0% {
    top: -10%;
    transform: rotate(25deg) translateY(0);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    top: 110%;
    transform: rotate(25deg) translateY(100vh);
    opacity: 0;
  }
}

/* Setup Variasi Meteor (Warna Neon & Kecepatan) */
.m1 {
  left: 30%;
  animation-duration: 3s;
  animation-delay: 0s;
  background: linear-gradient(to bottom, transparent, var(--primary));
}
.m1::after {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.m2 {
  left: 70%;
  animation-duration: 2.5s;
  animation-delay: 1.5s;
  background: linear-gradient(to bottom, transparent, var(--secondary));
}
.m2::after {
  background: var(--secondary);
  box-shadow: 0 0 10px var(--secondary);
}

.m3 {
  left: 50%;
  animation-duration: 4s;
  animation-delay: 0.5s;
  background: linear-gradient(to bottom, transparent, var(--accent));
}
.m3::after {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.m4 {
  left: 90%;
  animation-duration: 3.2s;
  animation-delay: 2.2s;
  background: linear-gradient(to bottom, transparent, #fff);
}
.m4::after {
  background: #fff;
  box-shadow: 0 0 8px #fff;
}

/* Kursor berkedip */
.cursor-blink {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Efek Card */
.pixel-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pixel-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.7);
}

.card-1:hover {
  box-shadow: 0 15px 35px -5px rgba(255, 145, 0, 0.15);
}
.card-2:hover {
  box-shadow: 0 15px 35px -5px rgba(0, 229, 255, 0.15);
}
.card-3:hover {
  box-shadow: 0 15px 35px -5px rgba(255, 0, 255, 0.15);
}

.img-overlay {
  background: linear-gradient(to top, var(--bg-dark) 5%, transparent 80%);
}

.tech-tag {
  transition: all 0.3s ease;
}
.tech-tag:hover {
  box-shadow: 0 0 10px currentColor;
  background: currentColor;
  color: #000 !important;
}
/* End Style untuk index.html */

/* Start untuk Portofolio.html */
:root {
  --primary: #00e5ff;
  --secondary: #ff9100;
  --accent: #ff00ff;
  --bg-dark: #050510;
  --bg-card: #0a0a1a;
  --border-dark: #1e1e3f;
}

body {
  background-color: var(--bg-dark);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
  /* Transisi halus */
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.retro-font {
  font-family: 'Press Start 2P', cursive;
}

/* NAVBAR */
header {
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(5, 5, 16, 0.9);
  backdrop-filter: blur(10px);
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease;
}

nav a {
  transition: all 0.3s;
  letter-spacing: 1px;
}

nav a:hover {
  color: var(--accent);
}

nav a.active {
  color: var(--primary);
}

/* BOX STYLES */
.pixel-card {
  border: 2px solid var(--border-dark);
  background: var(--bg-card);
  transition: all 0.3s;
}

.pixel-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.pixel-btn {
  background: var(--primary);
  color: #000;
  font-family: 'Press Start 2P', cursive;
  font-size: 9px;
  padding: 12px 20px;
  display: inline-block;
  transition: 0.2s;
  border: 2px solid transparent;
}

.pixel-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 0 10px var(--accent);
}

.pixel-btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

/* CRT Effect */
.crt::after {
  content: ' ';
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
  background-size: 100% 4px;
  z-index: 100;
  pointer-events: none;
}

/* SNAKE CURSOR STYLE */
.snake-pixel {
  width: 10px;
  height: 10px;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  background-color: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

/* --- LIGHT MODE OVERRIDES --- */
body.light-mode {
  --bg-dark: #f0f4f8;
  /* Warna background utama jadi terang */
  --bg-card: #ffffff;
  /* Warna card jadi putih */
  --border-dark: #cbd5e1;
  /* Warna border jadi abu-abu muda */
  color: #0f172a !important;
  /* PERBAIKAN: Ubah default warna teks ke gelap */
}

/* Memaksa class Tailwind hardcoded berubah saat light mode aktif */
body.light-mode .text-white {
  color: #0f172a !important;
}

body.light-mode .text-gray-300,
body.light-mode .text-gray-400,
body.light-mode .text-gray-500 {
  color: #475569 !important;
}

/* PERBAIKAN: bg-[#111] (Achievement) ditambahkan ke daftar yang di-override */
body.light-mode .bg-\[\#050510\],
body.light-mode .bg-\[\#0a0a1a\],
body.light-mode .bg-\[\#0f0f24\],
body.light-mode .bg-\[\#111\] {
  background-color: var(--bg-card) !important;
}

body.light-mode .bg-\[\#0f0f24\]\/50 {
  background-color: rgba(255, 255, 255, 0.7) !important;
}

body.light-mode .bg-\[\#0f0f24\]\/30 {
  background-color: rgba(255, 255, 255, 0.5) !important;
}

body.light-mode .border-\[\#1e1e3f\] {
  border-color: var(--border-dark) !important;
}

body.light-mode header {
  background-color: rgba(240, 244, 248, 0.9) !important;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-mode input,
body.light-mode textarea {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  border-color: var(--border-dark) !important;
}

/* Mengurangi kepekatan garis CRT di mode terang agar tidak mengganggu */
body.light-mode.crt::after {
  background: linear-gradient(
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.05) 50%
  );
  background-size: 100% 4px;
}
/* End Style Portofolio.html */
