/* ==========================================================================
   Tactile theme mock-up
   Same palette and sidebar layout as the live site; surfaces are built from
   paper, felt, stitching, ink and tape instead of flat color blocks.
   All textures are generated in CSS/SVG, so there are no extra image files.
   ========================================================================== */

@font-face {
	font-family: "Recoleta";
	src: url("../../fonts/Recoleta-Regular.otf") format("opentype");
	font-display: swap;
}

:root {
	/* Existing palette */
	--green:  #38532D;
	--tan:    #CCC7B9;
	--brown:  #664E4C;
	--slate:  #718591;
	--sage:   #9AA69C;
	--blue:   #447A9C;
	--navy:   #132B3B;

	/* Derived */
	--paper:      #E9E4D6;
	--paper-lo:   #DDD8C9;
	--print:      #F8F5EA;
	--ink:        #54413F;
	--ink-soft:   #7a6a66;
	--rule:       rgba(102, 78, 76, 0.28);

	--sidebar-w:  17rem;

	/* Paper shadows: tight contact shadow + soft ambient, no glow */
	--lift-1: 0 1px 1px rgba(58, 44, 30, .22), 0 2px 4px rgba(58, 44, 30, .12);
	--lift-2: 0 1px 1px rgba(58, 44, 30, .20), 0 3px 6px rgba(58, 44, 30, .12), 0 12px 22px -8px rgba(58, 44, 30, .30);

	/* Paper tooth: CC0 scan (ambientCG Paper001), normalised to a near-white multiply layer */
	--paper-tex: url("paper.jpg");   /* grey multiply tile, for small static elements */
	--page-tex:  url("page.jpg");    /* baked: tooth already multiplied into the page colour */
	--desk-tex:  url("desk.jpg");    /* baked: same, tan desk */
	--tex-size:  1200px;             /* tiles are 600px; showing them at 2x gives a softer, bigger grain */

	/* Procedural textures (SVG feTurbulence, tiled): now only for felt, stamps and small details */
	--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .26 0 0 0 0 .2 .55 0 0 0 -.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
	--flecks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='l' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .85 0 0 0 0 .9 0 0 0 0 .75 .7 0 0 0 -.32'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23l)'/%3E%3C/svg%3E");
	--felt-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='d' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' seed='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .05 0 0 0 0 .1 0 0 0 0 .04 .8 0 0 0 -.26'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23d)'/%3E%3C/svg%3E");
	--ink-blot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='s' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.4 0 0 0 -.4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: 1.5rem;
}

body {
	margin: 0;
	font-family: Spectral, Georgia, serif;
	font-size: 18px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--tan);
}

/* Desk texture lives on a fixed layer so scrolling never repaints it */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		url("coffee-desk.png") right -120px bottom 4vh / 470px no-repeat,
		var(--desk-tex) 0 0 / var(--tex-size) repeat;
	pointer-events: none;
}

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

a {
	color: var(--brown);
	text-decoration: none;
	border-bottom: 1px solid rgba(102, 78, 76, .4);
	transition: border-color .15s ease, color .15s ease;
}
a:hover { border-bottom-color: var(--brown); }

h1, h2, h3, h4 {
	font-family: Recoleta, Spectral, serif;
	font-weight: normal;
	color: var(--brown);
	margin: 0;
	line-height: 1.2;
}

p { margin: 0 0 1.1em; }

/* ---------- Sidebar: stitched felt ---------------------------------------- */

#sidebar {
	position: fixed;
	inset: 0 auto 0 0;
	width: var(--sidebar-w);
	padding: 3rem 2.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: right;
	z-index: 20;
	background:
		var(--flecks),
		var(--felt-dark),
		repeating-linear-gradient(0deg,  rgba(255,255,255,.028) 0 1px, transparent 1px 3px),
		repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 1px, transparent 1px 3px),
		var(--green);
	box-shadow:
		inset -1px 0 0 rgba(0, 0, 0, .28),
		2px 0 0 rgba(0, 0, 0, .12),
		6px 0 16px rgba(30, 25, 15, .35);
}

/* Running stitch along the inner edge */
#sidebar::after {
	content: "";
	position: absolute;
	top: 10px;
	bottom: 10px;
	right: 9px;
	border-right: 2px dashed rgba(236, 231, 210, .26);
	pointer-events: none;
}

#sidebar .avatar {
	width: 78%;
	margin-left: auto;
	border-radius: 50%;
	border: 6px solid var(--print);
	box-shadow:
		0 1px 2px rgba(0, 0, 0, .45),
		0 8px 14px -4px rgba(0, 0, 0, .45);
	background: var(--print);
}

