:root {
  --bg-body: #0a0b1e;
  --bg-card: #121426;
  --bg-glass: rgba(255, 255, 255, 0.05);
  --text-main: #e0e0e0;
  --text-muted: #a0a0a0;
  --accent-primary: #00f2ff;
  --accent-secondary: #9d00ff;
  --accent-gold: #ffd700;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;

  --shadow-glow: 0 0 20px rgba(0, 242, 255, 0.3);
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);
  --transition-speed: 0.3s;
}

body.light-mode {
  --bg-body: #f0f2f5;
  --bg-card: #ffffff;
  --bg-glass: rgba(0, 0, 0, 0.05);
  --text-main: #1a1a1a;
  --text-muted: #555555;
  --accent-primary: #00a8b3;
  --accent-secondary: #6a00ad;

  --shadow-glow: 0 0 15px rgba(0, 168, 179, 0.2);
  --border-glass: 1px solid rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed);
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.title-bar {
  width: 60px;
  height: 4px;
  background: var(--accent-primary);
  margin-bottom: 3rem;
  border-radius: 2px;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 2rem;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background: rgba(10, 11, 30, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-bottom: var(--border-glass);
}

body.light-mode .navbar.scrolled {
  background: rgba(255, 255, 255, 0.8);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo .dot {
  color: var(--accent-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 50%;
  transition: transform 0.3s;
}

#theme-toggle:hover {
  transform: rotate(15deg);
  color: var(--accent-primary);
}

.icon-sun,
.icon-moon {
  pointer-events: none;
}

body:not(.light-mode) .icon-sun {
  display: block;
}
body:not(.light-mode) .icon-moon {
  display: none;
}
body.light-mode .icon-sun {
  display: none;
}
body.light-mode .icon-moon {
  display: block;
}

.hamburger {
  display: none;
  cursor: pointer;
  z-index: 1002;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-main);
  transition: all 0.3s ease-in-out;
}

.hero-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0 2rem;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.layer-bg {
  background: radial-gradient(
    circle at 50% 50%,
    rgba(0, 242, 255, 0.1) 0%,
    transparent 50%
  );
}

.orb-1 {
  position: absolute;
  top: 20%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: var(--accent-secondary);
  filter: blur(120px);
  opacity: 0.4;
  border-radius: 50%;
}

.orb-2 {
  position: absolute;
  bottom: 20%;
  right: 10%;
  width: 200px;
  height: 200px;
  background: var(--accent-primary);
  filter: blur(100px);
  opacity: 0.3;
  border-radius: 50%;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 4rem;
  z-index: 1;
}

.overline {
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-text h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.role-text {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
}

.btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: var(--font-body);
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: #fff;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

.btn-outline:hover {
  background: rgba(0, 242, 255, 0.1);
  transform: translateY(-2px);
}

.hero-img-container {
  position: relative;
  width: 350px;
  height: 350px;
  margin: 0 auto;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  position: relative;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: morph 8s ease-in-out infinite;
}

.glow-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  border: 2px solid var(--accent-primary);
  filter: blur(15px);
  z-index: 1;
  opacity: 0.5;
  animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  50% {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  color: var(--accent-primary);
  opacity: 0.8;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.section {
  padding: 6rem 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.about-content {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: var(--border-glass);
  padding: 3rem;
  border-radius: 20px;
}

.bio-text {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.skill-chip {
  padding: 0.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  border: 1px solid transparent;
  transition: all 0.3s;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: default;
}

.skill-chip:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  transform: translateY(-2px);
  color: #fff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: var(--border-glass);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent-primary);
}

.card-image {
  height: 200px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover .card-image img {
  transform: scale(1.1);
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.card-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  flex-grow: 1;
}

.tech-stack {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tech-stack span {
  font-size: 0.75rem;
  background: rgba(0, 242, 255, 0.1);
  color: var(--accent-primary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.card-actions {
  display: flex;
  gap: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
  text-align: center;
}

.btn-sm.btn-primary {
  background: var(--accent-primary);
  color: #000;
}

.btn-sm.btn-outline {
  border: 1px solid var(--text-muted);
  color: var(--text-main);
}

.btn-sm:hover {
  opacity: 0.8;
}

.contact-section {
  text-align: center;
}

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: var(--border-glass);
  padding: 4rem 2rem;
  border-radius: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all 0.3s;
  border: 1px solid transparent;
}

.social-icon:hover {
  background: var(--accent-primary);
  color: #000;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 242, 255, 0.4);
}

.footer {
  background: var(--bg-card);
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-graphic {
  margin-bottom: 1rem;
}

.footer-tag {
  font-size: 0.8rem;
  color: var(--accent-primary);
  margin-top: 0.5rem;
  opacity: 0.7;
}

@media (max-width: 768px) {
  /* --- 1. LAYOUT FIXES (Yang udah bener tadi) --- */
  .hero-section {
    height: auto;
    min-height: 100vh;
    padding-top: 130px;
    padding-bottom: 120px; /* Ruang lega buat scroll indicator */
    align-items: flex-start;
    overflow: visible;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    margin-top: 0;
  }

  .hero-text h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .hero-img-container {
    width: 260px;
    height: 260px;
    margin: 1rem auto 0;
  }

  /* --- 2. SCROLL INDICATOR (Yang udah bener tadi) --- */
  .scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    z-index: 999;
    opacity: 1;
  }

  /* --- 3. NAVIGASI MOBILE --- */
  .nav-links {
    padding-top: 100px;
    position: fixed;
    left: 100%;
    top: 0;
    flex-direction: column;
    background-color: var(--bg-body);
    width: 100%;
    height: 100vh;
    text-align: center;
    transition: 0.3s ease-in-out;
    z-index: 1001;
    gap: 2rem;
  }

  .nav-links.active {
    left: 0;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .theme-toggle-wrapper {
    position: absolute;
    top: 25px;
    right: 80px;
    z-index: 1002;
  }

  /* --- 4. OPTIMASI PERFORMA (INI KUNCINYA) --- */

  /* Matikan Bola Background (Penyebab Lag Utama) */
  .orb-1,
  .orb-2 {
    display: none;
  }

  /* Matikan Ring Cahaya (Penyebab Lag Kedua) */
  .glow-ring {
    display: none;
  }

  /* FOTO PROFIL: Animasi TETAP JALAN, tapi shadow diringanin */
  .profile-img {
    /* Animasi Morph TETAP AKTIF sesuai request lu */
    animation: morph 8s ease-in-out infinite;

    /* Shadow kita ilangin dikit biar GPU fokus ke animasi morph aja */
    box-shadow: none;
    border: 2px solid var(--accent-primary);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .parallax-layer {
    transform: none !important;
  }
}
