*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --soft-blue: hsl(215, 51%, 70%);
  --cyan: hsl(178, 100%, 50%);
  --cyan-overlay: hsla(178, 100%, 50%, 0.5);
  --main-bg: hsl(217, 54%, 11%);
  --card-bg: hsl(216, 50%, 16%);
  --line: hsl(215, 32%, 27%);
  --white: hsl(0, 0%, 100%);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 1.5rem;
  background-color: var(--main-bg);
  color: var(--soft-blue);
  font-family: "Outfit", sans-serif;
  font-size: 18px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card {
  width: 100%;
  max-width: 350px;
  padding: 1.5rem;
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.card__images {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.card__image {
  width: 100%;
}

.card__images-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--cyan-overlay);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card__images:hover .card__images-layer {
  opacity: 1;
}

.card__title {
  margin-top: 1.5rem;
}

.card__title h1 {
  color: var(--white);
  font-size: 22px;
  font-weight: 600;
}

.card__title a:hover,
.card__creator a:hover {
  color: var(--cyan);
}

.card__info {
  margin-top: 0.75rem;
  font-weight: 300;
  line-height: 1.5;
}

.card__time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.card__time-left,
.card__time-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card__time-left {
  color: var(--cyan);
  font-weight: 600;
}

.card__time-right {
  font-weight: 300;
}

.card__creator {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 15px;
  font-weight: 300;
}

.card__creator img {
  width: 33px;
  height: 33px;
  border: 1px solid var(--white);
  border-radius: 50%;
  object-fit: cover;
}

.card__creator a {
  color: var(--white);
  font-weight: 400;
}

.attribution {
  font-size: 11px;
  text-align: center;
}

.attribution a {
  color: var(--cyan);
  text-decoration: underline;
}

.attribution a:hover {
  color: var(--white);
}

@media (max-width: 375px) {
  body {
    padding: 1.5rem;
  }

  .card__title h1 {
    font-size: 20px;
  }

  .card__info {
    font-size: 16px;
  }
}
