* {
  margin: 0;
}

body,
html {
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

.center {
  text-align: center;
}

#name,
.topnav a,
.knowledge,
.text-hobbies,
.text {
  font-family: "Roboto", sans-serif;
}

#name-description,
.title h1 {
  font-family: "Roboto Slab", serif;
}

/* header */
.hero-image {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)),
    url("../imgs/bg.jpg");
  height: 85%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

/* Picture of me */
#do-image-header {
  width: 12em;
  border-radius: 50%;
  display: block;
  border: solid 6px white;
  margin-left: auto;
  margin-right: auto;
  height: 200px;
}

.hero-text {
  width: 515px;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  padding-top: 50px;
}

#name {
  font-size: 50px;
  margin-bottom: 25px;
}

#name-description {
  font-size: 50px;
  padding-top: 10px;
}

hr {
  width: 100px;
  margin-left: auto;
  margin-right: auto;
  border-color: #007bff;
}

/* navigation */
.topnav {
  overflow: hidden;
  padding-bottom: 35px;
  z-index: 7;
}

.topnav a {
  display: inline-block;
  color: white;
  text-align: center;
  padding: 14px 25px;
  text-decoration: none;
  font-size: 17px;
}

.topnav a:hover {
  color: lightsalmon;
}

.topnav .icon {
  display: none;
}

.center {
  text-align: center;
}

.fa-bars {
  font-size: 27px;
}

/* Sections */
.title h1 {
  padding-bottom: 30px;
  text-align: center;
  font-size: 30px;
  letter-spacing: 1px;
  color: #64b5f6;
}

#about,
#portfolio,
#contact {
  background: linear-gradient(135deg, #001f3f 0%, #010a1a 100%);
  color: #e0e0e0;
}

#knowledge,
#hobbies {
  background: linear-gradient(45deg, #010a1a 0%, #001f3f 100%);
  color: #e0e0e0;
}

section {
  padding-top: 60px;
  padding-bottom: 60px;
}

/* Laptop Section */
#laptop p {
  font-size: 20px;
}

#laptop {
  text-align: center;
}

.laptop-image {
  width: 600px;
}

/* About Section */
.bold {
  font-weight: bold;
}

.box-about-right .bold {
  padding-bottom: 20px;
  font-size: 20px;
}

.container-about {
  display: flex;
  justify-content: center;
}

.container-about div {
  width: 400px;
  padding: 20px;
}

.box-about-right {
  margin-top: auto;
  margin-bottom: auto;
}

#image-about {
  width: 18em;
  border-radius: 50%;
  display: block;
  border: solid 6px white;
  margin-left: auto;
}

/* Knowledge Section */
.container-knowledge {
  display: flex;
  justify-content: center;
}

.container-item-1 {
  display: flex;
}

.container-item-1-1 .container-item-2-2 {
  display: flex;
}

.container-item-1-1 div,
.container-item-2-2 div {
  background: rgba(0, 0, 0, 0.4);
  padding: 15px;
  border: 1px solid #007bff;
  color: #e0e0e0;
}

.container-item-1-1-1,
.container-item-1-1-2,
.container-item-1-2-1,
.container-item-1-2-2 {
  margin: 10px;
  margin-left: 5px;
  margin-right: 5px;
  border-radius: 10px;
}

.container-item-1,
.container-item-2 {
  width: 400px;
  padding: 20px;
}

.container-item-1 {
  order: 2;
}

.container-item-2 {
  margin-top: auto;
  margin-bottom: auto;
  order: 1;
}

.knowledge {
  padding-bottom: 20px;
}

/* Portfolio */
.portfolio-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
}

.portfolio-image {
  width: 370px;
  margin: 10px;
  border-radius: 10px;
}

.portfolio-item-1,
.portfolio-item-2,
.portfolio-item-3,
.portfolio-item-4,
.portfolio-item-5,
.portfolio-item-6 {
  position: relative;
}

.overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transition: 0.5s ease;
  -webkit-transition: 0.5s ease;
  background: linear-gradient(45deg, rgba(0, 123, 255, 0.9) 0%, rgba(0, 86, 179, 0.9) 100%);
  border-radius: 9px;
  margin: 10px;
  margin-bottom: 14px;
  cursor: pointer;
}

