/* =============================================
   Justeen Keller Portfolio — global.css
   ============================================= */

/* --- Reset & Base --- */
body {
	width: 100%;
	margin: 0;
	background: #cfe2f3;
}

.container {
	min-height: 90vh;
	width: 100%;
}

/* --- Header --- */
.head {
	text-align: center;
	padding-bottom: 25px;
}

.head img {
	width: 350px;
	height: auto;
}

/* --- Navigation --- */
.menu { width: 100%; }

.menu ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
}

.menu li {
	padding: 15px;
	display: inline;
}

.menu a {
	color: #cc0000;
	font-size: 28px;
	text-decoration: none;
	font-family: 'Fragment Mono', monospace;
}

.menu a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	color: #cc0000;
	font-style: italic;
	text-decoration-color: #f7931d;
}

/* --- Gallery --- */
.gallery {
	width: 70%;
	text-align: center;
	margin: auto;
}

/* --- Photo Cards (Polaroid style) --- */
.image {
	position: relative;
	width: 300px;
	height: 300px;
	margin: 30px;
	display: inline-block;
	padding: clamp(6px, 5%, 17px);
	padding-bottom: clamp(51px, 25%, 85px);
	background-color: hsla(0, 0%, 90%, 1);
	border: 2px solid;
	border-color: white hsla(0,0%,75%,1) hsla(0,0%,40%,1) hsla(0,0%,75%,1);
	background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"%3E%3Cg fill="%239C92AC19" fill-opacity="0.4"%3E%3Cpath fill-rule="evenodd" d="M0 0h4v4H0V0zm4 4h4v4H4V4z"/%3E%3C/g%3E%3C/svg%3E');
	box-shadow: 0px 5px 5px hsla(0,0%,0%,.25), 0px 5px 25px hsla(0,0%,0%,.20);
	text-decoration: none;
	box-sizing: border-box;
	transform-origin: top center;
	overflow: hidden;
	vertical-align: top;
}

/* Photo image fills the card above the white border */
.image img {
	height: 100%;
	width: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.4s ease;
}

/* Skeleton shimmer while image loads */
.image img.loading {
	opacity: 0;
}

