* {
	box-sizing: border-box;
}
:root {
	--bg: #000;
	--fg: #e7e7e7;
	--muted: rgba(255, 255, 255, 0.22);
	--muted-2: rgba(255, 255, 255, 0.08);
	--hero-image: url("assets/bg.jpeg");
}
html,
body {
	height: 100%;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
		Arial, sans-serif;
}
/**** Header ****/
.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 32px;
	z-index: 20;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
}
.logo {
	display: inline-flex;
	align-items: center;
}
.logo img {
	height: 30px;
	width: auto;
	display: block;
}
.menu-toggle {
	display: none;
	position: relative;
	width: 40px;
	height: 40px;
	border: 1px solid var(--muted);
	background: transparent;
	border-radius: 8px;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.menu-toggle span {
	position: absolute;
	width: 20px;
	height: 2px;
	background: #e0e0e0;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle span:nth-child(1) {
	transform: translateY(-6px);
}
.menu-toggle span:nth-child(2) {
	transform: translateY(0);
}
.menu-toggle span:nth-child(3) {
	transform: translateY(6px);
}
.menu-toggle.menu-open span:nth-child(1) {
	transform: rotate(45deg);
}
.menu-toggle.menu-open span:nth-child(2) {
	opacity: 0;
}
.menu-toggle.menu-open span:nth-child(3) {
	transform: rotate(-45deg);
}
.nav {
	display: flex;
	gap: 24px;
}
.nav a {
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgb(210, 210, 210);
	text-decoration: none;
}
.nav a:hover {
	color: #fff;
}

/**** Hero ****/
.hero.full {
	position: relative;
	min-height: 100vh;
	min-height: 100dvh;
	display: grid;
	place-items: center;
}
.hero.full .overlay {
	position: absolute;
	inset: 0;
}
.hero.full .overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7));
}
.hero.full .overlay .bg {
	position: absolute;
	inset: 0;
	background: var(--hero-image) center/cover no-repeat;
	filter: contrast(0.9) brightness(0.55);
	transform: translateY(0);
	will-change: transform;
}
.hero-content {
	position: relative;
	z-index: 1;
	text-align: center;
	will-change: transform;
}
.eyebrow {
	display: inline-block;
	font-size: 12px;
	letter-spacing: 0.3em;
	opacity: 0.8;
}
.hero-title {
	font-family: "Bebas Neue", Impact, Haettenschweiler, "Arial Narrow Bold",
		sans-serif;
	font-size: clamp(56px, 12vw, 144px);
	letter-spacing: 0.06em;
	line-height: 0.9;
	margin: 10px 0 22px;
	color: #f2f2f2;
}
.btn-ghost {
	position: relative;
	background: transparent;
	color: var(--fg);
	border: 1px solid var(--muted);
	padding: 10px 26px;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	font-size: 11px;
	cursor: pointer;
}
.btn-ghost:hover {
	border-color: #fff;
	color: #fff;
}
.btn-ghost::before,
.btn-ghost::after {
	content: "";
	position: absolute;
	height: 1px;
	width: 16px;
	background: var(--muted);
	top: 50%;
	transform: translateY(-50%);
}
.btn-ghost::before {
	left: -22px;
}
.btn-ghost::after {
	right: -22px;
}

/**** Responsive ****/
@media (max-width: 900px) {
	.site-header {
		height: 64px;
		padding: 0 20px;
	}
	.nav {
		gap: 16px;
	}
	.nav a {
		font-size: 11px;
		letter-spacing: 0.16em;
	}
	.logo img {
		height: 22px;
	}
	.btn-ghost {
		padding: 9px 22px;
		font-size: 10px;
		letter-spacing: 0.2em;
	}
	.eyebrow {
		font-size: 11px;
		letter-spacing: 0.26em;
	}
}

