@font-face {
  font-family: 'Azonix';
  src: url('/fonts/Azonix.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --primary-background-color: hsl(203, 26%, 13%);
  --secondary-background-color: #25323d;
  --header-background-color: #24303b;

  --primary-button-border-color: #1479EA;

  --primary-input-background-color: #20283a;

  --primary-border-radius: 0.5em;

  --primary-h2-font-size: 3.5em;
  --primary-h3-font-size: 2.5em;
  --primary-h4-font-size: 1.5em;
  --primary-p-font-size: 1em;
  --primary-footer-font-size: 4em;

  --font-family: 'Azonix', sans-serif;
  --font-size: 16px;
  --line-height: 1.5;
}

body {
  background-color: var(--primary-background-color);
  color: white;
  font-family: var(--font-family);
  font-size: var(--font-size);
  line-height: var(--line-height);
  margin: 0;
  padding: 7% 2% 0%;

  overflow-x: hidden;
  scroll-behavior: smooth;

  font: var(--font-size) var(--font-family);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}


/* Main Navigation */
  header {
    width: 100%;
    height: fit-content;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--primary-background-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 20px 20px var(--primary-background-color);
  }

  nav {
    width: 60%;
    margin: 0px auto 40px auto;
    padding: 1% 0px;

    /* flex styles */
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    flex-direction: row;
  }

  /* From Uiverse.io by Navarog21 */ 
    nav > a {
      width: 5em;
      position: relative;
      height: 1.5em;
      border: 4px ridge var(--);
      color: white;
      transition: 1s;
      border-radius: 0.5em;
      border: var(--primary-button-border-color) solid 2px;
      justify-content: center;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;


      /* Adjusts text */
      display: flex;
      justify-content: center;
      align-items: center;
      text-decoration: none;
      font: 300 1.2em 'Arial', sans-serif;
    }

    nav > a::after {
      content: "";
      transform-origin: center;
      position: absolute;
      top: -6px;
      left: 3%;
      width: 95%;
      height: 40%;
      background-color: var(--primary-background-color);
      transition: 0.5s;
    }
    
    nav > a::before {
      content: "";
      transform-origin: center;
      position: absolute;
      top: 80%;
      left: 3%;
      width: 95%;
      height: 40%;
      background-color: var(--primary-background-color);
      transition: 0.5s;
    }


    nav > a:hover::before, a:hover::after {
      transform: scale(0)
    }

    nav > a:hover {
      box-shadow: inset 0px 0px 25px #1479EA;
    }


/* Section core styling */
  /* Keyframe animations for sections */
    @keyframes slideInRight {
      from {
        transform: translateX(-200%);
      }
      to {
        transform: translateX(0);
      }
    }
    
    @keyframes slideInLeft {
      from {
        transform: translateX(200%);
      }
      to {
        transform: translateX(0);
      }
    }

    @keyframes slideInUp {
      from {
        transform: translateY(200%);
      }
      to {
        transform: translateY(0);
      }
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
      
    }
    
  section {
    margin: 20px 0px;
    padding: 20px;
    /* background-color: var(--secondary-background-color); */
    /* border: 2px ridge var(--primary-button-border-color); */
    /* border-radius: var(--primary-border-radius); */
    height: fit-content;
  }


/* Home Section Styling */
  #home > a {
    background-color: var(--secondary-background-color);
    color: white;
    border: 2px solid var(--primary-button-border-color);
    border-radius: var(--primary-border-radius);
    padding: 0.2em 1em;
    text-decoration: none;

    width: fit-content;
    height: fit-content + 0.1em;
    position: relative;
    transition: 1s;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
  }

  #home > a:hover {
    box-shadow: inset 0px 0px 25px #1479EA;
  }

  #home > h2 {
    font-size: var(--primary-h2-font-size);
    font-weight: bold;
    margin-top: 0%;
    margin-bottom: 0.5em;
    left: 5%;
    opacity: 0;

    position: relative;

    animation: slideInRight 1.6s ease-out 0s, fadeIn 4s ease-out 1s forwards;
  }

  #home > p {
    font-size: var(--primary-p-font-size);
    margin-top: 0.5em;
    left: 5%;
    position: relative;
    width: 60%;
    opacity: 0;

    animation: slideInUp 1.4s ease-out 1s, fadeIn 4s ease-out 1s forwards;
  }

  #home > a {
    position: relative;
    left: 5%;
    opacity: 0;

    animation: fadeIn 4s ease-out 1.5s forwards;
  }

