/* Final presentation fixes requested after visual review. */

/* Keep the real portrait fully visible and give it a deliberate, stable frame. */
.hero-portrait {
  width: min(100%, 560px);
  height: auto;
  min-height: 0;
  aspect-ratio: 973 / 1214;
  justify-self: end;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #0a211b;
}

/* Show each published credential image in full instead of slicing it. */
.credential-grid article {
  display: flex;
  flex-direction: column;
}

.credential-grid figure {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.credential-grid figure img {
  width: 100%;
  height: 300px;
  padding: 14px;
  object-fit: contain;
  object-position: center;
  background: #e3e0d8;
}

.credential-grid figcaption {
  margin-top: auto;
}

.credential-grid article > div {
  flex: 1;
}

/* Patent previews use the title page; keep portrait documents readable. */
.featured-card[href*="/patent/"] figure,
body[data-page="patent"] .page-hero-image,
.document-card figure {
  background: #dad7cf;
}

.featured-card[href*="/patent/"] figure img,
body[data-page="patent"] .page-hero-image img,
.document-card figure img {
  padding: 14px;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 900px) {
  .hero-portrait {
    width: min(100%, 520px);
    height: auto;
    min-height: 0;
    justify-self: center;
  }
}

@media (max-width: 700px) {
  .hero-portrait {
    width: min(100%, 460px);
    height: auto;
    min-height: 0;
  }

  .credential-grid article {
    display: flex;
  }

  .credential-grid figure img {
    height: 270px;
  }

  .document-card figure img {
    padding: 10px;
  }
}

@media (max-width: 420px) {
  .hero-portrait {
    width: 100%;
    height: auto;
  }

  .credential-grid article {
    display: flex;
  }

  .credential-grid figure img {
    height: 245px;
    padding: 10px;
  }
}

/* Compact publication pass: keep each desktop story block readable in one
   ordinary browser viewport, including Windows displays using 125% scaling. */
body {
  overflow-x: hidden;
}

/* `overflow: hidden` on the page shell created a scrolling container and
   prevented the sticky navigation from staying visible. */
.site-shell {
  overflow: visible;
}

.profile-summary,
.featured-section,
.credentials-section,
.direct-contact,
#contact {
  scroll-margin-top: 72px;
}

.system-panel > p,
.system-panel li,
.system-panel li span {
  font-size: 13px;
}

.system-panel > p {
  color: #c9d7d2;
}

.system-panel li {
  color: #f7f5ef;
}

.hero-intro,
.page-hero-copy > p:not(.page-eyebrow),
.section-heading.inverse > p:last-child {
  color: rgba(243, 240, 233, 0.86);
}

.credential-image-link {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  cursor: zoom-in;
}

/* The home card uses a dedicated landscape crop made from the real patent
   title page. It preserves the emblem, document title, number and invention
   title without turning the preview into an unreadable full-page thumbnail. */
.featured-card[href*="/patent/"] figure img {
  padding: 0;
  object-fit: cover;
  object-position: center;
}

/* Keep the complete CDA engine visible in the featured research card. The
   source artwork already has a wide aspect ratio, but its engine sits very
   close to the canvas edges; a restrained inner frame prevents it from
   looking accidentally cropped at the camshaft and crankcase. */
.featured-card[href*="/research/"] figure img {
  box-sizing: border-box;
  padding: 8px 10px;
  object-fit: contain;
  object-position: center;
  background: #061f19;
}

.featured-card[href*="/research/"]:hover figure img {
  transform: none;
}

