/* RESET & GLOBAL */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(-45deg, #fafcff, #daf8fc, #fedff5, #f0f5ff, #deeaff, #ffdada, #f3e8ff);
  background-size: 500% 500%;
  animation: gradientBG 20s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  background: #ffffff;
  padding: 1rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.navbar a {
  text-decoration: none;
  color: #0f172a;
  font-weight: bold;
  transition: 0.3s;
}

.navbar a.active {
  border-bottom: 2px solid #fff;
  font-weight: bold;
  color: #00a2ff;
}

.navbar a:hover {
  color: #1e40af;
}

/* HEADER */
header {
  background: #0f172a;
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
}

header p {
  font-size: 1.2rem;
  color: #cbd5e1;
}

/* HEADER STYLING */
.header {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(to right, #1f1c2c, #928dab);
  color: #fff;
  border-radius: 0 0 30px 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  animation: fadeSlideDown 1s ease-out;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgb(255, 255, 255);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: scaleIn 1s ease-out 0.3s forwards;
  opacity: 0;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.profile-img:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.role, .desc {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

.role {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 10px 0;
  color: #ffd700;
  letter-spacing: 1px;
  animation-delay: 0.6s;
}

.desc {
  font-size: 1rem;
  color: #e0e0e0;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  padding: 0 10px;
  animation-delay: 0.8s;
}

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

/* RESPONSIVE */
@media (max-width: 600px) {
  .header {
    padding: 40px 10px;
  }

  .profile-img {
    width: 120px;
    height: 120px;
  }

  .desc {
    font-size: 0.95rem;
  }
}

.role {
  font-size: 18px;
  color: #47b5ff;
  font-weight: 600;
  margin: 8px 0;
}

.desc {
  font-size: 14px;
  color: #f2f2f2;
  max-width: 600px;
  margin: 0 auto;
}

/* SECTION UMUM */
section {
  padding: 3rem 1rem;
  max-width: 900px;
  margin: auto;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #0f172a;
}

.about p,
.contact p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* SKILLS SECTION */
.skills-icons {
  padding: 60px 20px;
  text-align: center;
  color: #f1f5f9;
}

.skills-icons h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  font-weight: bold;
  letter-spacing: 1px;
}

.skills-icons h3 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 15px;
  color: #38bdf8;
  border-bottom: 2px solid #0ea5e9;
  display: inline-block;
  padding-bottom: 5px;
}

.icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: auto;
}

.icon-card {
  background: #1e293b;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform;
  cursor: pointer;
}

.icon-card:hover {
  transform: rotateX(10deg) rotateY(-10deg) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.6);
}

.icon-card img {
  width: 48px;
  height: 48px;
  transition: transform 0.3s ease;
}

.icon-card:hover img {
  transform: scale(1.1) rotateZ(5deg);
}

.icon-card:nth-child(1) { transition-delay: 0s; }
.icon-card:nth-child(2) { transition-delay: 0.1s; }
.icon-card:nth-child(3) { transition-delay: 0.2s; }
.icon-card:nth-child(4) { transition-delay: 0.3s; }
.icon-card:nth-child(5) { transition-delay: 0.4s; }

/* PROJECTS */
.projects {
  padding: 4rem 1rem;
  text-align: center;
  color: #1e293b;
}

.projects h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2.5rem;
}

/* FILTER BUTTONS */
.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.filter-buttons button.active {
  background-color: #00b894;
  color: white;
  transform: scale(1.05);
}


