* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-image: url('background-img.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    color: #ffffff;
    scroll-behavior: smooth;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 50px;
    max-width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0 auto;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.header.scrolled {
  background-color: #222831; 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    padding-left: 50px;
    text-decoration: none;
    color: #ffffff;
}

#logo {
    color: #FFB22C;
}

#sub {
    color: #FFB22C;
}

nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a{
    position: relative;
    display: inline-block;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px; /* creates space (gap) between text and underline */
    width: 100%;
    height: 2px;
    background-color: #FFB22C;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

nav a:hover::after {
    transform: scaleX(1);
}

.introduce {
    display: flex;
    height: 100vh;
}

.left-side {
    padding: 20% 10%;
    width: 100%;
}

.left-side .intro {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.left-side h1 {
    font-size: 4rem;
    margin-bottom: 10px;
}

.left-side .sub {
    color: #909090;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.social-icons {
    display: flex;
    gap: 30px;;
}

.social-icons img {
    width: 40px;
    height: 40px;
    display: block;
}

.social-icons a {
    display: inline-block;
    padding: 4px;
    background-color: #fff;   
    border-radius: 25px;
    transition: transform 0.3s ease;
}

.social-icons a:hover {
    background-color: #FFB22C;
    transform: scale(1.1);
}

.about-me {
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 50px;
    display: flex;
    flex-wrap: wrap;
}

.about-me .content {
    width: 100%;
    max-width: 1210px;
}

.about-me h2 {
    font-size: 20px;
    letter-spacing: 2.5px;
    margin-bottom: 20px;
}

.about-me p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-align: justify;
}

.read-more {
    display: inline-block;
    color: #fff;
    border: 1px solid #fff;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1px;
    transition: 0.5s;
}

.read-more:hover {
    color: #FFB22C;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: #fff;
    padding: 50px 30px;
    background: #0c0c0c;
}

.services {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    text-align: justify;
    gap: 50px;
    background-color: #0c0c0c;
}

.service-heading {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 1050px;
  margin: 75px auto 0;
}

.service-heading h1 {
  font-size: 2.3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  padding-bottom: 10px;
}

.service-heading hr {
  background-color: #FFB22C;
  height: 5px;
  width: 10%;
  margin: 0 auto;
  border: none;
  border-radius: 10px;
}


.service h2 {
    color: #FFB22C;
}

.service {
    position: relative;
    max-width: 350px;
    border: 1px solid transparent;
    padding: 25px;
    background-color: #222831;
    opacity: 80%;
    color: #fff;
    border-radius: 10px;
    margin-bottom: 50px;
    margin-top: 40px;
    overflow: visible;
}

.service h2 {
    margin-bottom: 15px;
}

.service img {
    position: absolute;
    top: -40px;
    left: -35px;
    display: block;
    width: 20%;
    transform: rotate(-20deg);
    opacity: 0.5;
}

#maintenance-img {
    width: 28%;
    transform: none;
}

.skill-set {
    text-align: center;
    width: 100%;
    max-width: 880px;
}

.skill-heading {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 1050px;
  margin: 75px auto 0;
}

.skill-heading h1 {
  font-size: 2.3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  padding-bottom: 10px;
}

.skill-heading hr {
  background-color: #FFB22C;
  height: 5px;
  width: 10%;
  margin: 0 auto;
  border: none;
  border-radius: 10px;
  margin-bottom: 75px;
}

.content-grid {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    border: 1px solid transparent;
    padding: 20px;
    background-color: #222831;
    border-radius: 15px;
}

.skill-item {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.skill-item img {
    width: 50px;
    height: 50px;
}

.skill-item p {
    margin-top: 8px;
    font-size: 14px;
}

#using-now {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #FFB22C;
}

#learning, #other-skills {
    display: flex;
    align-items: flex-start;
    margin: 50px 0 20px 0;
    text-transform: uppercase;
    color: #FFB22C;
} 

.projects {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0c0c0c;
    margin: 0 auto;
    text-align: center;
    padding: 25px;
}

.projects-content {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin-bottom: 80px;
}

#project-another-page {
    display: inline-block;
    margin-top: 30px;
    text-decoration: none;
    color: #fff;
    border: 1px solid #fff;
    padding: 15px 20px;
    font-size: 0.90rem;
    letter-spacing: 1px;
    transition: 0.5s;
}

#project-another-page:hover {
    color: #FFB22C;
}

.grid-projects {
    padding: 40px;
}

.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
 }

.project-item img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.project-item:hover img {
    transform: scale(1.05);
}

.overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
    opacity: 0;
    transform: opacity 0.4s ease;
    padding: 20px;
    box-sizing: border-box;
}

.project-item:hover .overlay-text {
    opacity: 1;
}

.overlay-text h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.view-project {
    align-self: flex-end;
    margin-top: auto;
    font-size: 0.85rem;
    opacity: 0.85;
    color: #FFB22C;
    background-color: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 6px 8px;
}

.view-project:hover {
    background-color: #FFB22C;
    color: #000;
}

#website-category {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 25px auto 60px;
}

#website-category img {
    width: 100%;
    aspect-ratio: 4 / 3;
}

#design-category {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    gap: 30px;
    margin: 0 auto;
}

.portfolio-heading {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 1050px;
  margin: 75px auto 0;
}

.portfolio-heading h1 {
  font-size: 2.3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  padding-bottom: 10px;
}

