:root {
	--bg-color: #070707;
	--text-color: #FAFAFA;
	--accent: #4000FF;
	--font-headline: orpheuspro, serif;
	--font-text: spectral, sans-serif;
}

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

body {
	background: var(--bg-color);
	color: var(--text-color);
	font-family: var(--font-text);
	min-height: 100vh;
	overflow: hidden;
}

/* --- UI FIXE --- */
.top-header {
	position: fixed;
	top: 40px;
	width: 100%;
	display: flex;
	justify-content: center;
	z-index: 100;
	pointer-events: none;
}

.logo {
	pointer-events: auto;
	text-decoration: none;
	display: block;
}

.logo img {
	width: 55px;
	height: auto;
	display: block;
}

.floating-nav {
	position: fixed;
	bottom: 50px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(20, 20, 20, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.1);
	padding: 6px;
	border-radius: 3px;
	z-index: 1000;
	box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.floating-nav ul {
	list-style: none;
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	align-items: center;
}

.floating-nav a {
	text-decoration: none;
	color: rgba(255, 255, 255, 0.6);
	font-family: var(--font-text);
	font-size: 16px;
	font-weight: 400;
	padding: 12px 20px;
	border-radius: 3px;
	transition: all 0.3s ease;
	display: block;
	line-height: 1;
}

.floating-nav a.active {
	background: var(--accent);
	color: #FFFFFF;
	box-shadow: 0 4px 15px rgba(64, 0, 255, 0.4);
	font-weight: 500;
}

.floating-nav a:hover:not(.active) {
	background-color: rgba(255, 255, 255, 0.05);
	color: #FFFFFF;
	text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.close-btn {
	position: fixed;
	top: 24px;
	right: 24px;
	background: #FFFFFF;
	color: #070707;
	text-decoration: none;
	font-size: 16px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: all 0.3s ease;
}

.close-btn:hover {
	background: var(--accent);
	color: #FFFFFF;
	transform: rotate(90deg);
}

.project-layout {
	display: grid;
	grid-template-columns: 0.6fr 1.4fr;
	gap: 40px;
	padding: 40px 2% 80px;
	min-height: 100vh;
	align-items: start;
}

.project-info {
	position: sticky;
	top: 40px;
	display: flex;
	flex-direction: column;
	gap: 21px;
	max-width: 420px;
}

.meta {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.4);
	letter-spacing: 3px;
	text-transform: uppercase;
	font-weight: 300;
}

.project-info h2 {
	font-family: var(--font-headline);
	font-size: 2.2rem;
	font-weight: 400;
	letter-spacing: 2px;
}

.project-intro {
	font-size: 0.84rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.7);
	font-weight: 300;
}

.project-details {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 18px;
}

.project-details li {
	font-size: 0.78rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.5);
	font-weight: 300;
}

.project-details li span {
	display: block;
	color: #FAFAFA;
	font-weight: 400;
	letter-spacing: 1px;
	font-size: 0.72rem;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.project-buttons {
	position: fixed;
	bottom: 50px;
	left: 2%;
	display: flex;
	gap: 10px;
	z-index: 100;
}

.project-link {
	text-decoration: none;
	color: #FFFFFF;
	border: 1px solid rgba(255, 255, 255, 0.3);
	padding: 10px 16px;
	border-radius: 3px;
	font-family: var(--font-text);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 1px;
	transition: all 0.3s ease;
}

.project-link:hover {
	background: var(--accent);
	border-color: var(--accent);
}

.gallery {
	display: flex;
	flex-direction: column;
	gap: 21px;
	overflow-y: auto;
	height: calc(100vh - 120px);
	min-height: 0;
	padding-right: 8px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.gallery::-webkit-scrollbar {
	width: 6px;
}

.gallery::-webkit-scrollbar-track {
	background: transparent;
}

.gallery::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 6px;
}

.gallery::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.35);
}

.gallery-row {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 21px;
	width: 100%;
	flex-shrink: 0;
}

.gallery-row .gallery-item {
	overflow: hidden;
}

.gallery-row .gallery-item img {
	height: 100%;
	object-fit: cover;
}

.gallery-item {
	background: #1a1a1a;
	border-radius: 3px;
	overflow: hidden;
	width: 100%;
	height: auto;
	flex-shrink: 0;
}

.gallery-item.is-white {
	background: #FAFAFA;
}

.gallery-item.is-white img {
	transform: scale(0.9);
	transform-origin: center;
}

.gallery-item.is-16x9 {
	aspect-ratio: 16 / 9;
}

.gallery-item.is-16x9 img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery-item.is-zoom img {
	transform: scale(1.25);
	transform-origin: center;
}

.gallery-item img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

/* --- LIGHTBOX --- */
.lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2000;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.lightbox.active {
	opacity: 1;
	pointer-events: auto;
}

.lightbox-img {
	max-width: 85vw;
	max-height: 85vh;
	border-radius: 8px;
	object-fit: contain;
	user-select: none;
	transition: opacity 0.2s ease;
}

.lightbox-close {
	position: absolute;
	top: 24px;
	right: 24px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: rotate(90deg);
}

