@import url("reset.css");
@import url("layout.css");
@import url("variables.css");
@import url("typography.css");

/* Started commenting code on layout stlye sheet first. Anything new after that will be commented here. */

/* -------------INTRO SECTION ------------ */
.intro-section {
	padding-top: 10rem;
	padding-bottom: 4rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.title-fill {
	/* This turns the element into a flex container. */
	display: block;
	margin-top: 30vh;
	/* This centers items horizontally. */
	justify-content: center;
	/* This centers items vertically. */
	align-items: center;
	/* This is the font the text is displayed in. */
	font-family: "Major Mono Display", monospace;
	/* This gives the element colour. */
	color: white;
	/* animation: name duration timing-function delay iteration-count direction fill-mode; */
	animation: backInLeft 2.5s ease forwards 0.15s;
}

.intro-copy {
	font-family: "Outfit", sans-serif;
	font-size: 20px;
	display: flex;
	color: white;
	opacity: 0;
	padding: 5vw;
	margin-top: 10vh;
	animation: slideInUp 2s ease forwards 2.9s;
	text-align: center;
	max-width: 900px;
	margin: 0 auto;
}

.container {
	position: relative;
	overflow: hidden;
	min-height: 100vh;
}

/* -------------PORTFOLIO SECTION ------------ */

.portfolio {
	position: relative;
	width: 100%;
	height: 100vh;
	overflow: hidden;
}

.portfolio-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background-color: black;
	transition: opacity 0.4s ease;
	object-position: center;
}

/* overlay stays the same */
.portfolio-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 5vw;
}

.glass-panel {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem 1.25rem;
	width: 540px;
	/* Darker glass */
	background: rgba(0, 0, 0, 0.35);
	/* Softer border */
	border: 1px solid rgba(255, 255, 255, 0.18);
	/* Glass blur */
	backdrop-filter: blur(16px) saturate(100%);
	-webkit-backdrop-filter: blur(16px) saturate(135%);
	/* Dropshadow depth */
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
	position: relative;
	border-radius: 0;
}

.portfolio-button {
	appearance: none;
	border: 0;
	background: transparent;
	color: white;
	font: inherit;
	font-size: 3.5rem;
	font-weight: 700;
	line-height: 0.95;
	text-align: left;
	cursor: pointer;
	padding: 0;
	transition:
		transform 0.25s ease,
		opacity 0.25s ease;
}

.portfolio-button:hover,
.portfolio-button:focus-visible {
	transform: translateX(10px);
	opacity: 0.82;
	outline: none;
}

/* ----------HERO------------- */

.hero-grid {
	display: flex;
	gap: var(--s5);
	/* This changes the direction of the container into columns. */
	flex-direction: column;
	/* This centers items vertically. */
	align-items: center;
}

.avatar {
	width: 100%;
	/* This controls the proportion of the element. */
	aspect-ratio: 1/1;
	/* This controls the rounding of the corners of the element. */
	border-radius: 999px;
	/* This is the background colour. */
	background: #eee;
	/* This sets up the style of a visible border on an element. */
	border: 1px solid var(--border);
}

/* --------------- CONTACT -------------- */
.contact-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--s5);
}

.contact-actions {
	display: flex;
	align-items: center;
	gap: var(--s4);
}

/* --------------- CLASSES --------------- */
.more-grid {
	/* This makes the container display in a grid. */
	display: grid;
	/* This creates two columns, and defines how wide each column is. */
	grid-template-columns: repeat(2, minmax(0, 470px));
	justify-content: center;
	gap: var(--s3);
}

.more-item {
	width: 100%;
	max-width: 470px;
}

.image {
	/* This gives defined space around the element. */
	padding: var(--s2);
	border-radius: 100px;
	width: 100%;
	max-width: 470px;
	height: 350px;
	/* This tells the image to fill the container without distortion. */
	object-fit: cover;
}

.more-grid .image-half {
	width: 100%;
}

.image-half {
	border-radius: 100px;
	width: 50%;
	max-width: 470px;
	height: auto;
	object-fit: cover;
	aspect-ratio: 4 / 3;
}

.about-image {
	border-radius: 140px 140px;
	padding: var(--s3);
	min-width: 300px;
	max-width: 450px;
	height: auto;
	object-fit: cover;
	/* This is shrothand to remove top and bottom margin and center element horizontally. */
	margin: 0 auto;
}

.section {
	padding: var(--s2) 0;
}

.card {
	display: flex;
	flex-direction: column;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	/* This gives a shadow behind the element. */
	box-shadow: var(--shadow);
	padding: var(--s4);
}

