* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  background-image: url('assets/bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.navbar {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
  background: rgba(5,3,29,0.9);
  padding: 10px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  position: sticky; 
  top: 0; 
  z-index: 1000; 
  display: flex;
  justify-content: center; 
  align-items: center;
}

.nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  margin: 0 15px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.navbar a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.profile-container {
  background: linear-gradient(160deg, rgba(5,3,29,0.9), rgba(11,54,82,0.9));
  color: white;
  border-radius: 15px;
  padding: 15px;
  max-width: 1000px;
  width: 100%;
  margin: 0 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

h1, h2 {
  text-align: center;
}

.profile-image {
  display: block;
  width: 140px;
  height: 140px;
  border-radius: 100%;
  margin: 0 auto 10px auto;
  border: 4px solid rgb(255, 255, 255);
  object-fit: cover;
}

.contact-row {
  display: flex;
  justify-content: center;
}

.contact-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;  
  margin: 5px 40px;
}

.contact-column li {
  padding: 0;
  background: none;
  border: none;
  text-align: left;
  margin-bottom: 5px;
  list-style-type: none;
}

h3 {
  font-size: 1.5em;
  margin: 15px 20px 12px 20px;
  color: white;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 5px;
}

ul {
  list-style: none;
  margin-bottom: 20px;
}

a {
  color: rgb(250, 250, 250);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

.about-section {
  margin-top: 20px;
  scroll-margin-top: 405px;
}

#keahlian, #portofolio, #pendidikan,  #pengalaman, #kontak {
  scroll-margin-top: 70px;
}

.about-section h3 {
  font-size: 1.5em;
  margin: 15px 20px 12px 20px;
  color: white;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 5px;
}

.about-section h4 {
  font-size: 1.1em;
  margin: 0 20px 5px 20px;
  padding-bottom: 5px;
}

.about-section p {
  line-height: 1.5;
  color: rgb(255, 255, 255);
  list-style-type: circle;
  margin: 5px 20px 5px 20px;
  text-align: left;
}

.about-section li {
  line-height: 1.5;
  color: rgb(255, 255, 255);
  list-style-type: circle;
  margin: 5px 25px 5px 5px;
  text-align: left;
}

.video-container {
  position: relative;
  padding-bottom: 50%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin: 0 20px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.nav-toggle-label,
.nav-toggle {
    display: none;
}

#back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
background-color: rgba(109, 128, 141, 0.451);
color: white;
border: none;
border-radius: 50%;
width: 45px;
height: 45px;
text-align: center;
font-size: 1.5em;
line-height: 45px;
text-decoration: none;
display: block;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
z-index: 1000;
transition: background-color 0.3s ease;
}

#back-to-top:hover {
  background-color: rgba(11, 54, 82, 0.9);
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-end;
    position: relative; 
    margin-bottom: 0px;
  }

  .nav-links {
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    width: 100%;
    margin-top: 15px;
    transition: max-height 0.3s ease-in-out;
    background: rgba(5,3,29,0.9);
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }
    
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    top: 20px; /* Moved slightly lower */
    right: 20px;
  }

  .nav-toggle-label .hamburger,
  .nav-toggle-label .hamburger::before,
  .nav-toggle-label .hamburger::after {
    content: '';
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
  }

  .nav-toggle-label .hamburger {
    position: relative;
    top: 3px;
  }

  .nav-toggle-label .hamburger::before {
    position: absolute;
    top: -7px;
    left: 0;
  }

  .nav-toggle-label .hamburger::after {
    position: absolute;
    top: -14px;
    left: 0px;
  }

  .nav-toggle:checked ~ .nav-links {
    max-height: 500px;
  }

  .nav-toggle:checked + .nav-toggle-label .hamburger {
    transform: rotate(5deg);;
  }

  .nav-toggle:checked + .nav-toggle-label .hamburger::before {
    opacity: 1;
  }

  .nav-toggle:checked + .nav-toggle-label .hamburger::after {
    opacity: 1;
  }

  .contact-row {
    flex-direction: column;
    align-items: center;
  }

  .contact-column {
    list-style: none;
    width: 100%;
    align-items: center;
    margin: 0;
  }

  .navbar a {
    margin: 5px 8px;
  }

  .profile-container {
    margin: 20px;
  }

  body {
    font-size: 0.9em;
  }

  h1 {
    font-size: 2.2em;
  }

  h2 {
    font-size: 1.4em;
  }

  h3 {
    font-size: 1.1em;
  }

  .about-section {
    scroll-margin-top: 320px ;
  }

  .about-section h3 {
    font-size: 1.1em;
  }

  .about-section h4 {
    font-size: 0.9em;
  }

  #keahlian, #portofolio, #pendidikan, #pengalaman, #kontak {
    scroll-margin-top: 20px;
  }

  .video-container {
    position: relative;
    padding-bottom: 50%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 0 20px;
  }

  .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}