* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

html {
  scroll-behavior: smooth;
}

#backToTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--primary-blue)
  );
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all .3s ease;
  box-shadow: 0 0 20px rgba(168, 85, 247, .35);
  z-index: 999;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
#backToTop:focus,
#backToTop:active { outline: none; }
#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#backToTop:hover {
  transform: translateY(-4px);
}

#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity .6s ease, visibility .6s ease;
}

#typing-text {
  color: #f8fafc;
  text-shadow: 0 0 10px rgba(255,255,255,.15);
}
#typing-text::after {
  content: "|";
  animation: blink .8s infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.loader-logo { animation: loaderFloat 2.5s ease-in-out infinite; }
.loader-text {
  font-size: 3rem;
  font-weight: 700;
  animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes loaderFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes loaderPulse {
  0%,100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.08); opacity: 1; }
}

#loader.hide { opacity: 0; visibility: hidden; }

/* Variabel untuk Tema Gelap (Default) */
:root {
  --primary-purple: #a855f7;
  --primary-blue: #38bdf8;
  --primary-pink: #ec4899;
  --bg-primary: #0f172a;
  --bg-secondary: #1e1b4b;
  --header-bg: #111827;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --accent-purple: #7c3aed;
  --border-color: rgba(255, 255, 255, 0.1);
  --decoration-color: rgba(168, 85, 247, 0.05);
}

/* Variabel untuk Tema Terang */
body.light-mode {
  --bg-primary: #fdf2f8;
  --bg-secondary: #e0f2fe;
  --header-bg: #ffffff;
  --text-primary: #0c4a6e;
  --text-secondary: #374151;
  --accent-purple: #9333ea;
  --border-color: rgba(0, 0, 0, 0.1);
  --decoration-color: rgba(168, 85, 247, 0.1);
}
body.light-mode .navbar {
  background: rgba(255,255,255,.72);
}
body.light-mode .hero::before {
  background: rgba(168, 85, 247, 0.25);
}
body.light-mode .hero::after {
  background: rgba(56, 189, 248, 0.22);
}
body.light-mode .kanji {
  color: #9333ea;
  opacity: 0.12;
  filter: blur(.5px);
  text-shadow: 0 0 15px rgba(147, 51, 234, .15);
}
body.light-mode .kanji-bg {
  color: #9333ea;
  opacity: 0.08;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}
body.loading {
  overflow: hidden;
  height: 100vh;
}

.desktop-quote {
  display: block;
}
.mobile-quote {
  display: none;
}

/* --- NAVBAR --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: all .3s ease;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.visitor-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: .95rem;
  white-space: nowrap;
}

/* Visitor Counter - Default Desktop */
.mobile-counter {
  display: none;
  margin-top: 2px;
  font-size: .85rem;
}
.desktop-counter {
  display: flex;
}
.logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  top: 6px;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}
.logo-link:focus {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
  border-radius: 4px;
}
.logo { font-size: 1.8rem; font-weight: 700; display: flex; gap: 2px; }
.logo .ren, .hero-text h1 .ren, .loader-text .ren { color: var(--text-primary); }
.logo .dev,
.hero-text h1 .dev,
.loader-text .dev {
  background: linear-gradient(
    90deg,
    #a855f7,
    #ec4899,
    #38bdf8,
    #a855f7
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textFlow 6s linear infinite;
}
@keyframes textFlow {
  from { background-position: 0% center; }
  to { background-position: 300% center; }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
}
.nav-links li {
  margin-left: -0.5rem;
}
.nav-links a.button {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.4s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
.nav-links a.button:hover {
  color: var(--text-primary);
  background-color: rgba(124, 58, 237, 0.15);
}
.nav-links a.button.active {
  color: var(--text-primary);
  background-color: rgba(124, 58, 237, 0.25);
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  padding: 3rem 1.5rem;
  min-height: calc(100vh - 70px);
  flex-direction: column-reverse;
  align-items: center;
  text-align: center;
  gap: 2rem;
  background: radial-gradient(circle at top, var(--bg-secondary), var(--bg-primary));
  width: 100%;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.hero::before {
  width: 500px;
  height: 500px;
  background: rgba(168, 85, 247, 0.20);
  top: 5%;
  left: -80px;
  animation: orbFloat1 14s ease-in-out infinite;
}
.hero::after {
  width: 600px;
  height: 600px;
  background: rgba(56, 189, 248, 0.18);
  bottom: -50px;
  right: -120px;
  animation: orbFloat2 18s ease-in-out infinite;
}
.hero-text { width: 100%; animation: fadeIn 1s ease-in-out; }
.hero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 2;
}

@keyframes orbFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(80px,-50px) scale(1.3); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-70px,50px) scale(1.25); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-text h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 1.5rem; line-height: 1.2; text-shadow: 0 0 20px rgba(168, 85, 247, 0.15); }

