/* ================ HERO SECTION ================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(0, 223, 196, 0.1) 0%, transparent 50%);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* loading */
#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(10px);
  background-color: rgba(10, 25, 47, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

#load {
  position: relative;
  width: 600px;
  height: 36px;
  user-select: none;
  cursor: default;
}

#load div {
  position: absolute;
  width: 20px;
  height: 36px;
  opacity: 0;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: 32px;
  animation: move 2s linear infinite;
  color: #35C4F0;
}

#load div:nth-child(2) { animation-delay: 0.2s; }
#load div:nth-child(3) { animation-delay: 0.4s; }
#load div:nth-child(4) { animation-delay: 0.6s; }
#load div:nth-child(5) { animation-delay: 0.8s; }
#load div:nth-child(6) { animation-delay: 1s; }
#load div:nth-child(7) { animation-delay: 1.2s; }

@keyframes move {
  0% { left: 0; opacity: 0; transform: rotate(180deg); }
  35% { left: 41%; opacity: 1; transform: rotate(0deg); }
  65% { left: 59%; opacity: 1; transform: rotate(0deg); }
  100% { left: 100%; opacity: 0; transform: rotate(-180deg); }
}

/* ================ ABOUT SECTION ================ */
.about {
  background: var(--secondary-light);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/images/pattern.svg') repeat;
  opacity: 0.03;
  z-index: 0;
}

.about-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  border-radius: var(--element-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 223, 196, 0.1);
}

.about-image:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 223, 196, 0.15);
}

.about-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.about-details {
  margin-top: 2rem;
}

.detail-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.detail-item i {
  color: var(--primary);
  font-size: 1.2rem;
  margin-top: 0.2rem;
}

/* ================ SKILLS SECTION ================ */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-card {
  padding: var(--card-spacing);
  background: var(--secondary-light);
  border-radius: var(--element-radius);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 223, 196, 0.1);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 223, 196, 0.05), transparent);
  transition: 0.5s;
}

.skill-card:hover::before {
  left: 100%;
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 223, 196, 0.15);
  border-color: rgba(0, 223, 196, 0.3);
}

.skill-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.skill-card:hover i {
  transform: scale(1.1);
  color: var(--primary-light);
}

.skill-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.skill-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.skill-meter {
  margin-top: 1rem;
}

.meter {
  height: 8px;
  background: rgba(0, 223, 196, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

/* ================ PROJECTS PREVIEW ================ */
.projects-preview .card {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: var(--card-spacing);
}

.project-item {
  border-radius: var(--element-radius);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid rgba(0, 223, 196, 0.1);
}

.project-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 223, 196, 0.05), transparent);
  transition: 0.5s;
}

.project-item:hover::before {
  left: 100%;
}

.project-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}

.project-item:hover img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(10, 25, 47, 0.95), transparent);
  padding: 1.5rem;
  transform: translateY(100%);
  transition: var(--transition);
}

.project-item:hover .project-overlay {
  transform: translateY(0);
}

.project-overlay h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.project-overlay p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ================ CONTACT SECTION ================ */
.contact {
  background: var(--secondary-light);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border-radius: var(--element-radius);
  border: 1px solid rgba(0, 223, 196, 0.3);
  background: var(--secondary);
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 223, 196, 0.2);
  transform: translateY(-2px);
}

/* Container untuk semua komentar */
#comments {
  margin-top: 2rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Card komentar */
.comment {
  display: flex;
  align-items: flex-start;
  background-color: var(--secondary-light);
  border: 1px solid rgba(0, 223, 196, 0.2);
  border-radius: var(--element-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.comment::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 223, 196, 0.05), transparent);
  transition: 0.5s;
}

.comment:hover::before {
  left: 100%;
}

.comment:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 223, 196, 0.15);
  border-color: rgba(0, 223, 196, 0.3);
}

.comment-avatar {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--secondary);
  margin-right: 1rem;
  box-shadow: 0 4px 15px rgba(0, 223, 196, 0.3);
}

.comment-content {
  flex: 1;
}

.comment-content strong {
  display: block;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.comment-content p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Custom scrollbar untuk Webkit (Chrome, Edge, Safari) */
#comments::-webkit-scrollbar {
  width: 8px;
}

#comments::-webkit-scrollbar-track {
  background: var(--secondary);
  border-radius: 10px;
}

#comments::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0, 223, 196, 0.5);
}

/* Firefox scrollbar */
#comments {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--secondary);
}

/* ================ RESPONSIVE ADJUSTMENTS ================ */
@media (max-width: 992px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }

  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .skills-container {
    grid-template-columns: 1fr;
  }

  .projects-preview .card {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }

  .hero-badges {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .about-image {
    max-width: 100%;
  }

  .comment {
    flex-direction: column;
    text-align: center;
  }

  .comment-avatar {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}