html {
	scroll-behavior: smooth;
}

html, body {
	margin: 0;
	padding: 0;
	width: 100%;
}

body {
	background: #161108;
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: black;
	font-size: 12px;
	text-align: center;
	min-height: 100vh;
}

h1 { font-size: 2em; margin: 0; padding: 0; }
h2 { font-size: 160%; color: #444444; margin: 0; padding: 0; }
h3 { font-size: 1.25em; }
h4 { font-size: 1em; }

p {
	margin: 0;
	padding: 20px;
}

div#wrap {
	margin: 0 auto;
	width: 100%;
	max-width: 1024px;
	min-height: 100vh;
	text-align: left;
	background: url(../images/portfolio_background.jpg) top center no-repeat;
	background-size: cover;
	background-position: top center;
	background-attachment: fixed;
	padding: 20px 0;
}

/* WebP support for modern browsers */
.webp div#wrap {
	background-image: url(../images/portfolio_background.webp);
}

#portfolio {
	width: 92.2%;
	margin: 0 auto;
	padding: 20px 0;
}

#gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 15px;
	padding: 10px;
}

#portfolio a.image {
	display: block;
	aspect-ratio: 1;
	position: relative;
	overflow: hidden;
	border: 2px solid white;
	background-color: rgba(255, 255, 255, 0.1);
	background-image: repeating-linear-gradient(
		45deg,
		rgba(255, 255, 255, 0.05),
		rgba(255, 255, 255, 0.05) 10px,
		rgba(255, 255, 255, 0.1) 10px,
		rgba(255, 255, 255, 0.1) 20px
	);
}

#portfolio a.image picture {
	display: block;
	width: 100%;
	height: 100%;
}

#portfolio a.image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

#portfolio a.image:hover img {
	transform: scale(1.05);
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
	#gallery {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 10px;
	}
}

@media screen and (max-width: 480px) {
	#gallery {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}
}

/* Back to Top Button */
#back-to-top {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 45px;
	height: 45px;
	background-color: rgba(96, 96, 96, 0.8);
	color: white;
	text-align: center;
	line-height: 45px;
	font-size: 24px;
	border-radius: 50%;
	text-decoration: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
	z-index: 1000;
}

#back-to-top.show {
	opacity: 1;
	visibility: visible;
}

#back-to-top:hover {
	background-color: rgba(68, 68, 68, 0.9);
}

/* Footer Styles */
footer {
	text-align: center;
	padding: 20px;
	color: #bda99a;
	font-size: clamp(10px, 1vw, 11px);
	background-color: transparent;
}

footer p {
	margin: 0;
	padding: 0;
}

/* Hide duplicate GLightbox close buttons */
.gslide-title,
.gslide-desc {
	display: none !important;
}

/* Ensure only one close button */
.gclose:not(:first-of-type) {
	display: none !important;
}

/* Fix z-index so overlay is behind images */
.goverlay {
	z-index: 1 !important;
}

.glightbox-container {
	z-index: 10 !important;
}

.gslide {
	z-index: 11 !important;
}

.gslide-image,
.gslide-media {
	z-index: 12 !important;
	position: relative;
}
