@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:ital,wght@0,200..800;1,200..800&family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root{
  --base-clr: #ffffff;
  --text-clr: #201409;
  --accent-clr: #ef5508;
  --secondary-text-clr: #545454;
}  

*{
  margin: 0;
  padding: 0;
}
html{
  font-family: "atkinson hyperlegible", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5rem;
  background-color: var(--base-clr);
}

body{
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--base-clr);
  color: var(--text-clr);
  display: grid;
  grid-template-columns: auto 1fr;
  cursor: url(Icons/Cursor.png), auto;
}

a:hover, button:hover{
  cursor: url(Icons/CursorHover.png), auto;
}

body:active{
  cursor: url(Icons/CursorPress.png), auto;
}

a:active, button:active{
  cursor: url(Icons/CursorPress.png), auto;
}

a{
  color:var(--accent-clr);
}

small{
  color:var(--secondary-text-clr);
  font-size: 0.9rem
}

footer{
  text-align: center;
  padding-top: 50px;
  font-size: 0.9rem;
}

footer a{
  padding-left: 5px;
  padding-right: 5px;
}

/* Sidebar */

#sidebar{
  box-sizing: border-box;
  height: 100vh;
  width: 250px;
  padding: 5px 1em;
  background-color: var(--base-clr);
  border-right: 0px;

  position: sticky;
  top: 0;
  align-self: start;
  transition: 300ms ease-in-out;
  overflow: hidden;
  text-wrap: nowrap;
}

#sidebar ul{
  list-style: none;
}

/* Sidebar logo styling */

#sidebar > ul > li:first-child{
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
  margin-bottom: 10px;
}

#sidebar .logoimg{
  width: 70%;
  margin: auto;
}

#sidebar a, #sidebar .dropdown-btn, #sidebar .logo{
  border-radius: 1px;
  padding: 10px;
  text-decoration: none;
  color: var(--text-clr);
  display: flex;
  align-items: center;
  gap: 1em;

}

#sidebar .navimg{
  display:flex;
  margin: auto;
  width: 90%;
  height: auto;
}

/* Small socials images at bottom of nav */

#sidebar .socials{
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 5px;
  justify-items: center;
  align-items: center;
  text-align: center;
}

.socialimg{
  width: 55%;
  margin: auto;
}

/* idk why this is till called dropdown its the popup button */

.dropdown-btn{
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

/* Sidebar Animations */

#sidebar .navimg:hover, #sidebar .socialimg:hover, .close-btn:hover{
  animation: Wiggle 0.7s ease-in-out infinite;
}
#sidebar .anim-wrapper:focus, #sidebar a:focus, .close-btn:focus{
  animation: Pulse 0.4s ease;
}

/* --------------------- BODY STARTS HERE --------------------- */

main {
  padding: min(30px, 7%);
}

.mobileNav{
  display:none;
}

.mobileNavToggle{
  display: none;
}

/* Homepage masonry Grid Styling */

.grid{
  width: 100%;
  margin: auto;
}

.grid-item{
  width: 50%;
  box-sizing: border-box;
  padding: 10px;
}

.grid-item img {
  display: block;
  max-width: 100%;
  height: auto;
}

.grid-item a {
  text-decoration: none;
  color: var(--text-clr);
}

.grid-item p {
color: var(--secondary-text-clr);
}

/* Project page Masonry css */

.projectGrid{
  width: 100%;
  margin: auto;
}

.projgrid-item{
  width: 50%;
  padding: 10px;
  box-sizing: border-box;
}

.projgrid-item img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Contact & About Popups */

.popup {
  position: fixed;
  border-radius: 5px;
  top: 50%;
  left: var(--main-center-x, 50%);
  max-width: 90%;
  background-color: var(--base-clr);
  z-index: 1000;
  transform: translate(-50%, -50%);
}

.popup.popupHidden{
  display: none;
}

.popup:not(.popupHidden) {
  display: block;
  animation: slideInFromRight 0.6s cubic-bezier(0.175, 0.885, 0.30, 1.175) forwards;
}

.backdrop {
  position: fixed;
  top: 0;
  left: 250px;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0); 
  z-index: 999;
  display: block;
}

.backdrop.hidden {
  display: none;
}

/* Popup content styling */

.about{
  margin: auto;
  display: grid;
  align-items: start;
  grid-template-columns: 1fr 1fr;
  column-gap: 10px;
  padding: 20px;
}

.about img{
  width: 100%;
  margin: 5px;
}

.about h2{
  padding: 10px;
  padding-left: 0;
}

.popupNav{
  margin: auto;
  display: grid;
  align-items: center;
  grid-template-columns: 2fr 1fr;
  padding: 20px;
  padding-bottom: 0px;
}

.popupNav img{
  width: 90%;
}

.popupNav button{
  background: none;
  border: none;
  justify-self: end;
}

/* Project Page nagivation bar */

.projectNavMobile{
  display: none;
}