.lead {
	margin: 0 0 var(--s5);
	/* This gives the element colour. */
	color: var(--muted);
	max-width: 70ch;
}

.muted {
	color: var(--muted);
}

.small-title {
	padding: var(--s2);
	margin: 0 auto;
}

.logo {
	height: 6em;
	display: flex;
	align-items: center;
	width: auto;
	/* This displays the element through the full width. */
	display: block;
}

/* --------------PHOTOGRAPHY IMAGES---------------- */

.gd-gallery-section {
	padding-top: var(--s4);
	padding-bottom: var(--s6);
}

.gd-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--s5);
	justify-items: center;
}

.gd-item {
	display: block;
	width: 100%;
	max-width: 350px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	padding: var(--s3);
}

.gd-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
/* -------------PROJECT FEATURE IMAGES-------------- */

.gd-gallery.feature-layout {
	display: grid;
	grid-template-columns: 2fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: var(--s5);
	width: 100%;
	justify-items: stretch;
	align-items: stretch;
}

.gd-gallery.feature-layout > .gd-item {
	max-width: none;
	padding: 0;
	width: 100%;
	height: 100%;
}

.gd-gallery.feature-layout > .gd-item:first-child {
	grid-column: 1;
	grid-row: 1 / 3;
}

.gd-gallery.feature-layout > .gd-item:first-child img,
.gd-gallery.feature-layout > .gd-item:nth-child(2) img,
.gd-gallery.feature-layout > .gd-item:nth-child(3) img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ------------- NAVIGATION ----------- */

nav {
	display: flex;
	gap: var(--s4);
}

nav a {
	color: inherit;
	padding: 0.035rem 0.55rem;
	border-radius: 10px;
}

.project-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* ----------------DROP DOWN MENUS----------------- */

.nav-item {
	position: relative;
	display: inline-block;
}

.dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 180px;
	padding: 0.5rem;
	margin-top: 0.4rem;
	background: var(--green);
	border: 1px solid var(--border);
	border-radius: 10px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: 0.2s ease;
	z-index: 1000;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.menu-dropdown summary {
	cursor: pointer;
	list-style: none;
	padding: 0.5rem;
	border-radius: 8px;
}

.menu-dropdown summary::-webkit-details-marker {
	display: none;
}

.submenu {
	display: flex;
	flex-direction: column;
	margin-left: 0.5rem;
	gap: 0.25rem;
	margin-top: 0.25rem;
}

.submenu a {
	padding: 0.4rem 0.5rem;
	border-radius: 6px;
}

/* -----------LIGHTBOX------------- */
.lightbox {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 2000;
}

.lightbox.active {
	display: flex;
}

.lightbox-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.78);
}

.lightbox-content {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 92vw;
	padding: 2rem 4.5rem;
}

.lightbox-image {
	display: block;
	max-width: 100%;
	max-height: 82vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 18px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
	background: #111;
}

.lightbox-close {
	position: absolute;
	top: 0.5rem;
	right: 1rem;
	background: rgba(255, 255, 255, 0.12);
	color: var(--white);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 999px;
	width: 2.5rem;
	height: 2.5rem;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
}

.lightbox-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.12);
	color: var(--white);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 999px;
	width: 3rem;
	height: 3rem;
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox-prev {
	left: 0.5rem;
}

.lightbox-next {
	right: 0.5rem;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
	background: rgba(255, 255, 255, 0.22);
}

body.lightbox-open {
	overflow: hidden;
}

/* ----------- PILLS & BUTTONS ------------- */
.image-row .pill {
	width: fit-content;
	text-align: center;
}

.more-grid .pill {
	width: fit-content;
	/* This controls how an individual item aligns in the container. */
	align-self: center;
}

.pill {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	width: fit-content;
	padding: 0.45rem var(--s3);
	border: 1px solid var(--border);
	border-radius: 100px;
	background: var(--white);
	color: var(--dark-green);
}

.pill:hover {
	/* This changes the position of the element. */
	transform: translateY(-4px);
}

.btn {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1rem;
	border-radius: 100px;
	border: 1px solid var(--border);
	color: var(--white);
	background: #314b42;
}

.btn.primary {
	color: #fff;
}

.btn:hover {
	transform: translateY(-1px);
}

/* -------------- SECTIONS & PAGES ---------------- */

* {
	/* This controls the width and height calculations of an element. */
	box-sizing: border-box;
}

body {
	background-color: var(--dark-green);
}

