:root {
  --navy: #15263a;
  --navy-soft: #20364d;
  --blue-accent: #dceaf7;
  --blue-accent-strong: #bdd6ed;
  --blue-accent-ink: #183a5a;
  --ink: #1b2430;
  --muted: #66717f;
  --line: #d9dee5;
  --surface: #ffffff;
  --surface-soft: #f5f7f9;
  --light-text: #f7f9fb;
  --max-width: 1180px;
  --radius: 18px;
  --section-space: clamp(4.5rem, 8vw, 7rem);

  /* EASY IMAGE SWAP: change only this filename */
  --beyond-background: url("assets/beyond-background.jpg");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
}

.section-shell {
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.9rem max(1.5rem, calc((100vw - var(--max-width)) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(217, 222, 229, 0.85);
  backdrop-filter: blur(12px);
}

.header-identity {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.header-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.site-header.hero-passed .header-name {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.brand {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
}

.brand-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--navy);
}

.nav-cta {
  padding: 0.65rem 1rem;
  border: 1px solid var(--navy);
  border-radius: 999px;
}

.hero {
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(390px, 0.98fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

.hero-copy h1 {
  margin-bottom: 1.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.hero-kicker {
  max-width: 760px;
  margin-bottom: 0.8rem;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  color: var(--navy);
}

.hero-summary {
  max-width: 700px;
  margin-bottom: 2rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.button-primary {
  padding: 0.85rem 1.15rem;
  color: white;
  background: var(--navy);
  border-radius: 999px;
}

.button-text {
  color: var(--navy);
}

/* Desktop: Contact is already available in the header, so keep the hero CTA focused. */
@media (min-width: 861px) {
  .hero-actions .button-text {
    display: none;
  }
}

.portrait-frame {
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 18px 48px rgba(21, 38, 58, 0.14);
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(3rem, 7vw, 7rem);
}

.section-heading h2,
.horizontal-heading h2,
.contact-section h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.eyebrow,
.card-label {
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-dark {
  color: var(--light-text);
  background: var(--navy);
}

.about-section {
  padding: var(--section-space) 0;
}

.about-copy {
  color: rgba(247, 249, 251, 0.84);
  font-size: 1.06rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.light-eyebrow {
  color: rgba(247, 249, 251, 0.62);
}

.experience-section,
.education-section,
.beyond-section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

.contact-section {
  padding-top: clamp(2.6rem, 4vw, 3.75rem);
  padding-bottom: clamp(2.6rem, 4vw, 3.75rem);
}

.horizontal-heading {
  margin-bottom: 2.5rem;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.experience-card {
  padding: 1.7rem;
  border: 1px solid var(--blue-accent-strong);
  border-radius: var(--radius);
  background: var(--blue-accent);
}

.experience-card h3 {
  margin-bottom: 0.85rem;
  color: var(--blue-accent-ink);
  font-size: 1.2rem;
}

.experience-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.education-section {
  padding-top: clamp(3.25rem, 5vw, 4.75rem);
  padding-bottom: clamp(3.25rem, 5vw, 4.75rem);
}

.education-heading {
  margin-bottom: 1.8rem;
}

.compact-timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy);
}

.timeline-school,
.timeline-degree {
  margin-bottom: 0;
}

.timeline-school {
  font-weight: 700;
}

.timeline-degree {
  color: var(--muted);
  font-size: 0.94rem;
}


/* OPTION A — compact split rows (recommended) */
.education-layout-a {
  display: grid;
  grid-template-columns: minmax(230px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.education-layout-a .education-heading {
  position: sticky;
  top: 6rem;
  margin-bottom: 0;
}

.education-layout-a .compact-timeline {
  display: grid;
}

.education-layout-a .timeline-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: start;
  gap: 0.8rem;
  padding: 0.78rem 0;
  border-bottom: 1px solid var(--line);
}

.education-layout-a .timeline-marker {
  margin-top: 0.48rem;
}


.education-layout-a .timeline-degree {
  margin-top: 0.1rem;
}

/* OPTION B — four compact credential cards */
.education-layout-b .education-heading {
  margin-bottom: 1.5rem;
}

.education-layout-b .compact-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  border-top: 0;
}

.education-layout-b .timeline-item {
  min-height: 150px;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.education-layout-b .timeline-marker {
  margin-bottom: 0.9rem;
}


/* OPTION C — horizontal stepped timeline */
.education-layout-c .education-heading {
  margin-bottom: 2rem;
}

.education-layout-c .compact-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--navy);
}

.education-layout-c .timeline-item {
  padding: 1.2rem 1.3rem 0 0;
}

.education-layout-c .timeline-marker {
  margin-top: -1.48rem;
  margin-bottom: 1rem;
  outline: 5px solid var(--surface);
}


.beyond-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-image: var(--beyond-background);
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}

.beyond-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(245, 247, 249, 0.9);
}

.beyond-content {
  position: relative;
}

.beyond-heading {
  margin-bottom: 2.5rem;
}

.beyond-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.beyond-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 35px rgba(21, 38, 58, 0.08);
}

.beyond-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8ecf0;
}

.beyond-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.beyond-card-copy {
  padding: 1.45rem;
}

.beyond-card-copy h3 {
  margin-bottom: 0.7rem;
  font-size: 1.2rem;
}

.beyond-card-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.card-label {
  color: var(--navy);
}

.contact-section {
  background: var(--navy);
  color: var(--light-text);
}

.contact-inner {
  display: grid;
  gap: 1rem;
}

.contact-row {
  display: grid;
  align-items: center;
}

.contact-row-primary {
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 5rem);
}

.contact-row-primary h2 {
  white-space: nowrap;
}

.contact-copy {
  margin: 0;
  max-width: 760px;
  color: rgba(247, 249, 251, 0.82);
}

.contact-row-links {
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 1rem 1.75rem;
  padding-left: clamp(0rem, 0.5vw, 0.4rem);
}

.contact-row-links a,
.contact-link-button {
  color: white;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.contact-link-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.contact-link-button:hover,
.contact-link-button:focus-visible {
  color: var(--blue-accent-strong);
}

.contact-form[hidden] {
  display: none;
}


.contact-form {
  display: grid;
  gap: 0.9rem;
  max-width: 760px;
  padding-top: 0.35rem;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: rgba(247, 249, 251, 0.72);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 0.72rem 0.8rem;
  font: inherit;
  color: var(--light-text);
  background: rgba(255, 255, 255, 0.07);
}

.contact-form textarea {
  resize: vertical;
  min-height: 96px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--blue-accent-strong);
  outline-offset: 2px;
}

.contact-submit {
  justify-self: start;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 0.62rem 0.95rem;
  color: var(--light-text);
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.contact-submit:hover {
  background: rgba(255, 255, 255, 0.08);
}

.form-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin-bottom: 0;
}


@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
    gap: 2.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.85rem, 5.1vw, 4.35rem);
  }
}

