* {
      box-sizing: border-box;
    }

    body {
      font-family: 'Inter', sans-serif;
      background: linear-gradient(to right, #e8f0fe, #fff);
      margin: 0;
      padding: 40px 20px;
      display: flex;
      justify-content: center;
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 30px;
      width: 100%;
      max-width: 1200px;
    }

    .card-wrapper {
      perspective: 1000px;
      height: 400px;
      cursor: pointer;
    }

    .card {
      width: 100%;
      height: 100%;
      position: relative;
      transform-style: preserve-3d;
      transition: transform 0.8s ease;
    }

    /* Toggle flip on hover for desktop */
    .card-wrapper:hover .card {
      transform: rotateY(180deg);
    }

    /* Toggle flip on tap for mobile */
    .card-wrapper.flipped .card {
      transform: rotateY(180deg);
    }

    .card-face {
      position: absolute;
      width: 100%;
      height: 100%;
      border-radius: 16px;
      overflow: hidden;
      backface-visibility: hidden;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }

    .card-front {
      background: #fff;
    }

    .card-front img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .card-back {
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      transform: rotateY(180deg);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 20px;
      text-align: center;
    }

    .staff-name {
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .staff-role {
      font-size: 16px;
      color: #666;
      margin-bottom: 12px;
    }

    .staff-contact {
      font-size: 14px;
      margin: 4px 0;
    }

    .staff-contact a {
      color: #0077cc;
      text-decoration: none;
    }

    .staff-contact a:hover {
      text-decoration: underline;
    }

    @media (hover: none) {
      /* Enable flip on tap for touch devices */
      .card-wrapper:hover .card {
        transform: none;
      }
    }