.projectNav{
  margin: 10px;
  margin-top: 5px;
  margin-right: 30px;
  display: grid;
  justify-items: center;
  align-items: center;
  text-align: center;
  grid-template-columns: 1fr 2fr 1fr;
}

.projectNav img {
  width: 60%;
}

.leftArrow:hover{
  animation: pulseLeft 0.7s ease-in-out infinite;
}

.rightArrow:hover{
animation: pulseRight 0.7s ease-in-out infinite;
}

.noArrow{
animation: pulseLeft 0.7s ease-in-out infinite;
}

/* Project Page content styling */

.projectPage{
  margin: auto;
  display: grid;
  justify-items: center;
  grid-template-columns: 1fr 1fr;
  column-gap: 10px;
  margin: 20px;
}

.projectPage img{
  width: 100%;
  max-width: 400px;
}


/* Animations */

@keyframes slideInFromRight {
  from {
    transform: translate(-50%, -50%) translateX(100vw);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) translateX(0);
    opacity: 1;
  }
}

@keyframes Wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}


@keyframes Pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes pulseLeft {
  0% {
      transform: translateX(0) scale(1);
      opacity: 1;
  }
  50% {
      transform: translateX(-30px) scale(1);
      opacity: 0.8;
  }
  100% {
      transform: translateX(0) scale(1);
      opacity: 1;
  }
}

@keyframes pulseRight {
  0% {
      transform: translateX(0) scale(1);
      opacity: 1;
  }
  50% {
      transform: translateX(30px) scale(1);
      opacity: 0.8;
  }
  100% {
      transform: translateX(0) scale(1);
      opacity: 1;
  }
}

@keyframes FallDown{
  0%{
    transform: translateY(-2000px);
   }
  60%{
    transform: translateY(0px);
    }
  80%{
    transform: translateY(-30px);
    }
  100%
  {
    transform: translateY(0);
    }
}

@keyframes FallUp{
  0%{
    transform: translateY(0);
    
  }
  100%{
    transform: translateY(-100vh);
  }
}

@keyframes Yoink{
  0%{
    transform: translateY(0);
  }
  50%{
    transform: translateY(40px);
  }
  100%{
    transform: translateY(0);
  }
}

@keyframes YoinkYoink{
  0%{
    transform: translateY(0);
  }
  20%{
    transform: translateY(0);
  }
  50%{
    transform: translateY(30px)
  }
  65%{
    transform: translateY(0)
  }
  85%{
    transform: translateY(30px)
  }
  100%{
    transform: translateY(0);
  }
}

/* oh baby mobile */

@media screen and (max-width: 700px) {

body{
  display: block;
}

footer{
  padding-top: 30px
}

#sidebar{
  display: none;
}

#sidebar.mobile.closing {
  animation: FallUp 0.6s ease-in-out;
}

#sidebar.mobile{
  display: block;
  box-sizing: border-box;
  height: 100vh;
  width: 100vw;
  padding: 5px;
  background-color: var(--base-clr);
  z-index: 999;

  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  align-self: start;
  transition: 300ms ease-in-out;
  animation: FallDown 1s;
}

#sidebar > ul > li:first-child{
  display: none;
}

#sidebar .navimg{
  width: 60%;
}

#sidebar .socialimg{
  width: 60%;
}

#sidebar .socials{
  padding-top: 15px;
}

/* ----- BODY ------ */

main {
  padding: min(12px, 7%);
}

.mobileNav{
  display: block;
  height: 17vh;
  padding: 5px 10px;
}

.mobileNav img{
  height: 100%;
}


.mobileNavToggle{
  display: block;
  position: fixed;
  right: 6%;
  top: -50px;
  width: 20%;
  max-width: 100px;
  min-width: 20px;
  z-index: 1000;
  background: none;
  border: none;
  animation: YoinkYoink 1.5s ease
}

.mobileNavToggle img{
  width: 100%;
}

.mobileNavToggle:hover{
  animation: Yoink 1s ease;
}

.grid-item{
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
}

.popup {
  left: 50%;
  width: 80%;
  max-height: 90%;
  overflow-x: scroll;
}

.backdrop{
  left: 0;
}


.about{
  display: block;
}

.about img{
  max-width: 100%;
  margin: auto;
  padding-top: 20px;
}

/* Project page stuff */

/* Mobile project navigation */

.projectNav{
  display:none;
}

.projectNavMobile{
  display: grid;
  margin: 10px;
  margin-top: 5px;
  justify-items: center;
  align-items: center;
  text-align: center;
  grid-template-columns: 25% 25% 25%;
}

.projectNavMobile img {
  width: 60%;
}

/* Mobile project page */

.projectPage{
  display: block;
  margin: 10px;
  margin-bottom: 0px;
}

.projectPage img{
  margin-top: 20px;
  max-width: none;
}

.projectPage h3{
  margin: 20px;
  margin-top: 30px;
  text-align: center;
}


/* Mobile project masonry */
.projgrid-item{
  width: 100%;
}


}