.portfolio-item-1:hover .overlay,
.portfolio-item-2:hover .overlay,
.portfolio-item-3:hover .overlay,
.portfolio-item-4:hover .overlay,
.portfolio-item-5:hover .overlay,
.portfolio-item-6:hover .overlay {
  opacity: 1;
}

/* Hobbies */
.hobbies-container {
  display: flex;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
}

.hobbies-column-1 {
  flex-wrap: wrap;
}

.hobbies-items {
  width: 265px;
}

.image-hobbies {
  width: 240px;
  border-radius: 50%;
}

.hobbies-item-1,
.hobbies-item-2,
.hobbies-item-3,
.hobbies-item-4 {
  position: relative;
}

.overlay-hobbies {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 50%;
}

.hobbies-item-1:hover .overlay-hobbies,
.hobbies-item-2:hover .overlay-hobbies,
.hobbies-item-3:hover .overlay-hobbies,
.hobbies-item-4:hover .overlay-hobbies {
  opacity: 1;
}

.text-hobbies {
  color: white;
  font-size: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  text-align: center;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  background: #0000008c;
  padding: 5px 10px;
  width: 82%;
}

.hobbies-description,
.portfolio-description,
.contact-description {
  padding-bottom: 50px;
}

.hobbies-column-1 {
  display: flex;
  justify-content: center;
}

/* Contact */
.text {
  color: white;
  font-size: 20px;
  position: absolute;
  top: 40%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  text-align: center;
}

.form-group {
  margin-bottom: 15px;
}

.contact-input {
  font-family: "Open Sans", sans-serif;
  font-size: 1em;
  color: #333;
  background: #f8f8f8;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease-in-out;
}

.contact-input:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
  outline: none;
}

fieldset {
  border: none;
}

.contact-button {
  background-color: #007bff;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
  -webkit-appearance: none;
  margin-top: 20px;
}

.contact-button:hover {
  background-color: #0056b3;
}

.container-form {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  text-align: left;
  padding-left: 10px;
}



/* button */
.button {
  background-color: #007bff;
  border: none;
  color: white;
  padding: 10px 15px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  border-radius: 40px;
  transition-duration: 0.4s;
  -webkit-transition-duration: 0.4s;
}

.button-position {
  position: absolute;
  top: 65%;
  transition-duration: 0.4s;
  -webkit-transition-duration: 0.4s;
  /* Safari */
  cursor: pointer;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.button-code {
  left: 37%;
  padding: 10px 15px;
}

.button-site {
  left: 63%;
  padding: 10px 20px;
}

.button-border {
  background-color: transparent;
  color: white;
  border: 2px solid #007bff;
}

.button-border:hover {
  background-color: #007bff;
  color: white;
}

.button-about {
  margin-top: 20px;
}

/* Footer Section */
#footer-section {
  text-align: center;
  font-size: 14px;
  background-color: black;
  color: white;
  padding: 20px 0 20px 0;
}

.footer-social-spacing {
  margin-top: 12px;
}

.footer-link {
  /* word-spacing: 14px; */
  font-weight: bold;
  /* padding: 30px 0 30px 0; */
}

.footer-link a:hover {
  color: #007bff;
}

a:-webkit-any-link {
  cursor: pointer;
  text-decoration: none;
}

.footer-link a {
  color: white;
}

.social-footer {
  margin: 0 1px 10px 0;
}

.foot-icon {
  padding: 10px;
  font-size: 18px;
  width: 18px;
  text-align: center;
  text-decoration: none;
  border-radius: 50%;
}

.footer-link {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 600px;
  margin: 10px auto 15px auto;
}

.link-home,
.link-about,
.link-knowledge,
.link-portfolio,
.link-hobbies,
.link-contact {
  align-self: center;
  padding-left: 10px;
  padding-right: 10px;
}

/* Social Icons */
.fa-facebook-f {
  background: #3b5998;
  color: white;
}

.fa-twitter {
  background: #55acee;
  color: white;
}

.fa-linkedin {
  background: #007bb5;
  color: white;
}

.fa-github {
  background: rgb(80, 80, 80);
  color: white;
}

