/* ========================================
   COOKIE RUN
======================================== */

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
}

body {
	width: 100%;
	display: flex;
	align-items: center;
	overflow-x: hidden;
	overflow-y: auto;
}

html,
body {
	margin: 0;
	padding: 0;
}


/* ========================================
   DESKTOP NAV
======================================== */

nav {
	position: fixed;
	width: 98%;
	padding-left: 5rem;
	padding-right: 6rem;
}

.dropdown-menu {
	top: 45px;
}


/* ========================================
   BACK TO TOP
======================================== */

#top {
	position: fixed;
	bottom: 20px;
	left: 20px;
	background-color: var(--color-lightgreen);
	padding: 10px 15px;
	border-radius: 20px;
	font-size: 0.8rem;
	border: 1.5px solid #000;
	text-align: center;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
	z-index: 1000;
	pointer-events: none;
}

#top:hover {
	cursor: pointer;
	background: black;
}

#top:hover a {
	color: var(--color-lightgreen);
}

body.scrolled #top {
	opacity: 1;
	pointer-events: auto;
}


/* ========================================
   HEADER — DESKTOP
======================================== */

header {
	width: 100vw;
	aspect-ratio: 16 / 7;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

#crk-header {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

#crk-header img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	object-fit: cover;
	object-position: center;
}

/* ========================================
   MAIN
======================================== */

main {
	height: auto;
	flex-direction: column;
}


/* ========================================
   INTRO / TITLE
======================================== */

.title {
	display: flex;
	flex-direction: row;
	align-items: center;
	width: 90vw;
}

h1 {
	font-family: var(--title-font);
	font-size: 3rem;
	width: 70%;
	padding: 2rem;
}

h4 {
	font-weight: 400;
	width: 70%;
	margin-left: 2rem;
	font-size: 1rem;
	padding-right: 1rem;
}


/* ========================================
   PROJECT DETAILS
======================================== */

.project-details {
	margin-top: 3rem;
	width: 70vw;
}

.project-info {
	display: flex;
	justify-content: space-between;
	flex-direction: row;
	padding-left: 2rem;
	padding-right: 2rem;
	padding-bottom: 1rem;
}

.project-info li {
	line-height: 0.8;
}

.project-info h2 {
	font-family: var(--title-font);
	font-size: 2rem;
}

.project-info p {
	line-height: 0.5;
}


/* ========================================
   GALLERY
======================================== */

.gallery {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 0 3rem;
	padding-top: 5rem;
	padding-bottom: 5rem;
}

.gallery img {
	width: 100%;
	height: auto;
	display: block;
}


/* two-column rows */

.gallery-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	width: 100%;
	align-items: start;
}


/* stacked collage */

.split-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	align-items: start;
}

.gallery-stack {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.split-gallery img {
	width: 100%;
	height: auto;
	display: block;
}


/* Instagram pair */

#insta {
	width: 100%;
}

#insta img {
	width: 100%;
	height: auto;
	object-fit: initial;
}


/* ========================================
   MOBILE MENU — HIDDEN ON DESKTOP
======================================== */

