/* Vanilla-JS port of React Bits <TiltedCard /> — scoped styles */

.modal-right-col.honor-grid { display: block; }

.honor-group { display: grid; gap: 1.6vw; align-items: start; }
.honor-group--landscape { grid-template-columns: 1fr; margin-bottom: 1.6vw; }
.honor-group--portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tilted-card {
  position: relative;
  width: 100%;
  height: auto;
  margin: 0;
  perspective: 900px;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tilted-card--portrait { aspect-ratio: 3 / 4; }
.tilted-card--landscape { aspect-ratio: 3 / 2; }

.tilted-card__shadow {
  position: absolute;
  inset: 10% 7%;
  border-radius: 16px;
  background: rgba(24, 30, 34, 0.35);
  filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.tilted-card__body {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}

.tilted-card__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #fff;
  box-shadow: 0 18px 40px rgba(24, 30, 34, 0.16);
}

.tilted-card__back {
  transform: rotateY(180deg);
  background: #f7f3e8;
  box-shadow: 0 18px 40px rgba(24, 30, 34, 0.18);
}

.modal-right-col .tilted-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  background: #fff;
}

.tilted-card__back-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  color: #1a1a1a;
  font-family: 'Noto Sans JP', 'Noto Sans SC', sans-serif;
}

.tc-top,
.tc-title,
.tc-meta,
.tc-abilities,
.tc-foot {
  position: relative;
  z-index: 1;
}

.tc-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.tc-kicker {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: #8a8578;
}

.tc-index {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #a39d8e;
}

.tc-title {
  font-family: 'Noto Serif JP', 'Noto Serif SC', serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.42;
  letter-spacing: 0.01em;
  margin: 12px 0 13px;
  color: #15171a;
}

.tc-em {
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: #3d7a7e;
}

.tc-rule {
  height: 1px;
  flex: none;
  margin: 0 0 14px;
  background: rgba(23, 27, 28, 0.14);
}

.tc-meta {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tc-meta > div {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 9px;
  align-items: start;
}

.tc-meta dt {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #8a8578;
  padding-top: 3px;
}

.tc-meta dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #2d2d2d;
}

.tc-meta dd strong {
  font-weight: 400;
  color: #15171a;
}

.tc-abilities {
  margin-top: 18px;
}

.tc-ab-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #8a8578;
  margin-bottom: 4px;
}

.tc-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
}

