body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative; /* Needed for the pseudo-element */
  background-color: #1a202c; /* Fallback color */
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

/* New pseudo-element to hold and flip the background image */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('Draft1.png');
  background-size: cover;
  background-position: center;
  transform: scaleX(-1); /* This flips the image horizontally */
  z-index: -1;
}

.card {
    will-change: transform;
  }

.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  perspective: 2000px;
  transform: rotateX(50deg) rotateZ(-20deg) scale(0.9);
  transform-style: preserve-3d;
}

.scene {
  width: 180px;
  height: 250px;
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1); /* Transition for the lift */
}

.scene.is-lifted {
    transform: translateZ(40px);
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 1.5s cubic-bezier(0.76, 0, 0.24, 1); /* Slower transition for flip */
  transform: rotateX(0deg) rotateY(0deg); /* Initial state */
}

/* Horizontal Flip for the Wave */
.card.is-flipped-horizontally {
    transform: rotateY(180deg);
}

/* Vertical Flip for the Lift */
.card.is-flipped-vertically {
    transform: rotateX(360deg);
}


.face {
  position: absolute;
  width: 90%;
  height: 90%;
  backface-visibility: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.front { /* Now shows the card back image */ 
  background-image: url('card_back.png'); 
  background-size: 100% 100%; /* Changed from 'cover' to fill the element */ 
  background-position: center; 
}


.back {
  background: #2d3748;
  color: #f7fafc;
  transform: rotateY(180deg);
  background-position: center;
}


.back .skill-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.back .skill-name {
    font-size: 1.25rem;
    font-weight: 600;
}

/* New style for the heading */
.overlap-heading {
    font-weight: 800; /* Bolder than default bold */
    letter-spacing: 0.1em; /* Add space between the letters */
    /* Create the layered drop shadow effect */
    text-shadow: 1px 1px 0px rgba(0,0,0,0.3),
                 2px 2px 0px rgba(0,0,0,0.3),
                 3px 3px 0px rgba(0,0,0,0.3),
                 4px 4px 0px rgba(0,0,0,0.3);
}