#sidebar nav ul {
	list-style: none;
	margin: 2.4rem 0 0;
	padding: 0;
}

#sidebar nav a {
	position: relative;
	z-index: 1;
	display: block;
	border: 0;
	padding: .95rem 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .26em;
	line-height: 1.7;
	text-transform: uppercase;
	color: rgba(240, 236, 222, .55);
	text-shadow: 0 -1px 0 rgba(0, 0, 0, .35); /* debossed into the felt */
	transition: color .2s ease;
}

#sidebar nav a:hover { color: rgba(240, 236, 222, .85); }

/* Active link: a cloth index tab sewn to the edge */
#sidebar nav a.active {
	color: #F6F1E2;
	margin-right: -2.5rem;
	padding-right: 2.5rem;
	padding-left: 1rem;
	border-radius: 4px 0 0 4px;
	background: var(--grain), linear-gradient(180deg, #735856, var(--brown) 60%, #5a4341);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .16),
		0 1px 1px rgba(0, 0, 0, .4),
		0 3px 6px rgba(0, 0, 0, .28);
	text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
}

/* ---------- Main + paper sheets -------------------------------------------- */

main {
	margin-left: var(--sidebar-w);
	padding: 3rem 2rem 1rem;
	overflow-x: clip;
}

.sheet {
	position: relative;
	isolation: isolate;
	max-width: 52rem;
	margin: 0 auto 2.75rem;
	padding: 3rem 3.25rem;
	border-radius: 3px;
	background-color: var(--paper);
	background-image: var(--stain, none), linear-gradient(180deg, rgba(255, 255, 255, .30), rgba(255, 255, 255, 0) 45%), var(--page-tex);
	background-position: var(--stain-pos, 0 0), 0 0, 0 0;
	background-size: var(--stain-size, auto), auto, var(--tex-size);
	background-repeat: no-repeat, no-repeat, repeat;
	box-shadow: var(--lift-2), inset 0 1px 0 rgba(255, 255, 255, .55);
}

/* A second sheet peeking out underneath, slightly off-square */
.sheet::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: 3px;
	background: var(--paper-tex) 0 0 / var(--tex-size), var(--paper-lo);
	background-blend-mode: multiply, normal;
	box-shadow: var(--lift-1);
	transform: rotate(-.4deg);
}
.sheet:nth-of-type(even)::before { transform: rotate(.35deg); }

.sheet h1 { font-size: 3.1rem; letter-spacing: -.005em; margin-bottom: 1.2rem; }

.sheet h2 {
	font-size: 1.9rem;
	padding-bottom: .6rem;
	margin-bottom: 1.6rem;
	border-bottom: 1px solid var(--rule);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .55); /* pressed-in hairline */
}

.sheet h3 { font-size: 1.15rem; }

.accent { color: var(--brown); font-weight: 700; }

/* ---------- Buttons: raised card-stock chips -------------------------------- */

.btn {
	display: inline-block;
	margin: .3rem .4rem .3rem 0;
	padding: .6em 1.35em;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #F3EEDF;
	background: var(--grain), linear-gradient(180deg, #735856, var(--brown));
	border: 0;
	border-radius: 3px;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .18),
		0 2px 0 #3f2f2d,
		0 4px 6px rgba(40, 28, 20, .28);
	transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active {
	transform: translateY(2px);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35), 0 0 0 #3f2f2d;
}
.btn:focus-visible, a:focus-visible, button:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 3px;
}

/* ---------- Research: entries with rubber-stamp venues ----------------------- */

.entry { margin-bottom: 1.9rem; }
.entry:last-of-type { margin-bottom: 1.6rem; }

.entry-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.25rem;
	margin-bottom: .45rem;
}
.entry-head h3 { font-weight: 700; font-family: Spectral, serif; font-size: 1.08rem; line-height: 1.35; }
.entry p { margin: 0; }

.stamp {
	flex: none;
	margin-top: .15rem;
	padding: .3em .7em;
	font-size: .66rem;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	white-space: nowrap;
	color: #5a3f3d;
	border: 2px solid currentColor;
	border-radius: 3px;
	transform: rotate(-2deg);
	mix-blend-mode: multiply;
	/* Patchy ink: mask the stamp with noise so it doesn't read as a clean vector */
	-webkit-mask-image: var(--ink-blot);
	mask-image: var(--ink-blot);
}
.stamp:nth-of-type(even) { transform: rotate(1.5deg); }
.entry:nth-child(3n) .stamp { transform: rotate(-1deg); }
a.stamp:hover { color: #3f2f2d; }

.fine {
	margin-top: 1.8rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--rule);
	box-shadow: 0 -1px 0 rgba(255, 255, 255, .5);
	font-size: .92rem;
	color: var(--ink-soft);
}

