* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        "Source Sans Pro",
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
    line-height: 1.5;
    background-color: #1a1a1a;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.illus-portfolio {
    width: 50%;
    margin: auto;
}

@media (max-width: 991px) {
    .portfolio-container {
        padding: 40px 20px;
    }
}

/* header */
header {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 10%;
  width: 100%;
  position: relative;
  z-index: 100;
}

.logo {
  font-family: 'DM Serif Text';
  font-size: 18px;
  font-weight: 400;
  color: #fff;
  z-index: 101;
}

nav {
  width: 60%;
  max-width: 800px;
  height: 95px;
  position: absolute;
  text-align: center;
  right: 50%;
  top: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(52, 52, 52, 0.2) 100%);
  border-radius: 47.5px;
  transform: translateX(50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(25px);
  z-index: 100;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 15%;
  padding: 0;
  margin: 0;
  width: 80%;
  justify-content: center;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-family: "Mulish", sans-serif;
  font-weight: 400;
  font-size: 18px;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.portfolio-text {
  font-family: 'DM Serif Text';
  font-size: 18px;
  font-weight: 400;
  margin-left: auto;
  color: #fff;
}

/* Section title */
.section-title {
    margin-top: 56px;
    margin-bottom: 56px;
}

.illustrations-title {
    color: rgba(255, 255, 255, 1);
    font-size: 32px;
    font-family:
        "DM Serif Text",
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
    font-weight: 400;
    text-align: center;
}

.highlight {
    color: rgba(152, 216, 178, 1);
}

/* gallery section */
.container {
    width: 100%;
    margin: 0 auto;
  }
  
  .row {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .image-wrapper {
    margin: 0 10px;
  }
  
  img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
  }
  
  /* Media Query for smaller screens */
  @media (max-width: 768px) {
    .row {
      flex-direction: column; /* Stack images vertically */
      align-items: center; /* Center images horizontally */
    }
  
    .image-wrapper {
      margin: 10px 0; /* Add vertical spacing */
      width: 90%; /* Adjust image width on smaller screens */
    }
  }

  /* Contact form */
  .contact-section {
    margin-top: 100px;
    width: 100%;
  }
  
  .contact-form {
    background-color: #FFFFFF0D;
    border-radius: 35px;
    padding: 2rem;
  }
  
  .form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .form-input {
    color: var(--secondary-text);
    font-family: "Source Sans Pro", sans-serif;
    font-size: 14px;
    border-radius: 10px;
    background: #FFFFFF1A;
    padding: 1rem;
    border: none;
    width: 100%;
  }
  
  .form-textarea {
    color: var(--secondary-text);
    font-family: "Source Sans Pro", sans-serif;
    font-size: 14px;
    margin-top: 2rem;
    border-radius: 10px;
    background: #FFFFFF1A;
    padding: 1rem;
    height: 109px;
    width: 100%;
    border: none;
    resize: none;
  }
  
  .form-submit {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
  }
  
  .submit-button {
    width: 120px;
    height: 40px;
    border-radius: 10px;
    background-color: #98D8B2;
    color: #07262E;
    text-align: center;
    font-family: "Source Sans Pro", sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
  }
  
  /* Footer */
  .main-footer {
    display: flex;
    margin-top: 100px;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
  }
  
  @media (max-width: 991px) {
    .main-footer {
      margin-top: 40px;
    }
  }
  
  .footer-email {
    align-self: stretch;
    border-radius: 100px;
    border: 1px solid #98D8B2;
    padding: 8px 19px;
    font-family:
      "Mulish",
      -apple-system,
      Roboto,
      Helvetica,
      sans-serif;
    font-size: 15px;
    color: #fff;
    font-weight: 300;
  }
  
  .social-links {
    display: flex;
    align-items: stretch;
    gap: 30px;
  }
  
  .social-icon {
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
    width: 41px;
    flex-shrink: 0;
  }
  
  .social-icon:last-child {
    border-radius: 6px;
  }

  #scroll-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 1000;
    background-image: url('images/scroll/green.png'); /* Replace with your image path */
    background-size: cover; /* Ensures the image covers the entire button */
    background-position: center; /* Centers the image */
  }
  
  #scroll-to-top:hover {
    opacity: 0.8; /* Slight opacity change on hover */
  }

  /* Media Queries */
/* Large devices (desktops) */
@media (max-width: 1200px) {
  nav {
    width: 70%;
  }
  
  nav ul {
    width: 90%;
    gap: 4%;
  }
  
  nav ul li a {
    padding: 8px 12px;
    font-size: 17px;
  }
  
  .hero h1 {
    font-size: 60px;
  }

  .project-card {
    max-width: 90%;
  }

  .cards-container {
    width: 90%;
  }
}

