:root {
  --bg-primary: #e0f7fa;
  --text-primary: #073b4c;
  --accent-blue: #118ab2;
  --accent-yellow: #ffd166;
  --accent-mint: #06d6a0;
  --accent-orange: #ff9e6d;
  --card-bg: white;
  --shadow-color: rgba(17, 138, 178, 0.2);
  --pattern-bg: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffd166' fill-opacity='0.1'%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3Ccircle cx='50' cy='50' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="dark"] {
  --bg-primary: #073b4c;
  --text-primary: #f8f9fa;
  --card-bg: #118ab2;
  --shadow-color: rgba(255, 209, 102, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-primary) var(--pattern-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.sticky-header {
  position: sticky;
  top: 0;
  background: var(--card-bg);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px var(--shadow-color);
  z-index: 1000;
}

.logo {
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent-blue);
}

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent-orange);
}

.theme-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-primary);
}

.section {
  padding: 4rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Branda */
.profile-container {
  text-align: center;
  margin-top: 2rem;
}

.profile-pic {
  width: 150px;
  height: 150px;
  background: var(--accent-yellow);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: float 6s ease-in-out infinite;
  background-image: url('WhatsApp\ Image\ 2025-10-15\ at\ 13.45.31\ \(1\).jpeg'); /* ← GANTI DENGAN NAMA FILE FOTO ANDA */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-pic:hover {
  animation: spin 1s ease;
}

.main-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0.5rem 0;
  color: var(--accent-blue);
}

.subtitle {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-mint);
}

.tagline {
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Umum */
h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--accent-blue);
  position: relative;
}

h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 6px;
  background: var(--accent-orange);
  border-radius: 3px;
  margin-top: 0.5rem;
}

/* Skill */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
  padding: 1.2rem;
  border-radius: 16px;
  box-shadow: 0 6px 12px var(--shadow-color);
  transition: transform 0.3s, box-shadow 0.3s;
  width: 120px;
}

.skill-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px var(--shadow-color);
}

.skill-item i {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
  color: var(--accent-blue);
}

.skill-item span {
  font-weight: 700;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-mint);
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
}

.timeline-item {
  display: flex;
  margin-bottom: 2.5rem;
  width: 100%;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-icon {
  width: 30px;
  height: 30px;
  background: var(--accent-yellow);
  border: 4px solid var(--accent-blue);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-content {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 20px;
  box-shadow: 0 6px 12px var(--shadow-color);
  width: calc(50% - 40px);
  margin-top: 10px;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: auto;
}

/* Project */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 15px var(--shadow-color);
  transition: transform 0.4s, box-shadow 0.4s;
  padding: 1.5rem;
  text-align: center;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 12px 25px rgba(255, 209, 102, 0.4);
}

.cartoon-placeholder {
  width: 100%;
  height: 160px;
  background: var(--accent-yellow);
  border-radius: 12px;
  margin-bottom: 1rem;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="280" height="160" viewBox="0 0 280 160"><rect width="280" height="160" fill="%23FFD166"/><circle cx="140" cy="80" r="40" fill="%23118AB2"/><path d="M100 100 Q140 130 180 100" stroke="%23073B4C" stroke-width="4" fill="none"/></svg>');
  background-size: cover;
}

.project-card h3 {
  margin: 0.8rem 0;
  color: var(--accent-blue);
}

.tech-tags {
  margin: 1rem 0;
}

.tech-tags span {
  display: inline-block;
  background: var(--accent-mint);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin: 0.2rem;
}

.btn-demo {
  display: inline-block;
  background: var(--accent-orange);
  color: white;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-weight: 700;
  transition: background0.3s;
}

.btn-demo:hover {
  background: #ff7e3d;
}

/* Kontak */
#contact-form {
  max-width: 600px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#contact-form input,
#contact-form textarea {
  padding: 0.8rem;
  border: 2px solid var(--accent-blue);
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text-primary);
}

.btn-cartoon {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 0.9rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background0.3s;
}

