:root {
  --link-color: #214c11;
  --link-hover-color: #112709;
  --link-focus-color: #000;
  --primary-color: #73B25C;
  --light-color: #eaffe8;
  --light-gray: #f0f0f0;
  --black: #131313;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: "Harmattan";
  margin: 0;
}

h1 {
  /* main site title */
  font-family: "Fredoka";
  font-weight: 600;
  letter-spacing: 2.25px;
  font-size: 32px;
}

.center-children {
  text-align: center;
  margin: auto;
}

h2 {
  /* sidebar title */
  font-family: "Fredoka";
  font-weight: 600;
  letter-spacing: 2.25px;
  font-size: 24px;
  color: var(--black);
  margin: 0;
}

h3 {
  /* primary menu items */
  font-family: "Fredoka";
  font-weight: 500;
  font-size: 16px;
  margin: 0;
}

h4 {
  /* secondary menu items */
  font-family: "Harmattan";
  font-weight: 400;
  font-size: 16px;
  margin: 0;
}

p {
  /* body text */
  font-family: "Harmattan";
  font-weight: 400;
  font-size: 20px;
}

.nav {
  max-width: 50rem;
  min-width: 20rem;
  width: 45%;
  height: fit-content;
  padding: 2rem;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

.nav-content {
  padding: 2rem;

  background-color: white;
  border-radius: 0.1rem;
  transition-property: background-color, border-radius;
  transition-duration: 250ms;
  transition-timing-function: ease-out;
}

.nav-content:hover {
  border-radius: 1rem;
  background-color: #f4faf4;

  transition-property: background-color, border-radius;
  transition-duration: 250ms;
  transition-timing-function: ease;
}

ul {
  list-style: none;
}

ul li {
  font-family: "Fredoka";
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 16px;
}

ul ul li {
  font-family: "Harmattan";
  font-weight: 400;
  margin-bottom: 0px;
}

ul ul li:first-child {
  margin-top: -8px;
}

ul ul li:last-child {
  margin-bottom: 16px;
}

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

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

a:focus {
  color: var(--link-focus-color);
}

.site-container {
  display: flex;
  flex-flow: row nowrap;
  max-width: 1600px;
  width: 100%;
  margin: auto;
}

.logo img {
  max-width: 500px;
  width: 100%;
}

.logo {
  max-width: 100%;
}

.main-link {
  padding: 12px;
  background-image: url("../img/bg/btn-texture.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: block;
  width: inherit;
  border-radius: 100px;
  font-family: "Fredoka";
  font-weight: 600;
  letter-spacing: 2.25px;
  font-size: 16px;
}

ul ul {
  padding-left: 16px;
}

.socials {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-evenly;
  padding: 0;
  height: 36px;
  margin: 0 2.5rem;
}

.socials a {
  width: 36px;
  background-image: url("../img/bg/btn-texture-square.png");
  background-repeat: no-repeat;
  border-radius: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background-size: cover;
}

.socials a img {
  height: 50%;
  padding: 10px;
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
  transition: filter 0.25s ease-out;
}

.socials a:hover img {
  filter: invert(11%) sepia(56%) saturate(590%) hue-rotate(59deg) brightness(96%) contrast(98%);
  transition: filter 0.125s ease;
}

.socials * {
  height: 100%;
}

.mobile-hint {
  display: none;
  padding-bottom: 4rem;
  padding-top: 1.25rem;
}

.mobile-hint img {
  height: 36px;
  animation: up-down 2s infinite ease;
  filter: invert(20%) sepia(10%) saturate(5658%) hue-rotate(67deg) brightness(94%) contrast(87%);
}

@keyframes up-down {
  0% {
    transform: initial;
  }

  50% {
    transform: translateY(6px);
  }

  100% {
    transform: initial;
  }


}

.site-content {
  width: 100%;
  align-content: flex-start;
  padding: 2rem;
  padding-left: 0;
}

.button-margin {
  margin: 1.5rem 2.5rem;
}

#projects a {
  width: 100%;
  height: 300px;
  margin-bottom: 16px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;

  border-radius: 1.25rem;
  transform: scaleY(1);
  animation-name: shrink;
  animation-duration: 200ms;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

#projects a img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: left;
}

#projects a h2 {
  position: absolute;
  top: 45%;
  z-index: 2;

  animation-name: shrink;
  animation-duration: 200ms;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  color: rgba(0, 0, 0, 0);
  opacity: 0;
}

