/* A photographic mount and scroll-controlled opening; no generated scenery. */
/* One persistent shortcut; native anchor remains usable without JavaScript. */
/* Recommendations: concise summaries, named authors and original-language PDFs. */
.reference-heading h3 { font: 500 clamp(1.25rem,2vw,1.6rem)/1.3 var(--sans); margin-top: 18px; letter-spacing: -.02em; }
.reference-date { font-size: .875rem; color: var(--muted); margin-top: 9px; }
.reference-summary { font: clamp(1.25rem,1.8vw,1.65rem)/1.55 var(--serif); margin: 26px 0 28px; }
.reference-author { border-top: 1px solid #8f9a8244; padding-top: 17px; }
.reference-author p { font-size: .875rem; line-height: 1.6; margin-top: 4px; color: var(--ink); }
.reference-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 50px; margin-top: 24px; padding: 12px 16px; border: 1px solid #52645b88; font-size: .875rem; font-weight: 500; transition: color .2s,background .2s; }
.reference-link > span { font-size: 1.3rem; }
.reference-link:hover { background: var(--night); color: var(--paper); }
.reference-file-note { font-size: .75rem; color: var(--muted); margin-top: 10px; }
@media(max-width:760px) { .reference-summary { font-size: 1.25rem; margin-block: 22px 24px; } }
.back-to-top { position: fixed; right: max(20px,env(safe-area-inset-right,0px)); bottom: calc(20px + env(safe-area-inset-bottom,0px)); z-index: 35; display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 48px; min-width: 48px; padding: 10px 18px; border: 1px solid #d4b57688; border-radius: 999px; background: var(--night); color: var(--paper); box-shadow: 0 4px 20px #0003; font: 500 .875rem/1.3 var(--sans); transition: opacity .2s,transform .2s,background .2s; }
.back-to-top > span:last-child { font-size: 1.4rem; line-height: 1; color: var(--acid); }
.back-to-top:hover { background: #214237; transform: translateY(-2px); }
.scroll-tools-ready .back-to-top:not(.is-visible) { visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(8px); }
.back-to-top.above-chapter-nav { bottom: calc(106px + env(safe-area-inset-bottom,0px)); }
.site-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom,0px)); }
@media(max-width:760px) {
  .back-to-top { right: max(16px,env(safe-area-inset-right,0px)); bottom: calc(16px + env(safe-area-inset-bottom,0px)); padding: 10px 15px; }
  .back-to-top.above-chapter-nav { bottom: calc(88px + env(safe-area-inset-bottom,0px)); }
}
@media print { .back-to-top { display: none; } }
.hero-grid { perspective: 1600px; }
.portrait { --tilt-x: 0deg; --tilt-y: 0deg; transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.portrait::before { content: ''; position: absolute; inset: 8px 0 47px; border: 1px solid #d9e1cf60; transform: rotate(-3deg) translate(-9px,5px); pointer-events: none; }
.portrait-window { border: 7px solid #e3e6d7; box-shadow: 0 30px 55px -25px #0007; }
.portrait figcaption { padding-top: 28px; }
.hero-title { transform: translate3d(0,var(--title-drift,0px),0); transform-origin: left center; }
.hero .surname { margin-left: .04em; }
.intro-section { position: relative; z-index: 2; }

/* The existing journey heading opens from an inset frame into a full scene. */
.journey-intro { display: block; padding: 0; background: var(--paper); color: var(--paper); }
.journey-gateway { --frame-inset: 0%; --frame-radius: 0px; --gate-scale: 1; --line-offset: 0px; position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: min(82svh,900px); padding: clamp(3rem,7vw,7rem) var(--pad) 2.5rem; background: var(--night); clip-path: inset(0 var(--frame-inset) round var(--frame-radius)); overflow: clip; isolation: isolate; }
.gateway-heading { padding-block: 1.5rem 3rem; transform: scale(var(--gate-scale)); transform-origin: center left; }
.journey-gateway .eyebrow { color: var(--acid); margin-bottom: 2rem; }
.journey-gateway .display-heading { font-size: clamp(3.5rem,8.1vw,9.5rem); line-height: 1.1; letter-spacing: -.045em; }
.gateway-line { display: block; overflow: clip; padding: .08em .06em .15em 0; margin-bottom: -.18em; }
.gateway-line > span { display: block; transform: translate3d(0,var(--line-offset),0); }
.gateway-line + .gateway-line { color: var(--acid); font-style: italic; }
.gateway-line + .gateway-line > span { transform: translate3d(var(--second-drift,0px),var(--line-offset),0); }
.gateway-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; border-top: 1px solid #f1f2e938; padding-top: 1.75rem; }
.journey-gateway .journey-help { max-width: 370px; margin: 0; }
.gateway-direction { font: 3.25rem/1 var(--sans); color: var(--acid); transform: translateY(var(--arrow-drift,0px)); }
.chapter-landmark { perspective: 1200px; }
.landmark-year { transform-origin: left center; }
.chapter-story { backface-visibility: hidden; }
.chapter-navigation { isolation: isolate; }
.chapter-stops a { position: relative; }
.chapter-stops a::after { content: ''; position: absolute; left: 0; bottom: 3px; height: 1px; width: 100%; background: var(--acid); transform: scaleX(0); transform-origin: left; transition: transform .4s ease; }
.chapter-stops a[aria-current]::after { transform: scaleX(1); }
.button.primary > span, .text-link > span { transition: transform .35s cubic-bezier(.16,1,.3,1); }
.button.primary:hover > span { transform: translate(3px,3px); }
.text-link:hover > span { transform: translate(3px,-3px); }
.motion-ready .skill:nth-child(even), .motion-ready .reference:nth-child(even) { transition-delay: .1s; }

@media(min-width:761px) {
  .hero-copy { padding-bottom: 2.75rem; }
  .portrait { padding: 7px; }
}
@media(max-width:760px) {
  .portrait-window { border-width: 4px; }
  .portrait::before { inset: 4px 0 0; transform: rotate(-3deg) translate(-5px,3px); }
  .journey-gateway { min-height: min(72svh,620px); padding: 2.75rem var(--pad) 2rem; }
  .journey-gateway .display-heading { font-size: clamp(2.6rem,10.8vw,5.5rem); }
  .gateway-heading { padding-top: 1rem; padding-bottom: 3rem; }
  .journey-gateway .eyebrow { margin-bottom: 1.5rem; }
  .journey-gateway .journey-help { max-width: 250px; font-size: 1rem; }
  .gateway-direction { font-size: 2.5rem; }
  .gateway-bottom { padding-top: 1.5rem; }
}
@media(max-width:360px) { .journey-gateway .display-heading { font-size: 2.4rem; } }
body.calm .portrait, body.calm .hero-title, body.calm .gateway-heading, body.calm .gateway-line > span, body.calm .gateway-direction { transform: none; }
body.calm .journey-gateway { clip-path: none; }
@media(prefers-reduced-motion:reduce) {
  .portrait,.hero-title,.gateway-heading,.gateway-line > span,.gateway-direction { transform: none!important; }
  .journey-gateway { clip-path: none; }
}
@media print {
  .journey-gateway { min-height: 0; padding: 25px; clip-path: none; color: var(--ink); background: white; }
  .journey-gateway .display-heading { font-size: 2.5rem; }
  .journey-gateway .eyebrow, .gateway-line + .gateway-line { color: var(--ink); }
  .gateway-heading,.gateway-line > span,.hero-title { transform: none!important; }
  .gateway-bottom { display: none; }
}