html {
	/* This makes the scroll behaviour of in page links to scroll smooth, not jump. */
	scroll-behavior: smooth;
}

main {
	padding-top: 7rem;
	margin-top: 0;
}

header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	/* This gives the background a colour and transparency. */
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	/* This blurs the background. */
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
	/* This controls where the element appears, infront or behind. This is closest to the top. */
	z-index: 999;
}

.header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s6);
	padding: var(--s2);
}

/* --------------- FOOTER ------------- */
footer {
	border-top: 1px solid var(--border);
	padding: var(--s6);
	background-color: var(--green);
}

.footer-row {
	display: flex;
	justify-content: space-between;
	gap: var(--s4);
	flex-wrap: wrap;
}

/* -----------------MOBILE---------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	overflow-x: hidden;
	width: 100%;
}

/* ---------------KEYFRAMES--------------- */
@keyframes backInLeft {
	0% {
		top: 10vh;
		left: 0vw;
		/* This allows the element to scale without changing the page layout. */
		transform: scale(1);
		opacity: 0.7;
		/* This is the visible area of an element, it hides everything outside of it. */
		clip-path: inset(0 100% 0 0);
	}

	80% {
		top: 10vh;
		left: 25vw;
		transform: scale(1);
		opacity: 0.7;
	}

	100% {
		top: 10vh;
		left: 42vw;
		transform: scale(2.5);
		opacity: 1;
		clip-path: inset(0 0 0 0);
	}
}

@keyframes slideInUp {
	0% {
		transform: translateY(100vh);
		opacity: 0;
	}
	100% {
		transform: translateY(0vh);
		opacity: 1;
	}
}

/* //////////// Media queries //////////// */

@media (max-width: 390px) {
	main {
		padding-top: 5rem;
	}

	.intro-section {
		padding-top: 9rem;
		min-height: 100vh;
		overflow: hidden;
	}

	.container {
		min-height: auto;
		overflow: visible;
	}

	.title-fill {
		display: block;
		width: 98vw;
		max-width: 98vw;
		margin: 0 auto;
		text-align: center;
		font-size: clamp(4.5rem, 18vw, 5rem);
		line-height: 1;
		letter-spacing: -0.02em;
		white-space: normal;
		overflow-wrap: normal;
		word-break: normal;
		transform-origin: center;
		animation: backInLeftMobile 2.5s ease forwards 0.15s;
	}

	.intro-copy {
		width: 88vw;
		max-width: 88vw;
		margin: 5rem auto 0;
		padding: 0;

		font-size: 1.35rem;
		line-height: 2.1;
		text-align: center;
	}

	@keyframes backInLeftMobile {
		0% {
			transform: translateX(-60vw) scale(0.7);
			opacity: 0;
			clip-path: inset(0 100% 0 0);
		}

		80% {
			transform: translateX(0) scale(0.9);
			opacity: 0.8;
		}

		100% {
			transform: translateX(0) scale(1);
			opacity: 1;
			clip-path: inset(0 0 0 0);
		}
	}

	.section:first-of-type {
		padding-top: 0.5rem;
	}

	.section:first-of-type .card {
		padding: 0;
	}

	.section:first-of-type h2 {
		font-size: clamp(1.9rem, 6vw, 2rem);
		line-height: 1.2;
		overflow-wrap: break-word;
		word-break: normal;
		margin: 0;
		margin-top: 7vh;
	}

	.portfolio-overlay {
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 1rem;
	}

	.glass-panel {
		width: min(92vw, 320px);
		max-width: 100%;
		padding: 1rem;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0.75rem;
		margin: 0 auto;
	}

	.portfolio-button {
		width: 100%;
		max-width: 240px;
		font-size: 2rem;
		line-height: 1;
		text-align: center;
		padding: 0.5rem 0.5rem;
	}

	.gd-gallery {
		gap: 0;
	}

	#about .card:nth-of-type(1) {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		max-width: 100%;
		padding: 0;
		margin: 0 auto;
	}

	.about-image {
		display: block;
		width: min(60vw, 280px);
		max-width: 100%;
		height: auto;
		margin: 0 auto;
		padding: var(--s2);
		object-fit: cover;
	}

	h2 {
		font-size: 2rem;
	}

	.contact-card {
		flex-direction: column; /* 👈 stack instead of squish */
		align-items: center;
		gap: 1.5rem;
		text-align: center;
	}

	.contact-actions {
		flex-wrap: wrap; /* 👈 allows wrapping */
		justify-content: center;
		gap: 0.75rem;
	}

	.btn {
		font-size: 0.85rem; /* 👈 smaller text */
		padding: 0.5rem 0.7rem; /* 👈 smaller buttons */
		border-radius: 999px;
	}

	.contact-actions a {
		flex: 1 1 auto;
		max-width: 120px; /* 👈 keeps them from stretching too wide */
		text-align: center;
	}
}

