:root {
  --clr-bg: #111;
  --clr-grid: #1e1e1e;
  --clr-red: #d20026;
}

body {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
  background-color: var(--clr-bg);
  background-image: radial-gradient(circle, rgba(175, 208, 84, 0.25) 1px, rgba(0, 0, 0, 0) 1px);
  background-size: 40px 40px;
  color: #f0f0f0;
  margin: 0;
  padding: 0;
  cursor: default;
}
body nav {
  position: absolute;
  top: 1.5rem;
  height: auto;
  width: 7rem;
  padding: 0.5rem;
  background-color: var(--clr-grid);
  border-radius: 1rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  text-align: center;
}
body nav .item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
body nav .item img {
  cursor: pointer;
  height: 1.5rem;
  -o-object-fit: contain;
     object-fit: contain;
  transition: transform 0.3s, filter 0.3s;
  filter: invert(0.7);
}
body nav .item img:hover {
  transform: scale(1.2);
  filter: invert(1);
  stroke: 1px solid white;
}
body .grid-container {
  padding: 0.5rem;
  color: white;
  display: grid;
  grid-template-rows: repeat(6, 5rem);
  grid-template-columns: repeat(3, 10rem);
  gap: 0.5rem;
}
body .grid-item {
  text-align: center;
  border-radius: 0.5rem;
  background: var(--clr-grid);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
body .about {
  grid-column: 1/3;
  grid-row: 1/3;
  padding: 0.5rem 0.75rem;
  text-align: left;
  gap: 0.75rem;
}
body .about h2 {
  font-size: 1rem;
  margin: 0;
}
body .about p {
  font-family: Monospace;
  font-size: 0.8rem;
  color: #aaa;
  margin: 0;
  text-align: justify;
  -webkit-user-select: text;
     -moz-user-select: text;
          user-select: text;
}
body .about p::-moz-selection {
  color: var(--clr-bg);
  background-color: #fff;
}
body .about p::selection {
  color: var(--clr-bg);
  background-color: #fff;
}
body .about span {
  color: #ccc;
  font-weight: bold;
  transition: 0.3s;
  padding: 0.1rem;
}
body .about span::-moz-selection {
  background-color: var(--clr-red);
}
body .about span::selection {
  background-color: var(--clr-red);
}
body .about span:hover {
  border-radius: 0.25rem;
  background: white;
  color: black;
  padding: 0.1rem;
}
body .role {
  cursor: pointer;
  grid-column: 1;
  grid-row: 3;
  background: transparent;
  transition: scale 0.5s;
}
body .role h2 {
  font-size: 1rem;
}
body .role:hover .card-inner {
  transform: rotateX(180deg);
}
body .card-inner {
  position: relative;
  height: 100%;
  width: 100%;
  background: #cbab80;
  border-radius: 0.5rem;
  transition: transform 0.75s;
  transform-style: preserve-3d;
}
body .card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}
body .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--clr-red);
  color: #fff;
  transform: rotateX(180deg);
}
body .card-back a {
  text-decoration: none;
  color: white;
}
body .card-back .text-content {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
body .image {
  cursor: pointer;
  grid-column: 3;
  grid-row: 1/4;
  transition: scale 0.5s;
}
body .image img {
  height: 100%;
  width: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
  border-radius: 0.5rem;
}
body .image:hover {
  scale: 0.95;
}
body .quote {
  grid-column: 3;
  grid-row: 4;
  background: #d20026;
}
body .quote p {
  font-family: Monospace;
  font-size: 0.75rem;
}
body .tech-stack {
  grid-column: 1;
  grid-row: 4/7;
  font-family: Monospace;
  padding: 1rem;
  gap: 1rem;
}
body .tech-stack h2 {
  font-size: 1.25rem;
  margin: 0;
  margin-top: 1rem;
}
body .tech-stack .tech-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
body .tech-stack .tech-icons .icon {
  display: flex;
  position: relative;
  justify-content: center;
}
body .tech-stack .tech-icons .icon p {
  position: absolute;
  background-color: #fff;
  color: #000;
  font-weight: bold;
  text-align: center;
  padding: 0.1rem;
  border-radius: 5%;
  opacity: 0%;
  visibility: hidden;
  z-index: 1;
  transition: all ease-in-out 0.5s;
  top: -2rem;
}
body .tech-stack .tech-icons .icon img {
  height: 2rem;
  padding: 0.2rem;
  filter: saturate(0%);
  transition: all ease 0.5s;
}
body .tech-stack .tech-icons .icon:hover img {
  filter: saturate(100%);
  transform: scale(1.2);
}
body .tech-stack .tech-icons .icon:hover p {
  opacity: 100%;
  visibility: visible;
  transform: scale(1.1);
}
body .name {
  cursor: pointer;
  grid-column: 2;
  grid-row: 3/5;
  transition: scale 0.5s;
}
body .name:hover {
  scale: 0.95;
}
body .name a {
  text-decoration: none;
  color: inherit;
}
body .name a img {
  height: 40%;
  width: 40%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
}
body .name a h1 {
  font-family: Arial Black;
  font-size: 1.25rem;
}
body .contact {
  grid-column: 2/4;
  grid-row: 5/7;
}
body .contact .socials {
  display: flex;
  width: 80%;
  justify-content: space-around;
}
body .contact .socials img {
  height: 2.5rem;
  background: #cccccc;
  filter: invert(100%);
  padding: 0.25rem;
  border-radius: 0.5rem;
  transition: scale 0.5s, filter 0.4s, background 0.4s;
}
body .contact .socials img:hover {
  filter: invert(0%);
  background: white;
  scale: 1.1;
}

/* Animations */
.slide-in-left {
  animation: slide-in-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes slide-in-left {
  0% {
    transform: translateX(-1000px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
.slide-in-right {
  animation: slide-in-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes slide-in-right {
  0% {
    transform: translateX(1000px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
.slide-in-bottom {
  animation: slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes slide-in-bottom {
  0% {
    transform: translateY(1000px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
.slide-in-top {
  animation: slide-in-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes slide-in-top {
  0% {
    transform: translateY(-1000px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
.bounce-in-top {
  animation: bounce-in-top 1.1s both;
}

@keyframes bounce-in-top {
  0% {
    transform: translateY(-500px);
    animation-timing-function: ease-in;
    opacity: 0;
  }
  38% {
    transform: translateY(0);
    animation-timing-function: ease-out;
    opacity: 1;
  }
  55% {
    transform: translateY(-65px);
    animation-timing-function: ease-in;
  }
  72% {
    transform: translateY(0);
    animation-timing-function: ease-out;
  }
  81% {
    transform: translateY(-28px);
    animation-timing-function: ease-in;
  }
  90% {
    transform: translateY(0);
    animation-timing-function: ease-out;
  }
  95% {
    transform: translateY(-8px);
    animation-timing-function: ease-in;
  }
  100% {
    transform: translateY(0);
    animation-timing-function: ease-out;
  }
}
.rotate-center {
  animation: rotate-center 0.6s ease-in-out both;
}

@keyframes rotate-center {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}