.portfolio-heading hr {
  background-color: #FFB22C;
  height: 5px;
  width: 10%;
  margin: 0 auto;
  border: none;
  border-radius: 10px;
}

 .buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 50px;
    gap: 30px;
 }

 .buttons a {
    text-decoration: none;
    color: #FFB22C;
    padding: 10px 30px;
    font-size: 1rem;
    letter-spacing: 1px;
    border: 1px solid #ccc;
    border-radius: 50px;
    justify-content: space-between;
 }

 .buttons a:hover {
    background-color: #FFB22C;
    color: #000;
    border-color: #0c0c0c;
 }

 .filter-btn.active {
    background-color: #FFB22C;
    color: #000;
    border-color: #0c0c0c;
 }

 .preview-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
  }
  
  .preview-content {
    text-align: center;
    color: white;
    max-width: 90%;
  }
  
  .preview-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
  }
  
  #preview-title {
    margin-top: 15px;
    font-size: 1.5rem;
    color: #FFB22C;
  }
  
  .close-preview {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    font-weight: bold;
  }
  
  footer {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    color: #ffffff;
    padding: 50px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 -6px 30px rgba(255, 178, 44, 0.6);
  }

  footer .footer-elements {
    width: 100%;
    height: auto;
    max-width: 1100px;
  }

  .footer-elements nav {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
  }

  .footer-elements h2 {
    padding-bottom: 20px;
    font-size: 1.8rem;
    font-weight: bold;
  }

  .footer-elements span {
    color: #FFB22C;
  }

  .footer-elements p {
    color: #999999;
    font-size: 0.90rem;
  }

  .footer-elements img {
    display: block;
    width: 40px;
    height: 40px;
  }

  .icons {
    display: flex;
    justify-content: center;
    gap: 30px;
  }

  .icons a {
    display: inline-block;
    background-color: #fff;
    border-radius: 20px;
    padding: 2px;
    transition: transform 0.3s ease-in-out;
  }

  .icons a:hover {
    background-color: #FFB22C;
    transform: scale(1.1);
  }

  .copy-right {
    display: flex;
    justify-content: space-between;
    margin: 40px auto 0;
    color: #ccc;
  }

  .privacy-legal {
    color: #fff;
    letter-spacing: 1px;
    text-decoration: none;
  }

  .privacy-legal:hover {
    color: #FFB22C;
  }

  /* ========== Responsive Design ========== */

/* For tablets (≤ 1024px) */
@media (max-width: 1024px) {
    .header {
        position: static;
        margin-top: 30px;
    }
    .left-side {
        padding: 50px 30px;
        margin: 30% 10%;
    }

    .header.scrolled {
      background-color: transparent; 
    }

    .services {
      flex-direction: column;
      display: flex;
      align-items: center;
      gap: 20px;
      width: 100%;
    }
  
    #website-category {
      grid-template-columns: repeat(2, 1fr);
    }
  
    #design-category {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  /* For mobile (≤ 768px) */
  @media (max-width: 768px) {
    body {
      background-position: 70% center;
    }

    .header {
      position: static;
      padding: 20px 0;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }

    .header.scrolled {
      background-color: transparent; 
    }

    .logo {
      margin-bottom: 40px;
      font-size: 20px;
      text-align: left;
    }

    nav {
      gap: 15px;
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
    }
  
    .left-side {
      padding: 50px 30px;
      margin: 30% 8%;
    }
  
    .left-side h1 {
      font-size: 2.5rem;
    }
  
    .left-side .intro {
      font-size: 1.2rem;
    }
  
    .left-side .sub {
      font-size: 1rem;
    }
  
    .services {
      flex-direction: column;
      display: flex;
      align-items: center;
      width: 100%;
      gap: 20px;
      padding: 20px;
    }

    .services img {
      width: 60px;
    }

    .footer-elements nav {
      gap: 20px;
    }
  
    .copy-right {
      flex-direction: column;
      text-align: center;
      gap: 10px;
    }

    #website-category,
    #design-category {
      grid-template-columns: 1fr;
      gap: 20px;
    }
  }  

  /* For small phones (≤ 480px) */
@media (max-width: 468px) {
     body {
      background-position: 65% center;
     }

    .header {
      position: static;
      padding: 20px 10px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }

    .header.scrolled {
      background-color: transparent; 
    }
  
    .logo {
      margin-bottom: 40px;
      font-size: 20px;
      text-align: left;
    }
  
    nav {
      gap: 15px;
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
    }
  
    .left-side {
      padding: 80px 20px;
      margin: 120px 20px;
    }
  
    .left-side h1 {
      font-size: 2.5rem;
    }
  
    .left-side .intro {
      font-size: 1rem;
    }
  
    .left-side .sub {
      font-size: 0.9rem;
    }
  
    .social-icons {
      flex-wrap: wrap;
      gap: 20px;
    }

    .about-me {
      text-align: justify;
    }
  
    .service {
      width: 100%;
      padding: 20px;
      margin-top: 20px;
    }

    .service img,
    #maintenance-img {
      width: 60px;
      height: 60px;
    }

    #website-category,
    #design-category {
      grid-template-columns: 1fr;
      gap: 20px;
    }
  
    .buttons {
      flex-direction: column;
      gap: 15px;
    }
  
    .view-project {
      font-size: 0.8rem;
      padding: 6px 10px;
    }
  
    .footer-elements nav {
      gap: 15px;
    }
  
    .copy-right {
      flex-direction: column;
      text-align: center;
      font-size: 0.8rem;
      gap: 8px;
    }
  
    .footer-elements h2 {
      font-size: 1.2rem;
    }
  
    .footer-elements p {
      font-size: 0.8rem;
    }
  
    .preview-content img {
      max-width: 90%;
      max-height: 60vh;
    }
  
    .close-preview {
      font-size: 2rem;
      top: 15px;
      right: 20px;
    }
  }
  