.education-intro {
  padding-top: 45px;
  padding-bottom: 60px;
}
.education-intro > .eyebrow {
  margin-top: 42px;
}
.education-intro h1 {
  font-size: clamp(56px, 6.8vw, 90px);
  max-width: 1000px;
}
.education-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8%;
  max-width: 900px;
  margin-top: 30px;
}
.education-lead p {
  font-size: 13px;
  color: var(--muted);
}
.education-lead p:first-child {
  font-size: 17px;
  color: var(--ink);
}
.education-facts {
  display: flex;
  gap: 75px;
  border-top: 1px solid var(--line);
  margin-top: 35px;
  padding-top: 25px;
}
.education-facts strong {
  display: block;
  font: 36px var(--serif);
}
.education-facts span {
  font-size: 10px;
  color: var(--muted);
}
.gallery-section {
  background: #edf0e8;
  padding-top: 65px;
}
.gallery-section .section-heading h2 {
  font-size: 52px;
}
.gallery-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 30px 0 18px;
}
.gallery-filters button {
  border: 1px solid #bdc6b6;
  background: transparent;
  color: var(--ink);
  padding: 10px 16px;
  font-size: 10px;
}
.gallery-filters button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.gallery-count {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 22px;
}
.certificate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 22px;
}
.certificate-card {
  padding: 0;
  text-align: left;
  color: var(--ink);
  border: 0;
  background: transparent;
  min-width: 0;
}
.certificate-card[hidden] {
  display: none;
}
.document-image {
  display: block;
  position: relative;
  background: #faf9f6;
  padding: 13px;
  overflow: hidden;
  border: 1px solid #d9ded2;
}
.document-image img {
  width: 100%;
  height: 310px;
  object-fit: contain;
  transition: transform 0.25s;
}
.certificate-card:hover img {
  transform: scale(1.025);
}
.enlarge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: #293e35e8;
  color: white;
  padding: 7px 10px;
  font-size: 9px;
}
.document-caption {
  display: block;
  padding: 13px 0;
}
.document-caption small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin-bottom: 5px;
}
.document-caption strong {
  font-size: 11px;
  line-height: 1.6;
  font-weight: 500;
  display: block;
}
.gallery-source {
  margin: 40px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.education-cta {
  text-align: center;
}
.education-cta h2 {
  font-size: 56px;
}
.document-viewer {
  width: min(1100px, 96vw);
  height: 95dvh;
  max-height: 95dvh;
  max-width: 96vw;
  padding: 18px 25px;
  border: 1px solid #d7d9ce;
  overflow: hidden;
}
.document-viewer[open] {
  display: flex;
  flex-direction: column;
}
.document-viewer::backdrop {
  background: #11251bee;
  backdrop-filter: blur(4px);
}
.viewer-toolbar,
.viewer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-shrink: 0;
}
.viewer-count,
.viewer-bottom p,
.viewer-original {
  font-size: 11px;
  margin: 0;
}
.viewer-close {
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 12px;
  padding: 6px 0;
}
.viewer-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex: 1;
  gap: 15px;
  margin: 12px 0;
}
.viewer-image {
  height: 100%;
  width: calc(100% - 110px);
  object-fit: contain;
  min-width: 0;
}
.viewer-prev,
.viewer-next {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  width: 40px;
  height: 44px;
  flex-shrink: 0;
}
.viewer-original {
  border-bottom: 1px solid #aeb6a5;
}
.viewer-bottom {
  min-height: 40px;
}
.viewer-title {
  max-width: 55%;
}
body:has(.document-viewer[open]) {
  overflow: hidden;
}
nav [aria-current="page"] {
  border-bottom: 1px solid var(--ink);
}
@media (max-width: 1000px) {
  .certificate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .document-image img {
    height: 270px;
  }
}
@media (max-width: 720px) {
  .education-intro {
    padding-top: 30px;
  }
  .education-intro h1 {
    font-size: 52px;
    letter-spacing: -1px;
  }
  .education-lead {
    display: block;
  }
  .education-facts {
    gap: 20px;
    justify-content: space-between;
  }
  .education-facts strong {
    font-size: 28px;
  }
  .education-facts span {
    font-size: 8px;
    display: block;
    max-width: 95px;
  }
  .gallery-section .section-heading h2 {
    font-size: 43px;
  }
  .gallery-filters {
    gap: 7px;
  }
  .gallery-filters button {
    font-size: 9px;
    padding: 9px 11px;
  }
  .certificate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }
  .document-image {
    padding: 7px;
  }
  .document-image img {
    height: 230px;
  }
  .enlarge {
    bottom: 10px;
    right: 10px;
    padding: 4px 7px;
    font-size: 8px;
  }
  .document-caption strong {
    font-size: 10px;
  }
  .document-viewer {
    padding: 14px 12px;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
  }
  .viewer-stage {
    position: relative;
    gap: 0;
    margin: 12px 0 50px;
  }
  .viewer-image {
    width: 100%;
  }
  .viewer-prev,
  .viewer-next {
    position: absolute;
    bottom: -46px;
    z-index: 1;
    background: var(--paper);
  }
  .viewer-prev {
    left: 0;
  }
  .viewer-next {
    right: 0;
  }
  .viewer-bottom {
    align-items: flex-start;
    gap: 12px;
  }
  .viewer-bottom p,
  .viewer-original {
    font-size: 9px;
  }
  .education-cta h2 {
    font-size: 45px;
  }
}
@media (max-width: 380px) {
  .document-image img {
    height: 190px;
  }
}
.education-diploma {
  max-width: 900px;
  border-left: 2px solid #9ba88f;
  padding: 8px 0 8px 25px;
  margin-top: 30px;
}
.education-diploma .eyebrow {
  margin-bottom: 12px;
}
.education-diploma h2 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 12px;
}
.education-diploma > p:last-child {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
/* A quieter, gallery-like treatment that gives each original document room. */
.education-intro {
  position: relative;
  isolation: isolate;
  padding-top: 54px;
  padding-bottom: 72px;
  overflow: hidden;
}
.education-intro::after {
  content: "OL";
  position: absolute;
  z-index: -1;
  right: 7%;
  top: 100px;
  color: #e9e8df;
  font: 280px/0.8 var(--serif);
  letter-spacing: -24px;
  pointer-events: none;
}
.education-intro h1 {
  max-width: 760px;
}
.education-lead {
  max-width: 860px;
}
.education-diploma {
  max-width: 760px;
  border-left: 2px solid #a88a62;
  background: #efede6;
  padding: 22px 28px;
  margin-top: 28px;
}
.education-diploma h2 {
  max-width: 650px;
  font-size: 29px;
}
.education-facts {
  max-width: 800px;
  gap: 0;
  border: 0;
  padding: 22px 0 0;
}
.education-facts > div {
  min-width: 170px;
  padding: 0 28px;
  border-left: 1px solid var(--line);
}
.education-facts > div:first-child {
  padding-left: 0;
  border: 0;
}
.gallery-section {
  position: relative;
  overflow: hidden;
  background: #f1efe9;
  padding-top: 80px;
}
.gallery-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(
    90deg,
    #293e35 0 22%,
    #a88a62 22% 23%,
    transparent 23%
  );
}
.gallery-section .section-heading {
  margin-bottom: 26px;
}
.gallery-section .section-heading h2 {
  font-size: clamp(44px, 5vw, 66px);
}
.gallery-filters {
  gap: 8px;
  margin: 28px 0 16px;
}
.gallery-filters button {
  border-color: #d4d1c8;
  border-radius: 999px;
  padding: 10px 17px;
  transition:
    background 0.2s,
    color 0.2s,
    border 0.2s;
}
.gallery-filters button:hover {
  border-color: var(--ink);
}
.gallery-filters button[aria-pressed="true"] {
  background: var(--ink);
}
.gallery-count {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 9px;
  margin: 0 0 18px;
}
.certificate-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 26px;
}
.certificate-card {
  position: relative;
  padding: 12px;
  text-align: left;
  background: #fbfaf7;
  border: 1px solid #e0ddd4;
  box-shadow: 0 8px 24px #293e350a;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.certificate-card:hover,
.certificate-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px #293e3518;
}
.document-image {
  display: grid;
  place-items: center;
  height: 330px;
  padding: 13px;
  background: #f2f0e9;
  border: 0;
}
.document-image::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid #ffffffa8;
  pointer-events: none;
}
.document-image img {
  height: 100%;
  filter: saturate(0.94);
}
.certificate-card:hover img {
  transform: scale(1.015);
}
.enlarge {
  right: 17px;
  bottom: 17px;
  padding: 9px 13px;
  letter-spacing: 0.03em;
  opacity: 0.96;
}
.document-caption {
  min-height: 72px;
  padding: 14px 4px 3px;
}
.document-caption small {
  color: #967a57;
  letter-spacing: 0.14em;
}
.document-caption strong {
  font: 20px/1.2 var(--serif);
}
.gallery-source {
  border-top: 1px solid #d7d4ca;
  padding-top: 22px;
}
.education-cta {
  padding-top: 90px;
  padding-bottom: 90px;
  background: #f8f6f1;
}
@media (max-width: 1000px) {
  .certificate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .document-image {
    height: 310px;
  }
}
@media (max-width: 720px) {
  .education-intro {
    padding-top: 34px;
    padding-bottom: 50px;
  }
  .education-intro::after {
    right: 3%;
    top: 115px;
    font-size: 160px;
  }
  .education-diploma {
    padding: 18px 19px;
  }
  .education-diploma h2 {
    font-size: 25px;
  }
  .education-facts > div {
    min-width: 0;
    flex: 1;
    padding: 0 13px;
  }
  .education-facts strong {
    font-size: 28px;
  }
  .gallery-section {
    padding-top: 58px;
  }
  .gallery-section .section-heading h2 {
    font-size: 43px;
  }
  .certificate-grid {
    gap: 16px 12px;
  }
  .certificate-card {
    padding: 7px;
  }
  .document-image {
    height: 225px;
    padding: 7px;
  }
  .document-image::after {
    inset: 5px;
  }
  .document-caption {
    min-height: 62px;
    padding: 11px 3px 2px;
  }
  .document-caption strong {
    font-size: 18px;
  }
  .enlarge {
    bottom: 10px;
    right: 10px;
    padding: 6px 8px;
    font-size: 8px;
  }
}

