:root {
    /* much larger images for desktop */
    --cell-size: 280px;
    --gap: 1rem;

    --primary-color: rgb(189, 29, 58);
    --background-gradient: linear-gradient(to left, #FFF, #FFC0CB);
    --white-color: rgb(249, 235, 234);
    --shadow-color: rgba(218, 105, 105, 0.687);
  }
  
  /* Base & Layout */
  body {
    margin: 0;
    padding: 20px 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: var(--background-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden; /* allow vertical scrolling */
  }
  
  /* Logo */
  .logo {
    width: 16vw;
    height: 16vw;
    max-width: 180px;
    max-height: 180px;
    min-width: 90px;
    min-height: 90px;
    margin: 20px auto;
    position: relative;
    z-index: 1000;
    animation: slideInTop 1s ease-out forwards;
    border-radius: 50%;
    box-shadow: 0 8px 24px var(--shadow-color);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease-in-out;
  }

  .logo:hover img {
    transform: scale(1.1);
  }

  .logo:hover {
    box-shadow: 0 12px 32px var(--shadow-color);
  }
  
  /* Desktop Grid: larger images that fill the page */
  .main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--cell-size), 1fr));
    grid-auto-rows: var(--cell-size);
    gap: var(--gap);
    width: 90%;
    max-width: 1600px;
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    box-shadow: 0 8px 24px var(--shadow-color);
    overflow: visible;
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  /* Card */
  .box {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 24px var(--shadow-color);
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
  }
  
  /* Staggered animation for boxes */
  .box:nth-child(1) { animation-delay: 0.1s; }
  .box:nth-child(2) { animation-delay: 0.2s; }
  .box:nth-child(3) { animation-delay: 0.3s; }
  .box:nth-child(4) { animation-delay: 0.4s; }
  .box:nth-child(5) { animation-delay: 0.5s; }
  .box:nth-child(6) { animation-delay: 0.6s; }
  .box:nth-child(7) { animation-delay: 0.7s; }
  .box:nth-child(8) { animation-delay: 0.8s; }
  .box:nth-child(9) { animation-delay: 0.9s; }
  .box:nth-child(10) { animation-delay: 1.0s; }
  .box:nth-child(11) { animation-delay: 1.1s; }
  .box:nth-child(12) { animation-delay: 1.2s; }
  .box:nth-child(13) { animation-delay: 1.3s; }
  .box:nth-child(14) { animation-delay: 1.4s; }
  .box:nth-child(15) { animation-delay: 1.5s; }
  .box:nth-child(16) { animation-delay: 1.6s; }
  .box:nth-child(17) { animation-delay: 1.7s; }
  .box:nth-child(18) { animation-delay: 1.8s; }
  .box:nth-child(19) { animation-delay: 1.9s; }
  .box:nth-child(20) { animation-delay: 2.0s; }
  
  /* Image */
  .image-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
  }
  .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .image-container:hover img {
    transform: scale(1.1) rotate(1deg);
    filter: brightness(1.1) contrast(1.1);
  }
  
  .box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 32px var(--shadow-color);
    z-index: 10;
  }
  
  /* Description overlay */
  .description {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(189,29,58,0.38);
    color: var(--white-color);
    padding: 0.5rem;
    box-sizing: border-box;
    font-size: 0.9rem;
    line-height: 1.2;
    font-weight: 500;
    text-align: center;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    backdrop-filter: blur(2px);
    white-space: normal;
    word-break: break-word;
  }
  
  /* Footer */
  .disclaimer {
    width: 100%;
    padding: 1rem;
    background: rgba(255,255,255,0.9);
    text-align: center;
    color: var(--primary-color);
    box-shadow: 0 -4px 12px var(--shadow-color);
    backdrop-filter: blur(5px);
    margin-top: auto;
  }
  
  /* Responsive breakpoints */
  @media (max-width: 1200px) {
    .main {
      --cell-size: 240px;
    }
  }
  @media (max-width: 992px) {
    .main {
      --cell-size: 200px;
    }
  }
  @media (max-width: 768px) {
    .main {
      --cell-size: 180px;
    }
    .logo {
      width: 25vw;
      height: 25vw;
    }
  }
  
  /* === MOBILE: single column layout like contactme.html and courses.html === */
  @media (max-width: 600px) {
    body {
      height: auto;
      overflow: auto;
      padding: 10px 0;
    }

    .main {
      display: grid;
      grid-template-columns: 1fr;
      grid-auto-rows: auto;
      width: 95%;
      max-width: 400px;
      padding: 1rem;
      gap: 1rem;
      margin-bottom: 1rem;
    }

    .box {
      width: 100%;
      aspect-ratio: 1 / 1;
      border-radius: 15px;
      overflow: hidden;
    }

    .image-container {
      width: 100%;
      height: 100%;
    }

    .image-container img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .logo {
      width: 35vw;
      height: 35vw;
      margin-bottom: 1rem;
    }

    /* simulate hover on mobile */
    .logo img,
    .image-container img {
      transform: scale(1.08);
    }
    .logo {
      box-shadow: 0 12px 32px var(--shadow-color);
    }

    .description {
      font-size: 0.85rem;
      padding: 0.4rem;
    }
  }
  
  /* Animations */
  @keyframes slideInTop {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);       opacity: 1; }
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
  }
  @keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  