/*********************************************************************
 *    FONTS       
**********************************************************************/

/* Libre Barcode 39 */
@font-face {
  font-family: 'Libre Barcode 39 Text';
  src: url('../fonts/LibreBarcode39Text/LibreBarcode39Text-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Lato Black */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
}

/* Lato Black Italic */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-BlackItalic.ttf') format('truetype');
  font-weight: 900;
  font-style: italic;
}

/* Lato Bold */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

/* Lato Bold Italic */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
}

/* Lato Italic */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

/* Lato Light */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

/* Lato Light Italic */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
}

/* Lato Regular */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Lato Thin */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
}

/* Lato Thin Italic */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-ThinItalic.ttf') format('truetype');
  font-weight: 100;
  font-style: italic;
}

/*********************************************************************
 *    GENERAL STUFF       
**********************************************************************/

/* Colors: Light & Dark mode */
:root {
  /* color definitions: light */
  --light-background-color: #ffffff;
  --light-text-color: #000000;
  --light-text-color-secondary: #999999;
  --light-link-hover-color: #4CAF50;
  --light-navbar-background-color: #ffffff;
  --light-navbar-hover-text-color: #000000;
  --light-navbar-hover-background-color: #cccccc;
  --light-navbar-button-hover-text-color: #ffffff;
  --light-navbar-button-hover-background-color: #000000;
  --light-content-box-border-color: #cccccc;
  --light-content-box-videogames-background-color: #cccccc;
  --light-section__header-border-width: 0;
  --light-section__header-border-color: #ffffff;
  

  /* color definitions: dark */
  --dark-background-color: #272727;
  --dark-text-color: #dddddd;
  --dark-text-color-secondary: #999999;
  --dark-link-hover-color: #4CAF50;
  --dark-navbar-background-color: #000000;
  --dark-navbar-hover-text-color: #000000;
  --dark-navbar-hover-background-color: #cccccc;
  --dark-navbar-button-hover-text-color: #000000;
  --dark-navbar-button-hover-background-color: #ffffff;
  --dark-content-box-border-color: #cccccc;
  --dark-content-box-videogames-background-color: #555555;
  --dark-section__header-border-width: 1px;
  --dark-section__header-border-color: #555555;


  /* variables used in the css: default to light mode */
  --background-color: var(--light-background-color);
  --text-color: var(--light-text-color);
  --text-color-secondary: var(--light-text-color-secondary);
  --link-hover-color: var(--light-link-hover-color);
  --navbar-background-color: var(--light-navbar-background-color);
  --navbar-hover-text-color: var(--light-navbar-hover-text-color);
  --navbar-hover-background-color: var(--light-navbar-hover-background-color);
  --navbar-button-hover-text-color: var(--light-navbar-button-hover-text-color);
  --navbar-button-hover-background-color: var(--light-navbar-button-hover-background-color);
  --content-box-border-color: var(--light-content-box-border-color);
  --content-box-videogames-background-color: var(--light-content-box-videogames-background-color);
  --section__header-border-width: var(--light-section__header-border-width);
  --section__header-border-color: var(--light-section__header-border-color);

  /* note: footer has its own invariable colorscheme */
}

.darkmode-theme {
  --background-color: var(--dark-background-color);
  --text-color: var(--dark-text-color);
  --text-color-secondary: var(--dark-text-color-secondary);
  --link-hover-color: var(--dark-link-hover-color);
  --navbar-background-color: var(--dark-navbar-background-color);
  --navbar-hover-text-color: var(--dark-navbar-hover-text-color);
  --navbar-hover-background-color: var(--dark-navbar-hover-background-color);
  --navbar-button-hover-text-color: var(--dark-navbar-button-hover-text-color);
  --navbar-button-hover-background-color: var(--dark-navbar-button-hover-background-color);
  --content-box-border-color: var(--dark-content-box-border-color);
  --content-box-videogames-background-color: var(--dark-content-box-videogames-background-color);
  --section__header-border-width: var(--dark-section__header-border-width);
  --section__header-border-color: var(--dark-section__header-border-color);
}


/* General formatting */
html, body {
  box-sizing: border-box;
  height: 100%;
  width: 100%; 
  margin: 0; 
  padding: 0;
  color: var(--text-color);
  background-color: var(--background-color);
  font-family: "Lato", sans-serif;
  font-size: 1em;
  line-height: 1.8;
  scroll-snap-type: both proximity;
  z-index: 0;
}


/* Links */
a {
  color: var(--text-color);
  text-decoration: underline;
}

a:hover {
  cursor: pointer;
  text-decoration: underline; 
  color: var(--link-hover-color); 
}