@media (max-width: 980px) {
  .site-nav {
    gap: 0.9rem;
    font-size: 0.85rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
    gap: 2rem;
  }

  .education-layout-b .compact-timeline,
  .education-layout-c .compact-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy h1 {
    font-size: clamp(2.9rem, 6.8vw, 4.7rem);
  }

  .experience-grid,
  .beyond-grid {
    grid-template-columns: 1fr;
  }

  .beyond-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) 1.2fr;
  }

  .beyond-image-wrap {
    aspect-ratio: auto;
    min-height: 260px;
  }
}


@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.9rem, 8.2vw, 4.6rem);
    white-space: normal;
  }

  .portrait-frame {
    width: min(100%, 620px);
    justify-self: center;
  }

  .contact-row-primary {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-row-primary h2 {
    white-space: normal;
  }

  .contact-row-links {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding-left: 0;
    justify-items: start;
  }

  .contact-link-button {
    justify-self: start;
    text-align: left;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-inline: 1rem;
  }

  .site-nav {
    display: none;
  }

  .section-shell {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 11.5vw, 4rem);
    white-space: normal;
  }

  .portrait-frame {
    max-width: 520px;
  }

  .section-grid,
  .education-section,
  .contact-inner,
  .beyond-card {
    grid-template-columns: 1fr;
  }

  .education-layout-a .education-heading {
    position: static;
  }

  .education-layout-a .timeline-item {
    grid-template-columns: 14px minmax(0, 1fr);
  }


  .education-layout-b .compact-timeline,
  .education-layout-c .compact-timeline {
    grid-template-columns: 1fr;
  }

  .education-layout-c .compact-timeline {
    border-top: 0;
  }

  .education-layout-c .timeline-item {
    padding: 0.85rem 0;
    border-top: 1px solid var(--line);
  }

  .education-layout-c .timeline-marker {
    margin: 0 0 0.75rem;
    outline: 0;
  }

  .beyond-image-wrap {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }


  .site-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* =========================================================
   MOBILE EXPERIENCE REFINEMENTS
   - Uses the sticky header as the primary mobile nameplate
   - Hides the circular avatar while the hero is visible
   - Reveals the avatar and shrinks the header name after the hero / at About
   - Places portrait before the hero kicker and supporting copy
   - Keeps Clinical Experience and Beyond the Clinic as horizontal
     touch-friendly carousels on mobile
   ========================================================= */

