/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Poppins", sans-serif;
  background: #f5f6fa;
  color: #333;
  line-height: 1.6;
  font-size: clamp(14px, 2vw, 18px);
}

a { color: #4a90e2; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Navbar */
.navbar {
  position: absolute;   /* ikut scroll */
  top: 15px;
  left: 20px;           /* pindah ke kiri */
  z-index: 2;
}
.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 2px;
}


/* Hero dengan animasi gradient */
.hero {
  background: linear-gradient(-45deg, #4a90e2, #6c63ff, #00c9ff, #92fe9d);
  background-size: 300% 300%;
  animation: gradientMove 12s ease infinite;  
  text-align: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  color: white;
}

/* Nama utama */
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 10px;
  font-weight: 700;
  background: linear-gradient(90deg, #ffd700, #00c9ff, #ff6ec4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from { text-shadow: 0 0 5px rgba(255,215,0,0.6); }
  to   { text-shadow: 0 0 20px rgba(0,201,255,0.9); }
}

/* Hero subtext */
.profession {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  opacity: 0.9;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid white;
  object-fit: cover;
  margin-bottom: 20px;
}

.social-links {
  margin-top: 15px;
}
.social-links a {
  font-size: 1.5rem;
  margin: 0 10px;
  color: white;
  transition: color 0.3s;
}
.social-links a:hover { color: #ffd700; }

/* Animasi gradient */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Sections */
main {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}
section { margin-bottom: 50px; }
section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  border-left: 5px solid #4a90e2;
  padding-left: 10px;
  color: #222;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}
.skill {
  background: white;
  padding: 15px;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-weight: 500;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.project-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.project-card:hover { transform: translateY(-5px); }
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.project-card h3 {
  margin: 15px;
  font-size: 1.3rem;
}
.project-card p {
  margin: 0 15px 20px;
  color: #555;
}

/* Footer */
footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

/* 🌙 DARK MODE */
.dark-mode { background: #1a1a1a; color: #eaeaea; }
.dark-mode section h2 { color: #f5f5f5; border-left-color: #ffd700; }
.dark-mode .skill,
.dark-mode .project-card {
  background: #2a2a2a;
  color: #eaeaea;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.dark-mode .project-card p { color: #ccc; }
.dark-mode footer { background: #111; color: #bbb; }
.dark-mode a { color: #ffd700; }
.dark-mode a:hover { color: #ffea70; }
.dark-mode #toggle-theme {
  background: #333;
  color: #ffd700;
}

/* Toggle Button */
.theme-toggle {
  position: absolute;
  top: 15px;
  right: 20px;
}
#toggle-theme {
  background: white;
  border: none;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background 0.3s, color 0.3s;
}
#toggle-theme:hover { background: #ffd700; color: #333; }
#toggle-theme i {
  display: inline-block;
  transition: transform 0.5s ease, color 0.5s ease;
}
#toggle-theme i.rotate { transform: rotate(360deg); }

/* Responsive layout */
@media (max-width: 600px) {
  .hero { padding: 40px 10px; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* Certificates */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.certificate-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  text-align: center;
}

.certificate-card:hover {
  transform: translateY(-5px);
}

.certificate-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: #4a90e2;
}

.certificate-card p {
  margin-bottom: 15px;
  color: #555;
}

.certificate-card a {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 5px;
  background: #4a90e2;
  color: white;
  font-weight: 500;
  transition: background 0.3s;
}

.certificate-card a:hover {
  background: #357ABD;
}