/* Carry the portrait palette through the certificates page. */
.gallery-section {
  background: #eee9ed;
}
.gallery-section::before {
  background: linear-gradient(
    90deg,
    #65535f 0 22%,
    #b99b7c 22% 23%,
    transparent 23%
  );
}
.gallery-filters button {
  border-color: #d5cbd1;
}
.gallery-filters button:hover {
  border-color: #8e7180;
}
.gallery-filters button[aria-pressed="true"] {
  background: #594b55;
  border-color: #594b55;
}
.document-image {
  background: #f5f1f1;
}
.certificate-card {
  background: #faf8f6;
  border-color: #e2dadd;
  box-shadow: 0 8px 24px #51464f0b;
}
.certificate-card:hover,
.certificate-card:focus-visible {
  box-shadow: 0 18px 36px #51464f19;
}
.enlarge {
  background: #594b55e8;
}
.education-intro::after {
  color: #eee8ec;
}
.education-diploma {
  border-left-color: #b99b7c;
  background: #eee9ed;
}
.teaser-document {
  background: #faf8f6;
  box-shadow: 12px 12px 0 #e2d9df;
}
.education-cta {
  background: #f7f4f2;
}
.document-viewer {
  background: #f7f4f2;
  border-color: #ded7da;
}
.document-viewer::backdrop {
  background: #342b33e8;
}
.education-diploma,
.education-facts > div,
.gallery-source {
  border-color: #ded7da;
}