@media (min-width: 901px) {
  .site-header {
    height: 70px;
  }

  .home-hero {
    min-height: calc(100svh - 70px);
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
    align-items: center;
    padding: clamp(28px, 4svh, 44px) clamp(24px, 6vw, 96px) 74px;
  }

  .hero-copy {
    max-width: 720px;
    padding-right: clamp(22px, 3vw, 48px);
  }

  .page-eyebrow {
    margin-bottom: 12px;
  }

  .hero-copy h1 {
    margin-bottom: 14px;
    font-size: clamp(52px, 4.65vw, 72px);
    line-height: 0.96;
  }

  .hero-intro {
    margin-bottom: 18px;
    font-size: clamp(15px, 1.1vw, 18px);
    line-height: 1.5;
  }

  .hero-actions {
    gap: 12px;
    margin-bottom: 18px;
  }

  .primary-button,
  .secondary-button,
  .light-button {
    min-height: 46px;
    padding-inline: 20px;
  }

  .system-panel {
    max-width: 680px;
    padding: 10px 12px;
  }

  .system-panel > p {
    margin-bottom: 7px;
  }

  .system-panel li {
    min-height: 58px;
    gap: 6px;
    padding: 9px 10px;
    line-height: 1.3;
  }

  .hero-portrait {
    width: auto;
    height: min(68svh, 590px);
    max-width: 100%;
    min-height: 0;
    aspect-ratio: 973 / 1214;
    justify-self: end;
  }

  .hero-portrait figcaption {
    padding: 12px 16px;
    font-size: 13px;
  }

  .proof-strip {
    min-height: 62px;
  }

  .proof-strip > div {
    gap: 10px;
    padding: 11px 14px;
    font-size: 12px;
  }

  .section-pad {
    padding: clamp(48px, 5svh, 68px) clamp(24px, 6vw, 96px);
  }

  .section-heading {
    margin-bottom: clamp(26px, 3svh, 36px);
  }

  .section-heading h2,
  .contact-band h2,
  .method-block h2,
  .data-engineering h2,
  .dissertation-copy h2,
  .experience-copy h2,
  .direct-contact h2 {
    margin-bottom: 14px;
    font-size: clamp(34px, 3.45vw, 52px);
    line-height: 1.02;
  }

  .section-heading > p:last-child,
  .contact-band > div > p:last-child,
  .method-block > div > p:last-child,
  .data-engineering > div > p:last-child,
  .experience-copy > p,
  .direct-contact .section-heading > p:last-child {
    font-size: 16px;
    line-height: 1.55;
  }

  .profile-card {
    padding-bottom: 18px;
  }

  .profile-card figure {
    height: clamp(232px, 19vw, 296px);
    margin-bottom: 18px;
  }

  .profile-card h3 {
    margin-bottom: 8px;
    font-size: clamp(22px, 1.75vw, 27px);
  }

  .profile-card p {
    font-size: 14px;
    line-height: 1.5;
  }

  .profile-card:nth-child(3) figure img {
    object-position: center;
  }

  .featured-card figure {
    height: 225px;
  }

  .featured-card > div {
    min-height: 150px;
    padding: 20px;
  }

  .featured-card h3 {
    margin-bottom: 18px;
    font-size: clamp(21px, 1.8vw, 28px);
  }

  /* Three employer-value statements form one complete row. Leaving a fourth
     empty quadrant made the section look unfinished. */
  .value-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .value-grid article {
    min-height: 250px;
    padding: 28px;
  }

  .value-grid h3 {
    margin-top: 32px;
  }

  .page-hero {
    min-height: calc(100svh - 70px);
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: center;
    padding: clamp(34px, 5svh, 54px) clamp(24px, 6vw, 96px);
  }

  .page-hero-copy {
    padding-right: clamp(24px, 4vw, 62px);
  }

  .page-hero h1 {
    margin-bottom: 18px;
    font-size: clamp(45px, 4.7vw, 72px);
    line-height: 0.97;
  }

  .page-hero-copy > p:not(.page-eyebrow) {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.55;
  }

  .page-hero-image {
    align-self: center;
    height: min(66svh, 540px);
    min-height: 0;
  }

  body[data-page="patent"] .page-hero h1 {
    font-size: clamp(42px, 4.05vw, 62px);
  }

  body[data-page="patent"] .page-hero-image img {
    padding: 10px;
  }

  .contact-band {
    padding: clamp(46px, 5svh, 66px) clamp(24px, 6vw, 96px);
  }

  .direct-contact.section-pad {
    padding-block: clamp(46px, 5svh, 62px);
  }

  .direct-contact .section-heading h2 {
    font-size: clamp(38px, 3.7vw, 54px);
  }

  .contact-links a {
    min-height: 72px;
  }

  .credential-grid article {
    display: grid;
    grid-template-columns: minmax(155px, 0.55fr) minmax(0, 1fr);
  }

  .credential-grid figure img {
    height: 230px;
    padding: 10px;
  }

  .credential-grid article > div {
    padding: 20px;
  }

  .credential-grid h3 {
    margin-top: 18px;
    font-size: 21px;
  }

  footer {
    padding-top: 54px;
  }
}

@media (min-width: 901px) and (max-height: 800px) {
  .site-header {
    height: 64px;
  }

  .home-hero {
    min-height: calc(100svh - 64px);
    padding-top: 16px;
    padding-bottom: 60px;
  }

  .hero-copy h1 {
    margin-bottom: 10px;
    font-size: clamp(48px, 4.05vw, 64px);
  }

  .hero-intro {
    margin-bottom: 12px;
    font-size: 15.5px;
    line-height: 1.45;
  }

  .hero-actions {
    margin-bottom: 12px;
  }

  .system-panel {
    padding-block: 8px;
  }

  .system-panel li {
    min-height: 52px;
    font-size: 12px;
  }

  .system-panel li span {
    font-size: 12px;
  }

  .hero-portrait {
    height: min(67svh, 475px);
  }

  .proof-strip {
    min-height: 56px;
  }

  .proof-strip > div {
    padding-block: 8px;
  }

  .section-pad {
    padding-block: 44px;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .featured-section.section-pad {
    padding-block: 32px;
  }

  .featured-section .section-heading {
    margin-bottom: 20px;
  }

  .section-heading h2,
  .contact-band h2,
  .method-block h2,
  .data-engineering h2,
  .dissertation-copy h2,
  .experience-copy h2,
  .direct-contact h2 {
    font-size: clamp(32px, 3.15vw, 46px);
  }

  .profile-card figure {
    height: 232px;
    margin-bottom: 16px;
  }

  .page-hero {
    min-height: calc(100svh - 64px);
    padding-block: 28px;
  }

  .page-hero h1 {
    font-size: clamp(42px, 4.15vw, 62px);
  }

  body[data-page="patent"] .page-hero h1 {
    font-size: clamp(39px, 3.75vw, 56px);
  }

  .page-hero-image {
    height: min(68svh, 470px);
  }

  .direct-contact.section-pad {
    padding-block: 38px;
  }

  .contact-links a {
    min-height: 64px;
  }
}

@media (min-width: 1200px) and (max-height: 800px) {
  .credentials-section .section-heading {
    width: min(880px, 100%);
    margin-bottom: 20px;
  }

  .credentials-section .section-heading h2 {
    margin-bottom: 10px;
  }

  .credential-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .credential-grid article {
    display: grid;
    grid-template-columns: minmax(140px, 0.48fr) minmax(0, 1fr);
  }

  .credential-grid figure {
    min-height: 0;
  }

  .credential-grid figure img {
    height: 180px;
    padding: 8px;
  }

  .credential-grid figcaption {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .credential-grid article > div {
    padding: 16px;
  }

  .credential-grid h3 {
    margin: 12px 0 8px;
    font-size: 19px;
  }

  .credential-grid p {
    font-size: 12.5px;
    line-height: 1.45;
  }
}
