body.page-certificates {
  margin: 0;
  font: 1rem/1.6 var(--type);
}
.page-certificates *, .page-certificates *::before, .page-certificates *::after {
  box-sizing: border-box;
}
.page-certificates a { color: inherit; }
.page-certificates h1, .page-certificates h2, .page-certificates h3, .page-certificates p { margin: 0; }
.page-certificates :focus-visible { outline: 2px solid var(--cobalt); outline-offset: 4px; }
.page-certificates .skip { position: absolute; inset: 12px auto auto 12px; transform: translateY(-160%); }
.page-certificates .skip:focus { transform: none; }
.page-certificates .wrap { width: min(1120px, calc(100% - clamp(32px, 5vw, 64px))); margin-inline: auto; }

.cert-hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(12px, 5vw, 64px);
  align-items: end;
  padding-block: clamp(38px, 7vw, 94px) clamp(24px, 4vw, 52px);
  border-bottom: 1px solid var(--rule);
}
.folio-site .cert-hero h1 {
  font-size: clamp(2.8rem, 6.8vw, 5.75rem);
  line-height: 1.04;
  letter-spacing: -.07em;
}
.cert-hero p { max-width: 42ch; color: var(--muted); }

.cert-group { margin-top: clamp(32px, 5vw, 62px); }
.cert-group h2 {
  scroll-margin-top: 90px;
  margin-bottom: clamp(14px, 2.4vw, 22px);
  font-size: clamp(1.35rem, 2.55vw, 2.18rem);
  line-height: 1.16;
}
.cert-bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 1.65vw, 20px);
}
.certificate-card {
  grid-column: span 2;
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.certificate-card--half { grid-column: span 3; }
.cert-art {
  --art-inset: clamp(9px, 1.2vw, 14px);
  position: relative;
  display: grid;
  place-content: center;
  min-width: 0;
  min-block-size: clamp(155px, 17vw, 196px);
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(136deg, #e2ebf9, #f2f6fc);
}
.cert-art .photo-open {
  position: absolute;
  inset: var(--art-inset);
  background: transparent;
}
.cert-art .photo-open img { object-fit: contain; }
.certificate-card--half .cert-art { min-block-size: clamp(165px, 19vw, 222px); }
.cert-card-copy {
  position: relative;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: clamp(11px, 1.3vw, 16px) clamp(13px, 1.6vw, 20px);
}
.cert-provider {
  font: 650 .72rem/1.35 var(--code);
  color: var(--cobalt);
}
.certificate-card h3 {
  font-size: clamp(1.05rem, 1.75vw, 1.45rem);
  line-height: 1.16;
}
.cert-type {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.4;
}

/* Keep the hover transform separate from the scroll entrance's translate. */
.certificate-card {
  transition: transform .24s cubic-bezier(.2,.75,.25,1), border-color .24s, box-shadow .24s;
}
.cert-card-copy {
  transition: background-color .24s;
}
.cert-card-copy::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #145bd7, #92baff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.75,.25,1);
  pointer-events: none;
}
.cert-provider { transition: transform .24s cubic-bezier(.2,.75,.25,1); }
.certificate-card h3 { transition: color .24s; }

.certificate-card:is(:hover, :focus-within) {
  transform: translateY(-3px);
  border-color: #6292df;
  box-shadow: 0 12px 26px -19px #174879a8;
}
.certificate-card:is(:hover, :focus-within) .cert-card-copy { background-color: #edf4ff; }
.certificate-card:is(:hover, :focus-within) .cert-card-copy::before { transform: scaleX(1); }
.certificate-card:is(:hover, :focus-within) .cert-provider { transform: translateX(3px); }
.certificate-card:is(:hover, :focus-within) h3 { color: #154ba1; }

@media (prefers-reduced-motion: reduce) {
  .certificate-card,
  .cert-card-copy,
  .cert-card-copy::before,
  .certificate-card .cert-provider,
  .certificate-card .photo-open img,
  .certificate-card h3 { transition: none; }
  .certificate-card:is(:hover, :focus-within),
  .certificate-card:is(:hover, :focus-within) .cert-provider,
  .certificate-card .photo-open:hover img { transform: none; }
}

@media (min-width: 561px) {
  .cert-bento--adk {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }
  .cert-bento--adk .certificate-card { grid-template-rows: auto 1fr; }
}

@media (min-width: 861px) {
  .cert-bento--adk .certificate-card { grid-column: span 4; }
  .cert-bento--adk .certificate-card:nth-child(4) { grid-column: 3 / span 4; }
}

@media (min-width: 561px) and (max-width: 860px) {
  .cert-bento--adk .certificate-card { grid-column: span 6; }
  .cert-bento--adk .certificate-card:last-child { grid-column: 4 / span 6; }
}

@media (max-width: 860px) {
  .certificate-card { grid-column: span 3; }
}
@media (max-width: 560px) {
  .cert-hero { grid-template-columns: 1fr; }
  .certificate-card { grid-column: 1 / -1; }
  .certificate-card .cert-art { min-block-size: 0; aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .certificate-card {
      animation: certificate-enter linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes certificate-enter {
  from { opacity: .55; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
