/* =========================================================
   V7.5 · Precision fixes from Alice's latest screenshots
   Scope: project detail modal, About portrait alignment,
   and inner-page hero scale / mask brightness.
   Existing motion-system.js and V7.4 motion rules are untouched.
   ========================================================= */

/* 1) Inner-page hero: match the short, wide reference banner. */
@media (min-width: 1151px) {
  .page-hero.hero-inner {
    height: clamp(320px, 21vw, 400px) !important;
    min-height: 320px !important;
    max-height: 400px !important;
    aspect-ratio: auto !important;
  }
}
.page-hero.hero-inner .hero-art {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center bottom !important;
  filter: brightness(1.22) saturate(1.12) contrast(1.015) !important;
  opacity: 1 !important;
}
.page-hero.hero-inner::after {
  /* Light cobalt veil instead of the previous heavy navy mask. */
  background:
    radial-gradient(ellipse at 78% 30%, rgba(111, 177, 255, .13), transparent 42%),
    linear-gradient(90deg,
      rgba(49, 101, 184, .19) 0%,
      rgba(58, 112, 202, .12) 42%,
      rgba(76, 130, 218, .035) 72%,
      rgba(77, 128, 218, .015) 100%) !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
}
.page-hero.hero-inner .hero-copy {
  background: linear-gradient(112deg,
    rgba(78, 128, 198, .34) 0%,
    rgba(72, 119, 194, .25) 68%,
    rgba(72, 119, 194, .08) 100%) !important;
  border: 1px solid rgba(226, 240, 255, .24) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 26px rgba(9,35,92,.08) !important;
  backdrop-filter: blur(8px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.12) !important;
}
.page-hero.hero-inner .hero-copy h1,
.page-hero.hero-inner .hero-copy h2,
.page-hero.hero-inner .hero-copy p,
.page-hero.hero-inner .hero-copy .eyebrow {
  color: #f9fbff !important;
  text-shadow: 0 1px 10px rgba(9, 34, 88, .18) !important;
}

/* Tablet: preserve a compact banner without crushing the copy. */
@media (min-width: 761px) and (max-width: 1150px) {
  .page-hero.hero-inner {
    height: 270px !important;
    min-height: 270px !important;
    max-height: 270px !important;
  }
}
@media (max-width: 760px) {
  .page-hero.hero-inner {
    height: 230px !important;
    min-height: 230px !important;
    max-height: 230px !important;
  }
  .page-hero.hero-inner .hero-copy {
    background: linear-gradient(110deg, rgba(48, 91, 166, .32), rgba(48, 91, 166, .12)) !important;
    backdrop-filter: blur(5px) !important;
  }
}

/* 2) About profile: lift the portrait and visually center it in its stage. */
.about-profile-photo {
  align-items: center !important;
  justify-content: center !important;
}
.about-profile-photo img:not(.about-profile-signature) {
  transform: translateY(-34px) !important;
  object-position: center center !important;
}
@media (max-width: 760px) {
  .about-profile-photo img:not(.about-profile-signature) {
    transform: translateY(-24px) !important;
  }
}

/* 3) Project detail modal: smaller footprint, less wasted hero height,
      and a full-bleed cover image that always fills its image region. */
.project-modal {
  width: min(780px, calc(100vw - 48px)) !important;
  max-width: 780px !important;
  max-height: min(82vh, 780px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border-radius: 22px !important;
}
.project-modal .modal-close {
  top: 10px !important;
  margin: 10px 10px -44px 0 !important;
  width: 34px !important;
  height: 34px !important;
}
.case-study-hero {
  height: clamp(190px, 26vw, 235px) !important;
  min-height: 190px !important;
  max-height: 235px !important;
  aspect-ratio: 3.3 / 1;
  border-radius: 21px 21px 0 0 !important;
}
.case-study-cover {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  opacity: .96 !important;
  transform: none !important;
}
.project-modal:hover .case-study-cover {
  transform: scale(1.025) !important;
}
.case-study-hero::after {
  background:
    linear-gradient(90deg, rgba(10, 36, 94, .72) 0%, rgba(19, 57, 128, .40) 48%, rgba(24, 58, 132, .04) 100%),
    linear-gradient(0deg, rgba(11, 35, 91, .25), transparent 70%) !important;
}
.case-study-hero-copy {
  left: clamp(22px, 4vw, 38px) !important;
  right: 54px !important;
  bottom: 23px !important;
}
.case-study-hero-copy h2 {
  font-size: clamp(23px, 2.5vw, 31px) !important;
}
.case-study-hero-copy p {
  max-width: 560px !important;
  font-size: 12px !important;
}
.case-study-body {
  padding: 21px 30px 26px !important;
}
.case-study-summary h3,
.case-study-outcomes h3 {
  font-size: 18px !important;
}
.case-study-summary > p {
  font-size: 12px !important;
  line-height: 1.75 !important;
}
.case-study-summary .modal-tags {
  margin-top: 11px !important;
}
.case-study-meta {
  margin: 16px 0 !important;
  padding: 11px 0 !important;
}
.case-study-outcome-grid article {
  min-height: 84px !important;
  padding: 11px !important;
}
.case-study-footer {
  margin-top: 17px !important;
  padding-top: 13px !important;
}
@media (max-width: 760px) {
  .project-modal {
    width: calc(100vw - 24px) !important;
    max-height: 88vh !important;
    border-radius: 17px !important;
  }
  .case-study-hero {
    height: 190px !important;
    min-height: 190px !important;
    border-radius: 16px 16px 0 0 !important;
  }
  .case-study-hero-copy {
    left: 18px !important;
    right: 48px !important;
    bottom: 17px !important;
  }
  .case-study-body {
    padding: 18px 18px 22px !important;
  }
}
