/* Commit Mono */
@font-face {
	font-family: "CommitMono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/CommitMono-400-Regular.woff2") format("woff2");
}

@font-face {
	font-family: "CommitMono";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/CommitMono-400-Italic.woff2") format("woff2");
}

@font-face {
	font-family: "CommitMono-Light";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/CommitMono-450-Regular.woff2") format("woff2");
}

@font-face {
	font-family: "CommitMono-Light";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/CommitMono-450-Italic.woff2") format("woff2");
}

@font-face {
	font-family: "CommitMono";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/CommitMono-700-Regular.woff2") format("woff2");
}

@font-face {
	font-family: "CommitMono";
	font-style: italic;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/CommitMono-700-Italic.woff2") format("woff2");
}

@font-face {
	font-family: "CommitMono-Light";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/CommitMono-700-Regular.woff2") format("woff2");
}

@font-face {
	font-family: "CommitMono-Light";
	font-style: italic;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/CommitMono-700-Italic.woff2") format("woff2");
}

:root {
	color-scheme: light dark;
	font-family:
		"CommitMono-Light",
		"CommitMono",
		monospace;
	font-size: 13px;
}

@media (prefers-color-scheme: dark) {
	:root {
		font-family:
			"CommitMono",
			monospace;
	}
}

body {
	margin: 0;
	background: var(--pico-background-color);
	color: var(--pico-color);
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
}

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem 2rem;
	border-bottom: 2px solid currentColor;
}

.site-header .title {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.site-nav {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.site-nav a,
.site-nav button {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border: 1px solid currentColor;
	padding: 0.35rem 0.75rem;
	background: transparent;
	color: inherit;
}

.site-nav button.ghost {
	background: transparent;
}

button.ghost {
	border: 1px solid currentColor;
	padding: 0.35rem 0.75rem;
	background: transparent;
	color: inherit;
}

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	margin-bottom: 2rem;
}

.hero form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.5rem;
}

.hero input[type="url"] {
	border-radius: 0;
	border: 2px solid currentColor;
	background: transparent;
	padding: 0.6rem 0.75rem;
}

.hero button {
	border-radius: 0;
	border: 2px solid currentColor;
	background: currentColor;
	color: var(--pico-background-color);
	padding: 0.6rem 1rem;
}

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 2rem;
}

.filter-pill {
	border: 1px solid currentColor;
	padding: 0.35rem 0.6rem;
	font-size: 0.8rem;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.filter-pill.active {
	background: currentColor;
	color: var(--pico-background-color);
}

.gallery {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.card {
	position: relative;
	border: 2px solid currentColor;
	background: transparent;
	overflow: hidden;
	min-height: 160px;
}

.card img,
.card video {
	display: block;
	width: 100%;
	height: auto;
}

.card a {
	color: inherit;
	text-decoration: none;
}

.card .placeholder {
	padding: 1rem;
	font-size: 0.9rem;
}

.card .overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 0.5rem;
	padding: 0.8rem;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.card:hover .overlay {
	opacity: 1;
}

.card .overlay .title {
	font-weight: 600;
	font-size: 0.85rem;
}

.card .overlay .tags {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.detail {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: 2rem;
}

.detail img {
	width: 100%;
	border: 2px solid currentColor;
}

.detail .meta {
	display: grid;
	gap: 0.75rem;
}

.detail .meta h1 {
	margin: 0;
	font-size: 1.5rem;
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tag-chip {
	border: 1px solid currentColor;
	padding: 0.25rem 0.5rem;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.tag-editor {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.tag-editor input {
	border-radius: 0;
	border: 2px solid currentColor;
	padding: 0.45rem 0.6rem;
	background: transparent;
}

.tag-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tag-suggestions button {
	border-radius: 0;
	border: 1px solid currentColor;
	padding: 0.25rem 0.5rem;
	background: transparent;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.actions button,
.actions form button {
	border-radius: 0;
	border: 1px solid currentColor;
	padding: 0.45rem 0.8rem;
	background: transparent;
}

.notice {
	border: 2px dashed currentColor;
	padding: 1rem;
	font-size: 0.85rem;
}

@media (max-width: 900px) {
	.detail {
		grid-template-columns: 1fr;
	}
}