.image::before {
	content: '';
	position: absolute;
	top: clamp(6px, 5%, 17px);
	left: clamp(6px, 5%, 17px);
	right: clamp(6px, 5%, 17px);
	bottom: clamp(51px, 25%, 85px);
	background: linear-gradient(90deg, #dde8f0 25%, #eaf1f7 50%, #dde8f0 75%);
	background-size: 200% 100%;
	animation: shimmer 1.4s infinite;
	z-index: 0;
}

@keyframes shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Hide shimmer once image is loaded */
.image.loaded::before {
	display: none;
}

.image img {
	position: relative;
	z-index: 1;
}

/* Caption overlay — fades in on hover over the white polaroid strip */
.image .caption-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: clamp(51px, 25%, 85px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 10px;
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
	z-index: 2;
}

.image .caption-overlay span {
	font-family: 'Fragment Mono', monospace;
	font-size: 10px;
	color: #444;
	text-align: center;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.image:hover .caption-overlay {
	opacity: 1;
}

/* Hover — straighten and lift */
.image:hover {
	transform: rotate(0deg) scale(1.04) !important;
	box-shadow: 4px 12px 28px hsla(0,0%,0%,.28);
	z-index: 10;
	position: relative;
}

/* Lightbox overlay */
.lightbox {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.88);
	z-index: 1000;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 20px;
	box-sizing: border-box;
	cursor: zoom-out;
}

.lightbox.open {
	display: flex;
}

.lightbox img {
	max-width: min(90vw, 900px);
	max-height: 80vh;
	object-fit: contain;
	box-shadow: 0 20px 60px rgba(0,0,0,0.6);
	border: 3px solid rgba(255,255,255,0.08);
	animation: lbIn 0.25s cubic-bezier(0.22,1,0.36,1);
}

@keyframes lbIn {
	from { opacity: 0; transform: scale(0.92); }
	to   { opacity: 1; transform: scale(1); }
}

.lightbox-caption {
	margin-top: 14px;
	font-family: 'Fragment Mono', monospace;
	font-size: 12px;
	color: rgba(255,255,255,0.65);
	text-align: center;
	max-width: 600px;
}

.lightbox-ig {
	margin-top: 10px;
	font-family: 'Fragment Mono', monospace;
	font-size: 11px;
	color: #cc0000;
	text-decoration: none;
	letter-spacing: 0.05em;
}

.lightbox-ig:hover { text-decoration: underline; }

.lightbox-close {
	position: absolute;
	top: 18px;
	right: 22px;
	font-size: 28px;
	color: rgba(255,255,255,0.6);
	cursor: pointer;
	background: none;
	border: none;
	line-height: 1;
	padding: 4px 8px;
}

.lightbox-close:hover { color: #fff; }

/* --- Loading spinner --- */
.loader {
	display: none;
	justify-content: center;
	gap: 8px;
	padding: 30px 0 10px;
}

.loader.visible { display: flex; }

.loader span {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #cc0000;
	animation: bounce 0.9s infinite ease-in-out;
}

.loader span:nth-child(2) { animation-delay: 0.15s; }
.loader span:nth-child(3) { animation-delay: 0.30s; }

@keyframes bounce {
	0%, 80%, 100% { transform: translateY(0);    opacity: 0.4; }
	40%            { transform: translateY(-12px); opacity: 1; }
}

/* --- About / Services pages --- */
.page-wrap {
	width: 62%;
	max-width: 780px;
	margin: 0 auto;
	padding: 10px 20px 80px;
	font-family: 'Fragment Mono', monospace;
	font-size: 14px;
	line-height: 1.9;
	color: #222;
}

.page-wrap h1 {
	font-family: 'Major Mono Display', monospace;
	font-size: 20px;
	color: #cc0000;
	margin-bottom: 30px;
	letter-spacing: 0.04em;
}

.page-wrap h2 {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #cc0000;
	margin-top: 36px;
	margin-bottom: 8px;
}

.page-wrap p { margin: 0 0 16px; }

.page-wrap a { color: #cc0000; }

.page-wrap .service-item {
	background: rgba(255,255,255,0.45);
	border-left: 3px solid #cc0000;
	padding: 14px 18px;
	margin-bottom: 14px;
	font-size: 13px;
}

.page-wrap .service-item strong {
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* --- Footer --- */
.foot {
	margin-top: 50px;
	width: 100%;
	text-align: center;
}

.foot img { width: 24px; height: 24px; }

.foot p {
	font-size: 9pt;
	margin: 2px 0 0 0;
	font-family: 'Major Mono Display', monospace;
}

.foot .designer { font-size: 6pt; }

.foot a { text-decoration: none; color: #000; }

/* =============================================
   Responsive — Mobile (swipe carousel)
   ============================================= */
@media (max-width: 768px) {

	.head img { width: 220px; }
	.menu a   { font-size: 18px; }
	.menu li  { padding: 8px; }

	.gallery {
		width: 100%;
		display: flex;
		flex-direction: row;
		overflow-x: scroll;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 20px 0 30px;
		box-sizing: border-box;
		text-align: left;
	}

	.gallery::-webkit-scrollbar { display: none; }

	.image {
		flex: 0 0 80vw;
		width: 80vw;
		height: 80vw;
		scroll-snap-align: center;
		/* fixed margins — first/last handled by nth-child below */
		margin: 0 5vw;
		display: block;
		padding: clamp(6px, 4%, 16px);
		padding-bottom: clamp(40px, 18%, 70px);
		transform: none !important;
	}

	/* nth-child instead of first/last-child so dynamic cards work */
	.image:nth-child(1) { margin-left: 10vw; }

	/* caption always visible on mobile — no hover */
	.image .caption-overlay { opacity: 1; }

	.page-wrap { width: 90%; }
}

/* --- Mobile swipe dots --- */
.gallery-dots { display: none; }

@media (max-width: 768px) {
	.gallery-dots {
		display: flex;
		justify-content: center;
		gap: 7px;
		padding: 8px 0 20px;
		flex-wrap: wrap;
	}

	.gallery-dots span {
		width: 7px;
		height: 7px;
		border-radius: 50%;
		background: hsla(0,0%,0%,0.2);
		transition: background 0.2s;
		flex-shrink: 0;
	}

	.gallery-dots span.active { background: #cc0000; }
}
