html {
	scroll-behavior: smooth;
}

html, body {
	margin: 0;
	padding: 0;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

body {
	background: #161108;
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: black;
	font-size: 12px;
	text-align: center;
}

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;
}

#content p {
	margin: 0;
}

div#wrap {
	margin: 0 auto;
	width: 100%;
	max-width: 1024px;
	height: auto;
	aspect-ratio: 4/3;
	text-align: left;
	background: url(../images/background.jpg) top center no-repeat;
	background-size: contain;
	position: relative;
}

/* WebP support for modern browsers */
.webp div#wrap {
	background-image: url(../images/background.webp);
}

/* Desktop fixed size */
@media screen and (min-width: 1045px) {
	div#wrap {
		width: 1024px;
		height: 768px;
		background-size: cover;
	}
}

#menu {
	width: 48.8%;
	height: 42.7%;
	position: absolute;
	top: 51.3%;
	left: 13.7%;
}

a#about {
	display: block;
	width: 100%;
	height: 33.5%;
}

a#portfolio {
	display: block;
	width: 100%;
	height: 33.5%;
}

a#contact {
	display: block;
	width: 100%;
	height: 33%;
}

a#about:hover, .about_active {
	display: block;
	width: 100%;
	height: 33.5%;
	background: url(../images/about_active.jpg) top left no-repeat;
	background-size: 100% 100%;
}

.webp a#about:hover, .webp .about_active {
	background-image: url(../images/about_active.webp);
}

a#portfolio:hover, .portfolio_active {
	display: block;
	width: 100%;
	height: 33.5%;
	background: url(../images/portfolio_active.jpg) top left no-repeat;
	background-size: 100% 100%;
}

a#portfolio:active {
	background: none;
}

.webp a#portfolio:hover, .webp .portfolio_active {
	background-image: url(../images/portfolio_active.webp);
}

.webp a#portfolio:active {
	background: none;
}

a#contact:hover, .contact_active {
	display: block;
	width: 100%;
	height: 33%;
	background: url(../images/contact_active.jpg) top left no-repeat;
	background-size: 100% 100%;
}

.webp a#contact:hover, .webp .contact_active {
	background-image: url(../images/contact_active.webp);
}

#content {
	width: 37.5%;
	height: 48.7%;
	position: absolute;
	bottom: 0;
	right: 0;
	background: url(../images/content_bg.jpg) top left no-repeat;
	background-size: 100% 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.webp #content {
	background-image: url(../images/content_bg.webp);
}

/* Desktop fixed sizes */
@media screen and (min-width: 1045px) {
	#menu {
		width: 500px;
		height: 328px;
		top: 394px;
		left: 140px;
	}

	a#about, a#about:hover, .about_active {
		width: 500px;
		height: 110px;
		background-size: auto;
	}

	a#portfolio, a#portfolio:hover, .portfolio_active {
		width: 500px;
		height: 110px;
		background-size: auto;
	}

	a#contact, a#contact:hover, .contact_active {
		width: 500px;
		height: 108px;
		background-size: auto;
	}

	#content {
		width: 384px;
		height: 374px;
		background-size: auto;
	}
}

#content p {
	margin: 4% 12% 10% 14%;
	padding: 0;
	color: #606060;
	font-family: Geneva, Tahoma, Verdana, sans-serif;
	font-size: clamp(9.5px, 1.15vw, 11.5px);
	line-height: 1.6;
	height: 80%;
	box-sizing: border-box;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

@media screen and (min-width: 1045px) {
	#content p {
		margin: 30px 60px 50px 80px;
		padding: 0;
		height: auto;
		max-height: 280px;
		font-size: 11.5px;
		overflow-y: auto;
	}
}

#content p a {
	color: #606060;
	text-decoration: underline;
}

#content p a:hover {
	color: #444444;
}

/* Mobile styles */
@media screen and (max-width: 1044px) {
	html, body {
		overflow-x: hidden;
		width: 100%;
	}

	#content p b {
		font-weight: normal;
	}

	footer {
		font-size: clamp(9px, 1.5vw, 11px);
		padding: 15px;
	}
}

/* Contact Form Styles */
#contact-form {
	padding: 0 30px;
	margin-top: 5px;
}

#contact-form input,
#contact-form textarea {
	width: 100%;
	padding: 6px;
	margin-bottom: 8px;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-family: Geneva, Tahoma, Verdana, sans-serif;
	font-size: 10px;
	box-sizing: border-box;
}

#contact-form textarea {
	resize: vertical;
	min-height: 50px;
}

#contact-form button {
	background-color: #606060;
	color: white;
	padding: 8px 16px;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	font-family: Geneva, Tahoma, Verdana, sans-serif;
	font-size: 10px;
	font-weight: bold;
	transition: background-color 0.3s;
}

#contact-form button:hover {
	background-color: #444444;
}

#form-status {
	padding: 0 30px;
	color: #606060;
	font-size: 10px;
	text-align: center;
}

/* Portfolio Modal Styles */
.portfolio-modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.95);
	overflow: hidden;
}

.portfolio-modal-content {
	position: relative;
	width: 100%;
	height: 100%;
}

.portfolio-modal-close {
	position: absolute;
	top: 20px;
	right: 30px;
	color: #fff;
	font-size: 40px;
	font-weight: bold;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 10001;
	padding: 0;
	line-height: 1;
	transition: color 0.3s;
}

/* Hide modal close button when lightbox is open */
body.glightbox-open .portfolio-modal-close {
	display: none;
}

.portfolio-modal-close:hover,
.portfolio-modal-close:focus {
	color: #bbb;
}

#portfolio-iframe {
	width: 100%;
	height: 100%;
	border: none;
}

/* Footer Styles */
footer {
	text-align: center;
	padding: 20px;
	color: #bda99a;
	font-size: 11px;
	background-color: transparent;
	clear: both;
}

footer p {
	margin: 0;
	padding: 0;
}