.center-when-short {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		min-height: calc(100vh - 62px);
}
@media (min-width: 601px) {
	.center-when-short {
		margin-top: -15px; /* Only nudge up on desktop */
	}
}
.center-when-short {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - 62px); /* 62px = header height */
}
@media (min-width: 0px) {
	.center-when-short > .stack {
		width: auto;
		max-width: 1600px;
		margin: 0 auto;
	}
}
@media (max-width: 900px) {
	.center-when-short {
		min-height: 60vh;
	}
}
/* Project page vertical centered stack with infinite scroll loop */
:root {
	--space: 18vh;
}
/* Normalize text sizing across browsers (avoid auto text inflation) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; }
body { margin: 0; font-family: "Times New Roman", Times, serif; color:#111; background:#fff; font-size:15px; line-height:1.45; }
/* Enforce Times New Roman across project pages */
h1,h2,h3,h4,h5,h6, p, a, li, nav, figcaption, footer, .side-index, .brand, .stack, .num { font-family: "Times New Roman", Times, serif !important; }
* { font-family: inherit !important; }
/* Exit fade overlay */
.page-fade-overlay{ position:fixed; inset:0; background:#fff; opacity:0; pointer-events:none; transition: opacity 420ms cubic-bezier(.22,.61,.36,1); z-index: 90; }
body.page-exiting .page-fade-overlay{ opacity:1; pointer-events:auto; }
/* Content fade-in (sync with overlay fade-out) */
.content-fade { opacity:0; transition: opacity 420ms cubic-bezier(.22,.61,.36,1); }
body.page-ready .content-fade { opacity:1; }
/* Header with logo only */
.site-header { position:fixed; top:0; left:0; width:100%; z-index:101; padding:14px 28px 10px; background:transparent; }
.menu-toggle{ position:fixed; top:18px !important; right:28px !important; width:28px !important; height:16px !important; z-index:101; cursor:pointer; }
.menu-toggle .bar{ position:absolute; left:0; right:0; height:2px; background:#111; border-radius:0; transition: transform 480ms cubic-bezier(.22,.61,.36,1), opacity 480ms cubic-bezier(.22,.61,.36,1), top 480ms cubic-bezier(.22,.61,.36,1); }
.menu-toggle .bar:nth-child(1){ top:2px; }
.menu-toggle .bar:nth-child(2){ bottom:2px; top:auto; }
.menu-open .menu-toggle .bar:nth-child(1){ top:50%; transform:translateY(-50%) rotate(45deg); }
.menu-open .menu-toggle .bar:nth-child(2){ top:50%; bottom:auto; transform:translateY(-50%) rotate(-45deg); }
.slide-menu{ position:fixed; top:58px; right:28px; width:auto; min-width:120px; background:transparent; opacity:0; transform:translateY(-8px); transition: opacity 480ms cubic-bezier(.22,.61,.36,1), transform 480ms cubic-bezier(.22,.61,.36,1); z-index:100; display:flex; flex-direction:column; align-items:flex-end; gap:10px; pointer-events:none; }
.slide-menu a{ font-family:"Times New Roman", Times, serif; font-size:15px; color:#111; text-decoration:none; letter-spacing:.2px; display:block; }
.menu-open .slide-menu{ opacity:1; transform:translateY(0); pointer-events:auto; }
.menu-exiting .menu-toggle{ opacity:0 !important; transition:none !important; }
.menu-exiting .project-scroll{ opacity:0 !important; transition:none !important; }
.menu-exiting footer{ opacity:0 !important; transition:none !important; }
/* Keep the menu container visible so the active link can be shown */
.menu-exiting .slide-menu{ opacity:1 !important; transform:none !important; pointer-events:none; }
/* Instantly hide all links except the one clicked */
.menu-exiting .slide-menu a{ opacity:0 !important; transition:none !important; }
.menu-exiting .slide-menu a.menu-active-click{ opacity:1 !important; }
/* Then fade that active link out gracefully */
.menu-exiting .slide-menu a.menu-active-click.menu-fade-out{ transition: opacity 480ms cubic-bezier(.22,.61,.36,1) !important; opacity:0 !important; }
/* Logo remains visible */
.menu-exiting .brand img{ opacity:1 !important; }
.brand { display:inline-flex; align-items:center; gap:8px; }
.brand img { height:32px !important; width:auto !important; display:block; }
body { padding-top:62px; }

.project-scroll {
	position: relative;
}
.stack {
	width: 100%;
	max-width: 1564px;
	margin-left: auto;
	margin-right: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space);
	box-sizing: border-box;
	padding-left: 80px;
	padding-right: 80px;
	box-sizing: border-box;
}

.stack img, .stack picture, .stack .slide {
	display: block;
	margin: 0 auto;
	width: auto;
	max-width: calc(100% - 160px);
	height: auto;
	box-sizing: border-box;
}

/* Vertically center the first image if stack is short */
.stack figure { margin: 0; }
.stack img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
}
/* Force wide rendering for specific images (e.g., 05.png in New stone research centre)
	Make it exactly as wide as horizontals by using full content width; allow tall height */
.stack img.force-wide {
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: none;
}


/* Text block inserted between Header and 01 */
.text-figure { margin: var(--space) 0; }
.text-frame { width:auto; max-width:92vw; display:flex; align-items:flex-start; justify-content:center; box-sizing:border-box; }
.text-wrap { max-width: 600px; padding: 0 16px; text-align:left; }
.text-title { font-size:16px; line-height:1.35; margin:0 0 24px; text-transform:uppercase; }
.text-title strong { font-weight:700; }
.meta-grid { display:grid; grid-template-columns: 140px 1fr; column-gap: 22px; row-gap: 16px; margin: 12px 0 6px; align-items: baseline; }
.meta-grid dt { font-size:12px; line-height:1.2; color:#666; text-transform:uppercase; letter-spacing:.5px; margin:0; text-align:left; }
.meta-grid dd { font-size:15px; line-height:1.4; color:#111; margin:0; }
.meta-grid a { color: inherit; text-decoration: underline; }
.text-desc { font-size:15px; line-height:1.5; color:#111; opacity:.9; margin: 24px 0 0; }
/* Reduce spacing between subsequent description paragraphs */
.text-desc + .text-desc { margin-top: 12px; }
@media (max-width: 900px){
	.text-wrap { max-width: 92vw; padding: 0 12px; }
	.meta-grid { grid-template-columns: 120px 1fr; column-gap: 16px; row-gap: 14px; }
}
@media (max-width: 900px){
	.text-desc { margin-top: 20px; }
}
@media (max-width: 600px){
}
@media (max-width: 900px){
	:root { --space: 16vh; }
}
@media (max-width: 600px){
	:root { --space: 14vh; }
}

/* Restore original mobile side padding so margins match the pre-change behavior */
@media (max-width: 600px) {
	.stack {
		padding-left: 12px;
		padding-right: 12px;
	}
}

/* Side numbering */
.side-index { position: fixed; right: max(24px, 3vw); top: 50%; transform: translateY(-50%); display:flex; flex-direction:column; gap: 6px; pointer-events:none; }
.side-index .num { font-size: 12px; letter-spacing: .5px; color:#888; opacity:.25; transition: opacity .35s ease; }
.side-index .num.active { opacity:.95; color:#111; }
@media (max-width: 720px){ .side-index { display:none; } }