.sub-greeting {
  font-size: 1.2rem;
  font-weight: 400;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.sub-greeting.visible {
  opacity: 1;
  transform: translateY(0);
}
.sub-greeting .jp {
  font-size: 1.1rem;
  margin-left: 4px;
}

.hero-text p { margin-bottom: 2rem; line-height: 1.7; font-size: 1.1rem; color: var(--text-secondary); }

.info-cards {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.card {
  animation: cardGlow 4s ease-in-out infinite, cardGradient 12s linear infinite;
  background: linear-gradient(135deg, #a855f7, #ec4899, #38bdf8, #ec4899, #a855f7);
  background-size: 400% 400%;
  color: white;
  padding: 1.5rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease;
  min-width: 200px;
}
.card h2 { font-size: 2rem; font-weight: 700; }
.card p { font-size: 1rem; margin: 0; }

@keyframes cardGlow {
  0%,100% { box-shadow: 0 10px 20px rgba(0,0,0,.2); }
  50% { box-shadow: 0 10px 30px rgba(168,85,247,.45), 0 0 50px rgba(236,72,153,.25); }
}
@keyframes cardGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.follow-title { margin-top: 2rem; margin-bottom: 1rem; font-weight: 600; font-size: 1.2rem; }
.social-icons { display: flex; justify-content: center; gap: 1.5rem; }
.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}
.social-icons a:hover {
  background: linear-gradient(
    90deg,
    var(--primary-purple),
    var(--accent-purple)
  );
  color: white;
  transform: translateY(-5px) scale(1.08);
  box-shadow:
    0 0 15px var(--primary-purple),
    0 0 30px rgba(168,85,247,.3);
}

.music-card {
  width: 360px;
  max-width: 100%;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 0 25px rgba(168,85,247,.15);
  text-align: center;
  transition: all .3s ease;
}
.music-card .hero-image {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.music-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 25px rgba(168,85,247,.25), 0 0 45px rgba(236, 72, 153, .15);
}
.music-header {
  font-size: .9rem;
  color: var(--text-secondary);
}
.music-title {
  margin-top: 10px;
  font-weight: 700;
}
.music-artist {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.music-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
#playBtn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: .3s;
}
#playBtn:hover {
  transform: scale(1.15);
  color: var(--primary-purple);
}
#progressBar {
  flex: 1;
  cursor: pointer;
}
#visualizer {
  width: 100%;
  height: 70px;
  display: block;
  margin: 10px 0;
  filter: drop-shadow(0 0 8px rgba(236,72,153,.4));
}

.hero-image img {
  transition: opacity 0.4s ease, filter 0.3s ease;
}
.hero-image img.fade {
  opacity: 0;
  filter: blur(4px);
}
.hero-image {
  position: relative;
  animation: floatAvatar 6s ease-in-out infinite;
  will-change: transform;
}
.hero-image .image-wrapper {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  padding: 5px;
  background: linear-gradient(
    135deg,
    #9306ba,
    #061294,
    #9c083e,
    #ec4899,
    #9306ba
  );
  background-size: 400% 400%;
  animation: borderGradient 8s ease infinite, glowPulse 4s ease-in-out infinite;
  box-shadow: 0 0 35px rgba(236, 72, 153, 0.4);
  transition: all 0.3s ease;
}
body.light-mode .hero-image .image-wrapper {
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--primary-pink),
    var(--primary-blue),
    var(--primary-pink)
  );
  background-size: 400% 400%;
  animation: borderGradient 8s ease infinite, glowPulse 4s ease-in-out infinite;
}

