* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: "gal-gothic-variable", sans-serif;
	font-variation-settings: "wdth" 100, "wght" 400;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background: white;
	padding: 1rem 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	z-index: 100;
	border-bottom: 1px solid #eee;
	height: 4rem;
}

header h1 {
	font-size: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	line-height: 1;
	min-width: 0;
}

header h1 a {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
}

header h1 img {
	height: 1em;
	width: 1em;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	position: relative;
	top: -0.05em;
}

header h1 span {
	display: inline;
}

nav {
	display: flex;
	gap: 1rem;
	flex-shrink: 0;
}

.metadata-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: white;
	padding: 1.5rem 2rem;
	border-top: 1px solid #eee;
	z-index: 100;
	height: 6rem;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.photo-nav {
	display: flex;
	gap: 1rem;
	font-size: 1.5rem;
}

.photo-nav a {
	text-decoration: none;
	color: #666;
}

.photo-nav a.disabled {
	color: #eee;
	pointer-events: none;
}

.photo-nav a:hover:not(.disabled) {
	color: #000;
}

a {
	color: inherit;
	text-decoration: none;
	position: relative;
}

/* Only apply to nav links and other text links, not image containers */
nav a, .photo-meta a {
	color: inherit;
}

nav a::after, .photo-meta a::after {
	content: '';
	position: absolute;
	width: 100%;
	height: 1px;
	bottom: -2px;
	left: 0;
	background-color: currentColor;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover::after, .photo-meta a:hover::after {
	transform: scaleX(1);
}

/* Don't apply the underline animation to links that contain images */
a:has(img)::after {
	display: none;
}

.photos {
	margin-top: 5rem;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 2rem;
	padding: 2rem;
}

.photo img {
	width: 100%;
	height: auto;
	display: block;
}

/* Single photo page styles */
.single-photo {
	position: fixed;
	top: 4rem;
	bottom: 6rem;
	left: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.single-photo a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: white;
	padding: 2rem;
}

.single-photo img {
	max-height: 100%;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Typography */
.photo-meta h2 {
	font-size: 1rem;
	margin-bottom: 0.25rem;
}

.photo-meta time,
.photo-meta p {
	color: #666;
	font-size: 0.9rem;
}

.photo-meta p {
	margin-top: 0.25rem;
}

/* Add navigation controls */
.nav-controls {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	width: 100%;
	display: flex;
	justify-content: space-between;
	padding: 0 2rem;
	pointer-events: none;
}

.nav-controls button {
	background: rgba(255, 255, 255, 0.8);
	border: none;
	padding: 1rem;
	cursor: pointer;
	pointer-events: auto;
	font-family: inherit;
	border-radius: 4px;
}

.nav-controls button:hover {
	background: rgba(255, 255, 255, 0.95);
}

/* Archive page styles */
.archive {
	padding: 6rem 2rem 2rem;
}

.year {
	margin-bottom: 4rem;
}

.year h2 {
	font-size: 1.5rem;
	margin-bottom: 2rem;
	color: #666;
}

.archive .photos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 2rem;
}

.archive .photo {
	margin-bottom: 2rem;
}

.archive .photo a {
	display: block;
	text-decoration: none;
}

.archive .photo img {
	width: 100%;
	aspect-ratio: 3/2;
	object-fit: cover;
	display: block;
	margin-bottom: 1rem;
}

.archive .photo h3 {
	font-size: 1rem;
	margin-bottom: 0.25rem;
}

.archive .photo time {
	display: block;
	color: #666;
	font-size: 0.9rem;
	margin-bottom: 0.25rem;
}

.archive .photo p {
	color: #666;
	font-size: 0.9rem;
}

/* Style for photo page header */
.single-photo-page header h1 a {
	color: #000;
}

.single-photo-page header h1 a .site-name {
	color: #ccc;
}

/* Add styles for post title truncation */
.single-photo-page header h1 .post-title {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 200px;
}

@media (max-width: 600px) {
	/* Hide both spans on regular pages */
	header h1 span {
		display: none;
	}
	
	/* On photo pages, show the post title but hide site name */
	.single-photo-page header h1 .site-name {
		display: none;
	}
	
	.single-photo-page header h1 .post-title {
		display: inline;
	}
	
	/* Keep the header height consistent */
	header {
		padding: 0.75rem 1.5rem;
	}
}

/* Add a tighter breakpoint for very narrow screens */
@media (max-width: 400px) {
	/* Hide everything except the logo on very narrow screens */
	.single-photo-page header h1 .post-title {
		display: none;
	}
}