.tilted-card--landscape .tc-chips {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tc-chip {
  position: relative;
  padding: 8px 0 8px 14px;
  border-bottom: 1px dashed rgba(23, 27, 28, 0.16);
  color: #2f5f62;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.tc-chip::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3d7a7e;
  opacity: 0.7;
}

.tc-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.tc-hint {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: #a39d8e;
  text-transform: uppercase;
}

.tc-watermark {
  position: absolute;
  right: 12px;
  bottom: -12px;
  z-index: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 104px;
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(61, 122, 126, 0.075);
  pointer-events: none;
}

.tilted-card__glare {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(
    farthest-corner circle at var(--tc-gx, 50%) var(--tc-gy, 50%),
    rgba(255, 255, 255, calc(var(--tc-glare, 0) * 0.34)) 0%,
    rgba(255, 255, 255, calc(var(--tc-glare, 0) * 0.2)) 24%,
    rgba(255, 255, 255, calc(var(--tc-glare, 0) * 0.06)) 42%,
    rgba(255, 255, 255, 0) 60%
  );
  mix-blend-mode: screen;
}

.tilted-card__edge {
  position: absolute;
  inset: 0;
  z-index: 7;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(24, 24, 27, 0.08);
}

.tilted-card:focus-visible .tilted-card__edge {
  box-shadow: inset 0 0 0 2px rgba(61, 122, 126, 0.8);
}

@media (max-width: 900px) {
  .honor-group { gap: 5vw; }
  .honor-group--landscape { margin-bottom: 5vw; }
  .honor-group--portrait { grid-template-columns: 1fr; }
}

/* Honors page: full-width text block above the award wall */
.modal-body-split.is-stacked { display: block; }
.modal-body-split.is-stacked .modal-left-col { width: 100%; margin-bottom: 3.5vw; }
.modal-body-split.is-stacked #m-details-list { columns: 2; column-gap: 3vw; }
.modal-body-split.is-stacked #m-details-list li { break-inside: avoid; }
.modal-body-split.is-stacked .modal-right-col { width: 100%; }
.modal-body-split.is-stacked .honor-group--landscape { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal-body-split.is-stacked .honor-group--portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .modal-body-split.is-stacked .honor-group--portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .modal-body-split.is-stacked #m-details-list { columns: 1; }
  .modal-body-split.is-stacked .honor-group--landscape,
  .modal-body-split.is-stacked .honor-group--portrait { grid-template-columns: 1fr; }
}

/* Award folder — flap-mode default look of React Bits <Folder /> */
.award-folder {
  position: relative;
  width: 224px;
  height: 196px;
  margin: 1.4vw auto 3vw;
  perspective: 1100px;
  cursor: pointer;
  outline: none;
  transform-origin: 50% 37%;
  transition: transform 1.1s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.9s ease;
  will-change: transform;
}

.award-folder__shadow {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -11px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(9px);
  pointer-events: none;
}

/* Open state: the folder recedes behind the certificate wall */
.award-folder-host.is-open .award-folder {
  position: absolute;
  top: 1vw;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: 0;
  transform: scale(0.85);
  opacity: 0.9;
  pointer-events: auto;
}

.award-folder__back {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.award-folder__tab {
  position: absolute;
  top: 0;
  left: 52px;
  z-index: 3;
  width: 140px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.award-folder__front {
  position: absolute;
  left: 0;
  top: 72.8px;
  z-index: 4;
  width: 224px;
  height: 123.2px;
  padding: 15px 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(160deg, #5499ff 0%, #3d8bff 48%, #3983f0 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform-origin: bottom center;
  transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
}

.award-folder:hover .award-folder__front {
  filter: brightness(1.04);
}

.award-folder-host.is-open .award-folder__front {
  transform: rotateX(-64deg);
}

.award-folder__kicker {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 6.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 5px;
}

.award-folder__title {
  font-family: 'Noto Serif JP', 'Noto Serif SC', serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  line-height: 1.15;
}

.award-folder__count {
  margin-top: 5px;
  font-family: 'Noto Sans JP', 'Noto Sans SC', sans-serif;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.04em;
}

.award-folder__hint {
  position: absolute;
  right: 16px;
  bottom: 13px;
  padding-bottom: 3px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 6.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

.award-folder:focus-visible .award-folder__front {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.award-wall { display: none; margin-top: 2.5vw; }
.award-folder-host.is-open .award-wall {
  display: block;
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding-top: 112px;
  pointer-events: none;
}
.award-folder-host.is-open .award-wall .tilted-card { pointer-events: auto; }
.award-wall .tilted-card { will-change: transform, opacity; }

@media (max-width: 900px) {
  .award-folder-host.is-open .award-wall { padding-top: 104px; }
}

/* Bilingual copy fit: keep the folder and card backs readable without clipping */
.award-folder__front { padding: 12px 14px 24px; }
.award-folder__kicker { font-size: 6px; margin-bottom: 3px; }
.award-folder__title { font-size: 17px; line-height: 1.1; }
.award-folder__count { margin-top: 3px; font-size: 7.5px; line-height: 1.35; }
.award-folder__hint { right: 14px; bottom: 10px; font-size: 6px; padding-bottom: 2px; }
.award-folder__tab { font-size: 8px; letter-spacing: -0.01em; }

.tilted-card__back-inner { padding: 14px 16px 12px; }
.tc-title { font-size: 17px; line-height: 1.35; margin: 8px 0 9px; }
.tc-meta { gap: 6px; }
.tc-meta > div { grid-template-columns: 60px 1fr; gap: 6px; }
.tc-meta dt { font-size: 8.5px; padding-top: 2px; }
.tc-meta dd { font-size: 11.5px; line-height: 1.4; }
.tc-abilities { margin-top: 9px; }
.tc-ab-label { font-size: 9px; margin-bottom: 2px; }
.tc-chip { font-size: 9.5px; padding: 4px 0 4px 14px; line-height: 1.25; }
.tc-chip::before { top: 50%; left: 3px; transform: translateY(-50%); }
.tc-foot { padding-top: 6px; }
.tilted-card--landscape .tc-watermark { font-size: 80px; bottom: -8px; }