/*********************************************************************
 *    NAVBAR       
**********************************************************************/
.navbar {
  position: fixed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 2.7em;
  margin: 0;
  padding: 0;
  opacity: 1;
  box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),
              0 2px 10px 0 rgba(0,0,0,0.12);
  z-index: 2;
  }


/* Make navbar opaque when scrolled (with an animation) */
.navbar--scrolled {
  background-color: var(--navbar-background-color);
  animation: slideIn 0.4s;
}
@keyframes slideIn {
  from {
      top: -300px;
      opacity: 0
  }
  to {
      top: 0;
      opacity: 1
  }
}


/* Navbar elements */
.navbar__group {
  display: flex;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  height: 2.7em;
  overflow: hidden;
  align-items: center;
}
.navbar__group-left {
  justify-content: flex-start;
}
.navbar__group-right {
  justify-content: flex-end;
}
.navbar__link {
  box-sizing: border-box;
  padding: 0.5em 1.0em;
  height: 2.7em;
  vertical-align: middle;
  text-align: left;
  overflow: hidden;
  text-decoration: none;
}
.navbar__link:hover {
    color: var(--navbar-hover-text-color);
    background-color: var(--navbar-hover-background-color);
    text-decoration: none;
}


/* navbar buttons */
.navbar__button {
  display: inline-block;
  box-sizing: border-box;
  padding: 0.5em 0.4em;
  height: 2.7em;
  font-size: 1.1em;
  vertical-align: middle;
  text-align: center;
  overflow: hidden;
  text-decoration: none;
}
.navbar__button:hover {
  color: var(--navbar-button-hover-text-color);
  background-color: var(--navbar-button-hover-background-color);
  text-decoration: none;
}
.navbar__button--hide {
  display: none;
}


/* large screens */
@media (min-width: 841px){
  .navbar-large {
    display: flex;
  }
  .navbar-small {
    display: none;
  }
  .navbar__button--hide-on-large {
    display: none;
  }
}


/* small screens */
@media (max-width: 840px) {
  .navbar-large {
    display: none;
  }
  .navbar-small {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--navbar-background-color);
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),
                0 2px 10px 0 rgba(0,0,0,0.12);
    width: 100%;
    padding: 0;
    z-index: 1;
  }
  .navbar__button--hide-on-large {
    display: inline-block;
  }
}
.navbar--fill-background{
  background-color: var(--navbar-background-color);
}
.navbar-small--hide {
  display: none;
}


/*********************************************************************
 *    SECTION HEADERS & PARALLAX IMAGES        
**********************************************************************/

.section {
  position: relative;
  margin-bottom: 2em;
  scroll-snap-align: start;
  min-height: 100vh;
}

.section__header-block { 
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 400px;   
  position: relative;
  border-top: var(--section__header-border-width) solid var(--section__header-border-color);
  border-bottom: var(--section__header-border-width) solid var(--section__header-border-color);
}

.section__header-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  width: auto;
  text-align: center;
}

.section__header-title, 
.section__header-subtitle {
  font-size: 1.4em;
  letter-spacing: 0.4em;
  line-height: 2.3em;
  padding: 0.5em 0.0em;
  /* colors are fixed, the title is basically a "text picture" */
  color: #ffffff; 
  background-color: #000000;
  /* Lato font kerning bug fix*/
    border: 0.1em solid #000000;  
    outline-offset: -1px;
    outline: 0.3em solid #000000;
}

/* Background pictures */
.section__header-block--home {
  background-image: url('../pic/parallax/home.webp');
}
.section__header-block--management {
  background-image: 
    linear-gradient(to bottom, rgba(200,200, 200, .35), rgba(200,200, 200, .35)), 
    url("../pic/parallax/management.webp");
}
.section__header-block--videogames {
  background-image: 
    linear-gradient(to bottom, rgba(200,200, 200, .35), rgba(200,200, 200, .35)),
    url("../pic/parallax/videogames.webp");
}
.section__header-block--code {
  background-image: 
    linear-gradient(to bottom, rgba(200,200, 200, .35), rgba(200,200, 200, .35)),
    url("../pic/parallax/code.webp");
}
.section__header-block--play {
  background-image: 
    linear-gradient(to bottom, rgba(200,200, 200, .35), rgba(200,200, 200, .35)),
    url("../pic/parallax/gravitywell.webp");
}
.section__header-block--contact {
  background-image: 
    linear-gradient(to bottom, rgba(200,200, 200, .35), rgba(200,200, 200, .35)),
    url("../pic/parallax/contact.webp");
}


