html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(25deg, rgba(136,90,198,0.1) 0%, rgba(0,232,255,0.15) 35%, rgba(71,197,81,0.1) 70%, rgba(29,70,141,0.15) 100%);
  background-repeat: no-repeat;
}

h1, h2, h3, h4, h5, h6 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;;
  padding: 0;
  margin: 0;
}

h1, h2, h3 {
  margin: 0.5em 0;
  color: #242424;
  font-weight: bold;
}

h1 {
  font-size: 3.5em;
  font-weight: 600;
}

h2 {
  font-size: 2.5em;
}

h3 {
  font-size: 1.5em;
}

h5 {
  font-size: 1.3em;
}

h6 {
  font-size: 1em;
  font-style: normal;
  font-weight: bolder;
}

h5, h6 {
  color: #333333;
}

p, i, a {
  font-family: 'Nunito', sans-serif;
  color: #333333;
}

small {
  font-size: 1.6em;
  font-style: normal;
  color: #333333; /* 575757 */
  font-family: 'Courier New', Courier, monospace;
}

a {
  text-decoration: none;
  transition: color 0.1s ease;
  font-family: 'Nunito', sans-serif;
}

a:hover {
  color: #000000;
}

i {
  color: #575757;
  font-style: italic;
}

ul {
  margin: 0;
  padding: 0;
}

section {
  padding-top: 1px;
  padding-bottom: 50px;
  border-radius: 2em;
  margin: 5% 10px;
}

.section-bg {
  background: linear-gradient(75deg, rgba(98,98,98,0.1), rgba(66,66,66,0.1));;
}

.space-above {
  margin-top: 3.5em;
}

.box {
  list-style: none;
  background-color: rgba(233, 233, 233, 0.8);
  border-radius: 1.5em;
  padding: 1em;
  margin: 2%;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.rectangle-box {
  margin: 0 5% 2em 5%;
  width: inherit;
  display: flex;
  justify-content: left;
  align-items: center;
}

.rectangle-box-text {
  display: inline-block;
  width: 76%;
}

.rectangle-box-text > h5 {
  text-align: left;
}

.logo {
  display: inline-block;
  vertical-align: 50%;
  width: 6em;
  height: auto;
  border-radius: 1em;
  box-shadow: 1px 1px 3px #111111;
  margin-right: 1em;
}

#scroll-back-button {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  font-size: 35px;
  border: none;
  background-color: transparent;
  color: #575757;
  cursor: pointer;
  transition: color 0.2s ease;
}

#scroll-back-button:hover {
  color: black;
}

.box-img {
  border-radius: 1em;
  border: 2px solid;
  border-color: #e9e9e9;
  box-shadow: 1px 1px 3px #111111;
  transition: border-color 0.2s ease;
}

.box-img:hover {
  border-color: #111111;
}

.annotation {
  width: 80%;
  margin: 0 auto 20px auto;
  text-align: center;
}



/* Navigation bar */

#navbar {
  list-style: none;
  margin: 3% 0 3% 0;
  padding: 0;
  overflow: hidden;
  background-color: #333333;
  border-radius: 2em;
}

.nav-button {
  float: left;
  cursor: pointer;
}

.contact-button {
  float: right;
}

.nav-button > a {
  display: block;
  color: white;
  text-align: center;
  padding: 0.8em 2em;
  transition: background-color 0.3s ease;
  border-radius: 2em;
  font-family: 'Nunito', sans-serif;
  font-size: 1em;
  font-weight: 500;
}

.nav-button > a:hover {
  background-color: #111111;
}

.nav-icon {
  color: white;
  font-weight: 100 !important;
}



/* Header section*/

.line {
  background-color: #757575;
  margin: 15px;
  width: 115px;
  height: 2px;
}
.header-box {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 35em;
  margin: auto;
}



/* PROJECTS */

.projects-list {
  display: grid;
  margin: auto;
  width: fit-content;
  text-align: center;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  grid-gap: 1em;
}

.project-text {
  text-align: center;
}

.static {
  position: absolute;
  background: white;
}

.active-on-hover:hover .static{
  opacity: 0;
}

.active-on-hover:hover .active{
  border-color: #111111;
}



