@import url("https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@1,700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Mukta&display=swap");

:root {
  --white: #f4f4f2;
  --light: #e8e8e8;
  --medium: #bbbfca;
  --dark: #495464;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scrollbar-color: var(--medium) var(--light);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--light);
}

::-webkit-scrollbar-thumb {
  background: var(--medium);
}

body {
  background-color: var(--white);
  color: var(--dark);
  margin: 0;
  display: grid;
  grid-template-rows: fit-content(8rem) auto fit-content(3rem);
  grid-template-areas: "header" "main" "footer";
  height: 100%;
  font-family: "Mukta", sans-serif;
  opacity: 0;
  animation: fadein 500ms ease 100ms forwards;
}

@keyframes fadein {
  to {
    opacity: 1;
  }
}

p,
span {
  line-height: 1.4rem;
}

header {
  background-color: var(--dark);
  color: var(--white);
  font-family: "Courier Prime", monospace;
  grid-area: header;
  text-align: center;
  width: 100%;
  padding-bottom: 1rem;
  box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.5);
}

footer i,
header i {
  margin: 0 1rem;
  transition: color 100ms ease-in;
}

footer i:hover,
header i:hover {
  cursor: pointer;
  color: var(--medium);
}

a {
  text-decoration: none;
  color: inherit;
  min-height: 2rem;
  display: inline-block;
}

header h1 {
  font-size: 3rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.avatar {
  width: 50%;
  border-radius: 50%;
  background-color: var(--medium);
  border: 2px solid var(--light);
  animation: float 5s ease-in-out infinite;
}

main {
  padding: 1rem;
  max-width: 900px;
  margin: auto;
}

.backdrop {
  display: none;
  opacity: 0;
  height: 100vh;
  width: 100vw;
  position: fixed;
  background-color: rgba(0, 0, 0, 0.6);
  top: 0;
  left: 0;
  z-index: 100;
  transition: opacity 200ms linear;
}

.modal {
  display: none;
  position: fixed;
  opacity: 0;
  transition: opacity 200ms ease-out;
  z-index: 200;
  top: 15%;
  width: calc(100% - 2rem);
  background: white;
  border: 1px solid #ccc;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-color: var(--medium) var(--light);
  scrollbar-width: thin;
}

.modal::-webkit-scrollbar {
  width: 5px;
}

.modal::-webkit-scrollbar-track {
  background: var(--light);
}

.modal::-webkit-scrollbar-thumb {
  background: var(--medium);
}

.open {
  opacity: 1;
  transition: opacity 200ms ease-out;
}

main img {
  width: 100%;
}

.quick-bio {
  padding: 0.5rem 1rem;
  background-color: var(--light);
  box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.3);
  margin: 2rem 0;
}

.my-works h1 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 0;
}

hr {
  color: var(--light);
}

.carousel {
  perspective: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: fadein 500ms ease 200ms forwards;
}

/* .carousel > * {
  flex: 0 0 auto;
} */

.item-container {
  margin: 0;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  transform-box: fill-box;
  width: 100%;
  min-width: 300px;
  transition: transform cubic-bezier(0.46, 0.02, 0.19, 1.24);
  transition-duration: 0s;
}

.item-container div {
  text-align: center;
  width: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.item-container .website-examples:not(:first-of-type) {
  position: absolute;
  left: 0;
  top: 0;
}

.website-examples {
  height: fit-content;
  align-items: flex-start;
  vertical-align: middle;
  transform-style: preserve-3d;
  transform-box: fill-box;
}

.website-url {
  font-size: 1.2rem;
  text-align: center;
  text-decoration: underline;
  white-space: nowrap;
  align-self: center;
}

.source-code {
  display: inline-block;
  border: 1px solid var(--medium);
  box-shadow: 1px 1px 3px 0 rgba(0, 0, 0, 0.3);
  background-color: var(--light);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  transition: color 150ms ease-out, background-color 200ms ease-out,
    box-shadow 150ms ease-out;
}

.wordpress {
  width: 150px;
  padding: 1.5rem 0 0 0;
}

.source-code:hover {
  background-color: var(--white);
  box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: color 150ms ease-in, background-color 200ms ease-in,
    box-shadow 150ms ease-in;
}

.source-code:active {
  background-color: var(--light);
  color: var(--medium);
}

.screen-previews {
  position: relative;
  transform-style: preserve-3d;
  z-index: 1;
  image-rendering: -webkit-optimize-contrast;
  max-width: 60%;
  margin: auto;
}

.mobile-preview {
  backface-visibility: hidden;
  width: 25%;
  position: absolute;
  bottom: 0;
  right: 5%;
}

.website-description p {
  position: static !important;
  text-align: left !important;
}

/* carousel navigation */
.prev,
.next {
  position: absolute;
  top: 45%;
  background-color: var(--light);
  color: var(--dark);
  box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.2);
  border: 1px var(--medium) solid;
  border-radius: 4px;
  padding: 0.3rem;
  transition: color 150ms ease-in, background-color 150ms ease-in,
    box-shadow 150ms ease-in;
}

