@import url('https://fonts.googleapis.com/css?family=Inconsolata:400');

:root {
  --space: 1rem;
  --bg: #09090b;
  --fg: #e3e3e3;
  --surface-1: #101012;
  --surface-2: #27272a;
  --surface-3: #52525b;
  --ease-out: cubic-bezier(0.5, 1, 0.89, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

.project {
  padding: 80px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
  grid-template-rows: repeat(auto-fit, 1fr);
  gap: 2vw;
  justify-content: space-between;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow-x: auto;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
}

::-webkit-scrollbar {
  display: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  place-items: center;
  border: 2px solid var(--surface-2);
  isolation: isolate;
  transition: border-color 200ms var(--ease-out);
  user-select: none;
  border-radius: 8px;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at bottom left,
      transparent 55%,
      var(--surface-1)
  );
  pointer-events: none;
  box-shadow: var(--bg) -0.5cqi 0.5cqi 2.5cqi inset;
  transition: opacity 900ms var(--ease-out);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--bg), transparent 65%);
  opacity: 0;
  transition: opacity 800ms var(--ease-out);
}
.card:focus-within {
  outline: 5px auto Highlight;
}
.card:where(:hover, :focus-within) {
  border-color: var(--active-color, var(--fg));
  transition: border-color 800ms var(--ease-in-out);
}
.card:where(:hover, :focus-within)::before {
  opacity: 0;
}
.card:where(:hover, :focus-within)::after {
  opacity: 1;
}
.card .card-pixel {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.title {
  font-family: Inconsolata, sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  text-align: left;
  padding: 12px 20px;
  background-image: linear-gradient(to right, var(--main-color-3) 48%,var(--main-color-4) 52%, var(--main-color-3));
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: animate 10s infinite linear;
  transition: transform 0.6s ease;
}

@-webkit-keyframes hue {
  from {
    -webkit-filter: hue-rotate(0deg);
  }
  to {
    -webkit-filter: hue-rotate(-360deg);
  }
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 5px;
}
.progress-bar::before,
.progress-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  transition: 0.6s ease-out;
}
.progress-bar::before {
  right: 0;
  left: 0;
  background-color: rgba(255, 255, 255, 0.05);
}
.progress-bar::after {
  left: 100%;
  right: 0;
  background: var(--main-color-1);
  background: linear-gradient(to right, var(--main-color-3) 0%, var(--main-color-4) 100%);
  transition: 0.6s ease-out;
  z-index: 3;
}
.card:hover .progress-bar::before {
  right: 100%;
}
.card:hover .progress-bar::after {
  left: 0;
}

.description {
  flex: 1;
  font-size: 1.2rem;
  padding: 12px 20px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  transition: all ease 0.4s;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
}
.card:hover .description {
  color: rgba(255, 255, 255, 0.95);
}

.more {
  display: flex;
  gap: 12px;
  padding: 20px;
  z-index: 200;
}

a.link-btn {
  display: inline-block;
  border-radius: 50px;
  padding: 6px 12px;
  border: 1px solid rgba(240, 248, 255, 0.2);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all ease 0.4s;
  color: #2e3033;
  font-size: 0.8em;
  &:hover {
    color: #f3f3f3;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 1px 1px rgba(255, 255, 255, 0.3);
  }
}
