/* minimalist white base — accent only for subtle guidance */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #ffffff;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  line-height: 1.5;
  color: #1e1e1e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.5rem;
}

/* main canvas – pure white, lots of breathing room */
.exposition {
  max-width: 1100px;
  width: 100%;
  background: #ffffff;
  border-radius: 2rem;
  padding: 2rem 2rem 3rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.02), 0 2px 6px rgba(0, 0, 0, 0.01);
}

/* header — white, no noise */
.header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.header h1 {
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #111;
  margin-bottom: 0.5rem;
}

.header p {
  font-size: 1.1rem;
  color: #5a5a5a;
  font-weight: 350;
}

/* subtle accent divider — tiny hint of #522ffe */
.divider {
  width: 60px;
  height: 3px;
  background-color: #522ffe;
  border-radius: 10px;
  margin: 1.25rem auto 0;
  opacity: 0.7;
}

/* certification grid: airy, white, card click = link */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

/* ---- CARD ENTRANCE ANIMATION ---- */
@keyframes cardFadeIn {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---- MORE VISIBLE SHAKE — energetic wobble ---- */
@keyframes visibleShake {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  10%  { transform: translate(-4px, 2px) rotate(-1.2deg); }
  20%  { transform: translate(4px, -2px) rotate(1.2deg); }
  30%  { transform: translate(-4px, 2px) rotate(-1deg); }
  40%  { transform: translate(4px, -2px) rotate(1deg); }
  50%  { transform: translate(-3px, 2px) rotate(-0.8deg); }
  60%  { transform: translate(3px, -2px) rotate(0.8deg); }
  70%  { transform: translate(-3px, 1px) rotate(-0.5deg); }
  80%  { transform: translate(3px, -1px) rotate(0.5deg); }
  90%  { transform: translate(-1.5px, 1px) rotate(-0.2deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}

/* each cert card – clean white, minimal border, accent only on interaction */
.cert-card {
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02), 0 0 0 1px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid #f0f0f0;
  position: relative;
  overflow: hidden;
  opacity: 0;
  /* entrance + continuous shake */
  animation: cardFadeIn 0.6s ease forwards,
             visibleShake 4s ease-in-out 0.7s infinite;
}

/* stagger the two cards with different shake rhythms */
.cert-card:nth-child(1) {
  animation: cardFadeIn 0.6s ease forwards,
             visibleShake 4s ease-in-out 0.7s infinite;
}

.cert-card:nth-child(2) {
  animation: cardFadeIn 0.6s ease forwards,
             visibleShake 4.4s ease-in-out 0.9s infinite;
}

/* hover – accent shows up gently, still mostly white */
.cert-card:hover {
  animation-play-state: paused;
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 24px 40px -12px rgba(82, 47, 254, 0.15), 0 0 0 1px rgba(82, 47, 254, 0.2);
  border-color: rgba(82, 47, 254, 0.35);
}

/* tiny accent bar on the left – only appears on hover */
.cert-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: #522ffe;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 0 4px 4px 0;
}

.cert-card:hover::before {
  opacity: 1;
}

/* ---- IMAGE CONTAINER with subtle zoom on hover ---- */
.cert-image {
  width: 100%;
  height: 100px;
  background: #0a0a1a;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(82, 47, 254, 0.08);
  transition: border-color 0.3s ease,
              box-shadow 0.3s ease,
              transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  overflow: hidden;
}

.cert-card:hover .cert-image {
  border-color: rgba(82, 47, 254, 0.4);
  box-shadow: 0 0 0 1px rgba(82, 47, 254, 0.15);
  transform: scale(1.03);
}

/* the actual logo image — uses contain to fit fully, no cropping */
.cert-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 12px;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.cert-card:hover .cert-image img {
  transform: scale(1.08);
}

/* certification title */
.cert-card h3 {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #111;
  margin-bottom: 0.6rem;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.cert-card:hover h3 {
  color: #000;
}

/* description – light grey, stays subtle */
.cert-card p {
  font-size: 0.95rem;
  color: #5f5f5f;
  margin-bottom: 1.5rem;
  flex: 1;
  transition: color 0.2s ease;
}

.cert-card:hover p {
  color: #4a4a4a;
}

/* the 'view' row – accent text only, but still restrained */
.cert-link-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 450;
  color: #522ffe;
  opacity: 0.85;
  transition: opacity 0.25s ease, gap 0.25s ease;
  margin-top: 0.5rem;
  letter-spacing: -0.01em;
}

.cert-card:hover .cert-link-indicator {
  opacity: 1;
  gap: 0.75rem;
}

.cert-link-indicator span {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.cert-card:hover .cert-link-indicator span {
  transform: translateX(3px);
}

/* future note – white, minimal */
.future-note {
  text-align: center;
  margin-top: 3.5rem;
  font-size: 0.9rem;
  color: #9a9a9a;
  border-top: 1px solid #f1f1f1;
  padding-top: 2rem;
  letter-spacing: 0.01em;
  animation: cardFadeIn 0.6s ease forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

.future-note .accent-dot {
  color: #522ffe;
  font-weight: 500;
  opacity: 0.8;
}

/* responsiveness */
@media (max-width: 600px) {
  .exposition {
    padding: 1.5rem 1.25rem 2rem;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .cert-grid {
    gap: 1.25rem;
  }

  .cert-card {
    padding: 1.5rem 1.25rem;
  }

  .cert-image {
    height: 80px;
  }

  .cert-image img {
    padding: 8px;
  }

  /* reduce hover intensity on mobile */
  .cert-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
}

/* keep everything clean & white, no extra color except accents */
a {
  text-decoration: none;
}

/* focus-visible for accessibility — accent outline */
.cert-card:focus-visible {
  outline: 2px solid #522ffe;
  outline-offset: 4px;
  border-radius: 1.5rem;
}

/* ---- REDUCED MOTION: respect user preferences ---- */
@media (prefers-reduced-motion: reduce) {
  .cert-card,
  .future-note {
    animation: none !important;
    opacity: 1;
    transform: none !important;
  }

  .cert-card:hover {
    transform: none;
  }

  .cert-card:hover .cert-image,
  .cert-card:hover .cert-image img,
  .cert-card:hover .cert-link-indicator span {
    transform: none;
  }
}