.btn-cartoon:hover {
  background: #0a6a85;
}

/* Footer */
.address p {
  margin: 0.6rem 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.decoration-corner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  opacity: 0.7;
}

/* Animasi */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsif */
@media (max-width: 768px) {
  .sticky-header {
    flex-wrap: wrap;
  }
  nav {
    margin-top: 0.8rem;
    width: 100%;
    text-align: center;
  }
  nav a {
    margin: 0 0.8rem;
  }
  .timeline::before,
  .timeline-icon {
    left: 20px;
  }
  .timeline-item {
    flex-direction: column !important;
    align-items: flex-start;
  }
  .timeline-content {
    width: calc(100% - 40px) !important;
    margin-left: 40px !important;
    margin-top: 20px !important;
  }
  .main-title {
    font-size: 2.2rem;
  }
}

.project-img {
  width: 75%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* Pastikan ikon selalu terlihat jelas di kedua mode */
.skill-item i {
  color: var(--accent-blue) !important;
}

[data-theme="dark"] .skill-item i {
  color: #ffd166 !important; /* kuning cerah agar kontras di latar gelap */
}

/* Sembunyikan deskripsi secara default */
.skill-desc {
  display: none;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

/* Tampilkan deskripsi saat skill-item memiliki class 'active' */
.skill-item.active .skill-desc {
  display: block;
}

/* Opsional: tambahkan pointer cursor */
.skill-item {
  cursor: pointer;
}

.project-card h3 {
  color: #073b4c; /* default teks gelap untuk mode terang */
}

[data-theme="dark"] .project-card h3 {
  color: #f8f9fa; /* teks terang untuk mode gelap */
}

.sticky-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: var(--card-bg);
  box-shadow: 0 4px 12px var(--shadow-color);
  z-index: 1000;
  font-weight: 700;
}

.logo {
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--accent-blue);
  text-decoration: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

nav {
  display: flex;
  gap: 1.2rem;
}

nav a {
  text-decoration: none;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
  transition: color 0.25s;
}

nav a:hover {
  color: var(--accent-orange);
}

.theme-btn {
  background: none;
  border: 2px solid var(--accent-blue);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-btn:hover {
  background: var(--accent-yellow);
  color: var(--accent-blue);
  transform: rotate(15deg);
}

/* Mode gelap: pastikan ikon tetap terlihat */
[data-theme="dark"] .theme-btn {
  border-color: var(--accent-yellow);
  color: #ffd166;
}

[data-theme="dark"] .theme-btn:hover {
  background: rgba(255, 217, 102, 0.2);
  color: white;
}

[data-theme="dark"] .logo {
  color: #ffd166 !important;
}

/* Pesan Pengunjung */
#pesan h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  margin-top: 1.5rem;
}

.testimonial-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 18px;
  box-shadow: 0 6px 15px var(--shadow-color);
  position: relative;
}

.testimonial-card::before {
  content: """
  position absolute;
  top: 10px;
  left: 15px;
  font-size: 4rem;
  font-family: 'Comic Neue', cursive;
  color: var(--accent-yellow);
  opacity: 0.3;
  line-height: 1;
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.testimonial-author {
  font-weight: 700;
  color: var(--accent-blue);
  text-align: right;
}

 .social-links {
  margin-top: 15px;
  display: flex;
  gap: 16px;
}

.social-links a {
  font-size: 24px;
  color: #333;
  transition: color 0.3s ease, transform 0.2s ease;
}

.social-links a:hover {
  color: #f70b0b; /* Warna biru Instagram */
  transform: scale(1.1);
}

.social-links a[href*="whatsapp"] {
  color: #25d366; /* Warna hijau WhatsApp */
}

.social-links a[href*="whatsapp"]:hover {
  color: #07ad9a;
}

.animate-name {
  overflow: hidden;
  border-right: 3px solid #FF6B6B; /* Kursor berkedip */
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 2px;
  animation: typing 3.5s steps(28), blink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent; }
}