#overlay-nav,
#menu-toggle {
	display: none;
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 600px) {

	/* --------------------
	   PAGE
	-------------------- */

	html {
		overflow-x: hidden;
		scroll-behavior: smooth;
	}

	body {
		margin: 0;
		width: 100%;
		display: block;
		overflow-x: hidden;
		overflow-y: auto;
	}


	/* --------------------
	   DESKTOP NAV OFF
	-------------------- */

	body > nav {
		display: none;
	}


	/* --------------------
	   HEADER
	-------------------- */

	header {
		width: 100%;
		max-width: 100%;
		margin: 0;
	}

	header picture {
		display: block;
		width: 100%;
	}

	header img {
		display: block;
		width: 100%;
		height: auto;
		margin: 0;
	}


	/* --------------------
	   MAIN
	-------------------- */

	main {
		width: 100%;
		height: auto;
		margin: 0;
		padding: 0;
	}


	/* --------------------
	   TITLE / DESCRIPTION
	-------------------- */

	.title {
	width: auto;
	margin: 2rem 1.5rem 0;

	display: flex;
	flex-direction: column;
	align-items: center;
}

.title h1 {
	width: 100%;

	margin: 0 0 1.5rem;
	padding: 0;

	font-size: 2rem;
	line-height: 1.05;
	text-align: center;
}

	.title h4 {
		width: 100%;

		margin: 0;
		padding: 0;

		font-size: 0.8rem;
		line-height: 1.4;
	}


	/* --------------------
	   PROJECT INFO
	-------------------- */

	.project-details {
		width: auto;
		max-width: none;

		margin: 2.5rem 1.5rem 0;
	}

	.project-info {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));

		gap: 1rem;

		margin: 0;
		padding: 0;
	}

	.project-info li {
		min-width: 0;
		line-height: 1;
	}

	.project-info h2 {
		margin: 0 0 0.75rem;

		font-size: 1rem;
		line-height: 1;
	}

	.project-info p {
		margin: 0.3rem 0;

		font-size: 0.65rem;
		line-height: 1.3;
	}


	/* ========================================
	   GALLERY
	======================================== */

	.gallery {
		width: auto;

		margin: 0 1rem;

		padding-top: 3rem;
		padding-bottom: 5rem;

		gap: 0.5rem;
	}

	.gallery img {
		display: block;

		width: 100%;
		height: auto;
	}


	/* --------------------
	   TWO-COLUMN ROWS
	-------------------- */

	.gallery-columns {
		width: 100%;

		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));

		gap: 0.5rem;
		align-items: start;
	}


	/* --------------------
	   STACKED COLLAGE
	-------------------- */

	.split-gallery {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));

		gap: 0.5rem;
		align-items: start;
	}

	.gallery-stack {
		display: flex;
		flex-direction: column;

		gap: 0.5rem;
	}


	/* --------------------
	   INSTAGRAM ROW
	-------------------- */

	#insta {
		width: 100%;

		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));

		gap: 0.5rem;
	}

	#insta img {
		width: 100%;
		height: auto;

		object-fit: initial;
	}


	/* --------------------
	   BACK TO TOP
	-------------------- */

	#top {
		position: fixed;

		bottom: 5px;
		left: 5px;

		padding: 7px 10px;

		opacity: 1;
		pointer-events: auto;

		font-size: 0.5rem;
		font-weight: 700;

		z-index: 1000;
	}


	/* ========================================
	   MOBILE NAV — MATCH CARE CIRCLE
	======================================== */

	#menu-toggle {
		position: fixed;

		bottom: 20px;
		right: 20px;

		width: 60px;
		height: 60px;

		display: flex;
		align-items: center;
		justify-content: center;

		background: black;

		border: 1.5px solid black;
		border-radius: 50%;

		cursor: pointer;

		z-index: 9999;
	}


	/* --------------------
	   SMALL FLOATING RICE BOWL
	-------------------- */

	#menu-toggle #icon {
		transform: scale(0.8);
		padding-top: 0.5rem;
	}


	/* ========================================
	   FULLSCREEN MOBILE MENU
	======================================== */

	#overlay-nav {
		position: fixed;

		top: 0;
		left: 0;

		width: 100vw;
		height: 100vh;

		display: none;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;

		padding-top: 3rem;

		background: var(--color-lightgreen);

		overflow-x: hidden;
		overflow-y: hidden;

		z-index: 9998;
	}

	#overlay-nav.show {
		display: flex;
	}


	/* --------------------
	   LARGE RICE BOWL
	-------------------- */

	.overlay-icon {
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.overlay-icon #icon {
		transform: none;
	}


	/* --------------------
	   RICE GALLARDO
	-------------------- */

	#mobile-name {
	font-family: var(--title-font);
	font-size: 2.5rem;

	margin-top: 0;
	margin-bottom: 0;

	text-align: center;
}


	/* --------------------
	   MOBILE NAV
	-------------------- */

	#mobile-nav {
		position: relative;

		display: flex;
		flex-direction: column;
		align-items: center;

		height: auto;

		margin: 0;
		padding: 0;
	}


	/* --------------------
	   CONTACT LINKS
	-------------------- */

	#contact-mobile {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;

		color: black;

		gap: 2rem;

		margin-top: 0.5rem;
		padding: 0;

		list-style: none;
	}

	#contact-mobile li {
		margin: 0;
		padding: 0;
	}


	/* --------------------
	   BACK TO HOME
	-------------------- */

	#website-links {
		display: flex;
		flex-direction: row;
		justify-content: space-evenly;

		width: 100%;

		margin: 0;
		margin-top: 1.5rem;
		margin-bottom: 1.5rem;

		padding: 0;

		gap: 0.5rem;

		list-style: none;
		text-align: center;
	}

	#website-links li {
		display: flex;
		align-items: center;
		justify-content: center;

		text-align: center;
	}

	#website-links .link {
		margin: 0;
		text-align: center;
	}

	#website-links .link a {
		text-align: center;
	}


	/* --------------------
	   PROJECTS BLACK BAR
	-------------------- */

	#mobile-works {
		width: 100vw;
		box-sizing: border-box;

		margin: 0;
		margin-bottom: 0.5rem;

		padding: 0.5rem;

		background: black;
		color: var(--color-lightgreen);

		font-family: var(--title-font);
		font-size: 1.5rem;
		text-align: center;
	}


	/* --------------------
	   PROJECT LIST
	-------------------- */

	#works {
		display: flex;
		flex-direction: column;
		align-items: center;

		gap: 0.5rem;

		margin: 0;
		padding: 0;

		list-style: none;

		font-size: 1rem;
		text-align: center;
	}

	#works li {
		margin: 0;
	}

	#works li:hover {
		color: black;
		opacity: 0.5;
	}

}