/* For phones: Turn off parallax scrolling and have smaller background pictures */
@media only screen and (max-device-width: 870px)  {
  .section__header-block {
    background-attachment: scroll;
    min-height: 300px;
    height: 300px;
  }
  .section__header-block--home {
    background-image: url('../pic/parallax/home_mobile.webp');
  }
  .section__header-block--management {
    background-image: url("../pic/parallax/management_mobile.webp");
  }
  .section__header-block--videogames {
    background-image: url("../pic/parallax/videogames_mobile.webp");
  }
  .section__header-block--code {
    background-image: url("../pic/parallax/code_mobile.webp");
  }
  .section__header-block--play {
    background-image: url("../pic/parallax/gravitywell_mobile.webp");
  }
  .section__header-block--contact {
    background-image: url("../pic/parallax/contact_mobile.webp");
  }
}


/*********************************************************************
 *    SITE LOGO        
**********************************************************************/
.section--home {
  min-height: 100vh;
}

.section__header-block--home{
  height: 60vh;
  min-height: 60vh;
  position: relative;
  opacity: 0.75;
  border-top: none;
}

.section__header-text--home {
  position: absolute;
  top: 70%;
  left: 10%;
  transform: translate(-10%, -10%);
  text-align: left;
}

.section__header-title--home {
  padding: 0.3em 0.3em;
  outline: 1px solid #000000;
  font-family: "Libre Barcode 39 Text", system-ui;
  font-size: 5vmin;
  letter-spacing: 0.3em;
  white-space: nowrap;
}
@media (max-width: 800px) {
  .section__header-title--home {
    font-size: 2.3em;
  }
}

.section__header-subtitle--home {
  padding: 0.3em 0.3em;
  outline: 1px solid #000000;
  font-size: 1.8vmin;
  white-space: nowrap;
}
@media (max-width: 800px) {
  .section__header-subtitle--home {
    font-size: 0.8em;
    white-space: wrap;
  }
}


/*********************************************************************
 *    SECTION         
**********************************************************************/

/* Lists */
.section ul {
  list-style-type: none;
  padding: 1em 1em ;
  margin: 0 0 0 0.5em;
}
.section ul li {
  padding: 0.2em 0.3em 0.5em 3.0em;
  margin: 0 0 0 0.5em;
}
.section ul a {
  text-decoration: none;
}
.section ul i {
  font-size: 2em;
  vertical-align: bottom;
  padding: 0;
  margin: 0 0 0 -1.5em;
}



/* Intro */
.section__intro {
  padding: 1em 1em;
  margin: auto;
  max-width: 80em;
}
.section__intro-title {
  font-size: 1.5em;
  text-align: center;
}
.section__intro img {
  text-align: center;
  margin: 1em 3em;
  max-width: 100%;
}

/* content-block */
.section__content-block {
  padding: 1em 1em;
  margin: auto;
  max-width: 80em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22em, 1fr));
  gap: 1.4em;  
}

/* content boxes */
.section__content-box {
  border: 1px solid var(--content-box-border-color);
  padding: 1em; 
}
.section__content-title {
  font-size: 1.1em;
  text-align: center;
}
.section__content-subtitle {
  color: var(--text-color-secondary);
  letter-spacing: 0.2em;
  font-size: 1em;
  text-align: center;
}



/*********************************************************************
 *    VIDEO GAMES       
**********************************************************************/
.section__content-box--videogames {
  border: none;
  background-color: var(--content-box-videogames-background-color);
}

.videogame-cheatsheet-title {
  text-align: left;
  padding: 0;
  margin:0;
}
.videogame-cheatsheet-process{
  font-size: 1.1em;
  text-align: left;
  color: var(--text-color-secondary);
  padding: 0;
  margin:0;
  line-height: 1em;
}
.videogame-cheatsheet-thumbnail {
  display: block;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--content-box-border-color);
  width: 100%;
}



/*********************************************************************
 *    MODAL         
**********************************************************************/
.modal {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  color: var(--text-color);
  background-color: var(--background-color);
  z-index: 3;
}

.modal--hide {
  display: none;
}

.modal__content{
  text-align: center;
  vertical-align: middle;
  margin: auto;
}

.modal__content img{
  height: 100vh;
  width: 100vw;
  object-fit: contain;
  object-position: top;
  border: 1px solid var(--content-box-border-color);
}
 
