*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* z-index: -1; */
    /* overflow-x: hidden; */
}
body {
    margin: 0;
    padding: 0;
    background: #111;
    color: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 40px; /* top and sides only, no bottom for tightness */
    text-align: center;
}

.item1{
    height: 100%;
    width: 23%;
   /* background-color: red; */
   gap: 3px;
}
.item2{
    height: 100%;
    width: 27%;
    /* background-color: blue; */
}
.item3{
    height: 100%;
    width: 27%;
    /* background-color: green; */
    gap: 3px;
}
.item4{
    height: 100%;
    width: 23%;
    /* background-color: yellow; */
    gap: 3px;
}

.title {
    font-size: 2.6rem;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: 1.5px;
}


/* Portfolio grid layout */
.portfolio-grid {
    display: flex;
    gap: 24px;
    height: 900px;
    width: 94vw;
    margin-top: 18px;
    /* border: 2px solid yellow; */
    padding-left: 80px;
    /* margin: 0 auto;  */
}
.item-header {
    height: 570px;
    width: 94vw;
    /* display: flex;
    align-items: center;
    justify-content: center; */
    padding-left: 80px;
}
/* #img1{
    display: flex;
    align-items: center;
    justify-content: center;
} */

#img2{
    height: 40%;
    width: 100%;
}
#img3{
    height: 58%;
    width: 100%;
    padding-bottom: px;
    margin-top: 10px;
}
#img4{
    height: 30%;
    width: 100%;
}
#img5{
    height: 60%;
    width: 100%;
    margin-top: 10px;
}
#img6{
    height: 48%;
    width: 100%;
}
#img7{
    height: 38%;
    width: 100%;
    margin-top: 10px;
}
#img8{
    height: 48%;
    width: 100%;
}
#img9{
    height: 43%;
    width: 100%;
    margin-top: 10px;
}
.item-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* border-radius: 12px; */
    background: #222;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
    display: block;
} 
.row{
    display: inline-flex;
}
.col{
    display: inline-flex;
}
.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* border-radius: 12px; */
    background: #222;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
    display: block;
}

/* Responsive for tablets */
@media (max-width: 900px) {
    .container {
        padding: 24px 8px 0 8px;
    }
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 180px 130px 130px 130px 130px;
        gap: 14px;
    }
    .item-header {
        grid-column: 1 / span 2;
        height: 180px;
    }
    .item {
        height: 130px;
    }
}

.portfolio-section {
  max-width: 1200px;
  margin: auto;
  padding: 120px 20px 40px;
  text-align: center;
}
.portfolio-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 2rem;
  /* margin-bottom: px; */
  font-weight: bold;
  /* color: antiquewhite; */
}

/* Filter Menu */
.filter-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  gap: 20px;
  margin-bottom: 80px;
  margin-top: 100px;
}
.filter-menu button {
  background: none;
  border: none;
  color: #aaa;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-menu button:hover,
.filter-menu button.active {
  color: #fff;
  text-decoration: underline;
}
/* Responsive for mobile */
@media (max-width: 600px) {
    .container {
        padding: 8px 2px 0 2px;
    }
    .title {
        font-size: 2rem;
    }
    .nav-list {
        gap: 10px;
        font-size: 0.9rem;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 120px repeat(8, 90px);
        gap: 7px;
    }
    .item-header {
        grid-column: 1 / span 1;
        height: 120px;
    }
    .item {
        height: 90px;
    }
     .portfolio-title {
    font-size: 1.5rem;
  }
 .filter-menu {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    margin: 20px 0;
    padding-bottom: 10px;
    scrollbar-width: none; /* hide scrollbar in Firefox */
  }

  .filter-menu::-webkit-scrollbar {
    display: none; /* hide scrollbar in Chrome/Safari */
  }

  .filter-menu button {
    background: #222;
    color: #ccc;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
  }

  .filter-menu button:hover,
  .filter-menu button.active {
    background: #444;
    color: #fff;
    text-decoration: none;
  }
}