@charset "UTF-8";

/* ==========================================================================
   labs.css — WIP notes / AI & tool write-ups, card-grid index + a lean
   single-column entry page. Entry body content (.post, .post__body, figures,
   video embeds) reuses diary.css + project.css - this file only styles the
   Labs-specific chrome: the index header/filters/grid and the entry wrap.
   ========================================================================== */

.labs { padding: 44px 0 80px; }

.labs-head {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-bottom: 18px;
}

.labs-head h1 {
	font-family: var(--sans);
	font-weight: 800;
	font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem);
	letter-spacing: -.02em;
	margin: 0;
}

.labs-head .count {
	font-family: var(--mono);
	font-size: .74rem;
	color: var(--ink-soft);
	letter-spacing: .04em;
}

/* ---- tag filter bar ---------------------------------------------------- */

.labs-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin-bottom: 30px;
	font-family: var(--mono);
	font-size: .76rem;
}

.labs-filters button {
	background: none;
	border: 0;
	padding: 2px 0;
	color: var(--ink-soft);
	cursor: pointer;
}

.labs-filters button span { color: var(--ink-soft); }

.labs-filters button:hover,
.labs-filters button:focus-visible { color: var(--ink); }

.labs-filters button.is-active {
	color: var(--ink);
	border-bottom: 1px solid var(--ink);
}

/* ---- card grid ---------------------------------------------------------- */

.labs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.labs__card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line-soft);
	border-radius: 6px;
	overflow: hidden;
	background: var(--panel);
}

/* ---- status badge (In Progress / Done) ----------------------------------- */

.labs__status {
	display: inline-block;
	font-family: var(--mono);
	font-size: .62rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 99px;
	border: 1px solid var(--line);
}

.labs__status--wip { color: #d8b878; border-color: #5a4a2a; background: #2a2620; }
.labs__status--done { color: #9ad8a6; border-color: #2a5a3a; background: #1e2a22; }

/* the dark chip (light text on a dark tint) reads poorly on the light
   theme's pale ground - flip to a light tint with darker, saturated text */
:root[data-theme="light"] .labs__status--wip {
	color: #8a5a10; border-color: rgba(138, 90, 16, .35); background: #f2e3bd;
}
:root[data-theme="light"] .labs__status--done {
	color: #1f7a44; border-color: rgba(31, 122, 68, .3); background: #d9f0e0;
}

.labs__card .labs__status {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	background: var(--ground);
}

.labs-wrap .labs__status { margin-bottom: 14px; }

.labs__card[hidden] { display: none; }

.labs__card-link {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
	flex: 1;
}

.labs__thumb {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--img-ph);
	overflow: hidden;
}

.labs__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity .15s;
}

.labs__card-link:hover .labs__thumb img { opacity: .85; }

.labs__thumb--none { display: none; }

.labs__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px 14px;
}

.labs__date {
	font-family: var(--mono);
	font-size: .68rem;
	letter-spacing: .06em;
	color: var(--ink-soft);
}

.labs__title {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.35;
}

.labs__card-link:hover .labs__title { text-decoration: underline; text-underline-offset: 2px; }

.labs__excerpt {
	font-size: .84rem;
	line-height: 1.55;
	color: var(--ink-soft);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.labs__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 10px;
	padding: 0 18px 14px;
	font-family: var(--mono);
	font-size: .68rem;
}

.labs__tags button {
	background: none;
	border: 0;
	padding: 0;
	color: var(--ink-soft);
	cursor: pointer;
}

.labs__tags button:hover { color: var(--ink); text-decoration: underline; }

/* ---- entry page ---------------------------------------------------------- */

.labs-wrap {
	max-width: 760px;
	margin: 0 auto;
	padding: 44px 0 80px;
}

/* ---- WIP gallery — a loose scrapbook of raw process/workflow screenshots
   dropped into labs/media/wip/ (no post, no frontmatter), shown below the
   card grid on the Labs index. Deliberately NOT the Feed's uniform
   square-cropped grid: a filmstrip of even-height "tanzaku" strips
   (cropped, unlike the body's uncropped figures) in a single scrollable
   row, each widening on hover/focus to reveal more of the shot. */

.wip-gallery {
	margin-top: 40px;
	padding-top: 28px;
	border-top: 1px solid var(--line-soft);
}

.wip-gallery__label {
	font-family: var(--mono);
	font-weight: 400;
	font-size: .68rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin: 0 0 16px;
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.wip-gallery__label .count {
	color: var(--ink-soft);
	opacity: .7;
}

.wip-gallery__grid {
	display: flex;
	gap: 6px;
	height: 240px;
	overflow-x: auto;
	overflow-y: hidden;
	padding-bottom: 4px;
}

.wip-gallery__item {
	display: block;
	flex: 1 0 100px;
	height: 100%;
	padding: 0;
	border: 1px solid var(--line-soft);
	border-radius: 4px;
	overflow: hidden;
	background: var(--panel);
	cursor: zoom-in;
	transition: flex-basis .35s cubic-bezier(.2, .8, .2, 1);
}

.wip-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.wip-gallery__item:hover,
.wip-gallery__item:focus-visible {
	flex-basis: 340px;
}

@media (max-width: 700px) {
	.wip-gallery__grid { height: 170px; }
	.wip-gallery__item { flex-basis: 76px; }
	.wip-gallery__item:hover,
	.wip-gallery__item:focus-visible { flex-basis: 220px; }
}