.filter-buttons button {
  padding: 0.5rem 1.2rem;
  border: none;
  background-color: #ef4444;
  color: white;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.filter-buttons button:hover {
  background-color: #dc2626;
}

/* PROJECT GRID */
.project-grid {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 1rem 1rem;
  scrollbar-width: none;
}

/* CARD PROJECT */
.card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: linear-gradient(145deg, #f0f4ff, #ffffff);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, background 0.3s ease;
}

.card:hover {
  transform: scale(1.02);
  background: linear-gradient(145deg, #e0edff, #ffffff);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1rem 1rem 0.3rem;
  color: #0f172a;
}

.card p {
  font-size: 0.95rem;
  color: #475569;
  margin: 0 1rem 1rem;
  line-height: 1.5;
  flex-grow: 1;
}

/* PROJECT LINKS - Enhanced */
.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  justify-content: center;
  align-items: center;
  animation: fadeInLinks 1s ease forwards;
  opacity: 0;
}

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

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #4a4a4a, #2c2c2c);
  padding: 10px 16px;
  border-radius: 100px;
  font-size: 0.95em;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.project-links a:hover {
  background: linear-gradient(135deg, #e64a19, #bf360c);
  transform: translateY(-6px) scale(1.06);
  box-shadow: 0 10px 20px rgba(230, 74, 25, 0.5);
}

/* Optional icon animation if you use icons */
.project-links a i {
  transition: transform 0.3s ease;
}

.project-links a:hover i {
  transform: rotate(6deg) scale(1.1);
}

/* TIMELINE */
.timeline-section {
  padding: 4rem 1rem;
}

.timeline-section h2 {
  font-size: 2rem;
  margin-bottom: 3rem;
  text-align: center;
  color: #0f172a;
}

.timeline-container {
  position: relative;
  margin: auto;
  padding: 2rem 0;
  width: 100%;
  max-width: 900px;
}

.timeline-container::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  height: 100%;
  width: 4px;
  background-color: #0f172a;
  z-index: 1;
}

.timeline-item {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 3rem;
  position: relative;
  width: 100%;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-content {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  width: 45%;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-content {
  transform: translateY(-5px);
}

.timeline-dot {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background-color: #0f172a;
  border: 4px solid white;
  border-radius: 50%;
  z-index: 3;
  box-shadow: 0 0 0 2px #0f172a;
}

.timeline-content h4 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: #0f172a;
}

.timeline-content p {
  margin: 0;
  font-size: 1rem;
  color: #334155;
}

/* CONTACT SECTION */
.contact-section {
  padding: 50px 20px;
  text-align: center;
}

.contact-section h2 {
  font-size: 30px;
  margin-bottom: 10px;
}

.contact-section p {
  color: #555;
  font-size: 16px;
  margin-bottom: 25px;
}

.contact-form {
  max-width: 500px;
  margin: 0 auto 30px;
  display: flex; 
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  font-family: inherit;
}

.contact-form button {
  background-color: #ff5722;
  color: white;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.contact-form button:hover {
  background-color: #e64a19;
}

.alt-contact {
  font-size: 15px;
  margin-top: 15px;
}

.wa-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  text-decoration: none;
  font-weight: bold;
  color: #25d366;
}

.wa-link img {
  width: 20px;
  height: 20px;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  color: #fff;
  background-color: #1e1e1e;
  font-size: 14px;
}

/* STATS SECTION */
.stats-pro {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 60px 20px;
  
  border-radius: 20px;
  margin-top: 40px;
  
  position: relative;
  overflow: hidden;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #ffffff;
  padding: 20px 25px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 300px;
  min-width: 260px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.stat-item::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, #007bff22, transparent 70%);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

.stat-item:hover::after {
  opacity: 1;
}

.stat-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 123, 255, 0.2);
}

.stat-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.1));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.stat-item h3 {
  margin: 0;
  font-size: 1.8rem;
  color: #007BFF;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.stat-item p {
  margin: 2px 0 0;
  font-size: 1rem;
  color: #555;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .stats-pro {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 40px 10px;
  }

  .stat-item {
    width: 90%;
    max-width: 400px;
  }
}

/* TOP BANNER */
.top-banner {
  background-color: #ffefc5;
  color: #333;
  padding: 10px 20px;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.close-banner {
  margin-left: 15px;
  cursor: pointer;
  font-weight: bold;
  float: right;
}

#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  display: none;
  background-color: #ffffff;
  color: #000;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 20px;
}

#backToTop:hover {
  transform: scale(1.1);
  background-color: #00d5c0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .timeline-container::before {
    left: 8px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: row;
    align-items: flex-start;
  }

  .timeline-content {
    width: 100%;
    margin-left: 2rem;
  }

  .timeline-dot {
    left: 0;
    transform: translateX(0);
  }
}

@media (max-width: 600px) {
  header h1 {
    font-size: 2rem;
  }

  .skills ul {
    flex-direction: column;
  }
}

.testimoni-section {
    padding: 60px 20px;
    text-align: center;
}

.testimoni-section h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
}

.testimoni-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: auto;
}

.testimoni-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.testimoni-card:hover {
    transform: translateY(-5px);
}

.testimoni-card p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.rating {
    color: gold;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.testimoni-card h4 {
    font-weight: 600;
    margin-top: 10px;
}