html {
  scroll-behavior: smooth;
}

footer {
position: static !important;
margin: 0 !important;
padding: 10px 0 !important;
width: 100%;
background-color: #333;
color: #fff;
text-align: center;

display: flex;
flex-direction: column;
align-items: center;
justify-content: center;

height: 100px;
}

footer p {
color: #fff;
}

.github-link {
margin-top: 30px;
font-size: 28px;
color: #ffffff;
transition: transform 0.2s ease, color 0.2s ease;
}

.github-link:hover {
transform: scale(1.1);
}

nav {
  background-color: #333;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

.nav-left {
  text-align: left;
}

.nav-left h1 {
  margin: 0 0 0 30px;
  font-size: 1.5rem;
  font-family: 'Roboto Mono', monospace;
}

.nav-right {
  text-align: right;
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

nav li {
  margin: 0 60px 0 0;
}

nav a {
  color: #fff;
  font-size: 1.2rem;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  transition: background-color 0.2s ease-in-out;
}

nav a:hover {
  background: #fff;
  color: #333;
}

    html, body {
        height: 100%;
        margin: 0;
      }
      
      main {
        min-height: calc(100% - 100px); /* 85px is the height of header + footer */
        scroll-behavior: smooth;
      }
 
      .project-container img {
        width: 25%;
        height: auto;
        object-fit: cover;
        margin-bottom: 10px;
      }


      /*projects design */

      .projects-heading{
        margin-top: 240px;
        font-family: 'Roboto Mono', monospace;
        font-size: 48px;
        text-align: center;
        margin-bottom: 60px;
      }

      .project-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 20px;
        margin-top: 20px;
      }
      
      .project {
        position: relative;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
      }
      
      .project img {
        width: 100%;
        height: auto;
        display: block;
      }
      
      .overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.5);
        overflow: hidden;
        width: 100%;
        height: 0;
        transition: height 0.5s ease;
      }
      
      .project:hover .overlay {
        height: 100%;
      }
      
      .text {
        position: absolute;
        top: 30%;
        width: 100%;
        text-align: center;
        color: white;
      }
      
      .project-name {
        margin-top: -20px;
      }
      
      .show-more {
        margin-top: 60px;
        cursor: pointer;
        border: 2px solid white;
        background-color: transparent;
        color: white;
        font-size: 16px;
        font-weight: bold;
        text-transform: uppercase;
        padding: 10px;
        display: inline-block;
        transition: all 0.3s ease;
      }
      
      .show-more:hover {
        background-color: white;
        color: black;
      }
      
      
      /* see more button */
      .project-button {
        text-align: center;
        margin-top: 50px;
      }
      
      .project-button button {
        border: 2px solid black;
        background-color: transparent;
        color: rgb(0, 0, 0);
        font-size: 16px;
        font-weight: bold;
        text-transform: uppercase;
        padding: 10px 30px;
        display: inline-block;
        transition: all 0.3s ease;
        cursor: pointer;
      }
      
      .project-button button:hover {
        background-color: rgb(0, 0, 0);
        color: rgb(255, 255, 255);
      }
      

      /* contact form */

      .contact-form {
        background-color: #f5f5f5;
        padding: 20px;
        border-radius: 10px;
        margin-bottom: 30px;
      }
           
      .contact-form form {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
      }
      
      .contact-form div {
        display: flex;
        flex-direction: column;
        margin-bottom: 15px;
        width: 100%;
      }
      
      .contact-form label {
        font-weight: bold;
        margin-bottom: 5px;
      }
      
      .contact-form input,
      .contact-form textarea {
        padding: 10px;
        border: none;
        border-radius: 5px;
        margin-bottom: 10px;
        font-size: 16px;
        font-family: inherit;
        background-color: #dfdfdf;
        color: #000000;
        border: 1px solid rgb(0, 0, 0);
      }

      .contact-form textarea {
        height: 15vh;
      }
      
      .contact-form input[type="submit"] {
        background-color: #333;
        color: #ffffff;
        padding: 10px 20px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s ease-in-out;
      }
      
      .contact-form input[type="submit"]:hover {
        background-color: #b4b4b4;
      }
      
      .send { 
        border: 2px solid black;
        background-color: transparent;
        color: rgb(0, 0, 0);
        font-size: 16px;
        font-weight: bold;
        text-transform: uppercase;
        padding: 10px 30px;
        display: inline-block;
        transition: all 0.3s ease;
        cursor: pointer;
      }

      .send:hover{
        background-color: rgb(0, 0, 0);
        color: rgb(255, 255, 255);
      }

      .form-container {
        position: relative;
        padding-bottom: 40px; /* increase padding-bottom to create space for the footer */
      }

      #contact p{
        font-size: 28px;
        font-family: 'Josefin Sans', monospace;
        margin-bottom: 20px;
      }

      #contact h2{
        font-family: 'Roboto Mono', monospace;
        font-size: 48px;
        text-align: center;
        margin-top: 80px;
      }

      #contact .info {
        font-size: 28px;
        font-family: 'Josefin Sans', monospace;
        margin-bottom: 1vh;
      }

      /* about me section*/
      .about{
        margin-top: 120px;
        font-family: 'Roboto Mono', monospace;
        font-size: 48px;
        text-align: center;
      }
            
      .developer{
        font-size: 28px;
        font-family: 'Josefin Sans', monospace;
        text-align: center;
        padding-left: 140px;
        padding-right: 140px;
      }
      
      
      /*Home Page */

      #home {
        position: relative;
        background-color: rgb(35, 89, 244);
        height: 95vh; /* set the section height to the viewport height */
        margin-top: 70px;
      }
        
      #home h1 {
        font-size: 40px;
        color: white;
        font-family: 'Roboto Mono', monospace;
      }

      #home h2 {
        font-size: 70px;
        color: white;
        font-family: 'Roboto Mono', monospace;
      }

      #home h3 {
        font-size: 40px;
        color: white;
        font-family: 'Roboto Mono', monospace;
      }

      
      .hello-container {
        /* Align text to the left */
        text-align: left;
        /* Add padding to create space inside the container */
        padding: 20px;
        /* Set a max width to control container size */
        max-width: 600px;
        /* Optional: Center container within parent */
        margin: 0 auto;
        /* Add a red border to the container */
      /*border: 2px solid red;
        /* Ensure padding and border are included in the width */
      /*box-sizing: border-box; */
        flex: 1; /* Allows the container to take up available space */
        margin-left: 8vw;
      }
      
      .hello-container h1,
      .hello-container h2,
      .hello-container h3 {
        /* Ensure consistent margins and padding */
        margin: 0;
        padding: 0;
        text-align: left;
        padding-left: 0;
        margin-left: 0;
      }
      
      /* Adjust margins between elements as needed */
      .hello-container h1 {
        margin-bottom: 10px; /* Adjust spacing between elements */
      }
      
      .hello-container h2 {
        margin-bottom: 10px; /* Adjust spacing between elements */
      }
      
      .hello-container h3 {
        margin-bottom: 0; /* No margin needed below the last element */
      }
      

      .home-container {
        display: flex;
        align-items: center; /* Vertically align items */
        justify-content: space-between; /* Space between the two containers */
        width: 100vw; /* Full width of the viewport */
        max-width: 100%; /* Ensure it doesn't exceed viewport width */
        margin: 0; /* Remove default margins */
       /* border: 2px solid blue;  Visible border for debugging */
       /* box-sizing: border-box;  Include padding and border in the width */
      }

      .home-center{
      padding-top: 12vw;

      }
      
      .selfie-container {
        display: flex;
        align-items: center; /* Vertically align the image */
        flex: 1; /* Allows the container to take up available space */
        justify-content: flex-end; /* Align image to the right */
        margin-right: 8vw;
      }
      

      .selfie-container .selfie2 {
        border-radius: 50%;
        scale: 100%;
      }

      .up{
        font-size: 45px;
        color: white;
        margin-right: 10.5%;
      }
    
      .button-container {
        margin-top: 20px;
        margin-right: 20%;
        text-align: center;
        position: relative;
      }
      
      .button-container button {
        border: 2px solid rgb(255, 255, 255);
        background-color: transparent;
        color: rgb(255, 255, 255);
        font-size: 16px;
        font-weight: bold;
        text-transform: uppercase;
        padding: 10px 30px;
        display: inline-block;
        transition: all 0.3s ease;
        cursor: pointer;
      }
      
      .button-container button:hover {
        background-color: rgb(255, 255, 255);
        color: rgb(0, 0, 0);
      }

