/* v1.16.0 — CV-style homepage header and contact modal */

body {
  background: #fff;
}

/* Homepage header now uses the same system as the Online CV. */
.homepage-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.homepage-intro {
  padding: 58px 0 50px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.homepage-intro-photo {
  width: 220px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
  background: #e7ebf2;
}

.homepage-intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.homepage-intro-copy {
  min-width: 0;
}

.homepage-intro-copy h1 {
  max-width: 880px;
  margin: 8px 0 7px;
  font-size: clamp(42px, 5.4vw, 66px);
  line-height: .98;
  letter-spacing: -.065em;
}

.homepage-role {
  margin: 0;
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.homepage-summary {
  max-width: 840px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.homepage-facts {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: #66738a;
  font-size: 10px;
  line-height: 1.55;
}

.homepage-facts span {
  position: relative;
}

.homepage-facts span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 3px;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #a6b1c2;
}

.homepage-intro-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.homepage-intro-actions a,
.homepage-intro-actions button {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.homepage-intro-actions a {
  color: #fff;
  background: var(--blue);
}

.homepage-intro-actions button {
  border: 1px solid var(--line);
  color: var(--text);
  background: #fff;
}

/* About My Practice and the old large CTA are intentionally removed. */
.profile-summary,
.contact-strip {
  display: none !important;
}

/* Contact modal */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.contact-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 17, 37, .68);
  backdrop-filter: blur(7px);
  cursor: pointer;
}

.contact-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(5, 15, 36, .28);
  transform: translateY(14px) scale(.985);
  transition: transform .22s ease;
}

.contact-modal.is-open .contact-dialog {
  transform: none;
}

.contact-modal-open {
  overflow: hidden;
}

.contact-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.contact-dialog-header span {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}

.contact-dialog-header h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1;
  letter-spacing: -.055em;
}

.contact-dialog-close {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}

.contact-dialog-intro {
  max-width: 560px;
  margin: 20px 0;
  color: #435068;
  font-size: 13px;
  line-height: 1.7;
}

.contact-detail-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.contact-detail-list > div {
  padding: 14px 0;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.contact-detail-list dt {
  color: #77839a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.contact-detail-list dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.contact-detail-list a {
  color: var(--text);
}

.contact-detail-list a:hover {
  color: var(--blue);
}

.contact-dialog-actions {
  padding-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-dialog-actions a,
.contact-dialog-actions button {
  min-height: 44px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.contact-email-cta {
  color: #fff;
  background: var(--blue);
}

.contact-dialog-actions button {
  border: 1px solid var(--line);
  color: var(--text);
  background: #fff;
}

@media (max-width: 760px) {
  .homepage-intro {
    padding: 36px 0 38px;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .homepage-intro-photo {
    width: 170px;
    border-radius: 16px;
  }

  .homepage-intro-copy h1 {
    font-size: 43px;
  }

  .homepage-facts span:not(:last-child)::after {
    display: none;
  }

  .contact-dialog {
    padding: 24px 20px;
  }

  .contact-detail-list > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 520px) {
  .subpage-header-inner {
    gap: 12px;
  }

  .subpage-brand {
    flex: 0 0 auto;
  }

  .subpage-nav {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .subpage-nav::-webkit-scrollbar {
    display: none;
  }

  .homepage-intro-copy h1 {
    font-size: 38px;
  }

  .homepage-role {
    font-size: 13px;
  }

  .homepage-intro-actions {
    align-items: stretch;
  }

  .homepage-intro-actions a,
  .homepage-intro-actions button {
    flex: 1 1 auto;
  }

  .contact-dialog-actions {
    align-items: stretch;
  }

  .contact-dialog-actions a,
  .contact-dialog-actions button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-modal,
  .contact-dialog {
    transition: none;
  }
}
