@import url(./layout/layout.css);

@font-face {
  font-family: "Viga";
  src: url("../media/fonts/Viga-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Outfit";
  src: url("../media/fonts/Outfit-VariableFont_wght.ttf") format("truetype");
}

@font-face {
  font-family: "Yesteryear";
  src: url("../media/fonts/Yesteryear-Regular.ttf") format("truetype");
}

main {
  display: flex;
  justify-content: space-between;
  gap: 6em;
}

h2 {
  font-size: 2rem;
}

#assignment {
  opacity: 0;
  width: 50%;
  transition: 250ms opacity;
}

.assignment-menu-container {
  height: 75vh;
  position: sticky;
  top: var(--top);
  width: 600px;
}

.assignment-menu-container h1 {
  margin: 0 0 8px 0;
}

.assignment-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  margin: auto;
}

h4 {
  font-size: 1.5rem;
  margin: 0;
}

.assignment-menu-item {
  border-radius: 5px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}

.assignment-menu-item > .inline > p {
  font-family: var(--heading-font);
  font-size: 1.45rem;
  line-height: 1;
  margin: 8px 0 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline {
  border: 2px solid var(--text-color);
  height: calc(100% - 2em);
  width: calc(100% - 2em);
  background-color: transparent;
  border-radius: 10px;
  z-index: 1;
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 0.75em;
  overflow: hidden;
}

.link-arrow {
  transform: rotate(-90deg);
  margin: 1em;
  width: 16px;
  opacity: 0;
  position: absolute;
  right: 16px;
  bottom: 16px;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.assignment-menu-item:hover .link-arrow {
  opacity: 1;
}

.skill-collector {
  background:
    linear-gradient(to top, #000000, #ffffff00) 0 100% / 100% 50% no-repeat,
    url(../media/images/assignments/skill-selector.png);
  background-size: cover;
  background-position: center;
}

.todo-app {
  background:
    linear-gradient(to top, #000000, #ffffff00) 0 100% / 100% 50% no-repeat,
    url(../media/images/assignments/crud-square.png);
  background-size: cover;
  background-position: center;
}

.minesweeper {
  background:
    linear-gradient(to top, #000000, #ffffff00) 0 100% / 100% 50% no-repeat,
    url(../media/images/assignments/minesweeper.png);
  background-size: cover;
  background-position: center;
}

.top5albums {
  background:
    linear-gradient(to top, #000000, #ffffff00) 0 100% / 100% 50% no-repeat,
    url(../media/images/assignments/top5albums.png);
  background-size: cover;
  background-position: center;
}

.current {
  box-shadow: inset 0 -6px 0 0 var(--primary-color);
}

.title > h2 {
  margin: 0 0 8px 0;
}

.title-img {
  margin: 0;
  border-radius: 5px;
}

.links {
  margin-top: 1em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--heading-font);
}

.links > a {
  color: var(--text-color);
  line-height: 1;
}

.links > a > img {
  margin: 0;
  border-radius: 5px;
  transition: transform 100ms;
  height: 36px;
}

.lead {
  margin: 1em 0 1em 0;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  padding-bottom: 1em;
  max-width: 960px;
  border-bottom: 1px solid var(--text-color);
}

.content > p {
  margin-top: 0.25em;
  font-size: 1.2rem;
}

.heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 1em 0 0 0;
}

.media {
  margin: 32px 0;
}

video,
.media img,
.media iframe,
.media pre {
  border-radius: 5px;
}

.media-txt {
  font-size: 1rem;
  margin: 8px auto;
}

pre {
  overflow: auto;
  margin: auto;
}

video,
iframe {
  display: block;
}

.spinner {
  margin-top: 300px;
  border: 4px solid var(--menu-color);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  position: relative;
}

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

@media (max-width: 1920px) {
  main {
    max-width: var(--width-medium);
  }

  .assignment-menu-container {
    width: 500px;
  }

  .spinner {
    margin-top: 250px;
  }
}

@media (max-width: 1264px) {
  main {
    display: block;
    max-width: 100%;
  }

  #assignment {
    width: 100%;
  }

  .assignment-menu-container {
    position: relative;
    top: auto;
    margin: auto;
    height: auto;
    width: auto;
    max-width: 600px;
    margin-bottom: 5em;
  }

  .spinner {
    margin-top: 0;
  }

  .inline {
    padding: 0.5em;
  }
}

@media (max-width: 1000px) {
  h2 {
    text-align: left;
    font-size: 1.75rem;
  }
}

@media (max-width: 570px) {
  .heading {
    align-items: baseline;
    flex-direction: column-reverse;
    gap: 4px;
    margin: 1em 0 0 0;
  }

  iframe {
    height: 300px;
  }

  .assignment-menu-container {
    margin-bottom: 3em;
  }

  .assignment-menu {
    gap: 8px;
  }

  .assignment-menu-item > .inline > p {
    font-size: 4.5vw;
    margin-top: 6px;
  }

  .current {
    box-shadow: inset 0 -4px 0 0 var(--primary-color);
  }

  .assignment-menu-item .inline {
    height: calc(100% - 1.5em);
    width: calc(100% - 1.5em);
  }

  .assignment-menu .tools {
    gap: 4px;
  }

  .assignment-menu .tools p {
    font-size: 2vw;
    height: 4vw;
    margin-block-start: 0;
    margin-block-end: 0;
    min-width: 60px;
    line-height: 2;
  }

  .lead {
    font-size: 1.4rem;
  }

  .link-arrow {
    display: none;
  }
}

@media (max-width: 350px) {
  .assignment-menu {
    margin-bottom: 2em;
  }

  .assignment-menu-item .tools {
    display: none;
  }

  #description-main > h3 {
    font-size: 10vw;
  }

  #description-main > .desc {
    font-size: 7vw;
  }
}