/* About Me Styling */
  #about {
    margin-top: 5%;
    opacity: 0;
    animation: fadeIn 4s ease-out 2s forwards;
  }

  #about > section {
    flex: 1;
    min-width: 250px;
    padding: 16px;
    box-sizing: border-box;
  }

  #about p {
    font-size: var(--primary-p-font-size);
  }

  h3 {
    font-size: var(--primary-h3-font-size);
    text-align: center;
    margin-top: 0%;
  }

  #aboutContainer > p {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10%;
    margin: 0%;
    width: fit-content;
  }

  #aboutContainer {
    padding-top: 3%;
    width: 60%;
    height: 35vh;
  }

  #aboutContainer, #skillsContainer {
    background-color: var(--secondary-background-color);
    border: var(--secondary-background-color) solid 2px;
    border-radius: var(--primary-border-radius);
    box-shadow: inset 0px 0px 5px 5px var(--primary-background-color);
    margin: auto;
    text-align: center;
  }

/* Skills Section Styling */
  #skills {
    opacity: 0;
    animation: fadeIn 4s ease-out 2s forwards;
  }

  #skillsContainer {
    padding-top: 3%;
    width: 70%;
    height: 35vh;
  }

  #infiniteScrollContainer {
    display: flex;
    overflow-x: auto;
    height: 25vh;
    margin: auto;
  }

  #infiniteScrollContainer::-webkit-scrollbar {
    display: none;
  }

  .infiniteScroll img {
    width: 6em;
    height: 6em;
    border-radius: 1em;
    margin-bottom: 1%;
    object-fit: contain;
    display: block;
  }

  /* Skills Infinite Scroll */
  .infiniteScroll {
    display: flex;
    justify-content: center;
    gap: 0 1em;
    padding-right: 1em;
    animation: spin 20s linear infinite;
  }

  .skillBubble {
    flex: 0 0 5em;
    height: 5em;
    font-size: .6em;
    border-radius: .2em;
    text-align: center;
    align-content: center;
  }

  @keyframes spin{
    from {
      translate: 0;
    }
    to {
      translate: -100%;
    }
  }

/* Projects Section Styling */
  /* Keyframes for projectTiles */
    @keyframes revealContentBackground {
      from {
        opacity: 0;
        content: "";
        width: 100%;
        height: 100%;
        position: absolute;
        
      }
      to {
        opacity: 0.8;
        content: "";
        width: 100%;
        height: 100%;
        position: absolute;
        background-color: var(--primary-background-color);
      }
    }

    @keyframes hoverRevealContent{
      from {
        opacity: 0;
        transform: translate(-50%, 40%);
      }
      to {
        opacity: 0.8;
        transform: translate(-50%, 0%);;
      }
    }

  #projects {
    opacity: 0;
    animation: fadeIn 4s ease-out 2s forwards;
  }

  #projectsContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    opacity: 0;

    animation: fadeIn 4s ease-out 2s forwards;
  }

  .projectTile {
    background-color: var(--secondary-background-color);
    border: var(--secondary-background-color) solid 2px;
    border-radius: var(--primary-border-radius);
    box-shadow: inset 0px 0px 5px 5px var(--primary-background-color);
    padding: 16px;
    width: 300px;
    height: fit-content;
    position: relative;
    transition: transform 0.3s ease;
  }

  .projectTile > img {
    width: 100%;
    height: 100%;
    border-radius: var(--primary-border-radius);
  }

  .projectTile:hover {
    transform: scale(1.05);
    box-shadow: inset 0px 0px 25px #1479EA;
  }
  .projectTile {
    background-color: var(--secondary-background-color);
    border: var(--secondary-background-color) solid 2px;
    border-radius: var(--primary-border-radius);
    box-shadow: inset 0px 0px 5px 5px var(--primary-background-color);
    padding: 1%;
    width: 25%;
    height: fit-content;
    position: relative;
    transition: transform 0.3s ease;
    overflow: hidden;
  }
  
  .projectTile > img {
    width: 100%;
    height: 100%;
    border-radius: var(--primary-border-radius);
    display: block;
  }
  
  .projectContent {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    justify-content: center;
    color: white;
  }

  .projectContent h4 {
    font-size: var(--primary-h4-font-size);
    margin: 0;
    margin-bottom: 0.5em;
  }

  .projectContent p {
    font-size: var(--primary-p-font-size);
    margin: 0;
  }
  
  .projectTile:hover > .projectContent {
    display: block;
    
    animation: revealContentBackground 1s ease forwards, hoverRevealContent 0.8s ease forwards;
  }

  .projectContent {
    display: none;
  }