/* Customize the scrollbar track */
::-webkit-scrollbar {
  width: 10px; /* Set the width of the scrollbar */
  background-color: #333; /* Background color of the track */
}

/* Customize the scrollbar thumb */
::-webkit-scrollbar-thumb {
  background-color: #666; /* Set the color of the thumb */
  border-radius: 6px; /* Add rounded corners to the thumb */
}

/* Customize the scrollbar track when it's hovered */
::-webkit-scrollbar-thumb:hover {
  background-color: #888; /* Change the color on hover */
}

/* Customize the scrollbar track when it's pressed (clicked) */
::-webkit-scrollbar-thumb:active {
  background-color: #444; /* Change the color when clicked */
}


/* Media Queries for responsiveness */

@media only screen and (max-width: 930px) {

  .nav-left h1 {
    font-size: 1.2rem;
  }

  nav a {
    font-size: 1rem;
  }

  nav li {
    margin: 0 10px 0 0; /* Adjust the margin to give less space between nav items */
  }

  #home {
    position: relative;
    background-color: rgb(35, 89, 244);
    height: 95vh; /* set the section height to the viewport height */
    margin-top: 60px;
  }

  .selfie-container .selfie2 {
    scale: 80%;
  }

}

@media only screen and (max-width: 830px) {
  nav a {
    font-size: 14px;
  }

  nav li {
    margin: 0 10px 0 0; /* Adjust the margin to give less space between nav items */
  }
}