.prev:hover,
.next:hover {
  background-color: var(--white);
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: color 150ms ease-in, background-color 150ms ease-in,
    box-shadow 150ms ease-in;
}

.prev:focus,
.next:focus {
  outline: 0;
}

.prev {
  left: 0;
}

.next {
  right: 0;
}

/* Skills section  */

.skills--main {
  padding: 0;
}

.skills--main li {
  display: flex;
  flex-direction: column;
  background-color: var(--light);
  border-radius: 1rem;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  margin: 2rem 0;
  padding: 1rem;
  position: relative;
  transition: box-shadow 200ms ease;
}

.skills--main li:hover {
  cursor: pointer;
  box-shadow: 4px 4px 12px 0 rgba(0, 0, 0, 0.2);
}

.skills--main i {
  position: absolute;
  right: 1rem;
  top: 1rem;
  text-align: right;
  opacity: 0.6;
  transition: opacity 200ms ease-out 150ms;
}

.opacity {
  opacity: 0 !important;
  transition: opacity 200ms ease-in !important;
}

.skills--main span {
  height: 0.1px;
  overflow: hidden;
  transition: height 200ms ease;
}

.skill-height {
  height: 220px !important;
  padding-top: 1.5rem;
}

.skills--main img {
  width: 30%;
  margin: 0 auto;
  transition: width 200ms ease;
}

.skill-width {
  justify-content: center;
  width: 60% !important;
}

.skills--lesser {
  background-color: var(--white);
  color: var(--dark);
  border-radius: 4rem;
  padding: 2rem 0;
  margin: 2rem 0;
  text-align: center;
  border: 10px double var(--light);
}

.skills--lesser ul {
  padding: 0;
  list-style: none;
}

.skills--lesser h3 {
  font-weight: lighter;
}

/* Biography section  */

.bio-category {
  border-bottom: 2px dotted var(--medium);
}

.bio-icon,
.programmer-icon {
  max-width: 20%;
  background-color: var(--light);
  border-radius: 0.5rem;
}

.bio-icon {
  float: left;
  margin-right: 0.5rem;
}
.bio-info {
  padding-bottom: 50px;
}

.programmer-icon {
  padding: 0.5rem;
  float: right;
  margin-left: 0.5rem;
}

.web-dev-info h2 {
  text-align: right;
}

/* hobbies and interest section  */

.hobbies--flex {
  display: flex;
  flex-flow: row;
  justify-content: space-around;
  align-items: flex-end;
  padding: 1rem 0;
  height: 450px;
  max-height: 450px;
}

.hobbies--hobby {
  text-align: center;
  display: inline-block;
  height: 50px;
  width: calc(100% - 99%);
  flex-grow: 1;
  transition: flex-grow 500ms ease-out, transform 500ms ease-out;
}

.expand-box {
  margin: 1rem auto;
  background-color: var(--light);
  border: 2px solid var(--dark);
  border-radius: 1rem;
  flex-grow: 0 !important;
  transform: translateY(-90px);
  max-height: 300px;
  width: calc(100% - 2rem);
  position: absolute !important;
  transition: border 200ms ease-out, width 500ms ease-out 200ms,
    transform 200ms ease-out, height 400ms ease-out 200ms,
    flex-grow 100ms ease-out !important;
}

.expand-box img {
  position: absolute;
  bottom: 0;
  transform: scale(2) translateX(-25%);
  transition: transform 400ms;
}

