:root {
	--maxw: 1500px;
	--fg: #000;
	--bg: #fff;
	--rule: #e5e5e5;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }

/* Helvetica-centric stack (Jetset-style) */
body {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 8pt;
	line-height: 1.2;
}

/* Header */
header, main { max-width: var(--maxw); margin: 24px auto; padding: 0 16px; }
header { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; position: relative; }
h1 { margin: 0; font-size: inherit; font-weight: 700; }
h3 { font-size: inherit; }
nav { display: flex; gap: 8px; align-items: center; }
button, input[type="search"] {
	font: inherit; color: inherit; border: 1px solid var(--rule);
	padding: 4px 8px; background: #f7f7f7;
}
button[aria-pressed="true"] { background: #000; color: #fff; border-color: #000; }
input[type="search"] { background: #fff; }

/* Bio link positioned at top-right of header */
.bio-link {
	margin-left: auto;
	text-decoration: none;
	border: 1px solid var(--rule);
	padding: 4px 8px;
	background: #fff;
}
.bio-link:hover { text-decoration: underline; }

/* Archive list (grid of items: title + date per item) */
.archive { border-top: 1px solid var(--rule); padding-top: 8px; line-height: 1; }
.archive.cols { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 32px; row-gap: 0; }
.archive .col { display: grid; row-gap: 6px; align-content: start; }
.category-header {
	margin-top: 12px;
	margin-bottom: 4px;
	font-weight: 700;
	font-size: 10pt;
}
.category-header:first-child {
	margin-top: 0;
}
.row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) max-content;
	column-gap: 8px;
	align-items: start;
	padding: 0;
	font-size: 8pt;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.title { display: block; overflow-wrap: anywhere; hyphens: auto; margin-right: 1em; }
.title.visited { text-decoration: line-through; }
.title.empty { opacity: 0.45; text-decoration: none; cursor: default; }
.type { color: #666; white-space: nowrap; margin-right: 0.75em; }
.meta { color: #666; white-space: nowrap; text-align: right; }
.archive .row .meta {
	color: inherit;
	font-weight: inherit;
	text-align: left;
	justify-self: start;
}

/* Add extra right padding to left-column items so dates don't butt against next column */
/* no longer needed with explicit columns */

/* Project view */
.project { display: grid; gap: 24px; grid-template-columns: 1fr; border-top: 1px solid var(--rule); padding-top: 8px; }
.project h2 { margin: 0; margin-top: 12px; font-size: inherit; font-weight: 700; }
.project .metaBlk { color: #666; }
.project p { white-space: pre-wrap; font-size: 7pt; }
.project .media {
	display: grid; gap: 12px;
	grid-template-columns: repeat(2, 1fr);
}
.project .media img, .project .media video {
	width: 100%; height: auto; display: block; background: #f2f2f2;
}
.project .media .featured-image {
	grid-column: 1 / -1;
}
.project .media audio { width: 100%; display: block; }
.project .media .caption { color: #666; font-size: 8pt; line-height: 1.2; margin: 2px 0 10px; }

/* Documents block under blurb */
.project .docs { margin-top: 12px; }

/* Minimal audio list */
.audiolist { display: grid; gap: 6px; margin-top: 8px; }
.audioitem {
	border: 1px solid var(--rule);
	padding: 6px 8px;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
	background: #fff;
}
.audioitem:hover { background: #f9f9f9; }
.audioitem.playing { background: #000; color: #fff; border-color: #000; }
.audioitem .state { font-weight: 700; min-width: 34px; }
.audioitem .name { overflow-wrap: anywhere; }
.audioitem .dur { color: inherit; opacity: 0.7; }
.audiolist audio[data-minimal="1"] { display: none; }

/* Responsive columns for media */
@media (max-width: 1300px) {
	.project .media { grid-template-columns: repeat(2, 1fr); }
 	.archive.cols { grid-template-columns: 1fr; row-gap: 18px; }
}
@media (max-width: 700px) {
	.project .media { grid-template-columns: 1fr; }
 	.archive.cols { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.project .media { grid-template-columns: 1fr; }
 	.archive.cols { grid-template-columns: 1fr; }
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; z-index: 9999; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 95vh; }
.lightbox .docframe { width: 95vw; height: 95vh; border: 0; background: #fff; }

/* PDF.js viewer inside lightbox */
.pdfviewer { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 95vw; height: 95vh; }
.pdfviewer .controls { display: flex; gap: 8px; align-items: center; }
.pdfviewer canvas { max-width: 95vw; max-height: calc(95vh - 40px); background: #fff; }

/* Wider screens */
@media (min-width: 900px) {
	header { margin-top: 28px; }
	.project { grid-template-columns: 320px 1fr; align-items: start; }
}

.project .media video { grid-column: 1 / -1; }
.project .media .caption { grid-column: 1 / -1; }
.project .media .section-title { grid-column: 1 / -1; margin: 8px 0 0; font-weight: 700; }


