@import url("../media/styles/root.css");
@import url("../media/fonts/fonts.css");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-color: var(--green) rgba(0, 0, 0, 0.2);
}

body {
  font-family: "Outfit", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}

header {
  width: 100%;
  padding: 2rem 2rem 0 2rem;
  max-width: 100%;
}

/* --- left --- */
.p-left {
  width: 70%;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

main {
  width: 100%;
}

header {
  width: 100%;
  padding: 2rem 2rem 0 2rem;
  max-width: 100%;
}

header h2 {
  color: white;
  font-size: 2rem;
  font-weight: 700;
}

footer {
  text-align: center;
  width: 100%;
  height: 4rem;
  margin: 2rem;
  color: var(--pink);
  font-size: 1rem;
}

.year-section {
  width: 100%;
  padding: 0 2rem 2rem 2rem;
}

.year-section h2 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  margin-top: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 2fr));
  /* gap: 2rem; */
  width: 100%;
}

.project-tile {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--gradient, #c800ff12);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  text-decoration: none;
  position: relative;
  border-color: transparent;
  overflow: hidden;
  transition: all 0.1s ease;
  cursor: pointer;
  filter: saturate(1);
  backdrop-filter: blur(10px);
}

.project-tile.indev {
  border: 3px dashed var(--random-2);
  animation: blink-indev 1.5s step-start infinite;
}

.project-tile.paused {
  filter: saturate(0.1);
  border: 2px dotted gray;
  transition: all 0.1s ease;
  animation: blink-paused 1.5s step-start infinite;
  cursor: progress;
}

@keyframes blink-paused {
  0% {
    filter: saturate(0.1);
  }
  50% {
    filter: saturate(0.6);
  }
  100% {
    filter: saturate(0.1);
  }
}

@keyframes blink-indev {
  0% {
    border-color: var(--random-2);
  }
  50% {
    border-color: transparent;
  }
  100% {
    border-color: var(--random-2);
  }
}
.project-tile.unfinished {
  filter: grayscale(100%) blur(2px);
}

.project-tile.unfinished:hover {
  filter: grayscale(0%) blur(0);
}

.project-tile:hover {
  transform: scale(1.09) rotate(-1deg);
  filter: brightness(1.2);
  z-index: 10;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  border-radius: 15px;
}

.project-tile img {
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
  transition: 0.2s ease-in-out;
  image-rendering: pixelated;
}

/* .project-tile:hover img {
	transform: scale(1.1);
} */

.project-details {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.9rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  text-align: left;
  font-size: 1.2rem;
  opacity: 1;
  transition: 0.2s ease-in-out;
}

.project-details.white {
  color: black;
}

.p-title {
  font-weight: 800;
  font-size: 1.2rem;
}

.p-details {
  font-weight: 400;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  body {
    display: flex;
    flex-direction: column;
  }

  header {
    padding: 1rem 1rem 0 1rem;
  }

  .year-section {
    padding: 0 1rem 1rem 1rem;
  }

  .project-grid {
    grid-template-columns: repeat(2, 2fr);
    /* gap: 0.8rem; */
  }

  .project-tile {
    min-height: 180px;
  }

  .project-tile img {
    max-width: 70%;
    max-height: 70%;
  }

  .project-details {
    padding: 0.8rem;
  }

  .p-title {
    font-size: 1.1rem;
  }

  .p-details {
    font-size: 0.75rem;
    line-height: 1.1;
  }
}