@media (max-width: 860px) {
  /* Returning home from the sticky mobile header lands at the true top of the hero,
     rather than tucking the portrait underneath the header. */
  #home {
    scroll-margin-top: 7rem;
  }

  /* Keep the secondary contact action available on mobile, where the nav is hidden. */
  .hero-actions .button-text {
    display: inline-flex;
  }

  /* Hero state: the mobile header is name-only, with no circular avatar. */
  .header-identity {
    gap: 0;
  }

  .brand {
    width: 0;
    height: 0;
    flex: 0 0 0;
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.82);
    transition:
      width 220ms ease,
      height 220ms ease,
      flex-basis 220ms ease,
      opacity 160ms ease,
      transform 220ms ease;
  }

  /* At About: restore the circular home/avatar button beside the compact name. */
  .site-header.hero-passed .header-identity {
    gap: 0.9rem;
  }

  .site-header.hero-passed .brand {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 1px solid var(--line);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
  }

  /* On mobile, the header carries the hero name from the start. */
  .header-name {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    font-size: clamp(2rem, 8.8vw, 3.1rem);
    font-weight: 600;
    letter-spacing: -0.05em;
    transition: font-size 220ms ease, letter-spacing 220ms ease, font-weight 220ms ease;
  }

  /* Once the hero has been passed and About is reached, return the name to the compact header scale. */
  .site-header.hero-passed .header-name {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
  }

  /* Flatten the copy wrapper so portrait/copy can be reordered without changing desktop HTML. */
  .hero-copy {
    display: contents;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: auto;
    padding-top: 1.4rem;
    padding-bottom: 3.5rem;
  }

  /* The large desktop hero name is redundant on mobile because it now lives in the header. */
  .hero-copy h1 {
    display: none;
  }

  .portrait-frame {
    order: 1;
    width: min(100%, 620px);
    margin-bottom: 1.15rem;
    justify-self: start;
  }

  /* Keep the 4:5 portrait crop on mobile, anchored to the top so any crop is taken from the bottom. */
  .portrait-frame img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
  }

  .hero-kicker {
    order: 2;
    margin-bottom: 0.45rem;
  }

  .hero-summary {
    order: 3;
    margin-bottom: 1.25rem;
  }

  .hero-actions {
    order: 4;
  }

  .contact-row-primary {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-row-primary h2 {
    white-space: normal;
  }

  .contact-row-links {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding-left: 0;
    justify-items: start;
  }

  .contact-link-button {
    justify-self: start;
    text-align: left;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    gap: 0.75rem;
    padding-inline: 1rem;
  }

  .header-identity {
    width: 100%;
  }

  .site-header.hero-passed .header-identity {
    gap: 0.7rem;
  }

  .header-name {
    min-width: 0;
    white-space: nowrap;
  }

  .site-nav {
    display: none;
  }

  .section-shell {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  /* Keep the opening tight beneath the larger nameplate. */
  .hero {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }

  .portrait-frame {
    width: 100%;
    max-width: 520px;
    margin-bottom: 1rem;
  }

  .hero-kicker {
    margin-bottom: 0.4rem;
  }

  .hero-summary {
    margin-bottom: 1.1rem;
  }

  /* Horizontal swipe carousel: Clinical Experience */
  .experience-grid {
    display: flex;
    grid-template-columns: none;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.35rem;
  }

  .experience-grid::-webkit-scrollbar {
    display: none;
  }

  .experience-card {
    flex: 0 0 min(86vw, 350px);
    scroll-snap-align: start;
  }

  /* Horizontal swipe carousel: Beyond the Clinic */
  .beyond-grid {
    display: flex;
    grid-template-columns: none;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.35rem;
  }

  .beyond-grid::-webkit-scrollbar {
    display: none;
  }

  .beyond-card {
    display: block;
    flex: 0 0 min(86vw, 350px);
    scroll-snap-align: start;
  }

  .beyond-image-wrap {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .section-grid,
  .education-section,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .education-layout-a .education-heading {
    position: static;
  }

  .education-layout-a .timeline-item {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .education-layout-b .compact-timeline,
  .education-layout-c .compact-timeline {
    grid-template-columns: 1fr;
  }

  .education-layout-c .compact-timeline {
    border-top: 0;
  }

  .education-layout-c .timeline-item {
    padding: 0.85rem 0;
    border-top: 1px solid var(--line);
  }

  .education-layout-c .timeline-marker {
    margin: 0 0 0.75rem;
    outline: 0;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 390px) {
  /* Preserve a single-line name on very narrow phones without crowding the portrait button. */
  .header-name {
    font-size: clamp(1.78rem, 8.2vw, 2rem);
  }

  .site-header.hero-passed .header-name {
    font-size: 1.02rem;
  }

  .site-header.hero-passed .brand {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
}

/* =========================================================
   iPad portrait header
   - Extend the mobile nameplate/header treatment to portrait tablets
   - Remove the full primary navigation to prevent crowding/overlap
   - Preserve the tablet content layout above the 860px mobile breakpoint
   ========================================================= */
@media (min-width: 861px) and (max-width: 1024px) and (orientation: portrait) {
  #home {
    scroll-margin-top: 7rem;
  }

  .site-nav {
    display: none;
  }

  .site-header {
    gap: 0.75rem;
    padding-inline: max(1.5rem, calc((100vw - var(--max-width)) / 2));
  }

  .header-identity {
    width: 100%;
    gap: 0;
  }

  /* Match the mobile hero-state header: name only, no avatar. */
  .brand {
    width: 0;
    height: 0;
    flex: 0 0 0;
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.82);
    transition:
      width 220ms ease,
      height 220ms ease,
      flex-basis 220ms ease,
      opacity 160ms ease,
      transform 220ms ease;
  }

  .header-name {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    font-size: clamp(2rem, 5.4vw, 3.1rem);
    font-weight: 600;
    letter-spacing: -0.05em;
    white-space: nowrap;
    transition: font-size 220ms ease, letter-spacing 220ms ease, font-weight 220ms ease;
  }

  /* Avoid repeating the same large name directly below the tablet header. */
  .hero-copy h1 {
    display: none;
  }

  /* Once About is reached, restore the compact avatar + name header. */
  .site-header.hero-passed .header-identity {
    gap: 0.9rem;
  }

  .site-header.hero-passed .brand {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 1px solid var(--line);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
  }

  .site-header.hero-passed .header-name {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
  }
}
