*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

:root {
  --dark: #0F172A;
  --slate: #1E293B;
  --light: #F8FAFC;
  --blue: #38BDF8;
  --blue-hover: #0EA5E9;
  --gray: #94A3B8;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light);
  color: var(--dark);
}
  
/* header */
header {
  background: var(--dark);
  position: fixed;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 9999;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  justify-content: center;
}

nav a {
  color: #F1F5F9;
  text-decoration: none;
  font-weight: 600;
}

nav a:hover {
  color: var(--blue);
}

/* humberger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  z-index: 101;
}

.hamburger span {
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animasi ke X saat aktif */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}

/* home */
.hero {
  background: linear-gradient(to right, var(--slate), var(--dark));
}

.hero .hero_container{  
  padding: 6rem 0 3.5rem;
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
  justify-content: center;
}

.hero .text{
  max-width: 500px;
  width: 500px;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: #F1F5F9;
  padding: 8rem 0 ;
}

.hero h2{
  font-size: 2.5rem;
}

.hero h2 span {
  font-family: 'Montserrat', sans-serif;
  display: block;
  font-size: 3rem;
  margin-top: 0.5rem;
}

.hero p{
  font-size: 1.5rem;
  color: #ffff;
}

.hero-buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-buttons a{
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.btn1 img{
  border-radius: 50%;
  width: 50px;
}

.btn2{
  background-color: var(--blue);
  padding: 0.75rem 1.5rem;
  color: #ffff;
}

.btn1 img:hover {
  box-shadow: 0 10px 20px rgba( 0, 0, 0, 0.3);
}

.btn2:hover {
  background-color: var(--blue-hover);
  box-shadow: 0 10px 20px rgba( 0, 0, 0, 0.3);
}

.hero .profil{
  max-width: 500px;
  width: 500px;
  position: relative;
  padding: 8rem 0 ;
}

.hero .profil img{
  width: 450px;
  position: absolute;
  top: 0;
  right: 0;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 0 0;
}

h3{
  font-size: 2rem;
  padding-bottom: 1rem;
}

/* about */
.about p {
  max-width: 900px;
  line-height: 1.6;
  font-size: 1.3rem;
  color: #0f172a;
}

.skill-grid, .project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-card {
  background: #E2E8F0;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  transition: 0.3s;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
}

.skill-card:hover {
  background: #F1F5F9;
  box-shadow: 0 10px 20px rgba( 0, 0, 0, 0.3);
}

.skill-card img{
  width: 150px;
}

/* project */
.project-card {
  background: #ffff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  border: 1px solid black;
}

.project-card img{
  width: 200px;
}

.project-card .text{
  padding: 2rem 0;
}

.project-card p{
  line-height: 1.6;
  padding: 0.8rem 0;
}

.project-card a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.project-card a:hover{
  color: #0EA5E9;
}

/* contact */
.contact .container{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 4rem;
}

.contact form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  max-width: 600px;
  width: 500px;
}

.contact input,
.contact textarea {
  padding: 0.75rem;
  border-radius: 6px;
  border:1px solid black;
  color: black;
}

.contact input::placeholder,
.contact textarea::placeholder {
  color: var(--gray);
}

form button{
  width: 8rem;
  padding: 0.8rem 0;
  background-color: var(--blue);
  border: 1px solid black;
  border-radius: 8px;
  cursor: pointer;
}

form button:hover{
  background-color: var(--blue-hover);
  box-shadow: 0px 10px 20px rgba( 0, 0, 0, 0.3);
}

/* footer */
footer {
  background: var(--dark);
  color: var(--gray);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  header{
    display: flex;
    flex-wrap: wrap;
    padding: 2rem 0;

  }
  .hamburger {
    display: flex;
    position: absolute;
    right: 2rem;
    top: 1.5rem;
  }

  #nav-menu {
    display: none;
    position: absolute;
    top: 4rem;
    right: 0;
    background: #1e293b;
    padding: 2rem 4rem;
    width: 100%;
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  #nav-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }

  #nav-menu ul {
    flex-direction: column;
    gap: 1rem;
  }

  /* home */
  .hero .hero_container{
    padding: 4rem 0 17.3rem;
  }

  .hero .profil img{
    width: 400px;
    right: 3rem;
  }
}

@media (max-width: 480px){
  /* home */
  .hero .hero_container{
    padding-bottom: 9rem;
  }

  .hero .text{
  padding: 3rem 1rem;
  }

  .hero h2{
    font-size: 1.8rem;
  }

  .hero h2 span{
    font-size: 2rem;
  }

  .hero p{
    font-size: 1rem;
  }

  .contact form{
    width: 300px;
  }  

  .hero .profil img{
    width: 300px;
    right: 0rem;
  }

  .container{
    width: 80%;
  }
  
  h3{
    font-size: 1.8rem;
  }

  /* about */
  .about p{
    font-size: 1rem;
  }

  /* skilss */
  .skill-grid, .project-grid{
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .skill-card img{
    width: 100px;
  }

  /* project */
  .project-card img{
    width: 150px;
  }

  /* footer */
  footer{
    font-size: 0.5rem;
  }
}