/* Personal Projects section */

.perso-project-box {
  margin-bottom: 1em;
  width: 30em;
  display: inline-block;
}

.perso-project-size {
  height: 12em;
  width: auto;
}

#roadbook-box {
  grid-column: 1;
  grid-row: 1 / span 2;
}


/* University Projects section */

.uni-project-box {
  margin-bottom: 1em;
  width: 22em;
  display: inline-block;
}

.uni-project-size {
   height: 10em;
   width: auto;
}

.no-link:hover {
  border-color: #e9e9e9;
}



/* Education section */

.credentials {
  float: right;
}

.from-ucl {
  font-weight: normal;
  font-family: 'Nunito', sans-serif;
}



/* Footer section */

#footer {
  text-align: center;
}

#contact-section {
  box-shadow: none;
}

#email {
  font-family:Arial, Helvetica, sans-serif;
  color: #004fb0;
  transition: color 0.1s ease;
}

#email:hover {
  color: #000000;
}

#email-icon {
  font-size: 2em;
}

#footer-links {
  margin-top: 20px;
  list-style: none;
  padding: 0;
}

#footer-links > li {
  display: inline;
  margin: 0 4%;
  font-size: 2.5em;
  transition: color 0.1s ease;
}

#footer-links > li > a {
  color: #474747;
  transition: color 0.1s ease;
}

#footer-links > li > a:hover {
  color: #000000;
}

#footer-code {
  margin-top: 50px;
  display: block;
  font-style: normal;
  color: #242424;
  font-family: 'Courier New', Courier, monospace;
}

#github-link {
  border-bottom: 1px dotted #242424;;
  font-family: 'Courier New', Courier, monospace;
}



/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  padding-top: 7vh;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  margin: auto;
  width: 80%;
  -webkit-animation-name: animatetop;
  -webkit-animation-duration: 0.4s;
  animation-name: animatetop;
  animation-duration: 0.4s
}

@-webkit-keyframes animatetop {
  from {top:-300px; opacity:0} 
  to {top:0; opacity:1}
}

@keyframes animatetop {
  from {top:-300px; opacity:0}
  to {top:0; opacity:1}
}

#resume-pdf {
  border-radius: 1em;
  height: 80vh;
  box-shadow: 0 6px 10px 0 rgba(0,0,0,0.2),0 10px 24px 0 rgba(0,0,0,0.19);
}



/* Responsive design */

@media (max-width: 1250px) {
  #scroll-back-button {
    bottom: 15px;
    right: 10px;
  }
}

@media (min-width: 1152px) {
  body {
    max-width: 1152px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 1130px) {
  .roadbook-box {
    grid-row: 1;
  }
  .perso-projects-list {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
}

@media (max-width: 880px) {
  .uni-projects-list {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
}

@media (max-width: 740px) {
  .edu-text {
    width: 100%;
  }
  #scroll-back-button {
    bottom: 10px;
    right: 2px;
  }
  .nav-icon {
    color: red;
    display: none !important;
  }
  .nav-button > a {
    padding: 0.8em 1.5em;
  }
}

@media (max-width: 600px) {
  .nav-button > a {
    padding: 0.8em 1em;
  }
  .perso-project-box {
    width: inherit;
    margin: 0 5% 2em 5%;
  }
  .header-box {
    width: 100%;
  }
  small {
    font-size: 1.4em;
  }
  .line {
    width: 90px;
  }
}

@media (max-width: 475px) {
  .nav-button > a {
    padding: 0.9em 0.75em;
  }
  .perso-project-preview {
    height: 10em;
  }
  small {
    font-size: 1.25em;
  }
  .line {
    width: 70px;
  }
    #scroll-back-button {
    bottom: 10px;
    right: 10px;
    font-size: 25px;
  }
}

@media (max-width: 400px) {
  .nav-button > a {
    padding: 0.9em 0.5em;
  }
  .edu-box {
    flex-direction: column;
  }
  .credentials {
    float: left;
    display: block;
  }
  .perso-project-preview {
    height: 8em;
  }
  small {
    font-size: 1.1em;
  }
  .line {
    width: 40px;
  }
}