/* ========================================
   HOBBIES SECTION — Card styles extracted
   ======================================== */

/* ============ Moving_card =========== */
/* Card sizing variables (scoped globally, used by Hobbies cards) */
:root {
  --card-height: 400px;
  --card-width: calc(var(--card-height) / 1.5);
}

/* ============ Picture.png =========== */
/* Hint image attaches to the first card and does not affect layout */
.card .hover-hint {
  position: absolute;
  left: -170px; /* sit just to the left of the card */
  top: 50%;
  transform: translateY(-50%);
  width: 140px; /* compact size */
  height: auto;
  opacity: 0.9;
  pointer-events: none; /* never block interactions */
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.35));
}

@media (max-width: 1024px) {
  .card .hover-hint { display: none; }
}

/* ============ Moving_card =========== */
/* Card grid wrapper inside Hobbies */
.hobbies-cards {
  margin: 60px auto 0; /* provide spacing below heading */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px; /* bring cards closer together */
  padding: 0 1rem;
  width: auto; /* fit content, avoid stretching full row */
  /* no flex needed; this container is not inside a flex row */
}

.hobbies-cards > * {
  display: block;
  flex: 0 0 auto; /* prevent shrinking, keeps cards side-by-side */
}

/* Individual card */
.card {
  width: var(--card-width);
  height: var(--card-height);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0 36px;
  perspective: 2500px;
  margin: 0; /* remove wide side margins to center and tighten */
}

/* Keep all cards in a single row on large screens */
@media (min-width: 1100px) {
  .hobbies-cards {
    flex-wrap: nowrap;
  }
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Fade the bottom edge of the poster image */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.wrapper {
  transition: all 0.5s;
  position: absolute;
  width: 100%;
  z-index: -1;
}

.card:hover .wrapper {
  transform: perspective(900px) translateY(-5%) rotateX(25deg) translateZ(0);
  box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
  -webkit-box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
  -moz-box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
}

.wrapper::before,
.wrapper::after {
  content: "";
  opacity: 0;
  width: 100%;
  height: 80px;
  transition: all 0.5s;
  position: absolute;
  left: 0;
}
.wrapper::before {
  top: 0;
  height: 100%;
  background-image: linear-gradient(
    to top,
    transparent 46%,
    rgba(12, 13, 19, 0.5) 68%,
    rgba(12, 13, 19) 97%
  );
}
.wrapper::after {
  bottom: 0;
  opacity: 1;
  background-image: linear-gradient(
    to bottom,
    transparent 46%,
    rgba(12, 13, 19, 0.5) 68%,
    rgba(12, 13, 19) 97%
  );
}

.card:hover .wrapper::before,
.wrapper::after {
  opacity: 1;
}

.card:hover .wrapper::after {
  height: 120px;
}

.title {
  width: 100%;
  transition: transform 0.5s;
}
.card:hover .title {
  transform: translate3d(0%, -50px, 100px);
}

.character {
  width: 100%;
  opacity: 0;
  transition: all 0.5s;
  position: absolute;
  z-index: -1;
  /* Fade the bottom edge of the character image */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 80%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 80%, rgba(0,0,0,0) 100%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.card:hover .character {
  opacity: 1;
  transform: translate3d(0%, -30%, 100px);
}