.hover-wrapper-button a {
  animation-name: shrink, revert-text-color-link, shrink-button-text;
  animation-duration: 150ms;
  animation-fill-mode: reverse;
  animation-timing-function: ease-out;
  color: white;
  margin-top: 0;
  transition: margin 150ms ease-out;
}

.hover-wrapper-button:hover a {
  animation-name: enlarge, change-text-color-link, enlarge-button-text;
  animation-duration: 150ms, 150ms, 200ms;
  animation-delay: 0s, 50ms, 65ms;
  animation-fill-mode: forwards, forwards, forwards, forwards;
  animation-timing-function: ease;

  margin-top: -2px;
  transition: margin 200ms ease 65ms;
}

.anim-underline {
  text-decoration: underline solid rgb(255, 236, 222, 0) 0px;
  transition-property: text-decoration-color, text-decoration-thickness;
  transition-duration: 300ms;
  transition-timing-function: ease-out;
}

.anim-underline:hover {
  transition-property: text-decoration-color, text-decoration-thickness;
  transition-duration: 200ms;
  transition-timing-function: ease;
  text-decoration: underline solid 2px;
}

.thick-underline:hover {
  text-decoration: underline solid 4px !important;
}

#projects .hover-wrapper:hover a {
  transition-duration: 300ms;
  transition-timing-function: ease-in;
  transition-property: all;

  animation-name: enlarge, widen;
  animation-duration: 150ms, 325ms;
  animation-delay: 0s, 125ms;
  animation-fill-mode: forwards, forwards;

  h2 {
    animation-name: change-text-color, enlarge-cover-text;
    animation-duration: 150ms, 325ms;
    animation-delay: 0s, 150ms;
    animation-fill-mode: forwards, forwards;
  }
}

#projects .hover-wrapper:hover a::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  animation: darken 150ms both;
}

/* IMAGE GALLERY */

.site-content h1 {
  padding-top: 2rem;
  margin-bottom: 1rem;
}

.site-content p {
  padding-bottom: 2rem;
  width: 600px;
  max-width: 90%;
  margin: auto;
  line-height: 24px;
}

.image-gallery {
  column-count: 2;
  column-gap: 1rem;
  padding-bottom: 2.5rem;
}

.image-gallery img {
  max-width: 100%;
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  margin-bottom: 1rem;
  object-fit: contain;
  object-position: top;
  break-inside: avoid;
  border-radius: 1.5rem;

  transform: scale(1);
  transition: transform 0.1s ease-out;
}

.black-text {
  color: var(--black);
}

.about-summary-wrapper {
  display: flex;
  flex-flow: row nowrap;
  gap: 2.5rem;
  align-items: end;
  width: inherit;
  height: min-content;
  margin-bottom: 2.5rem;
  padding-top: 2rem;
}

.about-summary-wrapper p {
  margin: 0;
  width: inherit;
  min-width: 40ch;
  padding-bottom: 0;
}

.about-summary-wrapper h1 {
  padding-top: 0;
}

.about-summary-wrapper h2 {
  margin-top: -1rem;
  margin-bottom: 1rem;
}

.about-summary-wrapper img {
  max-width: 50%;
  max-height: 600px;
  width: auto;
  object-fit: contain;
  object-position: bottom;
  border-radius: 1.5rem;
}

.resume {
  width: 100%;
  height: 1500px;
  background-color: aqua;
  margin-top: 1rem;
}


.yt-video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

/* ANIMATIONS */

@keyframes enlarge {
  from {
    transform: scale(1, 1);
    border-radius: 1.25rem;
  }

  to {
    transform: scale(1.05, 1);
    border-radius: 150px;
  }
}

@keyframes widen {
  from {
    transform: scale(1.05, 1);
  }

  to {
    transform: scale(1.05, 1.05);
  }
}

@keyframes shrink {
  from {
    transform: scale(1.05, 1.05);
    border-radius: 150px;
    font-size: 32px;
    color: var(--light-color);

    h2 {
      visibility: visible;
    }
  }

  to {
    transform: scale(1, 1);
    border-radius: 1.25rem;
    font-size: 24px;
    color: var(--light-color);
  }
}

@keyframes darken {
  from {
    background-color: rgba(255, 215, 215, 0);
    /* Change the color and opacity as needed */
    border-radius: 1.25rem;
    color: initial;
  }

  to {
    background-color: #112709dd;
    /* Change the color and opacity as needed */
    border-radius: 150px;
    color: var(--primary-color);
  }
}

@keyframes enlarge-cover-text {
  from {
    font-size: 24px;
  }

  to {
    font-size: 32px;
  }
}

