html {scroll-behavior: auto; scrollbar-gutter: stable}
body {--pine: #29483e; --foil: #e4d6a4; --paper: #fbf8ed; --ink: #303b33; --muted: #60695e}
header {z-index: 5}
.book-room {color: var(--ink); overflow-anchor: none}
.book-room [hidden] {display: none}
.book {margin-inline: auto; outline: none}
.jacket {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 3px 9px 9px 3px;
  color: var(--foil); background-color: var(--pine);
  background-image: linear-gradient(90deg, #182e25a1, transparent 2%, #c4caa116 2.6%, transparent 3.5%, #112b219c 5%, #97aa8933 5.7%, transparent 6.4%),
    repeating-linear-gradient(2deg, transparent 0 2px, #1b332d35 2px 3px),
    repeating-linear-gradient(92deg, transparent 0 2px, #f4edd020 2px 3px),
    linear-gradient(130deg, #496658, #314f43 57%, #345346);
  box-shadow: inset 0 0 0 1px #19372b, inset -2px -2px 3px #14291d75, 0 12px 20px -12px #2a352f80;
}
.jacket-frame {
  position: absolute; inset: 6.2% 6% 5% 9%; border: 1px solid #c6ba897a;
  display: flex; flex-direction: column; align-items: center; padding-top: 12%;
}
.jacket-frame::before, .jacket-frame::after {content: ""; width: .45rem; height: .45rem; background: #b2aa78; box-shadow: 0 0 0 4px #344e41; transform: rotate(45deg); position: absolute; left: calc(50% - .225rem)}
.jacket-frame::before {top: -.25rem}
.jacket-frame::after {bottom: -.25rem}
.byline {margin: 0; font: 500 .75rem/1.3 "Inter","Segoe UI",sans-serif; letter-spacing: .12em}
.jacket h1 {font: 400 clamp(2.8rem, 4.4vw, 4.25rem)/1.08 var(--display); letter-spacing: -.065em; margin: 7% 0 2%; text-shadow: 0 1px 1px #122c2573}
.jacket-places {margin: 0; font: italic 1rem/1.4 var(--display); color: #e0d8bc}
.jacket-art {display: block; width: 100%; height: auto; margin-top: auto; margin-bottom: 7%; mix-blend-mode: normal}
.entry-copy h2 {font: 400 clamp(1.9rem,3.1vw,2.95rem)/1.04 var(--display); text-wrap: balance; letter-spacing: -.052em; margin: 0}
.tags {display: flex; gap: .3rem .36rem; flex-wrap: wrap; list-style: none; padding: 0; margin: .72rem 0 .9rem}
.tags li {margin: 0; padding: .2rem .54rem; border: 1px solid #9abcb1; border-radius: .4rem; background: #dcf0e6; color: #134c3e; font: 650 .73rem/1.2 "Inter","Segoe UI",sans-serif}
.tags .method {background: #e2ecf9; border-color: #a4bad3; color: #25476d}
.tags .tech {background: #eae5f8; border-color: #c2b3d8; color: #513775}
.tags .practice {background: #fae5cb; border-color: #cfa982; color: #6d401d}
.tags li:first-child {background: #225c50; border-color: #225c50; color: #fff}
.entry-copy p {margin: 0 0 .65em; font-size: clamp(.92rem,1.12vw,1.04rem); line-height: 1.48}
.entry-copy .role {color: #485348; font: italic 1.04rem/1.26 var(--display); margin: 0 0 .8rem}
.entry-copy .entry-date {font: .74rem/1.4 "Inter","Segoe UI",sans-serif; color: var(--muted); margin: auto 0 0; padding-top: .85rem}
.entry-link {align-self: flex-start; font-size: .83rem; color: #365c4d; text-decoration-color: #8d9c85}
.service-list {margin: 0 0 auto; font-size: clamp(.92rem,1.12vw,1.04rem); line-height: 1.42}
.service-list dt {font-weight: 600; margin: .65rem 0 .18rem}
.service-list dt:first-child {margin-top: 0}
.service-list dd {margin: 0}
.plate {margin: 0; color: #555e52}
.plate img {display: block; width: 100%; height: auto; box-shadow: 0 2px 4px #483e251b}
.plate figcaption {margin: .7rem auto 0; font: italic .96rem/1.35 var(--display); text-align: center; max-width: 34ch; text-wrap: pretty}
.technical-plate figcaption {font: 600 .8rem/1.35 "Inter","Segoe UI",sans-serif; color: #365c50}
.architecture > a {display: block}
.research-panel {background: #fcfbf5; padding: 1.05rem; border: 1px solid #c6cabb; color: #213e35}
.research-panel .figure-title {font: 400 clamp(1.3rem,2vw,1.8rem)/1.1 var(--display); letter-spacing: -.04em; margin: 0}
.research-panel .figure-source {font: .77rem/1.3 "Inter","Segoe UI",sans-serif; margin: .4rem 0 1rem; color: #536254}
.heatmap {display: block; width: 100%; fill: #38463c; font: 12px "Segoe UI",Arial,sans-serif}
.heatmap image {image-rendering: pixelated}
.research-panel table {width: 100%; border-collapse: collapse; font-size: .79rem; font-variant-numeric: tabular-nums}
.research-panel caption {text-align: left; font-weight: 650; margin: .7rem 0 .4rem}
.research-panel :is(td,th) {padding: .3rem .12rem; border-bottom: 1px solid #d5dbce; text-align: left}
.research-panel thead {background: #e5ece3}
.research-panel tbody th {font-weight: 500}
.research-panel :is(td,th):nth-child(n+3) {text-align: right}

/* The document also reads as an ordinary, illustrated book without scripting or at high zoom. */
.book:not(.bound) {max-width: 64rem; padding: 1.25rem 1rem 3rem}
.book:not(.bound) .jacket {width: min(80vw,22rem); aspect-ratio: .78; margin: 1rem auto 3rem}
@media (prefers-reduced-motion: no-preference) {
  .book:not(.bound) .jacket {transform-origin: left center; transform: perspective(1600px) rotateY(var(--flow-turn,0deg))}
}
.book:not(.bound) .experience {display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 2rem; margin: 0 auto 1.75rem; padding: clamp(1.2rem,4vw,3.3rem); background: var(--paper); border: 1px solid #dedbcc; box-shadow: 1px 3px 0 #ece8da; scroll-margin-top: 6.5rem}
.book:not(.bound) .entry-date {margin-top: .75rem}
@media (max-width: 730px) {
  .book:not(.bound) .experience {grid-template-columns: 1fr; gap: 1rem}
  .book:not(.bound) .plate {width: min(100%, 25rem); margin: auto}
}

/* Each leaf has an independently printed front and back, hinged at the binding. */
.reading .book-stage {
  position: sticky; top: var(--header-height); height: calc(100svh - var(--header-height));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(.85rem,2.7svh,1.7rem); overflow: clip;
}
.bound {
  --leaf-height: min(40rem,calc(100svh - var(--header-height) - 4.6rem)); --leaf-width: min(46vw,max(31rem,calc(var(--leaf-height) * .85)));
  width: calc(var(--leaf-width) * 2); height: var(--leaf-height); position: relative; flex: none;
  transform: translateX(var(--book-offset, -25%)); margin: 0;
}
.paper-stack {
  position: absolute; top: .6%; bottom: -.8%; width: calc(50% + 3px); border: 1px solid #a7a38d; pointer-events: none;
  background: repeating-linear-gradient(0deg, #e2ddce 0 1px, #f5f1e3 1px 3px);
  box-shadow: 0 3px 0 #385043, 0 7px 9px -4px #41432e3b, 6px 20px 33px -17px #3f4436aa;
}
.paper-stack.right {left: 50%; border-radius: 0 4px 7px 0}
.paper-stack.left {right: 50%; border-radius: 4px 0 0 7px; opacity: var(--opening,0); box-shadow: 0 3px 0 #385043, -4px 18px 30px -15px #3f44367d}
.leaf {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; transform-origin: left center;
  transform-style: preserve-3d; transform: perspective(3100px) rotateY(var(--turn,0deg));
}
.face {
  position: absolute; inset: 0; border-radius: 0 4px 5px 0; overflow: hidden;
  background: linear-gradient(90deg,#d4ceba 0,#f3efdf 3%,var(--paper) 10%,#faf8ee 95%,#f3efdd);
  border: 1px solid #d7d2c0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.face.front {transform: translateZ(.4px)}
.face.reverse {
  border-radius: 5px 0 0 5px; transform: rotateY(180deg) translateZ(.4px);
  background: linear-gradient(90deg,#f5f1e4,var(--paper) 9%,#f6f2e4 88%,#d6d0ba);
  display: grid; place-items: center; padding: 10%;
}
.face::after {content:""; position: absolute; inset: 0; background: #3e3825; opacity: var(--shade,0); pointer-events: none}
.face.front:has(.jacket) {border: none; background: var(--pine); border-radius: 3px 9px 9px 3px}
.bound .jacket {height: 100%; width: 100%}
.bound .experience {height: 100%}
.bound .entry-copy {height: 100%; padding: clamp(1.1rem,3svh,2.2rem) 6.5% clamp(1rem,2.8svh,2rem) 8%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center}
.bound .entry-copy h2 {margin-top: auto}
.bound .entry-copy .entry-date {margin-top: auto}
.bound .plate {width: 100%}
.face.reverse .plate {transform: rotate(-1.6deg)}
.face.reverse .plate img {border: .48rem solid #fffdf6; box-shadow: 0 0 0 1px #d9d6c8, 1px 3px 6px #4e483623}
.face.reverse:has(.technical-plate) {padding: 6%}
.face.reverse .technical-plate, .face.reverse .construction-plate {transform: none}
.face.reverse .technical-plate img {border: 1px solid #c6cabb; box-shadow: none}
.face.reverse .architecture img {width: min(100%,calc(var(--leaf-height) - 6.25rem)); margin-inline: auto}
.face.reverse .research-plate {width: min(100%,calc(var(--leaf-height) * .85))}
@media (min-width: 1000px) and (max-height: 700px) {
  .bound {--leaf-width: min(46vw,34rem)}
  .bound .entry-copy {padding-block: 1rem}
  .bound .entry-copy h2 {font-size: 2.2rem}
  .face.reverse .research-panel {padding: .75rem}
  .face.reverse .research-panel :is(td,th) {padding-block: .18rem}
}

.book-controls {height: 2.7rem; flex: none; color: #45554b; font-size: .86rem; display: grid; place-items: center}
.book-controls button,.page-picker {font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 1.5rem}
.book-controls button {cursor: pointer; min-height: 2.65rem; min-width: 2.65rem}
.open-book {padding: .35rem .8rem}
.open-book span {display: inline-block; margin-left: .5rem; color: #7c785b}
.book-controls button:hover,.page-picker:hover {border-color: #cbd0c2; background: #f2f3ec}
.book-controls button:disabled {opacity: .3; cursor: default}
.page-controls {display: flex; gap: .25rem; align-items: center}
.page-controls button {font-size: 1.3rem}
.page-picker {position: relative; padding: .4rem .65rem; font-variant-numeric: tabular-nums}
.page-picker::after {content: "⌄"; margin-left: .4rem}
.page-picker select {position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer}
.page-picker:focus-within {outline: 2px solid var(--gold)}
@media (max-width: 730px) {
  .bound {--leaf-width: min(calc(100vw - 1.9rem),28rem); --leaf-height: min(43rem,calc(100svh - var(--header-height) - 4.5rem)); width: var(--leaf-width); transform: none}
  .leaf, .paper-stack.right {left: 0; width: 100%}
  .paper-stack.left, .face.reverse {visibility: hidden}
  .bound .entry-copy {padding: clamp(1rem,2.6svh,1.5rem) 7% 1.1rem 9%; justify-content: flex-start}
  .bound .entry-copy h2 {font-size: clamp(1.85rem, 7vw, 2.35rem); margin: 0}
  .tags {margin: .55rem 0 .75rem}
  .entry-copy p {font-size: .91rem; line-height: 1.37}
  .service-list {font-size: .91rem; line-height: 1.37}
  .entry-copy .role {font-size: .96rem; margin-bottom: .6rem}
  .bound .entry-copy .plate {margin: auto auto 0; padding-top: .65rem}
  .bound .entry-copy .plate img {height: clamp(4rem,14svh,8rem); width: 100%; object-fit: contain; box-shadow: none}
  .bound .entry-copy .plate figcaption {font-size: .81rem; margin-top: .3rem; max-width: 42ch}
  .bound .entry-copy .technical-plate {display: flex; gap: .8rem; align-items: center; justify-content: center}
  .bound .technical-plate figcaption {flex: 0 1 10rem; margin-inline: 0; text-align: left}
  .bound .entry-copy .architecture img {width: 5.75rem; height: 5.75rem; border: 1px solid #bdc5b9}
  .bound .research-panel {padding: .2rem; max-width: 9.5rem}
  .bound .research-panel :is(.figure-title,.figure-source,table) {display: none}
  .bound .entry-copy .entry-date {margin-top: .55rem; padding: 0; font-size: .69rem}
  .jacket h1 {font-size: clamp(2.75rem,10vw,3.65rem)}
}
