body[data-page="contacts"] {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body[data-page="contacts"] > main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contacts-section {
  flex: 1;
  padding-bottom: 32px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.contacts-grid > * {
  min-width: 0;
}

.contacts-portrait {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0c171a;
}

.contacts-portrait > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.contact-method {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  gap: 18px;
  align-items: center;
  min-height: 68px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}

.contact-method:last-of-type {
  border-bottom: 1px solid var(--line);
}

.contact-method > svg:first-child {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-label {
  display: block;
  margin-bottom: 3px;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .12em;
  color: var(--muted);
}

.contact-value {
  display: block;
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.6;
  color: var(--ivory);
  overflow-wrap: anywhere;
}

.contact-method > .contact-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
}

.contact-method:not([href]) > .contact-arrow {
  visibility: hidden;
}

.contact-method[href]:hover .contact-value {
  color: var(--gold);
}

.contact-method[href]:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 5px;
}

.contacts-demo-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

body[data-page="contacts"] .footer-row {
  min-height: 60px;
  padding-block: 6px;
}

@media (min-width: 980px) {
  .contacts-grid.is-viewport-fit {
    min-height: var(--contacts-panel-height);
    grid-template-columns:
      minmax(0, min(44%, calc(var(--contacts-panel-height) * 4 / 3)))
      minmax(0, 1fr);
  }
}

@media (min-width: 980px) and (max-height: 820px) {
  .contacts-section {
    padding-bottom: 20px;
  }

  .contact-method {
    min-height: 60px;
    padding-block: 8px;
  }
}

@media (max-width: 979px) {
  .contacts-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 740px;
    gap: 28px;
  }

  .contacts-portrait {
    max-width: 560px;
    justify-self: center;
  }
}

@media (max-width: 599px) {
  .contacts-section {
    padding-bottom: 34px;
  }

  .contact-method {
    gap: 12px;
    min-height: 72px;
  }

  .contact-value {
    font-size: 16px;
  }
}