@keyframes enlarge-button-text {
  from {
    font-size: 16px;
  }

  to {
    font-size: 20px;
  }
}

@keyframes change-text-color {
  from {
    color: var(--light-color);
    opacity: initial;
    top: 50%;
  }

  to {
    color: var(--light-color);
    opacity: 100;
    top: calc(50% - 16px);
  }
}

@keyframes change-text-color-link {
  0% {
    color: initial;
    opacity: initial;
    top: 50%;
    filter: none;
  }
  100% {
    color: var(--link-hover-color);
    opacity: 100;
    top: calc(50% - 16px);
  }
}

@keyframes revert-text-color-link {
  0% {
    color: white;
    opacity: 100;
    top: calc(50% - 16px);
  }
  100% {
    opacity: initial;
    top: 50%;
  }
}

@keyframes shrink-button-text {
  from {
    font-size: 20px;
  }

  to {
    font-size: 16px;
  }
}

@media screen and (max-width: 1200px) {
  ul {
    padding-left: 0;
  }

  .button-margin {
    margin: 1.5rem 0;
  }

  .socials {
    margin: 0;
  }

  .about-summary-wrapper {
    gap: 1.5rem;
    align-items: last baseline;
    flex-flow: row wrap;
  }

  .about-summary-wrapper img {
    max-width: 35%;
  }

  .about-summary-wrapper h1 {
    margin-top: 0;
    padding-top: 0;
  }

}

/* mobile interface */
@media screen and (max-width: 976px) {

  .site-container {
    width: 100%;
    max-width: none;
    min-width: fit-content;
    display: block;
  }

  .logo {
    max-width: 80%;
    height: max-content;
    display: block;
    margin: auto;
  }

  .logo img {
    margin-top: 2rem;
  }

  .nav {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    padding: 0;
    display: flex;
    flex-flow: column;
    justify-content: space-evenly;
  }

  .nav-content {
    height: calc(100vh - 4rem);
    padding: 0;
    overflow-y: scroll;
  }

  .nav-content:hover {
    border-radius: 0;
    background-color: white;
  }

  .nav-links {
    width: 80%;
    max-width: 500px;
    margin: auto;
    height: initial;
    padding: 1.5rem 2.5rem 2.5rem 2.5rem;
  }

  .mobile-hint {
    display: block;
  }

  .site-content {
    width: 92.5%;
    margin: auto;
    padding: 0;
    background-color: white;
    position: relative;
    z-index: 1;
  }

  /* goal of nav: sticky so the content rolls over it and conceal it with a background in the content
  nav fills up the screen
  if the nav content is bigger than the screen, be able to scroll down until the end of the nav, then stick the nav and scroll the content
  */


  /* site content */
  #projects a {
    display: flex;
    flex-flow: column;
    height: fit-content;
    margin-bottom: 1.25rem;
    margin-top: 0.75rem;
  }

  #projects a h2 {
    display: block;
    color: white !important;
    opacity: 100;
    background-color: var(--primary-color);
    background-image: url("../img/bg/btn-texture.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    width: 100%;
    position: relative;
    border-radius: 0 !important;
    padding: 0.75rem 0;
  }


  

  /* CHANGING ANIMATIONS */
  @keyframes enlarge {
    from {
      transform: scale(1, 1);
      border-radius: 1.25rem;
    }

    to {
      transform: scale(1.05, 1.05);
    }
  }

  @keyframes widen {}

  @keyframes shrink {
    from {
      transform: scale(1.05, 1.05);
      color: var(--link-focus-color);
    }

    to {
      transform: scale(1, 1);
      color: initial;
    }
  }

  @keyframes darken {}

  @keyframes enlarge-cover-text {}

  @keyframes enlarge-button-text {
    from {
      font-size: 16px;
    }

    to {
      font-size: 20px;
    }
  }

  @keyframes change-text-color {
    from {
      color: initial;
      opacity: initial;
    }

    to {
      color: var(--link-focus-color);
      opacity: 100;
    }
  }
}

@media screen and (max-width: 768px) {
  .site-content p {
    width: 90%;
  }
  
  .image-gallery {
    display: block;
    text-align: center;
  }

  .image-gallery {
    column-count: 1;
    column-gap: 1rem;
  }

  .about-summary-wrapper {
    flex-flow: row wrap;
  }
  
  .about-summary-wrapper img {
    max-width: 100%;
  }
}



.image-gallery img:hover {
  transform: scale(1.01);
  transition: transform 0.25s ease;
}

.image-gallery img:focus {
  transform: scale(1.01);
  transition: transform 0.25s ease;
}

