* {
  box-sizing: border-box;
}

html {
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -ms-text-size-adjust: none;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}




/* Main Page Layout */

#main-content {
  margin: 225px 425px;
  display: flex;
  flex-direction: column;
  gap: 96px;
}


/* Add smooth scrolling */

html {
  scroll-behavior: smooth;
}


/* Portfolio Header */

#portfolio-header {
  display: flex;
  gap: 20px;
  align-items: center;
}

#portfolio-header-image-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-basis: 50%;
}

.portfolio-header-image {
  width: 300px; /* Adjust the size of the circular image */
  height: 300px; /* Adjust the size of the circular image */
  border-radius: 50%; /* Makes the image circular */
  object-fit: cover; /* Ensures the image covers the circular frame */
}

#portfolio-header-text-container {
  display: flex;
  flex-direction: column;
  gap: 34px;
  flex-basis: 50%;
}




/* About Section */

#about-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-section-content {
  display: flex;
  flex-direction: column;
  gap: 34px;
}




/* Project Section */

#my-work-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px; /* Adjusted to have consistent spacing */
  justify-content: space-between; /* Ensure spacing between items */
}


    /* Project Cards */

    .project-card {
  flex: 1 1 calc(33% - 16px); /* Ensures 3 cards per row, adjusting for gap */
  margin-bottom: 32px; /* Space between rows */
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}


    .project-card-text-container {
      flex-direction: column;
      display: flex;
      gap: 16px
    }

    .project-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover; /* Ensures the images don't stretch or distort */
  object-position: center; /* Centers the image */
}


    .project-card:hover {
      transform: scale(1.05);
      transition: transform 0.3s ease;
    }

    .project-image:hover {
      transform: scale(1.1);
    }



/* Project Pages */

#project-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-header-image {
  width: 100%;
  height: auto;
}

#project-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-details-content {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

    /* Project Gallery */

    #project-gallery {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .project-gallery-content {
      display: flex;
      flex-wrap: wrap;
      gap: 34px 16px;
    }

    .gallery-image-container {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 20px;
    }
    /* Your existing CSS */
.gallery-image-container.half-width {
  width: calc((100% - 16px) / 2);
}

.gallery-image {
  width: 100%;
  height: auto;
}

/* CSS Styles for the Modal */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 9999; /* Sit on top */
  padding-top: 50px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

/* Modal Content (image) */
.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

/* Caption of Modal Image */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Add Animation */
.modal-content, #caption {
  -webkit-animation-name: zoom;
  -webkit-animation-duration: 0.6s;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
  from {-webkit-transform:scale(0);}
  to {-webkit-transform:scale(1);}
}

@keyframes zoom {
  from {transform:scale(0);}
  to {transform:scale(1);}
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

    
    



/* Extra Extra large devices (large laptops and desktops, 1200px and below) */
@media only screen and (max-width: 1600px) {
  #main-content {
    margin: 225px 275px;
  }
}

/* Extra large devices (large laptops and desktops, 1200px and below) */
@media only screen and (max-width: 1200px) {
  #main-content {
    margin: 225px 175px;
  }
}

/* Large devices (laptops/desktops, 1000px and below) */
@media only screen and (max-width: 1000px) {
  #main-content {
    margin: 225px 75px;
  }
}

/* Small devices (portrait tablets and large phones, 800px and below) */
@media only screen and (max-width: 800px) {
  #main-content {
    margin: 150px 50px;
  }

  #portfolio-header {
    flex-direction: column;
  }

  .project-card {
    max-width: calc((100% - 16px) / 2);
  }
}

/* Small devices (portrait tablets and large phones, 600px and below) */
@media only screen and (max-width: 600px) {
  #main-content {
    margin: 125px 20px;
  }

  .project-card {
    max-width: 100%;
  }
}

/* Specific Grid Layout for the Project Page */
.specific-project-page #project-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.specific-project-page .project-gallery-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4cm, 1fr));
  gap: 16px;
}

.specific-project-page .gallery-image-container {
  width: 4cm;
  height: 4cm;
  overflow: hidden; /* Ensures the image fits within the square */
}

.specific-project-page .gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the image covers the entire square */
}

/* Responsive Grid for Small Devices on Specific Project Page */
@media only screen and (max-width: 800px) {
  .specific-project-page .project-gallery-content {
      grid-template-columns: repeat(auto-fit, minmax(3cm, 1fr));
  }
}

@media only screen and (max-width: 600px) {
  .specific-project-page .project-gallery-content {
      grid-template-columns: repeat(auto-fit, minmax(2.5cm, 1fr));
  }
}