@media only screen and (max-width: 750px) {
  img, iframe, video {
    max-width: 100%; /* Ensures these elements don't cause horizontal scrolling */
    height: auto; /* Maintain aspect ratio */
  }
  
  nav {
    padding: 10px;
  }

  .nav-left h1 {
    font-size: 1rem;
    margin-left: 5px;
  }

  nav li {
    margin: 0;
  }

  nav a {
    font-size: 0.6rem;
  }

  .nav-right a {
    padding: 5px 10px; /* Smaller padding to reduce button size */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
  }

  .hello-container {
    margin-top: 20vh;
  }

  .selfie-container .selfie2 {
    scale: 70%;

  }
  .selfie-container {
    margin-top: 20vh;
    margin-right: 0;
    justify-content: center;
  }

  #home {
    margin-top: 1vh;
    padding-bottom: 40px;
  }

  #home h1,
  #home h2,
  #home h3 {
    font-size: 2rem;
  }

  .about {
    font-size: 1.8rem;
    margin-top: 60px;
  }

  .developer {
    margin: 0;
    padding: 0;
    padding-left: 5vh;
    padding-right: 5vh;
    text-align: left;
    align-content: flex-start;
    font-size: 22px;
  }

  .project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Ensures a max of 2 items per row */
    gap: 10px;
    margin: 10px;
  }
  
  .project {
    position: relative;
  }
  
  .project img {
    display: block; /* Ensures the image behaves as expected */
    width: 100%;
    height: auto;
  }
  
  .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease; /* Smooth transition */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .project:hover .overlay {
    opacity: 1; /* Show the overlay on hover */
  }
  
  .text {
    text-align: center;
    color: white;
    opacity: 0; /* Hide text by default */
    transform: translateY(20px); /* Slightly move text down */
    transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth transition for opacity and transform */
  }
  
  .project:hover .text {
    opacity: 1; /* Make text visible on hover */
    transform: translateY(0); /* Move text to its normal position */
  }
  
  .show-more {
    margin-top: 10px;
    padding: 3px 8px; /* Smaller button padding */
    font-size: 0.9rem; /* Smaller font size */
    color: white;
    text-decoration: none;
  }
  
  .show-more:hover {
    background-color: rgba(255, 255, 255, 0.9); /* Darken on hover */
    color: black;
  }
  

  .form-container {
    padding-bottom: 40px;
  }

  .contact-desc {
    font-size: 22px !important;
  }
}