/* ---------- Background: typed-resume rows with dotted leaders ---------------- */

.cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
	gap: 2.5rem;
}

.cols h3.label {
	margin-bottom: 1rem;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .24em;
	text-transform: uppercase;
	font-family: Spectral, serif;
	color: var(--ink-soft);
}

.item { margin-bottom: 1.5rem; }

.row {
	display: flex;
	align-items: baseline;
	gap: .5rem;
}
.row .lead {
	flex: 1 1 1.5rem;
	min-width: 1rem;
	border-bottom: 2px dotted rgba(102, 78, 76, .38);
	transform: translateY(-.3em);
}
.row .what { font-weight: 700; color: var(--brown); }
.row .where, .row .when { font-size: .92rem; color: var(--ink-soft); white-space: nowrap; }
.item .sub { font-size: .94rem; margin: 0; }
.item .sub + .sub { margin-top: .1rem; }

/* ---------- Photo print + washi tape ----------------------------------------- */

.split {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2.5rem;
	align-items: center;
}

.print {
	position: relative;
	width: 14.5rem;
	padding: 10px 10px 36px;
	background: var(--paper-tex) 0 0 / var(--tex-size), var(--print);
	background-blend-mode: multiply, normal;
	box-shadow: var(--lift-2);
	transform: rotate(1.8deg);
}
.print img { width: 100%; aspect-ratio: 1; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.print::before {
	content: "";
	position: absolute;
	top: -.85rem;
	left: 50%;
	width: 5.5rem;
	height: 1.65rem;
	margin-left: -2.75rem;
	transform: rotate(-4deg);
	background:
		repeating-linear-gradient(90deg, rgba(255, 255, 255, .0) 0 7px, rgba(255, 255, 255, .13) 7px 9px),
		rgba(154, 166, 156, .72);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
	/* Torn tape ends */
	clip-path: polygon(0 8%, 3% 0, 6% 10%, 9% 0, 12% 8%, 100% 0, 97% 12%, 100% 26%, 97% 40%, 100% 55%, 97% 70%, 100% 85%, 98% 100%, 94% 90%, 90% 100%, 86% 92%, 0 100%, 3% 84%, 0 70%, 3% 55%, 0 40%, 3% 25%);
}

/* ---------- Photo carousel, restyled as loose prints -------------------------- */

.photo-carousel { max-width: 40rem; margin: 3rem auto .5rem; }

.photo-carousel__viewport {
	overflow: visible;
	background: transparent;
	box-shadow: none;
	border-radius: 0;
	aspect-ratio: 4 / 3.45;
}

.photo-carousel__slide {
	padding: 0;
	border-radius: 2px;
	background: var(--paper-tex) 0 0 / var(--tex-size), var(--print);
	background-blend-mode: multiply, normal;
	box-shadow: var(--lift-2);
}

.photo-carousel__slide img {
	position: absolute;
	left: 14px;
	top: 14px;
	width: calc(100% - 28px);
	height: calc(100% - 84px);
	border-radius: 0;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}

.photo-carousel__slide figcaption {
	left: 0;
	right: 0;
	bottom: 0;
	height: 70px;
	padding: 0 18px;
	justify-content: center;
	background: none;
	color: var(--ink);
	gap: .15em;
}
.photo-carousel__slide .pc-desc { font-size: .95rem; line-height: 1.3; }
.photo-carousel__slide .pc-loc  { font-size: .66rem; letter-spacing: .16em; color: var(--ink-soft); }

.photo-carousel__arrow {
	width: 2.5rem;
	height: 2.5rem;
	color: var(--brown);
	background: var(--paper-tex) 0 0 / var(--tex-size), var(--print);
	background-blend-mode: multiply, normal;
	box-shadow: 0 1px 1px rgba(0,0,0,.35), 0 3px 6px rgba(0,0,0,.22), inset 0 1px 0 #fff;
}
.photo-carousel__arrow:hover,
.photo-carousel__arrow:focus-visible { background: var(--brown); background-blend-mode: normal; color: #F3EEDF; }
.photo-carousel__arrow--prev { left: -1.25rem; }
.photo-carousel__arrow--next { right: -1.25rem; }

.photo-carousel__dot { background: rgba(102, 78, 76, .28); }
.photo-carousel__dot:hover { background: rgba(102, 78, 76, .5); }
.photo-carousel__dot.is-active { background: var(--brown); }

/* ---------- Contact ------------------------------------------------------------ */

.contact {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1.75rem 2.5rem;
}
.contact h3 {
	margin-bottom: .35rem;
	font-family: Spectral, serif;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--ink-soft);
}
.contact p { margin: 0; }

/* ---------- Footer: slate cloth band ------------------------------------------- */

footer {
	margin-left: var(--sidebar-w);
	padding: 1.6rem 2rem;
	text-align: center;
	font-size: .8rem;
	color: rgba(244, 240, 226, .75);
	text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
	background: var(--flecks), var(--felt-dark), repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px), var(--slate);
	box-shadow: inset 0 3px 6px -2px rgba(0, 0, 0, .3);
}
footer a { color: inherit; border-bottom-color: rgba(244, 240, 226, .4); }

