/* Team Members – front end
 * Cards: white frame, 4:5 photo, serif name, small-caps title, dark hover overlay.
 * Popup: two columns on desktop; full screen, stacked and scrolling on phones. */

.tmbr-grid,
.tmbr-modal {
	--tmbr-ink: #1a1a1a;
	--tmbr-text: #222222;
	--tmbr-muted: #4b5563;
	--tmbr-label: #555b63;
	--tmbr-line: #d9dce1;
	--tmbr-rule: #c9cdd3;
	--tmbr-soft: #f2f3f5;
	--tmbr-placeholder: #d0d5dd;
	--tmbr-overlay: rgba(30, 31, 33, 0.9);

	--tmbr-font-heading: adobe-caslon-pro, "Big Caslon FB", "Libre Caslon Text", Georgia, "Times New Roman", serif;
	--tmbr-font-text: adobe-caslon-pro, "Big Caslon FB", "Libre Caslon Text", Georgia, "Times New Roman", serif;
	--tmbr-font-btn: "Proxima Nova", proxima-nova, Inter, "Helvetica Neue", Arial, sans-serif;
}

/* ---------------------------------------------------------------
 * Grid – fixed-width cards, rows centred (an odd last row centres
 * under the row above, as in the design).
 * ------------------------------------------------------------- */
.tmbr-grid {
	--tmbr-card-w: 262px;
	--tmbr-gap: 28px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--tmbr-gap);
	max-width: calc(var(--tmbr-cols, 4) * var(--tmbr-card-w) + (var(--tmbr-cols, 4) - 1) * var(--tmbr-gap));
	margin: 0 auto;
	padding: 0;
}

.tmbr-grid .tmbr-card {
	flex: 0 1 var(--tmbr-card-w);
	min-width: 0;
	margin: 0;
	padding: 0;
}

/* Card = the button. Reset theme button styles. */
.tmbr-grid .tmbr-card__btn {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 10px 10px 10px;
	border: 1px solid var(--tmbr-line);
	border-radius: 0;
	background: #ffffff;
	box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
	color: var(--tmbr-ink);
	font: inherit;
	line-height: 1.3;
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	word-break: normal;
	cursor: pointer;
	transition: box-shadow 0.2s ease;
}
.tmbr-grid .tmbr-card__btn:hover,
.tmbr-grid .tmbr-card__btn:focus {
	background: #ffffff;
	color: var(--tmbr-ink);
	border-color: var(--tmbr-line);
	transform: none;
}
.tmbr-grid .tmbr-card__btn:focus { outline: none; }
.tmbr-grid .tmbr-card__btn:focus-visible { outline: 2px solid var(--tmbr-ink); outline-offset: 3px; }

/* No bio yet: same card, not clickable (1.3.7). */
.tmbr-grid .tmbr-card__btn--static { cursor: default; }

/* Photo */
.tmbr-grid .tmbr-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 0;
	background: var(--tmbr-placeholder);
}
.tmbr-grid .tmbr-card__img {
	display: block;
	width: 100%;
	height: 100% !important;
	max-width: none;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
}
.tmbr-grid .tmbr-card__img--empty { background: var(--tmbr-placeholder); }

