* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Courier New", Courier, monospace;
  color: #00ff00;
  background-color: #000;
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
  padding-top: 80px;
}

/* Bagian Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: rgba(17, 17, 17, 0.9);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.logo img {
  height: 60px;
  width: auto;
  margin-right: 20px;
  transition: transform 0.3s, filter 0.3s;
}

.logo img:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

nav ul {
  list-style-type: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

nav ul li {
  position: relative;
}

nav ul li a {
  text-decoration: none;
  color: #00ff00;
  font-size: 20px;
  padding: 10px 0;
  position: relative;
  display: inline-block;
  overflow: hidden;
}

nav ul li a::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background: #00ff00;
  left: 0;
  bottom: 0;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-in-out;
}

nav ul li a:hover::before {
  transform: scaleX(1);
  transform-origin: bottom left;
}

nav ul li a.active {
  color: #ff0000;
  font-weight: bold;
}

nav a {
  position: relative;
  display: inline-block;
  color: #00ff00;
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}

nav a:hover {
  color: #00cc00;
}

/* Bagian Terminal */
.terminal {
  max-width: 100%;
  margin-top: 50px;
  margin-bottom: 150px;
  padding: 40px;
  background-color: #111;
  border: 2px solid #00ff00;
  border-radius: 10px;
  box-shadow: 0 0 10px #00ff00;
  text-align: center;
  font-size: 24px;
  font-family: "Courier New", Courier, monospace;
  line-height: 1.6;
  overflow: hidden;
  white-space: nowrap;
}

.terminal .typewriter {
  display: inline;
  white-space: nowrap;
  overflow: hidden;
  border-right: 0.15em solid #00ff00;
  font-family: "Courier New", Courier, monospace;
  font-size: 24px;
  animation: typing 2s steps(30, end), blink 0.75s step-end infinite;
}

/* Animasi Terminal border */
@keyframes border-glow {
  0% {
    border-color: #00ff00;
  }
  50% {
    border-color: #ffffff;
  }
  100% {
    border-color: #00ff00;
  }
}

.terminal:hover {
  animation: border-glow 1.5s infinite;
}

/* styling tiap Section  */
main {
  max-width: 800px;
  margin-bottom: 150px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

section {
  padding: 60px 20px;
  max-width: 800px;
  text-align: center;
}

h2 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 28px;
}

/* styling About Me */
#about {
  padding: 60px 20px;
  background-color: #111;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 255, 0, 0.2);
  margin: 40px 20;
  max-width: 800px;
  margin-top: 100px;
  margin-bottom: 10px;
  margin-left: auto;
  margin-right: auto;
  text-align: center; 
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: justify;
  margin: 0 auto;
  gap: 20px;
}

.about-content p {
  margin: 0;
  line-height: 1.8;
  max-width: 600px;
  text-align: justify;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin: 0 0 10px;
  line-height: 1.8;
}

/* styling Profile picture container */
.profile-pic-container {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.profile-pic {
  border-radius: 50%;
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 3px solid #00ff00;
  box-shadow: 0 0 5px #ffffff;
  transition: opacity 0.3s ease;
}

.profile-pic-hover {
  position: absolute;
  top: 0; 
  left: 0;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #00ff00;
  box-shadow: 0 0 5px #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-pic-container:hover .profile-pic {
  opacity: 0;
}

.profile-pic-container:hover .profile-pic-hover {
  opacity: 1;
}

/* styling untuk experiences section */
#experiences {
  padding: 60px 20px;
  margin-bottom: 150px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.experience-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.experience-card {
  background-color: #222;
  border: 1px solid #00ff00;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 255, 0, 0.2);
  overflow: hidden;
  width: 100%;
  max-width: 350px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.experience-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 255, 0, 0.3);
}

.project-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.experience-content {
  padding: 20px;
  color: #00ff00;
}

.experience-content h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.experience-content p {
  margin-bottom: 15px;
  font-size: 16px;
}

.project-link {
  text-decoration: none;
  color: #00ff00;
  border: 1px solid #00ff00;
  padding: 10px 20px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

.project-link:hover {
  background-color: #00ff00;
  color: #000;
}

/* styling Contact section */
#contact {
  padding: 60px 20px;
  background-color: #111;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 255, 0, 0.2);
  margin: 40px 0;
  max-width: 800px;
  margin-top: 100px;
  margin-bottom: 10px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.contact-content p {
  margin-bottom: 30px;
  font-size: 18px;
  line-height: 1.8;
  text-align: justify;
}

.social-media {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #00ff00;
  text-decoration: none;
  font-size: 18px;
  transition: color 0.3s, transform 0.3s;
}

.social-link i {
  font-size: 24px;
}

.social-link:hover {
  color: #00cc00;
  transform: scale(1.1);
}

/* styling Footer */
footer {
  text-align: center;
  padding: 20px;
  background-color: #111;
  color: #00ff00;
  position: relative;
  width: 100%;
  margin-top: 20px;
}

footer p {
  font-size: 14px;
  margin: 0;
}

/* lazy loading effect */
.lazy-load {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.lazy-load.active {
  opacity: 1;
  transform: translateY(0);
}

/* buat fit di hp dan tablet */
@media (max-width: 1024px) {
  header {
    padding: 10px 15px;
  }

  .logo img {
    height: 50px;
  }

  nav ul {
    gap: 20px;
  }

  nav ul li a {
    font-size: 18px;
    padding: 8px 0;
  }
  .terminal {
    font-size: 20px;
    white-space: no-wrap;
  }

  .terminal .typewriter {
    font-size: 20px;
    white-space: no-wrap;
  }
}

/* untuk mobile */
@media (max-width: 768px) {
  nav ul {
    flex-direction: row;
    gap: 15px;
  }

  nav ul li {
    margin: 0;
  }

  nav ul li a {
    font-size: 12px;
  }

  .terminal {
    font-size: 21px;
    white-space: no-wrap;
  }

  .terminal .typewriter {
    font-size: 18px;
    white-space: no-wrap;
  }
}

/* untuk tablet */
@media (max-width: 1024px) and (min-width: 769px) {
  nav ul {
    flex-direction: row;
    gap: 20px;
  }

  nav ul li {
    margin: 0;
  }

  nav ul li a {
    font-size: 16px;
  }

  .terminal {
    font-size: 22px;
    white-space: no-wrap;
  }

  .terminal .typewriter {
    font-size: 22px;
    white-space: no-wrap;
  }
}

@media (max-width: 480px) {
  .terminal {
    padding: 15px 15px;
    font-size: 16px;
    white-space: no-wrap;
  }

  .terminal .typewriter {
    font-size: 16px;
    white-space: no-wrap;
  }

  .about-content {
    font-size: 14px;
  }

  .experience-content h3 {
    font-size: 14px;
  }

  .experience-content p {
    font-size: 12px;
  }

  #contact {
    padding: 40px 15px;
    margin-top: 60px;
    font-size: 16px;
  }

  .social-media {
    flex-direction: column;
    margin-left: 10px;
    gap: 20px;
  }

  .social-link {
    font-size: 16px;
  }
}