@keyframes borderGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes glowPulse {
  0% { box-shadow: 0 0 35px rgba(236, 72, 153, 0.4); }
  50% { box-shadow: 0 0 60px rgba(236, 72, 153, 0.6); }
  100% { box-shadow: 0 0 35px rgba(236, 72, 153, 0.4); }
}
@keyframes floatAvatar {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}

.hero-image .image-wrapper img {
  border-radius: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-primary);
}
.hero-image .image-wrapper:hover { transform: scale(1.05); }

/* PERBAIKAN 6: Theme toggle posisi */
.theme-toggle {
  position: absolute;
  right: 73px;
  bottom: 10px;
  width: 45px;
  height: 45px;
  background: var(--header-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { color: var(--primary-blue); transform: scale(1.1); }

.hero-decoration {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-text,
.hero-image {
  position: relative;
  z-index: 2;
}

.kanji {
  position: absolute;
  color: white;
  opacity: 0.07;
  font-weight: 700;
  user-select: none;
  pointer-events: none;
  filter: blur(1px);
  animation: floatKanji 3s ease-in-out infinite;
}
.kanji-bg {
  position: absolute;
  left: 52%;
  top: 50%;
  transform: translate(-50%, -50%);
  writing-mode: vertical-rl;
  font-size: 20rem;
  font-weight: 700;
  color: white;
  opacity: 0.08;
  filter: blur(1px);
  pointer-events: none;
  z-index: 0;
}
.kanji-1 {
  top: 6%;
  left: 8%;
  font-size: 9rem;
  transform: rotate(-15deg);
}
.kanji-2 {
  top: 10%;
  right: 22%;
  font-size: 7rem;
  transform: rotate(15deg);
  animation-delay: .5s;
}
.kanji-3 {
  bottom: 15%;
  left: 35%;
  font-size: 8rem;
  transform: rotate(-10deg);
  animation-delay: .1s;
}
.kanji-4 {
  top: 66%;
  left: 4%;
  font-size: 6rem;
  transform: rotate(90deg);
  animation-delay: 1.5s;
  opacity: 0.06;
}
.kanji-5 {
  top: 68%;
  right: 5%;
  font-size: 6rem;
  transform: rotate(-90deg);
  animation-delay: .2s;
  opacity: 0.06;
}
.kanji-6 {
  bottom: 8%;
  right: 20%;
  font-size: 7rem;
  transform: rotate(18deg);
  animation-delay: .8s;
}
.kanji-7 {
  top: 28%;
  left: 18%;
  font-size: 5rem;
  transform: rotate(-25deg);
  animation-delay: 1.25s;
  opacity: 0.05;
}
.kanji-8 {
  top: 18%;
  left: 72%;
  font-size: 5rem;
  writing-mode: vertical-rl;
  animation-delay: 1.8s;
  opacity: 0.05;
}
.kanji-9 {
  top: 30%;
  right: 14%;
  font-size: 4rem;
  transform: rotate(35deg);
  opacity: .04;
}
.kanji-10 {
  bottom: 22%;
  left: 18%;
  font-size: 5rem;
  writing-mode: vertical-rl;
  opacity: .05;
}
.kanji-11 {
  top: 15%;
  left: 34%;
  font-size: 4rem;
  transform: rotate(-40deg);
  opacity: .035;
}
.kanji-12 {
  bottom: 5%;
  left: 38%;
  font-size: 5rem;
  transform: rotate(22deg);
  opacity: .04;
}

@keyframes floatKanji {
  0%,100% { margin-top: 0; }
  50% { margin-top: -12px; }
}

@media (max-width: 767px) {
  .hero-decoration,
  .hero::before,
  .hero::after {
    display: none;
  }
}

/* --- ABOUT SECTION --- */
.about-section h2,
.about-section p,
.about-section ul li {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(30px);
  transition:
    opacity .8s ease,
    transform .8s ease,
    filter .8s ease;
}
.about-section h2.visible,
.about-section p.visible,
.about-section ul li.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.about-section ul li i {
  margin-right: 8px;
  color: var(--accent-purple);
}
.about-section {
  padding: 3rem 1.5rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  transition: background 0.3s, color 0.3s;
}
.about-section .container {
  max-width: 960px;
  margin: 0 auto;
  line-height: 1.7;
}
.about-section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(90deg, var(--primary-purple), var(--primary-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.about-section h2::after {
  content: "";
  display: block;
  width: 110px;
  height: 4px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, var(--primary-purple), var(--primary-blue), var(--primary-purple));
  background-size: 200% 100%;
  animation: lineFlow 4s linear infinite;
  border-radius: 999px;
}
@keyframes lineFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.about-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--accent-purple);
}
.about-section p,
.about-section ul li a {
  text-decoration: none;
  color: var(--text-secondary);
}
.about-section ul li a:hover { color: var(--text-primary); }
.about-section ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}
.about-section ul li {
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.7rem;
  color: var(--text-primary);
  transition: background 0.3s, transform 0.3s;
}
.about-section ul li:hover {
  background: rgba(124, 58, 237, 0.1);
  transform: translateX(6px);
}
.about-section ul li:nth-child(1) {
  transition-delay: .1s;
}
.about-section ul li:nth-child(2) {
  transition-delay: .2s;
}
.about-section ul li:nth-child(3) {
  transition-delay: .3s;
}
.about-section ul li:nth-child(4) {
  transition-delay: .4s;
}
.about-section ul li:nth-child(5) {
  transition-delay: .5s;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 2.5rem;
  background: var(--header-bg);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: background 0.3s;
}
footer p:first-child { font-style: italic; margin-bottom: 0.5rem; }

/* --- DESKTOP VIEW --- */
@media (min-width: 768px) {
  .navbar {
    padding-left: 3rem;
    padding-right: 3rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  .nav-links { gap: 1.5rem; }
  .nav-links li { margin-left: 0; }
  .nav-links a.button { font-size: 1.1rem; }
  .hero {
    position: relative;
    padding: 5rem 3rem;
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .hero-text { flex-basis: 55%; max-width: 600px; }
  .hero-side { flex-basis: 40%; position: static; }
  .music-card { margin-top: 25px; margin-left: 50px; }
  .hero-text h1 { font-size: 3.8rem; }
  .info-cards { justify-content: flex-start; }
  .social-icons { justify-content: flex-start; }
  .hero-image .image-wrapper { width: 180px; height: 180px; }
  .about-section { padding: 5rem 3rem; }
  .about-section h2 { font-size: 2.8rem; text-align: left; }
  .about-section h3 { margin-top: 3rem; }
  .desktop-quote { display: block; }
  .mobile-quote { display: none; }
  .desktop-quote {
    position: absolute;
    top: 142px;
    left: 0;
    width: 620px;
    max-width: 98%;
    overflow: hidden;
    z-index: 5;
  }
  .desktop-quote .quote-track {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    min-width: max-content;
  }
  #quoteText { font-size: 0.95rem; color: var(--text-secondary); text-shadow: 0 0 8px rgba(168, 85, 247, 0.15); }
  .theme-toggle {
    right: -10px;
    bottom: -10px;
    width: 65px;
    height: 65px;
    font-size: 1.4rem;
  }
  #backToTop {
    width: 60px;
    height: 60px;
    font-size: 1.4rem;
    bottom: 40px;
    right: 40px;
    box-shadow: 0 0 20px rgba(168, 85, 247, .35);
  }
}

/* MOBILE VIEW */
@media (max-width: 768px) {
  .navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .desktop-counter {
    display: none;
  }
  .mobile-counter {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    top: -4px;
  }

  .hero-text .quote-marquee { display: none; }
  .mobile-quote {
    display: block;
    width: 100%;
    overflow: visible;
    margin: 0;
    position: relative;
    top: -15px;
  }
  .mobile-quote .quote-track {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    position: relative;
    left: -55px;
  }
  #quoteTextMobile {
    display: inline-block;
    color: var(--text-secondary);
    font-size: 1.5rem;
    text-shadow: 0 0 8px rgba(168, 85, 247, .2);
    padding: 0 16px;
  }
}