/* Hover overlay: card line + "Read more" */
.tmbr-grid .tmbr-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 20px 22px;
	background: var(--tmbr-overlay);
	color: #ffffff;
	opacity: 0;
	transition: opacity 0.2s ease;
}
.tmbr-grid .tmbr-card__line {
	display: -webkit-box;
	width: 100%;
	overflow: hidden;
	-webkit-line-clamp: 7;
	-webkit-box-orient: vertical;
	overflow-wrap: break-word;
	color: #ffffff;
	font-family: var(--tmbr-font-text);
	font-size: 19px;
	font-weight: 400;
	line-height: 1.4;
}
.tmbr-grid .tmbr-card__more {
	white-space: nowrap;
	color: #ffffff;
	font-family: var(--tmbr-font-btn);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.tmbr-grid .tmbr-card__btn:hover .tmbr-card__overlay,
.tmbr-grid .tmbr-card__btn:focus-visible .tmbr-card__overlay { opacity: 1; }

/* Name + title */
.tmbr-grid .tmbr-card__name {
	display: block;
	margin: 17px 0 0;
	padding: 0 8px;
	color: var(--tmbr-ink);
	font-family: var(--tmbr-font-heading);
	font-size: 28px;
	font-weight: 400;
	line-height: 1.2;
}
.tmbr-grid .tmbr-card__title {
	display: block;
	margin: 6px 0 0;
	padding: 0 8px;
	color: var(--tmbr-muted);
	font-family: var(--tmbr-font-btn);
	font-size: 12px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* Touch screens: no hover, so no overlay – tap opens the popup. */
@media (hover: none) {
	.tmbr-grid .tmbr-card__overlay { display: none; }
}

/* Tablets: two columns at most (an odd last card centres under the row above). */
@media (max-width: 1024px) {
	.tmbr-grid { max-width: min(calc(var(--tmbr-cols, 4) * var(--tmbr-card-w) + (var(--tmbr-cols, 4) - 1) * var(--tmbr-gap)), calc(2 * var(--tmbr-card-w) + var(--tmbr-gap))); }
}

/* Phones: one column, the same card width as desktop (Oct 27). */
@media (max-width: 600px) {
	.tmbr-grid { --tmbr-gap: 12px; max-width: var(--tmbr-card-w); }
	.tmbr-grid .tmbr-card { flex: 0 1 var(--tmbr-card-w); }
	.tmbr-grid .tmbr-card__btn { padding: 6px 6px 18px; }
	.tmbr-grid .tmbr-card__name { margin-top: 10px; padding: 0 4px; font-size: 21px; }
	.tmbr-grid .tmbr-card__title { margin-top: 4px; padding: 0 4px; font-size: 10px; letter-spacing: 0.1em; }
	.tmbr-grid .tmbr-card__line { font-size: 15px; -webkit-line-clamp: 6; }
}

/* ---------------------------------------------------------------
 * Popup
 * ------------------------------------------------------------- */
html.tmbr-lock { overflow: hidden; }

.tmbr-modal {
	position: fixed;
	inset: 0;
	box-sizing: border-box;
	width: min(980px, calc(100vw - 48px));
	max-width: none;
	height: fit-content;
	max-height: calc(100dvh - 48px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #ffffff;
	color: var(--tmbr-text);
	font-family: var(--tmbr-font-text);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}
.tmbr-modal *, .tmbr-modal *::before, .tmbr-modal *::after { box-sizing: border-box; }
.tmbr-modal:not([open]) { display: none; }
.tmbr-modal:focus { outline: none; }
.tmbr-modal[open] { display: flex; flex-direction: column; animation: tmbr-fade 0.18s ease-out; }
.tmbr-modal::backdrop { background: rgba(0, 0, 0, 0.5); }
@keyframes tmbr-fade { from { opacity: 0; } to { opacity: 1; } }

/* Close – black square, top right */
.tmbr-modal .tmbr-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #111111;
	color: #ffffff;
	box-shadow: none;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.tmbr-modal .tmbr-modal__close svg { width: 16px; height: 16px; }
.tmbr-modal .tmbr-modal__close:focus { background: #111111; color: #ffffff; outline: none; }
.tmbr-modal .tmbr-modal__close:hover { background: #333333; color: #ffffff; }
.tmbr-modal .tmbr-modal__close:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: -5px; }

.tmbr-modal__inner {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 40px;
	scrollbar-width: thin;
	scrollbar-color: #9ca3af transparent;
}
.tmbr-modal__inner::-webkit-scrollbar { width: 8px; }
.tmbr-modal__inner::-webkit-scrollbar-thumb { background: #9ca3af; }

.tmbr-pop {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 36px;
	align-items: start;
}

/* Left column */
.tmbr-pop__aside { min-width: 0; }
.tmbr-pop__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	aspect-ratio: 4 / 5;
	margin: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
	background: var(--tmbr-placeholder);
}
.tmbr-pop__img--empty { display: block; }

.tmbr-pop__id { margin-top: 16px; text-align: center; }
.tmbr-modal .tmbr-pop__name {
	margin: 0;
	padding: 0;
	color: var(--tmbr-ink);
	font-family: var(--tmbr-font-heading);
	font-size: 28px;
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
}
.tmbr-modal .tmbr-pop__title {
	margin: 6px 0 0;
	padding: 0;
	color: var(--tmbr-label);
	font-family: var(--tmbr-font-btn);
	font-size: 13px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.tmbr-modal .tmbr-pop__facts {
	display: grid;
	gap: 14px;
	margin: 16px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--tmbr-rule);
}
.tmbr-modal .tmbr-pop__facts dt {
	margin: 0;
	color: var(--tmbr-label);
	font-family: var(--tmbr-font-btn);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.tmbr-modal .tmbr-pop__facts dd {
	margin: 4px 0 0;
	color: var(--tmbr-ink);
	font-family: var(--tmbr-font-btn);
	font-size: 15px;
	line-height: 1.5;
}

/* Right column */
.tmbr-pop__main { min-width: 0; }
.tmbr-modal .tmbr-pop__bio {
	color: var(--tmbr-text);
	font-family: var(--tmbr-font-text);
	font-size: 18px;
	line-height: 1.75;
}
/* Keeps the first line of the bio clear of the close button. */
.tmbr-modal .tmbr-pop__bio::before {
	content: "";
	float: right;
	width: 22px;
	height: 20px;
}
.tmbr-modal .tmbr-pop__bio p { margin: 0 0 1em; font-size: inherit; line-height: inherit; color: inherit; }
.tmbr-modal .tmbr-pop__bio p:last-child { margin-bottom: 0; }

.tmbr-modal .tmbr-pop__word {
	margin-top: 20px;
	padding: 16px 18px 18px;
	border: 0;
	background: var(--tmbr-soft);
}
.tmbr-modal .tmbr-pop__label,
.tmbr-modal .tmbr-pop__recs-title {
	display: block;
	margin: 0;
	color: var(--tmbr-label);
	font-family: var(--tmbr-font-btn);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.tmbr-modal .tmbr-pop__haw {
	display: block;
	margin-top: 8px;
	color: var(--tmbr-ink);
	font-family: var(--tmbr-font-heading);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.3;
}
.tmbr-modal .tmbr-pop__meaning {
	display: block;
	color: var(--tmbr-ink);
	font-family: var(--tmbr-font-btn);
	font-size: 16px;
	line-height: 1.5;
}

.tmbr-modal .tmbr-pop__recs { margin-top: 22px; }
.tmbr-modal .tmbr-pop__recs-title { margin-bottom: 10px; }
.tmbr-modal .tmbr-pop__recs ul { margin: 0; padding: 0 0 0 18px; list-style: disc; }
.tmbr-modal .tmbr-pop__recs li {
	margin: 0 0 4px;
	padding: 0;
	border: 0;
	color: var(--tmbr-ink);
	font-family: var(--tmbr-font-btn);
	font-size: 16px;
	line-height: 1.8;
}
.tmbr-modal .tmbr-pop__recs li::marker { color: var(--tmbr-ink); }
.tmbr-modal .tmbr-pop__recs a {
	display: inline;
	padding: 0;
	background: none;
	color: var(--tmbr-ink);
	font-family: var(--tmbr-font-btn);
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
.tmbr-modal .tmbr-pop__recs a:hover,
.tmbr-modal .tmbr-pop__recs a:focus { background: none; color: #000000; text-decoration-thickness: 2px; }

/* Tablet: narrower photo column */
@media (max-width: 900px) and (min-width: 721px) {
	.tmbr-pop { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
	.tmbr-modal__inner { padding: 32px; }
}

/* Phone: full screen, photo on top, everything stacked, scrolls inside */
@media (max-width: 720px) {
	.tmbr-modal {
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		max-width: 100vw;
		max-height: none;
		border: 0;
		box-shadow: none;
	}
	.tmbr-modal__inner { padding: 64px 20px 40px; }
	.tmbr-pop { grid-template-columns: 1fr; gap: 0; }
	.tmbr-pop__img { width: min(220px, 62%); margin: 0 auto; }
	.tmbr-pop__id { margin-top: 18px; }
	.tmbr-modal .tmbr-pop__name { font-size: 28px; }
	.tmbr-modal .tmbr-pop__facts { margin-top: 18px; padding-top: 18px; }
	.tmbr-modal .tmbr-pop__facts dd { font-size: 16px; }
	.tmbr-pop__main { margin-top: 24px; }
	.tmbr-modal .tmbr-pop__bio { font-size: 17px; line-height: 1.75; }
	.tmbr-modal .tmbr-pop__bio::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tmbr-grid .tmbr-card__btn, .tmbr-grid .tmbr-card__overlay, .tmbr-modal .tmbr-modal__close { transition: none; }
	.tmbr-modal[open] { animation: none; }
}