.modal__closebutton {
  position: fixed;
  right: 0px;
  box-sizing: border-box;
  padding: 0 0.4em;
  height: 2.0em;
  font-size: 1.3em;
  vertical-align: middle;
  text-align: center;
  text-decoration: none;
  color: var(--text-color);
  border: 1px solid var(--light-content-box-border-color);
  background-color: var(--light-navbar-background-color);
  opacity: 0.75;
  box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),
              0 2px 10px 0 rgba(0,0,0,0.12);
}
.modal__closebutton:hover {
  color: var(--light-navbar-button-hover-text-color);
  background-color: var(--light-navbar-button-hover-background-color);
  text-decoration: none;
  opacity: 1;
}

/*********************************************************************
 *    PLAY GRAVITYWELL       
**********************************************************************/

/* "Play GravityWell" rocket animation  */
@keyframes rocketAnimation {
    0% {
        transform: rotate(0deg);
    }
    15% {
        transform: rotate(-45deg) translate(0) translateY(0);
    }
    20% {
        transform: rotate(-50deg) translateX(-1px) translateY(1px);
    }
    30% {
        transform: rotate(-40deg) translateX(1px) translateY(-1px);
    }
    37% {
        transform: rotate(-50deg) translateX(1px) translateY(1px);
    }
    45% {
        transform: rotate(-42deg) translateX(-1px) translateY(1px);
    }
    55% {
        transform: rotate(-47deg) translateX(1px) translateY(-1px);
        color: red;
    }
    65% {
        transform: rotate(-45deg) translate(0) translateY(0);
        color: red;

    }
    70% {
        transform: rotate(-45deg) translateX(0);
        color: red;
    }
    100% {
        transform: rotate(-45deg) translateX(150vh) translateY(-150vh);
        color: red;
    }
}
.section--play a:hover .fa-rocket {
  animation: 
  rocketAnimation 4s linear 0ms 1 none; 
}


/* "GravityWell" title animation  */
.section__header-title--play {
  position: relative;
  display: inline-block;
}
.section__header-title--play:hover {
  animation: gravitate 2s linear none;
}

@keyframes gravitate {
  0% {
      transform: rotate(0deg) scale(1);
  }
  25% {
      transform: rotate(270deg) scale(.75);
  }
  50% {
    transform: rotate(540deg) scale(.25);
  }
  100% {
    transform: rotate(810deg) scale(0);
    color: #3333ff; 
}
}



/*********************************************************************
 *    ABOUT ME        
**********************************************************************/
.section__header-block--aboutme{
  box-sizing: border-box;
  height: 2.7em;
  min-height: 2.7em;
  background-color: var(--content-box-border-color);
}

.section__header-text--aboutme {
  display: none;
}

.section__content-box--profile-picture {
  text-align: center;
}

.section__content-box--qualifications li {
  border-bottom: 1px solid var(--content-box-border-color);
}
.section__content-box--qualifications li:last-child {
  border-bottom: none;
}

.section__content-box--qualifications img {
  margin: 0 0 0 -55px;
  vertical-align: middle;
}

.section__content-box--qualifications .institution {
  font-style: italic;
  color: var(--text-color-secondary);
}


/*********************************************************************
 *    CONTACT FORM         
**********************************************************************/
.section--contact {
  min-height: 100vh;
  text-align: center;
}

/* form */
.contact-form {
  box-sizing: border-box;
  max-width: 30em;
  border: 1px solid #cccccc;
  margin: auto;
  padding: 0.5em 2em;
  text-align: left;
}
.contact-form i {
  font-size: 1.5em;
  vertical-align: bottom;
  padding: 0.3em 0.1em;
}
.contact-form__field {
  width: 100%;
} 
.contact-form p{
  padding: 0;
}
.contact-form p i{
  font-size: 1em;
  vertical-align: middle;
  padding: 0.3em 0.1em;
}
.contact-form__button {
  color: #ffffff;
  background-color: #000000;
  display: block;
  margin-left: auto;
  margin-right: 0;
  border: 1px solid white;
  padding: 0.2em 1em;
}
.contact-form__button:hover {
  color: #000000;
  background-color: #cccccc;
}
.contact-form__button i {
  font-size: 1.1em;
  vertical-align: middle;
  padding: 0.3em 0.1em;
}



/*********************************************************************
 *    FOOTER        
**********************************************************************/
footer {
  background-color: #000000;
  color: #ffffff;
  text-align: center;
  box-sizing: border-box;
  padding: 2em;
}

footer a {
  color: #000000;
  background-color: #cccccc;
  box-sizing: border-box;
  padding: 1em;
  margin: 1em;
  text-decoration: none;
}

footer a:hover {
  color: #000000;
  background-color: #ffffff;
}

 footer p {
  margin: 2em;
  color: #757575;
  font-size: 0.8em;
  letter-spacing: 0.2em;
 }