/* --- right --- */
.p-right {
  width: 30%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.p-right.empty {
  width: 20%;
}

body:has(.p-right.empty) .p-left {
  width: 80%;
}

body:has(.p-right.empty) .empty {
  display: flex;
}

body:has(.p-right.empty) .preview {
  display: none;
}

.empty {
  width: 100%;
  height: 100vh;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.e-img {
  min-width: 90px;
  min-height: 90px;
  background-color: white;
  margin-bottom: 12px;
}

.e-detail {
  color: white;
  font-size: 1rem;
  font-weight: 700;
}

.preview {
  display: flex;
  width: 100%;
  height: 100vh;
  flex-direction: column;
}

.preview.boing {
  animation: preview-boing 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.preview.boing .icon-container img {
  animation: icon-boing 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes preview-boing {
  0% {
    transform: scale(0.97);
  }
  55% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes icon-boing {
  0% {
    transform: scale(0.9) rotate(-4deg);
  }
  60% {
    transform: scale(1.06) rotate(3deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

/* ## header ## */
.header {
  height: 70%;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  position: relative;
}

.header .icon-container {
  z-index: -1;
}

.icon-container {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.icon-container img {
  min-width: 100px;
  min-height: 100px;
  width: 50%;
  max-width: 500px;
  aspect-ratio: 1 / 1;
  border-radius: 5px;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
}

.header .info {
  position: absolute;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  width: 100%;
  height: 75%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  position: relative;
}

.info .title {
  font-size: 1.5rem;
  font-weight: 700;
  background-color: var(--pink);
  color: white;
}

.info .title.active {
  background-color: rgb(135, 219, 135);
  color: rgb(59, 95, 59);
  animation: 2s cubic-bezier(1, 0, 0, 1) title-active infinite;
}

@keyframes title-active {
  0% {
    background-color: rgb(135, 219, 135);
    color: rgb(59, 95, 59);
  }
  50% {
    background-color: rgb(59, 95, 59);
    color: rgb(135, 219, 135);
  }
  100% {
    background-color: rgb(135, 219, 135);
    color: rgb(59, 95, 59);
  }
}

.info .title.paused {
  background-color: rgb(223, 223, 223);
  color: rgb(37, 37, 37);
  animation: 2s cubic-bezier(1, 0, 0, 1) title-paused infinite;
}

@keyframes title-paused {
  0% {
    background-color: rgb(223, 223, 223);
    color: rgb(37, 37, 37);
  }
  50% {
    background-color: rgba(223, 223, 223, 0.2);
    color: rgb(223, 223, 223);
  }
  100% {
    background-color: rgb(223, 223, 223);
    color: rgb(37, 37, 37);
  }
}

.info .title.legend {
  background-color: rgb(241, 225, 133);
  color: rgb(82, 76, 45);
  animation: 2s title-legend ease-in-out infinite;
}

@keyframes title-legend {
  0% {
    margin-bottom: 0;
  }
  10% {
    margin-bottom: -10px;
  }
  40% {
    margin-bottom: -10px;
  }
  50% {
    margin-bottom: 50px;
  }
  80% {
    margin-bottom: -5px;
  }
}

.info .title.non {
  background-color: rgb(255, 255, 255);
  color: black;
}

.mininfo {
  margin-top: 5px;
  margin-bottom: 5px;
  background-color: rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
  display: flex;
  flex-direction: row;
  justify-content: stretch;
  width: 100%;
}

.info .description,
.mininfo,
.title {
  margin-left: 12px;
  max-width: 90%;
  width: fit-content;
}

.info .description p {
  margin: 0;
}

.languages {
  width: 100%;
  height: 35px;
  margin-left: 12px;
  margin-top: 12px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
}

.item {
  background-color: white;
  width: 35px;
  height: 35px;
  border-radius: 4px;
  aspect-ratio: 1 / 1;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100%;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

.item.js {
  background-image: url("./media/langs/javascript.gif");
  background-size: 180%;
}

.item.java {
  background-image: url("./media/langs/java.gif");
  background-size: 120%;
  background-position: 80% 50%;
}

.item.py {
  background-image: url("./media/langs/python.gif");
  background-size: 120%;
}

.item.asm {
  background-image: url("./media/langs/asm.gif");
  background-size: 150%;
}

.item.css {
  background-color: #7323db;
  background-image: url("./media/langs/css.gif");
  background-size: 200%;
  background-position: 60% 50%;
}

.item.cpp {
  background-image: url("./media/langs/cpp.gif");
  background-size: 150%;
  background-position: 50% 55%;
}

.item.c {
  background-image: url("./media/langs/c.gif");
  background-size: 150%;
  background-position: 50% 55%;
}

.item.cs {
  background-image: url("./media/langs/cs.gif");
  background-size: 150%;
  background-position: 50% 55%;
}

.item.rust {
  background-image: url("./media/langs/rust.gif");
  background-size: 150%;
  background-position: 50% 55%;
}

.item.ts {
  background-color: #0f67ff;
  background-image: url("./media/langs/ts.gif");
  background-size: 150%;
  background-position: 80% 50%;
}

/* ## body ## */
.preview .body {
  background-color: rgba(0, 0, 0, 0.4);
  width: 100%;
  height: 40%;
  padding-top: 12px;
}

.preview .body ul {
  width: 90%;
}

.no-links {
  display: none;
  width: 100%;
  height: 40%;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.55);
  font-size: 1rem;
  font-style: italic;
}

.preview .body p,
h2,
ul {
  margin-left: 12px;
}