/* ---------- Photo carousel mechanics inherit from ../assets/css/carousel.css ---- */

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Sidebar collapses to a stitched top bar */
@media (max-width: 980px) {
	html { scroll-padding-top: 5rem; }

	#sidebar {
		position: sticky;
		inset: 0 0 auto 0;
		top: 0;
		width: auto;
		height: auto;
		padding: .55rem 1rem .7rem;
		flex-direction: row;
		align-items: center;
		gap: 1rem;
		text-align: left;
		box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .28), 0 3px 10px rgba(30, 25, 15, .35);
	}
	#sidebar::after {
		top: auto;
		left: 8px;
		right: 8px;
		bottom: 4px;
		border-right: 0;
		border-bottom: 2px dashed rgba(236, 231, 210, .26);
	}
	#sidebar .avatar { width: 2.7rem; margin: 0; border-width: 3px; flex: none; }
	#sidebar nav { flex: 1; min-width: 0; }
	#sidebar nav ul {
		margin: 0;
		display: flex;
		gap: .15rem;
		overflow-x: auto;
		scrollbar-width: none;
	}
	#sidebar nav ul::-webkit-scrollbar { display: none; }
	#sidebar nav li:first-child { margin-left: auto; } /* right-align without clipping the left edge on overflow */
	#sidebar nav a { padding: .6rem .8rem; white-space: nowrap; letter-spacing: .2em; }
	#sidebar nav a.active {
		margin: 0;
		padding: .6rem .8rem;
		border-radius: 4px;
	}

	main, footer { margin-left: 0; }
	main { padding: 2rem 1.25rem .5rem; }
}

@media (max-width: 720px) {
	body { font-size: 17px; }
	.sheet { padding: 2rem 1.5rem; margin-bottom: 2rem; }
	.sheet h1 { font-size: 2.4rem; }
	.sheet h2 { font-size: 1.6rem; }

	.split { grid-template-columns: 1fr; justify-items: center; }
	.split .print { order: -1; }
	.cols { gap: 2rem; }

	.entry-head { flex-direction: column-reverse; gap: .5rem; }
	.stamp { align-self: flex-start; }

	.photo-carousel__arrow--prev { left: .5rem; }
	.photo-carousel__arrow--next { right: .5rem; }
	.photo-carousel__slide img { left: 10px; top: 10px; width: calc(100% - 20px); height: calc(100% - 78px); }
	.photo-carousel__slide figcaption { height: 66px; padding: 0 14px; }
}

@media (max-width: 480px) {
	main { padding: 1.25rem .75rem .25rem; }
	.sheet { padding: 1.6rem 1.15rem; }
	.row { flex-wrap: wrap; }
	.row .lead { display: none; }
	.row .where, .row .when { flex-basis: 100%; margin-top: -.15rem; }
	#sidebar nav a { padding: .6rem .6rem; letter-spacing: .15em; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn, a { transition: none; }
}

/* ==========================================================================
   Field-notebook mode
   JS adds html.notebook-on (unless the visitor prefers reduced motion).
   Without it, everything above still works as a plain stack of sheets.
   ========================================================================== */

html.notebook-on main { padding: 0; }
html.notebook-on footer { display: none; }

/* Tall scroll track; JS sets its height. The stage stays pinned inside it. */
html.notebook-on .notebook { position: relative; }

html.notebook-on .notebook__stage {
	position: sticky;
	top: var(--bar-h, 0px);
	height: var(--stage-h, 100vh);
	padding: 1.75rem 1.75rem 1.5rem;
	display: flex;
	justify-content: center;
}

