/* Shared reference-inspired header; loaded after each page's layout styles. */
.portfolio-header {
  --header-gap: 24px;
  --header-height: 76px;
  --header-gutter: clamp(24px, 2.6vw, 64px);
  position: sticky; inset: auto; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: none; height: var(--header-height); min-height: var(--header-height);
  margin: 0; padding: 0 var(--header-gutter); gap: 32px;
  background: transparent; color: #101820; border: 0; box-shadow: none;
  backdrop-filter: none; transition: background .25s, color .25s;
}
.portfolio-header[data-header-home] { position: fixed; left: 0; right: 0; }
.site-header.portfolio-header,
.site-header.portfolio-header:is(.is-scrolled, .is-dark) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.portfolio-header :is(.header-identity, .header-actions) { display: flex; align-items: center; gap: var(--header-gap); min-width: 0; }
.portfolio-header .header-identity { flex-shrink: 0; }
.portfolio-header .wordmark { display: flex; align-items: center; width: 78px; min-height: 44px; margin: 0; padding: 0; }
.portfolio-header .rm-logo { display: block; width: 78px; height: 42px; object-fit: contain; }
.portfolio-header .header-name { display: block; font-size: 12px; font-weight: 400; line-height: 1.35; white-space: nowrap; }
.portfolio-header .header-divider { display: block; width: 1px; height: 16px; background: currentColor; flex-shrink: 0; opacity: .65; }
.portfolio-header .audio-toggle {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px;
  min-width: 44px; min-height: 44px; padding: 0; margin: 0;
  border: 1px solid #10182021; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.portfolio-header .audio-idle { grid-area: 1 / 1; display: block; width: 23px; height: 1.5px; background: currentColor; transition: opacity .2s; }
.portfolio-header .audio-wave { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 4px; width: 32px; height: 30px; transform: scale(.8); opacity: 0; transition: opacity .2s; }
.portfolio-header .audio-wave i { display: block; width: 2px; height: 26px; background: currentColor; border-radius: 2px; transform: scaleY(.6); }
.portfolio-header .audio-wave i:nth-child(1) { height: 15px; animation-duration: .85s; animation-delay: -.3s; }
.portfolio-header .audio-wave i:nth-child(2) { height: 23px; animation-duration: .65s; animation-delay: -.12s; }
.portfolio-header .audio-wave i:nth-child(3) { height: 29px; animation-duration: .9s; animation-delay: -.5s; }
.portfolio-header .audio-wave i:nth-child(4) { height: 21px; animation-duration: .7s; animation-delay: -.27s; }
.portfolio-header .audio-wave i:nth-child(5) { height: 14px; animation-duration: .8s; animation-delay: -.44s; }
.portfolio-header .audio-toggle[data-audio-state="playing"] .audio-idle { opacity: 0; }
.portfolio-header .audio-toggle[data-audio-state="playing"] .audio-wave { opacity: 1; }
.portfolio-header .audio-toggle[data-audio-state="playing"] .audio-wave i { animation-name: sound-wave; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.portfolio-header .audio-toggle:hover { border-color: currentColor; background: #80808008; }
.portfolio-header .audio-toggle[aria-busy="true"] { border-color: #dc143c70; }
.portfolio-header audio { display: none; }
.audio-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@keyframes sound-wave { 0%, 100% { transform: scaleY(.3); } 30% { transform: scaleY(.95); } 65% { transform: scaleY(.5); } }
.portfolio-header .header-contact {
  display: inline-flex; align-items: center; gap: 16px;
  min-height: 44px; margin: 0; padding: 0; white-space: nowrap;
  font-size: 18px; font-weight: 400; line-height: 1.4; letter-spacing: 0;
  text-decoration: none; text-transform: none; color: inherit;
}
.portfolio-header .header-contact::before, .portfolio-header .header-contact::after { content: none; }
.portfolio-header .header-contact-label { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.portfolio-header .header-contact-mark { display: grid; place-items: center; width: 26px; height: 36px; border-bottom: 2px solid currentColor; }
.portfolio-header .header-star { display: block; width: 22px; height: 22px; color: #dc143c; stroke: currentColor; stroke-width: 1; transition: transform .3s; }
.portfolio-header .header-contact:hover .header-star { transform: rotate(45deg); }
.portfolio-header :is(a, button, summary):focus-visible { outline: 2px solid #dc143c; outline-offset: 5px; }
.portfolio-header.is-dark { background: transparent; color: #f7f7f7; box-shadow: none; }
.portfolio-header.is-dark .rm-logo { filter: brightness(0) invert(1); }
.portfolio-header.is-dark .audio-toggle { border-color: #ffffff35; }
.ambient-paused .portfolio-header *, .ambient-paused .portfolio-header *::after { transition: none !important; }
/* The open navigation is a modal panel, independent of the transparent bar. */
html { scrollbar-gutter: stable; }
html.navigation-open { overflow: hidden; overscroll-behavior: none; }
.portfolio-header .menu-toggle { position: relative; display: block; width: 72px; height: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.portfolio-header .menu-toggle > span { position: absolute; width: 52px; height: 2px; background: currentColor; transition: transform .25s; }
.portfolio-header .menu-toggle > span:first-child { top: 15px; left: 0; }
.portfolio-header .menu-toggle > span:last-child { top: 28px; left: 20px; }
.portfolio-header .menu-toggle:hover > span:first-child { transform: translateX(4px); }
.portfolio-header .menu-toggle:hover > span:last-child { transform: translateX(-4px); }
.portfolio-header .navigation-overlay {
  position: fixed; inset: var(--header-height) var(--header-gutter) auto;
  width: calc(100% - var(--header-gutter) * 2); max-width: none;
  height: min(840px, calc(100dvh - var(--header-height) - 32px)); max-height: none;
  margin: 0; padding: 0; border: 0; overflow: visible; background: transparent;
  color: #101820; font-family: inherit; text-align: left;
}
.navigation-overlay::backdrop { background: #10182055; backdrop-filter: blur(5px); }
.navigation-overlay[open][data-state="opening"] { animation: navigation-enter .42s cubic-bezier(.16, 1, .3, 1) both; }
.navigation-overlay[open][data-state="closing"] { animation: navigation-exit .24s ease-in both; pointer-events: none; }
.navigation-overlay[open][data-state="opening"]::backdrop { animation: navigation-backdrop-in .42s ease both; }
.navigation-overlay[open][data-state="closing"]::backdrop { animation: navigation-backdrop-out .24s ease both; }
.portfolio-header .navigation-close { position: absolute; z-index: 2; top: -52px; right: 0; display: grid; place-items: center; width: 76px; height: 64px; padding: 0; border: 0; border-radius: 24px 24px 0 0; background: #f4f1f2; color: #101820; cursor: pointer; }
.navigation-close svg { width: 32px; height: 32px; stroke: currentColor; stroke-width: 1.5; transition: transform .25s; }
.navigation-close:hover svg { transform: rotate(90deg); }
.portfolio-header .navigation-panel {
  display: flex; flex-direction: column; justify-content: space-between; gap: 64px;
  height: 100%; padding: clamp(40px, 6vw, 110px) clamp(32px, 5.7vw, 110px) 28px;
  overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
  border-radius: 28px 0 28px 28px;
  background: radial-gradient(ellipse at 86% 100%, #dc143c12, transparent 52%), linear-gradient(135deg, #fcfaf7f5, #f4f1f2fa);
  box-shadow: 0 30px 100px #10182030; backdrop-filter: blur(20px);
}
.navigation-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, .85fr) minmax(0, .75fr); gap: clamp(32px, 5.2vw, 100px); }
.navigation-grid > * { min-width: 0; }
.navigation-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; color: #dc143c; font-size: 16px; }
.navigation-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.navigation-invitation h2 { margin: 0; font-size: clamp(34px, 3.1vw, 60px); line-height: 1.06; font-weight: 400; letter-spacing: -.055em; }
.navigation-rule { display: block; width: 70px; height: 1px; margin-block: 32px; background: #10182030; }
.navigation-email { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; color: #687078; font-size: 16px; text-decoration: underline; text-underline-offset: 5px; overflow-wrap: anywhere; }
.navigation-email svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.5; }
.navigation-cta { display: flex; align-items: center; justify-content: center; gap: 20px; width: fit-content; min-height: 60px; margin-top: 64px; padding: 16px 32px; border-radius: 999px; background: #101820; color: #fff; font-size: 16px; letter-spacing: .07em; text-decoration: none; box-shadow: 0 14px 24px #10182018; }
.navigation-cta > span { color: #dc143c; font-size: 26px; line-height: 1; transition: transform .25s; }
.navigation-cta:hover > span { transform: translate(3px, -3px); }
.portfolio-header .navigation-links { position: static; inset: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: auto; margin: 0; padding: 0; transform: none; }
.navigation-label { margin: 0 0 24px; font-size: 13px; color: #687078; }
.portfolio-header .navigation-links a { position: relative; display: flex; align-items: center; min-height: 44px; padding: 3px 0; color: #687078; font-size: clamp(22px, 1.9vw, 36px); line-height: 1.3; font-weight: 400; letter-spacing: -.025em; text-decoration: none; transition: color .2s, transform .2s; }
.portfolio-header .navigation-links a:is(:hover, :focus-visible, .is-active, [aria-current]) { color: #101820; }
.portfolio-header .navigation-links a:hover { transform: translateX(4px); }
.portfolio-header .navigation-links a:is(.is-active, [aria-current])::before { content: ''; position: absolute; left: -22px; width: 9px; height: 9px; border-radius: 50%; background: #dc143c; }
.navigation-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; border-top: 1px solid #1018201c; padding-top: 22px; color: #687078; }
.navigation-bottom p { margin: 0; font-size: 12px; }
.navigation-bottom .navigation-signature { font-size: 10px; letter-spacing: .12em; }
.portfolio-header .navigation-bottom .menu-motion-toggle { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; width: auto; height: auto; min-height: 44px; min-width: 0; padding: 8px 0; margin: 0; border: 0; border-radius: 0; background: transparent; color: #687078; font: inherit; font-size: 12px; cursor: pointer; }
.portfolio-header .navigation-bottom .menu-motion-toggle:hover { color: #dc143c; }
@keyframes navigation-enter { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes navigation-exit { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(12px) scale(.99); } }
@keyframes navigation-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes navigation-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.social-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.social-links a { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid #68707855; border-radius: 50%; color: inherit; transition: color .2s, border-color .2s, transform .2s; }
.social-links svg { display: block; width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.5; }
.social-links a:hover { color: #dc143c; border-color: #dc143c; transform: translateY(-3px); }
.social-links a:focus-visible { outline: 2px solid #dc143c; outline-offset: 4px; }
@media(max-width: 1100px) { .navigation-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; }.navigation-invitation { grid-column: 1 / -1; }.navigation-invitation h2 { max-width: 620px; }.navigation-cta { margin-top: 28px; }.portfolio-header .navigation-panel { gap: 40px; padding-top: 40px; }.navigation-label { margin-bottom: 14px; } }
@media(max-width: 600px) { .portfolio-header .menu-toggle { width: 54px; }.portfolio-header .menu-toggle > span { width: 36px; }.portfolio-header .menu-toggle > span:last-child { left: 18px; }.portfolio-header .navigation-overlay { height: calc(100dvh - var(--header-height) - 16px); }.portfolio-header .navigation-panel { padding: 32px 24px 20px; border-radius: 20px 0 20px 20px; }.portfolio-header .navigation-close { top: -44px; width: 58px; height: 54px; border-radius: 18px 18px 0 0; }.navigation-close svg { width: 27px; height: 27px; }.navigation-grid { gap: 32px 24px; }.navigation-eyebrow { font-size: 13px; margin-bottom: 18px; }.navigation-invitation h2 { font-size: clamp(30px, 6.5vw, 40px); }.navigation-rule { margin-block: 22px; }.navigation-email { font-size: 13px; }.navigation-cta { min-height: 50px; font-size: 13px; padding: 12px 24px; }.portfolio-header .navigation-links a { font-size: 19px; }.navigation-label { font-size: 11px; }.portfolio-header .navigation-links a:is(.is-active, [aria-current])::before { left: -14px; width: 6px; height: 6px; }.navigation-bottom { gap: 8px 24px; }.navigation-bottom .navigation-signature { display: none; } }
@media(max-width: 360px) { .navigation-grid { grid-template-columns: minmax(0, 1fr); }.navigation-invitation { grid-column: auto; } }
@media(min-width: 361px) and (max-width: 600px) {
  .navigation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .portfolio-header .navigation-links a { font-size: clamp(16px, 4.7vw, 19px); }
}
@media(prefers-reduced-motion: reduce) { .navigation-overlay[open], .navigation-overlay[open]::backdrop { animation: none !important; }.navigation-overlay * { transition: none !important; } }
@media(max-width: 900px) {
  .portfolio-header { --header-gap: 20px; --header-gutter: 24px; --header-height: 68px; gap: 24px; }
  .portfolio-header .wordmark { width: 70px; }
  .portfolio-header .rm-logo { width: 70px; height: 38px; }
  .portfolio-header .header-name { display: none; }
  .portfolio-header .header-contact { font-size: 16px; gap: 8px; }
}
@media(max-width: 600px) {
  .portfolio-header { --header-gap: 14px; --header-gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); --header-height: 64px; gap: 16px; }
  .portfolio-header .wordmark { width: 62px; }
  .portfolio-header .rm-logo { width: 62px; height: 34px; }
  .portfolio-header .header-actions { gap: 0; }
  .portfolio-header .header-actions > :is(.header-contact, .header-divider) { display: none; }
  .portfolio-header .header-divider { height: 14px; }
}
@media(prefers-reduced-motion: reduce) { .portfolio-header *, .portfolio-header *::after { transition: none !important; }.portfolio-header .audio-wave i { animation: none !important; } }
