:root {
  --font: "Montserrat", sans-serif;
  --blackish: #000610;
  --black-off: #001122;
  --dark-blue-primary: #162C42;
  --orange-secondary: #F7770F;
  --grey1: #637180;
  --grey2: #b9b9b9;
  --grey3: #ebebeb;
  --grey4: #f9f9f9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overscroll-behavior: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  line-height: 1.4;
  font-size: 1rem;
  background: var(--blackish);
}

/* Header and navigation section */

header {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  position: fixed;
  width: 100%;
  z-index: 20;
}

.header-banner {
  margin-top: 20px;
  position: fixed;
  width: 70%;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: solid var(--grey4) 1px;
  border-radius: 50px;
  z-index: 10;
}

.logo {
  height: 30px;
  width: 30px;
  margin-left: 10px;
}

.mobile {
  display: none;
}

nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
}

nav ul li{
  list-style-type: none;
  display: inline-block;
  padding: 0 10px;
}

nav ul li a {
  text-decoration: none;
  color: var(--grey4);
  padding: 15px;
}

nav ul li a:hover {
  background-color: var(--dark-blue-primary);
  border-radius: 50px;
  padding: 15px;
  border: none;
  }

button {
  padding: 15px;
  font-size: 0.9rem;
  border: none;
  border-radius: 50px;
  color: var(--grey4);
  background-color: var(--orange-secondary);
}
  
button:hover {
  background-color: var(--dark-blue-primary);
  cursor: pointer;
}

/* Make space for the header banner */
.main-container {
  padding-top: 100px;
}

/* Hero banner */
.hero-banner {
  height: 60vh;
  background: url(./images/banner.svg) no-repeat center center/cover;
}

.welcome-text {
  padding-top: 100px;
  color: var(--grey4);
  text-align: center;
}

.developer {
  border-radius: 50px;
  border: var(--grey4) solid 1px;
  padding: 5px;
  width: 175px;
  text-align: center;
  margin: 20px 0;
  display: inline-block;
}

.heroButton {
  margin: 20px auto;
}

/* Sections */

a {
  text-decoration: none;
  color: var(--grey4);
}

section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  flex-wrap: wrap;
  color: var(--grey4);
}

.divTitle {
  text-align: center;
}

/* Stacks */

.stacks {
  background: var(--black-off);
  padding: 60px 0 80px 0;
}

#stackDisplay {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

.stack {
  border: 1px solid var(--grey4);
  border-radius: 5px;
  height: 120px;
  width: 120px;
  margin: 30px 15px 10px 15px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.stack img {
  height: 50px;
  width: 50px;
}

.progress {
  position: relative;
  width: 80%;
  height: 13px;
  margin-top: 10px;
  background-color: var(--grey3);
  border-radius: 15px;
  overflow: hidden;
  z-index: 1;
}

.progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 70%;
  height: 100%;
  background-color:var(--orange-secondary);
  z-index: 0;
}

.quarter::after {
  width: 25%;
}

.half::after {
  width: 50%;
}

.full::after {
  width: 90%;
}

/* Projects */

#projects {
  background-color: var(--dark-blue-primary);
  padding-top: 60px;
}

.cards {
  display: flex;
  gap: 30px;
  padding: 30px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.cardProject {
  width: 70%;
  height: auto;
  background: var(--black-off);
  display: flex;
  flex-direction: row;
  border-radius: 15px;
  padding: 40px;
  flex-wrap: wrap;
  align-items: center;
}

.cardImg {
  flex: 1;
  margin-right: 15px;
  padding: 25px;
  border-radius: 15px;
  background-color: var(--dark-blue-primary);
}

.cardText {
  flex: 2;
}

.cards_image {
  width: 100%;
  margin: 0 auto;
}

.roundedText {
  color: var(--grey3);
  border: 1px solid var(--grey3);
  padding: 5px 8px;
  border-radius: 15px;
  margin: 0 2px;
}

.git:hover {
  cursor: pointer;
  background-color: var(--orange-secondary);
  border: 1px solid var(--orange-secondary);
}

.cardsLink {
  text-decoration: none;
  color: var(--orange-secondary)
}

a:hover { 
  color: var(--grey4);
}

#linkToGH {
  padding: 15px;
  text-decoration: none;
  border-radius: 50px;
  color: var(--grey4);
  font-size: 0.9rem;
  background-color: var(--orange-secondary);
  margin: 20px 0;
}

#linkToGH:hover {
  background-color: var(--black-off);
} 

/* Grid */

#gallery {
  background-color: var(--black-off);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 60px 0 40px 0;
}

#grid {
  padding: 10px;
  display: grid;
  width: 67%;
  background: var(--grey4);
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 150px);
  gap: 10px;
  margin: 30px auto;
  border-radius: 10px;
}

.pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pic:first-child {
  grid-column: 1 / span 1;
  grid-row: 1 / span 2;
}