/* Chipboard backing the pad sits on */
html.notebook-on .notebook__board {
	position: relative;
	width: 100%;
	max-width: 55rem;
	height: 100%;
	padding: 14px 14px 16px;
	border-radius: 7px;
	background-color: #7b6a5c;
	background-image: var(--paper-tex), linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(0, 0, 0, .08));
	background-size: var(--tex-size), auto;
	background-blend-mode: multiply, normal;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .25),
		inset 0 -1px 0 rgba(0, 0, 0, .25),
		0 1px 2px rgba(0, 0, 0, .35),
		0 14px 28px -10px rgba(35, 25, 15, .5);
}

html.notebook-on .notebook__pages { position: relative; height: 100%; }

/* Each page: leaves 18px at the bottom so up to three pages beneath show as stack edges */
html.notebook-on .sheet {
	position: absolute;
	inset: 0 0 18px 0;
	max-width: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border-radius: 3px;
	transform-origin: 50% 100%;
	will-change: transform;
	background-color: var(--paper);
	background-image: var(--stain, none), var(--page-tex);
	background-position: var(--stain-pos, 0 0), 0 0;
	background-size: var(--stain-size, auto), var(--tex-size);
	background-repeat: no-repeat, repeat;
	box-shadow:
		0 1px 1px rgb(58 44 30 / .22),
		0 calc(2px + var(--lift, .3) * 14px) calc(4px + var(--lift, .3) * 20px) rgb(58 44 30 / calc(.10 + var(--lift, .3) * .16));
}
/* Soft fade where content scrolls under the bottom edge of a page */
html.notebook-on .sheet::before {
	inset: auto 0 0 0;
	height: 2.4rem;
	z-index: 2;
	border-radius: 0;
	background: linear-gradient(to top, var(--paper) 10%, rgb(233 228 214 / 0));
	background-blend-mode: normal;
	box-shadow: none;
	transform: none;
	pointer-events: none;
}

/* Darkens pages deeper in the pile */
html.notebook-on .sheet::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	background: #2a1d14;
	opacity: var(--shade, 0);
	will-change: opacity;
	pointer-events: none;
}

/* Page content: scrolls inside the frame */
html.notebook-on .sheet__scroll {
	position: relative;
	min-height: 100%;
	padding: 3rem 3.25rem 4rem;
	will-change: transform;
}

html.notebook-on .sheet--center .sheet__scroll {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Colophon on the last page */
.colophon {
	margin: 2.25rem 0 0;
	font-size: .8rem;
	color: var(--ink-soft);
}

/* Keep the carousel from outgrowing a single page on short screens */
html.notebook-on .photo-carousel {
	max-width: min(40rem, calc((var(--stage-h, 800px) - 21rem) * 1.16));
	min-width: min(100%, 15rem);
}

@media (max-width: 720px) {
	html.notebook-on .notebook__stage { padding: .65rem .6rem .6rem; }
	html.notebook-on .notebook__board { padding: 8px 8px 10px; }
	html.notebook-on .sheet { inset: 0 0 18px 0; }
	html.notebook-on .sheet__scroll { padding: 2rem 1.4rem 4rem; }
}

@media (max-width: 480px) {
	html.notebook-on .sheet__scroll { padding: 1.6rem 1.15rem 4rem; }
}

/* ---- Coffee stains: baked PNGs in a page corner, painted under the text ---- */
#three {
	--stain: url("coffee-b.png");
	--stain-pos: right -85px top -75px;
	--stain-size: 330px;
}

/* ---- Blog ---- */
.blog-filter {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	margin: 0 0 1.7rem;
}
.blog-filter button {
	font: inherit;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	padding: .5em 1em;
	color: var(--ink-soft);
	background: transparent;
	border: 1.5px solid var(--rule);
	border-radius: 3px;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.blog-filter button:hover { color: var(--brown); border-color: var(--brown); }
.blog-filter button[aria-pressed="true"] {
	color: #F3EEDF;
	background: var(--brown);
	border-color: var(--brown);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 0 #3f2f2d;
}
.entry .post-meta {
	margin: 0 0 .4rem;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ink-soft);
}
.entry-head h3 a { border-bottom-color: transparent; }
.entry-head h3 a:hover { border-bottom-color: var(--brown); }
.blog-status { color: var(--ink-soft); font-style: italic; }
.blog-more { margin: 1.6rem 0 0; font-size: .92rem; color: var(--ink-soft); }