.fa-instagram {
  background: linear-gradient(#b433a9, #fcad48);
  color: white;
}

.fab:hover {
  opacity: 0.7;
  color: lightslategray;
  text-decoration: none;
}

.footer-link-color {
  color: white;
  text-decoration: none;
}

.github-link {
  color: #007bff;
}

@media only screen and (max-width: 768px) {
  .hero-text {
    width: unset;
  }

  #name {
    font-size: 3.5em;
    line-height: 48px;
  }

  #name-description {
    font-size: 37px;
    line-height: 34px;
  }

  #do-image-header {
    margin-bottom: 15px;
  }

  .portfolio-image {
    width: 285px;
  }

  .portfolio-item-1,
  .portfolio-item-2,
  .portfolio-item-3,
  .portfolio-item-4,
  .portfolio-item-5,
  .portfolio-item-6 {
    align-self: center;
  }

  .portfolio-description,
  .about-description,
  .meet-description,
  .knowledge-description {
    width: 630px;
    margin-right: 20px;
    margin-left: 20px;
  }

  /* Knowledge Button */
  .button-code {
    left: 34%;
    padding: 10px 15px;
  }

  .button-site {
    left: 66%;
    padding: 10px 20px;
  }

  .button-about {
    margin-left: 20px;
  }

  /* Hobbies */
  .text-hobbies {
    width: 85%;
  }

  .image-hobbies {
    width: 250px;
    margin-bottom: 15px;
  }

  .hobbies-items {
    align-self: center;
  }

  /* Laptop */
  .responsive {
    width: 85%;
    height: auto;
  }

  /* Contact */
  .contact-input {
    width: calc(100% - 20px); /* Adjusting for padding */
    margin: 10px auto;
  }

  .container-form {
    width: 90%;
  }

  .form-group label {
    padding-left: 0;
  }

  fieldset {
    text-align: center;
  }

  .contact-button {
    margin: 20px auto 0 auto;
    display: block;
  }

  /* About */
  .container-about {
    flex-direction: column;
  }

  #image-about {
    margin: auto;
    width: 15em;
  }

  .container-about div {
    width: auto;
  }

  /* Knowledge */
  .container-knowledge {
    flex-direction: column;
  }

  .container-item-1-1 div,
  .container-item-2-2 div {
    padding: 3px;
  }

  .container-item-1,
  .container-item-2 {
    width: auto;
    justify-content: center;
  }

  /* Footer */
  #footer-section {
    font-size: 10px;
  }
}

/* For Wider Screen */
@media only screen and (min-width: 1500px) {
  .portfolio-container {
    width: 1500px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Navbar */
  .topnav a {
    padding-right: 60px;
    padding-left: 60px;
  }

  #do-image-header {
   
  }
}

@media only screen and (max-width: 670px) {
  .portfolio-description,
  .about-description,
  .meet-description,
  .knowledge-description {
    width: auto;
  }

  .footer-link {
    flex-direction: column;
    width: unset;
  }

  .link-home,
  .link-about,
  .link-knowledge,
  .link-portfolio,
  .link-hobbies,
  .link-contact {
    padding-bottom: 5px;
  }

  /* .button-position {
    top: 115%;
    transition-duration: unset;
    -webkit-transition-duration: unset;
    cursor: unset;
    -webkit-transform: unset;
    -ms-transform: unset;
    transform: unset;
} */
}

@media screen and (max-width: 600px) {
  .topnav.responsive-nav {
    position: relative;
  }

  .topnav.responsive-nav a.icon {
    position: absolute;
    right: 0;
    top: 0;
  }

  .topnav.responsive-nav a {
    float: none;
    display: block;
    text-align: left;
  }

  .topnav a {
    display: none;
  }

  .topnav a.icon {
    float: right;
    display: block;
  }

  /* Resume Button */
  .button-about {
    text-align: center;
    margin-left: unset;
  }
}

@media screen and (max-width: 450px) {
  .github-icon {
    margin-top: 20px;
  }

  .portfolio-description {
    padding-bottom: 20px;
  }
}

@media only screen and (max-width: 360px) {
  .portfolio-image {
    width: 285px;
  }

  #do-image-header {
    width: 8em;
  }

  .topnav a {
    font-size: 12px;
  }
}

/* Fix for smaller screens in portrait mode */
@media (max-height: 380px) and (max-width: 815px) {
  .topnav a {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-image {
    height: 600px;
  }
}
