.profile-page { padding-block: var(--header-height) clamp(32px, 4.5vw, 64px); }
.profile-container { width: min(88%, 1300px); margin-inline: auto; }
.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  align-items: center;
  gap: clamp(30px, 5vw, 78px);
  padding-block: clamp(48px, 5.5vw, 82px);
}
.profile-intro h1 {
  margin: 0;
  font-size: clamp(54px, 5.5vw, 86px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.98;
  text-transform: none;
}
.profile-role { margin: 16px 0 0; color: var(--brand); font-size: 28px; font-style: italic; }
.profile-lead { max-width: 385px; margin: 22px 0 28px; font-size: 24px; font-weight: 500; line-height: 1.45; }
.profile-consultation { gap: 14px; }
.profile-consultation { cursor: pointer; }
.profile-consultation:hover { background: #a82121; border-color: #a82121; }
.profile-consultation span, .profile-text-link span { font: 16px/1 Georgia, serif; }
.profile-portrait { margin: 0; }
.profile-portrait img { display: block; width: 100%; height: auto; border-radius: 5px; }
.profile-background {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  grid-template-areas: 'heading heading' 'visual bio';
  align-items: center;
  gap: 28px clamp(30px, 5vw, 78px);
  padding-block: clamp(44px, 5vw, 72px);
  border-top: 1px solid #ddd9d2;
  scroll-margin-top: var(--header-height);
}
.profile-page h2 { margin: 0; }
.profile-background h2 { grid-area: heading; }
.profile-background-visual { grid-area: visual; width: 100%; max-width: 330px; }
.profile-award { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 23px; line-height: 1.2; }
.profile-award-icon { flex: 0 0 34px; width: 34px; height: 40px; color: var(--brand); }
.profile-award span { display: block; margin-top: 3px; color: var(--muted); font-size: 19px; }
.profile-courthouse-portrait { margin: 0; }
.profile-courthouse-portrait img { display: block; width: 100%; height: auto; border-radius: 5px; }
.profile-bio { grid-area: bio; max-width: 640px; }
.profile-bio p, .profile-steps p { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.5; }
.profile-bio p + p { margin-top: 16px; }
.profile-text-link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 22px;
  color: var(--brand);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}
.profile-text-link:hover { color: #a82121; }
.profile-approach { padding-block: clamp(46px, 5.5vw, 82px); background: #f0ece5; }
.profile-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 4vw, 55px); margin-top: 32px; }
.profile-steps > div { padding-top: 19px; border-top: 1px solid #d3c3b9; }
.profile-steps h3 { margin: 0 0 9px; font-size: 28px; font-weight: 700; line-height: 1.15; }
.profile-dialog-header > span { display: none; }

@media (max-width: 800px) {
  .profile-hero, .profile-background, .profile-steps { grid-template-columns: minmax(0, 1fr); }
  .profile-hero { gap: 28px; }
  .profile-intro h1 { font-size: clamp(47px, 9vw, 65px); }
  .profile-background { grid-template-areas: 'heading' 'bio' 'visual'; gap: 24px; }
  .profile-lead, .profile-bio p, .profile-steps p { font-size: 21px; }
  .profile-consultation { padding-inline: 18px; }
}

@media (max-width: 720px) {
  .profile-container { width: min(calc(100% - 36px), 560px); }
  .profile-hero { gap: 22px; padding-block: 34px 38px; }
  .profile-intro h1 { font-size: clamp(40px, 11vw, 60px); line-height: 1.04; }
  .profile-role { margin-top: 8px; font-size: 24px; }
  .profile-lead { margin: 15px 0 20px; }
  .profile-consultation { width: 100%; min-height: 48px; padding-block: 12px; }
  .profile-background { gap: 22px; padding-block: 36px 42px; }
  .profile-background-visual { max-width: 390px; }
  .profile-background { grid-template-areas: 'heading' 'bio'; }
  .profile-background-visual { display: none; }
  .profile-courthouse-portrait { display: none; }
  .profile-award { margin-bottom: 0; }
  .profile-award span { display: inline-block; margin: 0 0 0 8px; }
  .profile-approach { padding-block: 38px; }
  .profile-steps { gap: 20px; margin-top: 22px; }
  .profile-steps > div { padding-top: 14px; }
  .profile-steps h3 { margin-bottom: 5px; font-size: 25px; }

  .profile-dialog[open] {
    display: flex;
    flex-direction: column;
    max-height: calc(100svh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 0;
    overflow: hidden;
  }
  .profile-dialog-header {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 10px 6px 18px;
    border-bottom: 1px solid #e5dfd7;
  }
  .profile-dialog-header > span { display: block; font-size: 20px; font-weight: 700; }
  .profile-dialog .contact-dialog-close { position: static; flex: none; width: 44px; height: 44px; }
  .profile-dialog .contact-dialog-close:focus-visible { outline-offset: 2px; }
  .profile-dialog .contact-dialog-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .profile-dialog .consultation-form { padding: 16px 18px 20px; }
  .profile-dialog .form-stage-title { margin-bottom: 14px; font-size: 26px; }
  .profile-dialog .form-progress { margin: 0 0 16px; }
  .profile-dialog .form-progress li { padding-top: 7px; }
  .profile-dialog .form-grid { gap: 12px; }
  .profile-dialog .form-field label { margin-bottom: 5px; }
  .profile-dialog .form-field input, .profile-dialog .form-field select { min-height: 48px; padding-block: 9px; }
  .profile-dialog .form-navigation { margin-top: 18px; }
  .profile-dialog .form-navigation .button { min-height: 48px; padding-block: 10px; }
}

@media (max-width: 540px) {
  .profile-page + .site-footer .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }
  .profile-page + .site-footer .footer-identity,
  .profile-page + .site-footer .footer-contact { grid-column: 1 / -1; }
  .profile-page + .site-footer .footer-nav a { font-size: 19px; }
  .profile-footer-consultation { min-height: 44px; }
}