@media (max-width: 640px) {
	.site-header {
		height: 56px;
		padding: 0 14px;
	}
	.menu-toggle {
		display: inline-flex;
		touch-action: manipulation;
	}
	.nav {
		position: fixed;
		inset: 56px 12px auto 12px;
		display: flex;
		flex-direction: column;
		gap: 14px;
		padding: 14px;
		background: rgba(20, 20, 20, 0.96);
		border: 1px solid var(--muted-2);
		border-radius: 12px;
		box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
		backdrop-filter: blur(6px);
		z-index: 30;
		opacity: 0;
		transform: translateY(-8px) scale(0.98);
		transform-origin: top center;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.22s ease, transform 0.22s ease,
			visibility 0s linear 0.22s;
	}
	.nav.nav-open {
		opacity: 1;
		transform: translateY(0) scale(1);
		visibility: visible;
		pointer-events: auto;
		transition-delay: 0s, 0s, 0s;
	}
	.nav a {
		font-size: 12px;
		letter-spacing: 0.16em;
		opacity: 0;
		transform: translateY(-6px);
		transition: opacity 0.18s ease, transform 0.18s ease;
	}
	.nav.nav-open a {
		opacity: 1;
		transform: none;
	}
	.nav.nav-open a:nth-child(1) {
		transition-delay: 40ms;
	}
	.nav.nav-open a:nth-child(2) {
		transition-delay: 70ms;
	}
	.nav.nav-open a:nth-child(3) {
		transition-delay: 100ms;
	}
	.nav.nav-open a:nth-child(4) {
		transition-delay: 130ms;
	}
	.nav.nav-open a:nth-child(5) {
		transition-delay: 160ms;
	}
	.nav.nav-open a:nth-child(6) {
		transition-delay: 190ms;
	}
	.nav.nav-open a:nth-child(7) {
		transition-delay: 220ms;
	}
	.logo img {
		height: 20px;
	}

	.hero.full {
		min-height: 100vh;
		min-height: 100dvh;
	}
	.hero-title {
		font-size: clamp(40px, 16vw, 96px);
	}
	.btn-ghost {
		padding: 8px 18px;
		font-size: 10px;
	}
}

@media (max-width: 400px) {
	.nav {
		gap: 10px;
	}
	.nav a {
		font-size: 9px;
	}
	.logo img {
		height: 18px;
	}
	.hero-title {
		font-size: clamp(36px, 18vw, 80px);
	}
}

/**** Projects ****/
.projects {
	--header-h: 72px;
	padding: var(--header-h) 0 0;
	max-width: none;
	margin: 0;
}
.page-title {
	display: none;
}
.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
	gap: 0;
}
.project-card {
	position: relative;
	display: block;
	height: 0;
	padding-bottom: 70%; /* taller cards */
	border-radius: 0;
	overflow: hidden;
	background: #111;
	border: none;
	box-shadow: none;
	transform-style: preserve-3d;
}
.project-card .card-media {
	position: absolute;
	inset: 0;
	background: var(--img) center/cover no-repeat;
	transition: transform 220ms ease, filter 220ms ease;
	transform: perspective(900px) rotateX(var(--tiltY, 0deg))
		rotateY(var(--tiltX, 0deg)) scale(var(--scale, 1));
	will-change: transform;
}
.project-card:hover .card-media {
	--scale: 1.06;
	filter: brightness(0.95) contrast(1.02);
}
.project-card .card-overlay {
	position: absolute;
	inset: auto 0 0 0;
	padding: 16px;
	background: rgba(0, 0, 0, 0.72);
	/* background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0)); */
	color: #f0f0f0;
}
.project-card .card-title {
	margin: 0 0 6px;
	font-size: clamp(16px, 2vw, 20px);
}
.project-card .card-desc {
	margin: 0;
	font-size: 13px;
	color: #d8d8d8;
}

@media (min-width: 1024px) {
	.projects-grid {
		grid-template-columns: repeat(4, 1fr);
		grid-template-rows: repeat(2, minmax(0, calc((100vh - var(--header-h)) / 2)));
		grid-auto-rows: minmax(0, calc((100vh - var(--header-h)) / 2));
		min-height: calc(100vh - var(--header-h));
	}
	.project-card {
		height: 100%;
		padding-bottom: 0;
	}
}
@media (max-width: 1200px) {
	.projects {
		padding-top: var(--header-h);
	}
	.projects-grid {
		grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	}
}
@media (max-width: 900px) {
	.projects {
		--header-h: 64px;
		padding-top: var(--header-h);
	}
	.projects-grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	}
}
@media (max-width: 640px) {
	.projects {
		--header-h: 56px;
		padding-top: var(--header-h);
	}
	.projects-grid {
		grid-template-columns: 1fr;
	}
}

/**** Utilities *****/
.hidden {
	display: none !important;
}

/* MOBILE (≤899px): horizontal grid, cards fill height */
@media (max-width: 899px) {
	/* Kill any legacy height:0 and let cards fill the row height */
	.projects-grid .project-card {
		height: 100% !important;
		min-height: 0; /* avoid overflow traps */
	}
	/* Ensure the visual media fills the card height as well */
	.projects-grid .project-card .card-media {
		height: 100% !important;
	}

	/* (optional) reduce tilt shimmer on phones */
	.project-card .card-media {
		transform: none !important;
	}
}