/* Desktop: wrapper is invisible, children positioned absolutely */
.lightbox-nav-wrapper {
	display: contents;
}

.lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
	left: 24px;
}

.lightbox-next {
	right: 24px;
}

.lightbox-counter {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	font-family: var(--font-text);
	font-size: 13px;
	color: rgba(255, 255, 255, 0.5);
	letter-spacing: 2px;
}

/* Thumbnails: hidden on desktop */
.lightbox-thumbnails {
	display: none;
}

.lb-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.4;
	transition: opacity 0.3s ease;
}

.lb-thumb.active {
	opacity: 1;
	outline: 2px solid #fff;
	outline-offset: 2px;
}

@media (max-width: 1024px) {
	body {
		overflow-y: auto;
		overflow-x: hidden;
	}

	.project-layout {
		grid-template-columns: 1fr;
		gap: 34px;
	}

	.project-info {
		position: static;
		max-width: none;
	}

	.project-buttons {
		position: static;
		margin-top: 8px;
	}

	.gallery {
		overflow-y: visible;
		height: auto;
		padding-right: 0;
	}
}

/* --- MOBILE --- */
@media (max-width: 768px) {
	body {
		overflow-y: auto;
		overflow-x: hidden;
	}

	/* Header */
	.top-header { top: 21px; }
	.logo img { width: 55px; }

	/* Close button */
	.close-btn {
		top: 18px;
		right: 18px;
		width: 34px;
		height: 34px;
		font-size: 14px;
		background: transparent;
		color: #fff;
		border: 1px solid rgba(255, 255, 255, 0.3);
	}
	.close-btn:hover {
		background: var(--accent);
		border-color: var(--accent);
	}

	/* Nav */
	.floating-nav { bottom: 21px; padding: 8px; }
	.floating-nav a { font-size: 19px; padding: 14px 26px; }

	/* Layout */
	.project-layout {
		display: flex;
		flex-direction: column;
		gap: 28px;
		padding: 70px 21px 110px;
		min-height: auto;
	}

	/* Info */
	.project-info {
		position: static;
		max-width: none;
		gap: 16px;
	}

	.meta {
		font-size: 10px;
		letter-spacing: 2px;
	}

	.project-info h2 {
		font-size: 1.8rem;
		letter-spacing: 1px;
	}

	.project-intro {
		font-size: 0.8rem;
		line-height: 1.6;
	}

	.project-details {
		gap: 12px;
		padding-top: 14px;
	}

	.project-details li {
		font-size: 0.75rem;
	}

	.project-details li span {
		font-size: 0.7rem;
	}

	/* Buttons - inline flow */
	.project-buttons {
		position: static;
		display: flex;
		gap: 10px;
		margin-top: 8px;
	}

	.project-link {
		font-size: 12px;
		padding: 9px 14px;
		letter-spacing: 0.5px;
	}

	/* Gallery */
	.gallery {
		overflow-y: visible;
		height: auto;
		padding-right: 0;
		gap: 16px;
	}

	.gallery-row {
		gap: 16px;
	}

	.gallery-item {
		border-radius: 6px;
	}

	/* --- Mobile Lightbox --- */
	.lightbox {
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		padding: 21px;
		padding-top: 80px;
		overflow-y: auto;
		background: rgba(0, 0, 0, 0.96);
	}

	.lightbox-close {
		position: fixed;
		top: 18px;
		right: 18px;
		z-index: 2001;
	}

	.lightbox-img {
		max-width: 100%;
		max-height: 55vh;
		border-radius: 8px;
		flex-shrink: 0;
	}

	.lightbox-nav-wrapper {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 24px;
		margin-top: 21px;
		flex-shrink: 0;
	}

	.lightbox-nav {
		position: static;
		transform: none;
		width: 50px;
		height: 50px;
		font-size: 18px;
		background: rgba(255, 255, 255, 0.12);
		border: 1px solid rgba(255, 255, 255, 0.2);
	}

	.lightbox-counter {
		position: static;
		transform: none;
		font-size: 14px;
		letter-spacing: 1px;
		min-width: 50px;
		text-align: center;
	}

	/* Thumbnails grid */
	.lightbox-thumbnails {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
		margin-top: 21px;
		width: 100%;
		padding-bottom: 80px;
	}
}

@media (max-width: 480px) {
	.logo img { width: 50px; }
	.floating-nav a { font-size: 19px; padding: 14px 26px; }

	.project-layout {
		padding: 60px 16px 100px;
		gap: 21px;
	}

	.project-info h2 { font-size: 1.5rem; }
	.project-intro { font-size: 0.75rem; }

	.project-link { font-size: 11px; padding: 8px 12px; }

	.gallery { gap: 13px; }
	.gallery-row { gap: 13px; }

	.lightbox { padding: 16px; padding-top: 70px; }
	.lightbox-img { max-height: 45vh; }
	.lightbox-nav { width: 44px; height: 44px; }
	.lightbox-nav-wrapper { gap: 18px; margin-top: 16px; }
	.lightbox-thumbnails { gap: 8px; margin-top: 16px; }
}