.hobbies--hobby p {
  position: absolute;
  z-index: -1;
  margin: 2rem 1rem;
  left: 0;
  height: 10px;
  overflow: hidden;
  opacity: 0;
}

.reveal-text {
  height: 100% !important;
  position: static !important;
  opacity: 1 !important;
  transition: opacity 200ms ease-in 700ms, height 100ms linear 700ms;
}

.hobbies--hobby img {
  width: 60px;
  background: var(--light);
  padding: 0.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.4);
}

/* footer section  */

footer {
  text-align: center;
  position: relative;
  grid-area: footer;
  background-color: var(--light);
  padding-top: 2rem;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.6);
}

footer i {
  margin-bottom: 1rem;
}

footer a {
  min-height: 0;
}

.attribution {
  text-align: left;
  padding-left: 0.5rem;
  font-size: 0.8rem;
}

footer img {
  width: 40px;
}

/* Desktop screen styles */

.nodisplay {
  display: none;
}

@media (min-width: 40rem) {
  p,
  span {
    line-height: normal;
  }

  .avatar {
    width: 300px;
  }

  .modal {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 800px;
    max-height: 100vh;
  }

  .quick-bio {
    padding: 2rem 5rem;
    margin: 4rem auto;
    max-width: 85%;
  }

  .my-works h1 {
    font-size: 3rem;
  }

  .carousel {
    margin: 2rem auto;
  }

  .website-examples {
    height: fit-content;
    margin: 0;
    padding: 0;
  }

  .website-url {
    display: inline-block;
    font-size: 1.5rem;
    text-decoration: none;
    transition: text-decoration 200ms ease-out;
  }

  .website-url:hover {
    text-decoration: underline;
    transition: text-decoration 200ms ease-in;
  }

  .website-description {
    text-align: left !important;
  }

  .website-description {
    padding: 0 4rem;
  }

  /* skills section  */

  #skills {
    padding: 0 2rem;
    margin: 4rem 0;
  }

  .skills--main li {
    align-items: center;
  }

  .skills--main img {
    width: 15%;
  }

  .skill-width {
    width: 40% !important;
  }

  .skills--main span {
    padding: 0 4rem;
    transition: height 200ms ease, padding 200ms ease;
  }

  .skill-height {
    padding: 2rem 4rem !important;
    height: 200px !important;
  }

  .skills--lesser {
    width: 80%;
    margin: 2rem auto;
  }

  .background-info {
    padding: 0 2rem;
    margin: 4rem 0;
  }

  .bio-icon,
  .programmer-icon {
    width: 30%;
  }

  /* hobbies section large screen  */

  .hobbies--flex {
    height: 550px;
  }

  .expand-box {
    max-width: 640px;
    width: calc(100vw - 7rem);
    padding: 0 4rem;
    height: 420px;
    transform: translateY(-75px);
  }

  .hobbies--hobby img {
    width: 100px;
    border-radius: 2rem;
    padding: 1rem;
    transition: background-color 200ms ease, box-shadow 200ms ease;
  }

  .hobbies--hobby img:hover {
    background-color: var(--white);
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.2);
    cursor: pointer;
  }

  .expand-box img {
    transform: scale(1.2) translateX(-42%);
  }

  .expand-box img:hover {
    cursor: initial;
    background-color: var(--light);
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.4);
  }
}

/* very narrow width screens  */

@media (max-width: 370px) {
  .skill-height {
    height: 250px !important;
  }

  .expand-box {
    width: calc(100% - 1rem);
  }

  .expand-box img {
    transform: scale(1.5) translateX(-32%);
  }

  .reveal-text {
    margin: 1.5rem 0.5rem 0.5rem !important;
  }
}

/* Avatar animation */

@keyframes float {
  0% {
    box-shadow: 0 5px 15px 0px rgba(0, 0, 0, 0.6);
    transform: translatey(0px);
  }
  50% {
    box-shadow: 0 25px 15px 0px rgba(0, 0, 0, 0.2);
    transform: translatey(-20px);
  }
  100% {
    box-shadow: 0 5px 15px 0px rgba(0, 0, 0, 0.6);
    transform: translatey(0px);
  }
}
