:root {
  --primary-color: #3d2798;
  --secondary-color: #ff61ae;
  --icon-size-s: 1em;
  --icon-size-m: 1.5em;
  --card-radius: 16px;
}

body {
  /* position: relative; */
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: 1em;
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

main {
  padding: 1rem 5em;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: load reverse ease-in-out 1s;
  /* font-weight: 300; */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  text-align: center;
  padding: 0.5rem;
  border-bottom: 1px solid var(--secondary-color);
}

h1 {
  font-size: 2em;
  border-bottom: 4px solid var(--secondary-color);
}

h2 {
  font-size: 1.75em;
  border-bottom: 2px solid var(--secondary-color);
}

h3 {
  font-size: 1.5em;
  border-bottom: 1px solid var(--secondary-color);
}

a {
  width: fit-content;
}

a,
a:visited {
  color: inherit;
  text-decoration: inherit;
  opacity: 1;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.5;
}

ul {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

li {
  list-style: none;
}

/* li {
    display: flex;
    align-items: center;
    position: relative;
} */

/* li::before {
    content: "- ";
    position: absolute;
    top: 0;
    left: -0.5em;
} */

address {
  font-style: normal;
}

.loading {
  filter: invert(47%) sepia(18%) saturate(6019%) hue-rotate(305deg)
    brightness(104%) contrast(93%);
  filter: invert(47%) sepia(18%) saturate(6019%) hue-rotate(305deg)
    brightness(104%) contrast(93%);
  animation: 0.8s ease-in 1 load;
  opacity: 0;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@keyframes load {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.area {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.area:nth-of-type(1) {
  animation: 0.8s ease 1 100ms cards-in backwards;
}

.area:nth-of-type(2) {
  animation: 0.8s ease 1 200ms cards-in backwards;
}

.area:nth-of-type(3) {
  animation: 0.8s ease 1 300ms cards-in backwards;
}

.card {
  display: flex;
  position: relative;
  flex-direction: column;
  border-color: var(--secondary-color);
  border-style: solid;
  border-radius: var(--card-radius);
  border-width: 1px;
  padding: 0.75rem 1.5em;
  height: 20em;
  flex: 1 1 0;
  gap: 1em;
  box-sizing: border-box;
  min-width: 16rem;
  max-width: 16rem;
  border-color: var(--secondary-color);
  transition: all 0.2s ease-in;
}

@keyframes cards-in {
  from {
    opacity: 0;
    transform: translateY(-10%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:first-child {
  position: relative;
  border-width: 3px;
  width: 16rem;
  max-width: 16rem;
  height: 20em;
  flex: 0 0 15em;
  border-color: var(--secondary-color);
  align-items: center;
  justify-content: flex-end;
}

.hide {
  display: none;
}

/* .card:last-child {
    max-width: 16rem;
} */

.card:hover {
  transform: scale(1.01, 1.01);
}

.card:first-child:hover {
  transform: scale(1.03, 1.03);
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: 1px 1px 1px var(--secondary-color),
    1px -1px 1px var(--secondary-color), -1px -1px 1px var(--secondary-color),
    -1px 1px 1px var(--secondary-color);
  opacity: 0;
  transition: all 0.2s ease-out;
  z-index: -1;
  border-radius: var(--card-radius);
}

.card:hover::after {
  opacity: 1;
}

.card.card--hs {
  height: 8em;
}

.when {
  position: absolute;
  bottom: 0.5em;
  right: 0.5em;
  font-style: italic;
}

.icon {
  background-color: var(--secondary-color);
  display: inline-block;
  width: var(--icon-size-s);
  height: var(--icon-size-s);
  mask-repeat: no-repeat;
  mask-position: center;
  vertical-align: middle;
}

.icon--link {
  mask-image: url("images/external-link.svg");
  margin-top: -1rem;
}

.icon--gh {
  mask-image: url("images/github-circle.svg");
  width: var(--icon-size-m);
  height: var(--icon-size-m);
}

.decor {
  /* TODO: set to -1 */
  z-index: -1;
  position: fixed;
  inset: 0;
  padding: 1rem 0;
  opacity: 50%;
}

.railgroup {
  overflow-x: hidden;
}

.rail {
  width: 100%;
  height: 4px;
  background: linear-gradient(
    to right,
    #2ea7d3 10%,
    #1c6580 25%,
    #2ea7d3 50%,
    #1c6580 80%,
    #2ea7d3
  );
  margin-top: 4px;
}

.cart {
  background-color: rgb(255, 255, 255);
  opacity: 85%;
  width: 6px;
  height: 100%;
  animation: 10s infinite linear drive;
}

@keyframes drive {
  from {
    transform: translateX(-10vw);
  }
  to {
    transform: translateX(100vw);
  }
}

@media (min-width: 640px) {
  .area {
    justify-content: flex-start;
  }
}
