/* Responsibility: top-message page layout and president message content. */

.message-layout {
  display: grid;
  grid-template-columns: var(--subpage-sidebar) minmax(0, 1fr);
  gap: var(--subpage-gap);
  align-items: start;
  margin-bottom: 200px;
}

.message-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 38%);
  grid-template-rows: auto auto;
  column-gap: clamp(32px, 4vw, 56px);
  min-width: 0;
  padding-top: 46px;
  border-top: 2px solid var(--line-gray);
}

.message-aside {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
}

.message-portrait {
  margin: 0;
  width: 100%;
  height: 581px;
  overflow: hidden;
  background: var(--line-gray);
}

.message-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-copy {
  display: contents;
}

.message-heading {
  grid-column: 1;
  grid-row: 1;
  width: min(100%, 480px);
  align-self: end;
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.53;
  text-decoration: underline;
  text-underline-offset: .12em;
  text-decoration-thickness: .055em;
}

.message-text {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: 900px;
  margin-top: 96px;
}

.message-text p {
  margin: 0 0 2.55em;
  font-size: 22px;
  font-weight: 600;
  line-height: 2;
}

.message-profile {
  margin-top: 22px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.58;
}

.message-profile p {
  margin: 0 0 .22em;
}

.message-profile p:last-child {
  margin-bottom: 0;
}

.message-profile__name {
  font-size: 14px;
  font-weight: 600;
}

.message-signature {
  display: grid;
  justify-items: end;
  gap: 12px;
  margin-top: 70px;
}

.message-signature p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}

.message-signature img {
  width: 250px;
  height: auto;
}

@media (max-width: 1024px) {
  .message-layout {
    grid-template-columns: 1fr;
  }

  .message-content {
    grid-template-columns: 1fr;
  }

  .message-portrait {
    grid-column: auto;
    grid-row: auto;
    width: min(100%, 400px);
    height: auto;
    aspect-ratio: 400 / 581;
    margin-left: auto;
  }

  .message-copy {
    padding-top: 40px;
  }

  .message-signature {
    position: static;
    width: auto;
    min-width: 0;
    margin-top: 70px;
  }
}

@media (max-width: 640px) {
  .message-heading {
    margin-bottom: 42px;
  }

  .message-text p {
    font-size: var(--body-text-size-sm);
    line-height: 1.8;
  }

  .message-signature img {
    width: 190px;
  }
}

@media (max-width: 820px) {
  .message-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .message-content {
    order: 1;
    width: 100%;
  }

  .message-layout .side-nav {
    order: 2;
    width: 100%;
    margin-top: 16px;
  }

  .message-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 96px;
  }

  .message-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 36px;
  }

  .message-copy {
    display: contents;
  }

  .message-heading {
    order: 1;
    width: 100%;
    margin: 0;
    font-size: clamp(30px, 9vw, 40px);
    line-height: 1.55;
  }

  .message-aside {
    order: 2;
    width: 100%;
  }

  .message-portrait {
    width: calc(100% + var(--side) * 2);
    height: auto;
    aspect-ratio: 400 / 581;
    margin-inline: calc(var(--side) * -1);
  }

  .message-text {
    order: 3;
    max-width: 100%;
    margin-top: 6px;
  }

  .message-text p {
    margin-bottom: 1.65em;
    font-size: 17px;
    line-height: 1.95;
  }

  .message-text br {
    display: none;
  }

  .message-profile {
    margin-top: 18px;
    line-height: 1.55;
  }
}

@media (max-width: 430px) {
  .message-heading {
    font-size: clamp(28px, 8.2vw, 34px);
  }
}