/* Contact Section Styling */
  #contact {
    opacity: 0;
    animation: fadeIn 4s ease-out 2s forwards;
  }

  form {
    background-color: var(--secondary-background-color);
    border: var(--secondary-background-color) solid 2px;
    border-radius: var(--primary-border-radius);
    box-shadow: inset 0px 0px 5px 5px var(--primary-background-color);
    width: 80%;
    height: fit-content;
    padding: 3% 5%;
    margin: auto;
  }

  form > h3 {
    font-size: var(--primary-h3-font-size);
    text-align: center;
  }

  #contactHead {
    display: flex;
    flex-direction: row;
    gap: 2%;
    justify-content: center;
    align-items: center;
    margin-bottom: 1%;
    width: 100%;
  }

  #contactHead > input {
    width: 30%;
  }

  #contactBody {
    display: flex;
    flex-direction: row;
    gap: 2%;
    justify-content: center;
    align-items: center;
  }

  #bodyContainer {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 80%;
  }

  #bodyContainer input[type="email"],
  #bodyContainer textarea {
    margin-bottom: 2%;
    width: 90%;
  }

  #captchaInputContainer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2%;
  }

  #captchaInputContainer > #captchaSubmit {
    appearance: none;
    background-color: var(--primary-input-background-color);
    border: 2px solid;
    border-radius: var(--primary-border-radius);
    padding: 0.5em 1em;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    width: 30px;
    height: 30px;
  }

  #captchaInputContainer > #captchaSubmit:hover {
    background-color: white;
  }

  #captchaInputContainer > #captchaSubmit:checked {
    background-color: green;
  }

  #captchaInputContainer > #captchaInput {
    width: 100%;
  }

  #submitButton {
    color: white;
    appearance: none;
    background-color: var(--primary-input-background-color);
    border: 2px solid black;
    border-radius: var(--primary-border-radius);
    padding: 0.5em 1em;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;

    width: 100%;
  }


  /* Form Input Styling */
    form input[type=text],
    form input[type=email],
    form textarea {
      background-color: var(--primary-input-background-color);
      color: azure;
      border: solid 2px black;
      border-radius: var(--primary-border-radius);
      padding: 0.5em;
    }

    form input[type=text]:focus,
    form input[type=email]:focus,
    form textarea:focus {
      outline: none;
      border: var(--primary-button-border-color) solid 2px;
    }

    form textarea {
      min-height: 12vh;
      max-height: 30vh;
    }


/* Footer Section */
  footer {
    width: 100%;
    height: 20vh;
    position: relative;
    bottom: 0;
    left: 0;
    margin-top: 10%;
    background-color: var(--primary-background-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #footerUrl {
    color: white;
    font-size: var(--primary-footer-font-size);
    font-weight: bold;
    text-align: center;
    opacity: 0.2;
    z-index: 2;

    position: absolute;
    bottom: 8%;
  }

  #footerUrl > p {
    margin: 0%;
  }

  #copyRight {
    color: white;
    font-size: 0.6em;
    font-weight: bold;
    text-align: center;

    position: absolute;
    z-index: 1;

    bottom: 0%;
    left: 0%;
  }


/* ################################### */
/* ########## Media Queries ########## */
/* ################################### */

@media (max-width: 1100px) {
  /* Height for the About & Skills sections */
    #aboutContainer, #skillsContainer {
      height: 30vh;
    }

  /* Keyframe Animation for the projectTile content */
    @keyframes hoverRevealContent{
      from {
        opacity: 0;
        transform: translate(-50%, 40%);
      }
      to {
        opacity: 0.8;
        transform: translate(-50%, -20%);;
      }
    }
}

@media (max-width: 835px) {
  /* Variable values */
  :root {
    --primary-h2-font-size: 2.5em;
    --primary-h3-font-size: 2em;
    --primary-p-font-size: 0.9em;
    --primary-footer-font-size: 3em;
  }

  #home {
    margin-top: 8%;
  }

  #aboutMeAndSkills {
    gap: 0%;
    padding: 0%;
  }

  #aboutMeAndSkills > section {
    padding: 0%;
  }
}

@media (max-width: 620px) {
  /* Variable values */
  :root {
    --primary-h2-font-size: 2em;
    --primary-h3-font-size: 1.5em;
    --primary-h4-font-size: 1.2em;
    --primary-p-font-size: 0.8em;
    --primary-footer-font-size: 2em;
  }

  #home {
    margin-top: 14%;
  }

  /* Project Section */
  .projectTile {
    width: 35%;
  }

  /* Contact Section */
  #contactHead {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3em;
  }

  #contactHead > input {
    width: 95%;
  }

  #bodyContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  #footerUrl {
    bottom: 16%;
  }
}

@media (max-width: 500px) {
  /* Variable values */
  :root {
    --primary-h2-font-size: 1.5em;
    --primary-h3-font-size: 1.2em;
    --primary-h4-font-size: 1em;
    --primary-p-font-size: 0.8em;
    --primary-footer-font-size: 1.5em;
  }

  #home {
    margin-top: 28%;
  }

  /* About & Skills Section */
  #aboutMeAndSkills {
    display: flex;
    flex-direction: column;
  }

  #aboutMeAndSkills section {
    width: 90%;
    margin: auto;
  }

  #about p {
    font-size: var(--primary-p-font-size);
  }

  /* Contact Section */
  #contactBody {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  #bodyContainer input[type="email"],
  #bodyContainer textarea {
    width: 95%;
  }

  #contactBody > #bodyContainer, #captchaContainer {
    width: 100%;
  }
}

@media (max-width: 335px) {
  
  #home {
    margin-top: 58%;
  }
}