@media (max-width: 600px) {
	.title-fill {
		flex-direction: column;
		display: block;
		width: min-content;
		margin: 0 auto;
		text-align: center;
		font-size: 1.5rem;
		margin-top: 20vh;
	}

	.intro-copy {
		margin-top: 7vh;
	}

	.back-button {
		top: 6rem;
		left: var(--s3);
	}

	.menu {
		position: relative;
	}

	.menu-icon {
		/* This is the size of the font. */
		font-size: 2em;
		/* This controls how bullets and lists look. */
		list-style: none;
		/* This controls what type of cursor is visible. */
		cursor: pointer;
		background-color: var(--green);
		color: var(--white);
		padding: 0.35rem 0.55rem;
		border-radius: 10px;
		border: 1px solid var(--border);
	}

	.menu-icon:hover {
		transform: translateY(-4px);
	}

	.menu-panel {
		position: absolute;
		right: 0;
		min-width: 180px;
		display: grid;
		gap: 0.5rem;
		background: var(--green);
		border: 1px solid var(--border);
		border-radius: 12px;
		padding: 0.75rem;
		z-index: 99;
	}

	.menu-panel a {
		background: transparent;
		padding: 0.5rem 0.5rem;
		border-radius: 8px;
		color: var(--white);
	}

	.primary-button {
		/* This makes the element not visible. */
		display: none;
	}
}

@media (min-width: 600px) {
	.menu-icon {
		display: none;
	}

	.menu-panel {
		display: none;
	}

	.title-fill {
		flex-direction: column;
		display: block;
		width: min-content;
		margin: 0 auto;
		margin-top: 30vh;
		text-align: center;
		font-size: 1.5rem;
	}

	.intro-copy {
		padding: 2rem 1rem;
		margin-top: 4rem;
		text-align: center;
	}
}

@media (min-width: 768px) {
	/* anything you want to kick in at small tablet and above can go here */
	.primary-button {
		padding: var(--s2);
		font-size: 24px;
		display: inline-block;
		/* This makes a smooth change overtime instead of instatnly. */
		transition: all 400ms ease-in-out;
	}

	.primary-button:hover {
		/* This changes the size of the element. */
		transform: scale(1.07);
	}

	.title-fill {
		flex-direction: row;
		display: block;
		width: min-content;
		margin: 0 auto;
		margin-top: 30vh;
		text-align: center;
		font-size: 2.7rem;
	}

	.intro-copy {
		padding: 2rem 1rem;
		margin-top: 4rem;
		text-align: left;
	}
}

@media (max-width: 768px) {
	.gd-gallery.feature-layout {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
	}

	.gd-gallery.feature-layout > .gd-item:first-child {
		grid-column: auto;
		grid-row: auto;
	}

	.gd-gallery.feature-layout > .gd-item {
		aspect-ratio: 4 / 3;
	}

	.lightbox-content {
		width: 95vw;
		padding: 1rem 3.5rem;
	}

	.lightbox-arrow {
		width: 2.5rem;
		height: 2.5rem;
		font-size: 1.4rem;
	}

	.lightbox-close {
		top: 0;
		right: 0.25rem;
	}
}

@media (min-width: 900px) {
	.portfolio-panel {
		min-height: 50vh;
	}

	.portfolio-overlay {
		justify-content: center;
		align-items: center;
	}

	.glass-panel {
		gap: 1.2vw;
		padding: 2.5vw;
		width: 35vw;
		max-width: 90%;
	}

	#about {
		display: flex;
		flex-wrap: wrap;
		flex-direction: row;
		align-items: center;
		gap: var(--s6);
	}

	#about .small-title {
		width: 100%;
	}

	#about .card {
		flex: 1;
	}
}

@media (min-width: 1080px) {
	/* anything you want to kick in at large tablet and above can go here */
	.image-row {
		display: flex;
		justify-content: center;
		gap: var(--s5);
		flex-wrap: wrap;
	}

	.image-row .flex-item {
		flex: 0 0 470px;
		max-width: 470px;
	}

	.image-row .image {
		width: 100%;
		max-width: 470px;
		height: 350px;
	}
}

@media (min-width: 1300px) {
	/* anything you want to kick in at desktop and above can go here */
}