.pic:nth-child(2) {
  grid-column: 2 / span 2;
  grid-row: 1 / span 2;
}

.pic:nth-child(3) {
  grid-column: 4 / span 1;
  grid-row: 1 / span 1;
}

.pic:nth-child(4) {
  grid-column: 1 / span 1;
  grid-row: 3 / span 1;
}

.pic:nth-child(5) {
  grid-column: 2 / span 2;
  grid-row: 3 / span 1;
}

.pic:nth-child(6) {
  grid-column: 3 / span 1;
  grid-row: 4 / span 1;
}

.pic:nth-child(7) {
  grid-column: 1 / span 2;
  grid-row: 4 / span 1;
}

.pic:nth-child(8) {
  grid-column: 4 / span 1;
  grid-row: 2 / span 2;
}

.pic:nth-child(9) {
  grid-column: 4 / span 1;
  grid-row: 4 / span 1;
}

/* About Me */

#aboutMe {
  background-color: var(--blackish);
  margin: 0 auto;
  width: 100%;
  padding-bottom: 30px;
}

.squares {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 50px 0 0 0;
  width: 60%;
  flex-wrap: wrap;
}

.myInfo {
  margin: 20px auto;
  height: 350px;
  width: 600px;
  border: 1px solid var(--grey1);
  border-radius: 10px;
  background-color: var(--black-off);
  font-size: 0.8rem;
  padding: 40px;
  line-height: 1.6rem;
  color: var(--grey2);
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.myInfo h3 {
  color: var(--grey4);
  padding-bottom: 20px;
}

.myImg {
  padding: 40px;
  height: 350px;
  width: 300px;
  border: 1px solid var(--grey1);
  border-radius: 10px;
  background: url(/images/banner.png) no-repeat center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
}

.imageContainer {
  border: 1.5px solid var(--grey3);
  border-radius: 50%;
  height: 200px;
  width: 200px;
  overflow: hidden;
}

.imageContainer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

.socialBtn {
  border: 1px solid var(--grey1);
  border-radius: 5px;
  background-color: var(--black-off);
  height: 60px;
  width: 250px;
  text-align: center;
  flex: 1;
  margin: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.socialBtn:hover {
  background-color: var(--blackish);
  cursor: pointer;
}

/* Footer */
footer {
  text-align: center;
  padding: 15px;
  background-color: var(--black-off);
  color: var(--grey4);
  margin-bottom: 40px;
}

#footer-flex {
  width: 70%;
  margin: 30px auto;
  display: flex;
  justify-content: center;
}

.footer-section {
  flex: 1;
}

.footerText {
  font-size: 0.8rem;
  margin: 20px 0;
}

footer .socialBtn {
  margin: 30px auto;
}

.socialBtn img {
  height: 25px;
  width: 25px;
}

.divider {
  height: 275px;
  width: 0.1px;
  background-color: var(--grey1);
}

form {
  margin: 0;
}

.footer-form {
  font: var(--font);
  flex: 1;
}

.footer-form h2 {
  font-size: 20px;
  font-weight: 200;
  margin-bottom: 20px;
}

label {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--grey4);
  width: 80px;
  text-align: justify;
}

input {
  width: 350px;
  margin-bottom: 30px;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: var(--dark-blue-primary);
  color: var(--grey4);
}

::placeholder {
  color: var(--grey1);
}

#message {
  height: 75px;
}

#submitBtn {
  margin-bottom: 30px;
}

#backTopBtn {
  border-radius: 6px;
  height: 40px;
  width: 40px;
  padding: 0;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
}

/* Mobile view */

@media only screen and (min-width: 300px) and (max-width: 800px) {

  body {
    flex-wrap: wrap;
  }

  .mobile {
    display: block;
  }
  
  nav ul {
    display: none;
  }

  nav ul.responsive {
    display: block;
    background-color: var(--grey3);
    position: absolute;
    left: 0;
    width: 100%;
    border-radius: 5px;
  }

  ul.responsive li {
    display: block;
    margin: 2rem 0rem;
  }

  ul.responsive button {
    display: block;
    margin: 1rem 1rem;
  }

  ul.responsive button:hover {
    background: var(--grey1);
  }

  nav ul.responsive li a {
    color: var(--black-off);
  }

  nav ul.responsive li a:hover {
    color: var(--grey4);
    background-color: var(--grey1);
    border-radius: 5px;
    width: 100vw;
  }

  .cardProject {
    flex-direction: column;
    width: 100%;
  }

  .cardText {
    flex: 1;
  }

  .cardImg {
    margin: 0 0 10px 0;
    padding: 15px;
  }

  .myInfo {
    padding: 20px;
  }

  .socials {
    flex-direction: column;
  }

  .socialBtn {
    margin-bottom: 30px;
  }

  #footer-flex {
    flex-direction: column;
  }

  .divider {
    display: none;
  }

  input {
    width: 250px;
  }
}