:root {
  --border-radius: 1rem;
  --text-base: 1rem;
  --text-lg: 1.5rem;
  --text-xl: 2.5rem;
  --tracking: -0.04em;
}

* {
  margin: 0;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    scale: 1.05;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

body {
  padding: 4rem 1.5rem;
  height: 100vh;

  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  font-family: system-ui;
  letter-spacing: var(--tracking);
}

#works {
  position: relative;
  overflow: hidden;

  margin-right: -1.5rem;
  width: auto;
  flex: 1;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  border: solid black 4px;
  border-right: none;
  box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.5);

  transition: transform 300ms;

  opacity: 0;
  animation: fadeIn 0.5s forwards;
  animation-delay: 0.3s;
}

/* .work::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, transparent, rgba(0, 0, 0, 0.7));
} */

/* .work::after {
  content: 'Digital Offering';
  color: white;
  font-size: var(--text-xl);
  font-weight: lighter;
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;

  opacity: 0;
  animation: fadeIn 0.5s forwards;
  animation-delay: 0.5s;
} */

.work img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  overflow: hidden;
  border-radius: inherit;
}

.work {
  /* display: none; */
  opacity: 0;
  transition: opacity 500ms;

  position: absolute;
  inset: 0;

  z-index: 0;
}

.work.active {
  /* display: inline; */
  opacity: 1;
  transition: opacity 500ms;

  z-index: 1;
}

#info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#logo {
  /* width: 253px;
  height: 136px; */
  /* margin-bottom: -0.5rem; */
  /* margin-top: 1rem; */
  width: auto;
  height: fit-content;
  margin-top: 1rem;
}

#logo.skew {
  animation: skewAnimation 600ms;
}

@keyframes skewAnimation {
  0% {
    transform: scale(0.8, 0.8) skew(0deg);
  }
  35% {
    transform: scale(5, 0.03) skew(-75deg);
  }
  80% {
    transform: scale(0.85, 0.85) skew(0deg);
  }
  100% {
    transform: scale(1, 1);
  }
}

#title {
  margin: 0;
  font-size: var(--text-lg);
}

.type-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
}

.type-line.line1 {
  border-right: 2px solid black;
  animation:
    typing1 0.3s steps(8) forwards,
    cursorOff 0s forwards;
  animation-delay: 0.3s, 0.6s;
}

.type-line.line2 {
  border-right: 2px solid black;
  border-right-color: transparent;
  animation:
    cursorOn 0s forwards,
    typing2 0.6s steps(18) forwards,
    blink 1s infinite;
  animation-delay: 0.6s, 0.6s, 1.2s;
}

@keyframes typing1 {
  from {
    width: 0%;
  }
  to {
    width: 8ch;
  }
}

@keyframes typing2 {
  from {
    width: 0%;
  }
  to {
    width: 14ch;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

@keyframes cursorOff {
  to {
    border-color: transparent;
  }
}

@keyframes cursorOn {
  to {
    border-color: black;
  }
}

#contact {
  display: flex;
  gap: 1rem;
  align-items: center;
}

@keyframes fadeIn-contact {
  from {
    opacity: 0;
    scale: 1.3;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

#instagram {
  width: 32px;
  height: 32px;

  transition: transform 300ms;

  opacity: 0;
  animation: fadeIn-contact 0.5s forwards;
  animation-delay: 1.2s;
}

#instagram:active {
  transform: scale(0.9);
}

#gmail {
  text-decoration: none;
  color: inherit;

  transition: transform 300ms;

  opacity: 0;
  animation: fadeIn-contact 0.5s forwards;
  animation-delay: 1.4s;
}

#gmail:active {
  transform: scale(0.9);
}

@media (min-width: 768px) {
  body {
    padding: 4rem 4rem;

    flex-direction: row;
    justify-content: end;
    align-items: end;
    gap: 4rem;
  }

  #works {
    margin-right: 0;
    border-right: solid black 4px;
    border-radius: var(--border-radius);
    height: calc(100vh - 8rem);
  }

  #digitalOffering::after {
    left: 3rem;
    bottom: 3rem;
  }

  #works:hover {
    transform: scale(1.02);
  }

  #instagram:hover {
    transform: scale(1.3);
  }

  #gmail:hover {
    transform: scale(1.1);
  }
}