/* Medium devices (tablets) */
@media (max-width: 991px) {
  header {
    padding: 25px 4%;
  }
  
  nav {
    width: 85%;
    height: 80px;
    top: 0;
  }
  
  nav ul {
    width: 95%;
    gap: 3%;
  }
  
  nav ul li a {
    font-size: 16px;
    padding: 8px 10px;
  }
  
  .hero h1 {
    font-size: 50px;
  }
  
  .project-content {
    flex-direction: column;
  }
  
  .project-column {
    width: 100%;
  }
  
  .project-column.project-details {
    width: 100%;
    margin-top: 20px;
  }
  
  .project-image {
    height: auto;
    max-height: 202px;
  }
  
  .project-info {
    height: auto;
  }

  .skills-grid {
    width: 90%;
  }

  .about-text {
    width: 90%;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer {
    width: 90%;
  }
}

/* Small devices (mobile) */
@media (max-width: 767px) {
  header {
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
    padding: 15px 4%;
  }
  
  .logo, .portfolio-text {
    margin: 0;
  }
  
  nav {
    position: relative;
    width: 95%;
    height: auto;
    min-height: 60px;
    top: 0;
    right: 0;
    transform: none;
    margin: 15px auto;
    padding: 10px 0;
  }
  
  nav ul {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 0 10px;
  }
  
  nav ul li {
    margin: 5px 0;
  }
  
  nav ul li a {
    font-size: 15px;
    padding: 7px 10px;
  }
  
  .hero {
    margin-top: 60px;
  }
  
  .hero h1 {
    font-size: 36px;
  }
  
  .btn {
    margin-top: 30px;
    padding: 12px 25px;
    font-size: 0.9rem;
  }
  
  .about-container {
    margin-top: 80px;
  }
  
  .about-text {
    padding: 10px 20px;
  }
  
  .about-text h3 {
    font-size: 1.5rem;
  }
  
  .about-text p {
    font-size: 16px;
  }
  
  .divider-image {
    width: 80%;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .section-heading {
    margin-top: 100px;
    font-size: 28px;
  }
  
  .project-title {
    font-size: 24px;
  }
  
  .project-tags {
    top: 25px;
    right: 25px;
  }

  .project-description {
    font-size: 14px;
    -webkit-line-clamp: 4;
  }
  
  .contact-section {
    margin-top: 100px;
    width: 90%;
  }

  .contact-form {
    padding: 1.5rem;
  }
  
  .skill-card {
    width: 45%;
  }
  
  .footer {
    flex-direction: column;
    gap: 30px;
    padding: 80px 20px 40px;
  }
  
  .social-links {
    width: 100%;
    justify-content: center;
  }

  .social-icon {
    width: 35px;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .logo, .portfolio-text {
    font-size: 17px;
  }
  
  nav {
    border-radius: 25px;
    min-height: 50px;
  }
  
  nav ul {
    gap: 10px;
  }
  
  nav ul li a {
    font-size: 14px;
    padding: 6px 8px;
  }
  
  .hero h1 {
    font-size: 28px;
  }

  .skill-card {
    width: 100%;
  }
  
  .project-cards {
    height: 180px;
  }
  
  .overlay-text {
    font-size: 24px;
  }

  .project-card {
    padding: 15px;
  }

  .project-tags {
    top: 15px;
    right: 15px;
  }

  .tag-icon {
    width: 20px;
  }

  .tag-icon-single {
    width: 20px;
  }

  .project-category {
    font-size: 12px;
  }

  .project-title {
    font-size: 20px;
  }
  
  .footer-email {
    width: 100%;
    text-align: center;
    padding: 12px 15px;
    font-size: 14px;
  }

  .form-input, .form-textarea {
    font-size: 13px;
  }

  .submit-button {
    width: 100px;
    font-size: 16px;
  }

  .cta-button {
    width: 100%;
    text-align: center;
  }
}

/* Portrait phones */
@media (max-width: 375px) {
  header {
    padding: 15px 3%;
  }

  .logo, .portfolio-text {
    font-size: 15px;
  }

  nav {
    width: 97%;
    padding: 8px 0;
    margin: 10px auto;
    min-height: 45px;
  }

  nav ul {
    gap: 8px;
  }

  nav ul li a {
    font-size: 13px;
    padding: 5px 6px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.8rem;
  }

  .section-heading {
    font-size: 24px;
  }

  .about-text h3 {
    font-size: 1.3rem;
  }

  .project-description {
    -webkit-line-clamp: 3;
  }

  .social-icon {
    width: 30px;
  }
}