/* define the container aspect first */
.selfie-container2 {
  display: none; /* Hide by default */
  width: 150px; /* Ensure it has a defined size */
  height: 150px;
}


@media only screen and (max-width: 450px) {
  .hello-container {
    margin-left: 0;
    margin-top: 15vh;
  }
  .selfie-container {
    display: none; /* Hide the old container */
  }

  .selfie-container2 {
    display: block; /* Show the new container */
    margin: 20px auto; /* Center it horizontally */
    width: 150px; /* Ensure proper size */
    height: 150px;
    transform: scale(1); /* Keep normal scale */
    border-radius: 50%;
  }

  .selfie-container2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

  .home-container .name {
    font-size: 35px !important;
    font-weight: bold;
  }

  .button-container {
    margin-left: auto;
    align-items: center;
    align-self: center;
    margin-right: 0;
  }

  .download-cv {
    margin-left: 0;
    object-fit: contain;
  }

  .about-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    margin: 0; /* Prevents automatic centering */
    padding: 0;
    padding-left: 2vh;
    padding-right: 2vh;
  }
  
  .developer {
    margin: 0;
    padding: 0;
    text-align: left;
    align-content: flex-start;
    font-size: 22px;
  }

  .projects-heading{
    font-size: 35px;
  }

  .contact-me {
    font-size: 35px !important;
  }

  .contact-desc {
    font-size: 22px;
  }
}

@media only screen and (max-width: 350px) {
  /* diminuir a letra dos butoes do nav bar */
  .project-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Ensures a max of 2 items per row */
    gap: 10px;
    margin: 10px;
  }

  .nav-left h1 {
    font-size: 0.8rem;
  }

  nav a {
    font-size: 8px;
  }

  nav li {
    margin: 0; /* Adjust the margin to give less space between nav items */
    padding: 0;
  }

  .contact-desc {
    font-size: 22px;
  }
}


@media only screen and (max-height: 500px) {
  #home {
    margin-top: 1vh;
    padding-bottom: 40px;
  }

  #home h1,
  #home h3 {
    font-size: 20px;
  }
  #home h2 {
    font-size: 25px;
  }

  .selfie-container .selfie2 {
    border-radius: 50%;
    scale: 50%;
  }

  .home-center {
    padding-top: 5vh;
  }

  .nav-left h1 {
    font-size: 18px;
    padding-right: 20px;
  }

  nav a {
    font-size: 12px;
  }

  nav {
    padding: 10px;
  }

  footer {
    position: absolute;
    margin-bottom: 0;
  }

  .contact-desc {
    font-size: 22px;
  }
}


@media only screen and (max-height: 360px) {
  #home {
    margin-top: 1vh;
    padding-bottom: 40px;
  }

  #home h1,
  #home h3 {
    font-size: 20px;
  }
  #home h2 {
    font-size: 25px;
  }

  .selfie-container .selfie2 {
    border-radius: 50%;
    scale: 50%;
  }

  .home-center {
    padding-top: 0;
  }

  .nav-left h1 {
    font-size: 18px;
  }

  nav a {
    font-size: 12px;
  }

  nav {
    padding: 10px;
  }

  footer {
    position: absolute;
    margin-bottom: 0;
  }

  .about {
    font-size: 38px;
  }

  .projects-heading{
    font-size: 38px;
  }

  #contact h2{
    font-size: 38px;
  }
  
  .contact-desc {
    font-size: 22px;
  }
}


.email-link {
  color: #333;
  font-size: 16px;
  font-weight: normal;
  text-decoration: none;
  background-color: #f4f4f4;
  padding: 4px 8px;
  border: 1px solid #000000;
  border-radius: 3px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.email-link:hover {
  color: #fff;
  background-color: #000000;
  border-color: #000000;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#copyButton {
  margin-left: 10px;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#copyButton i {
  font-size: 16px;
  transition: all 0.3s ease;
}

#copyButton:hover i {
  color: #0073e6;
}

section {
  scroll-margin-top: 10vh; /* Adjust the value to match your nav bar's height */
}

#contact {
  scroll-margin-top: 0; /* Adjust the value to match your nav bar's height */
}
