:root {
	--main-color: #181818;
}
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body {
	background-color: #181818;
	color: white;
	padding: 0;
	margin: 0;
	font-family: "Montserrat", sans-serif;
	max-width: 100vw;
	font-size: 1.4rem;
	width: 100%;
}
main {
	background-color: black;
	place-items: center;
	/* width: 20vw; */
	display: flex;
	justify-content: center;
	align-items: center;
	/* height: 30vw; */
	max-height: 50vh;
	aspect-ratio: 660/500;
	position: relative;
}
.hero {
	height: 90vh;
	display: grid;
	align-items: center;
	font-size: 1.2rem;
}
.hero .title {
	font-family: "Montserrat", sans-serif;
	font-size: clamp(2.8rem, 6vw, 4.0rem);
	font-weight: 700;
	font-style: normal;
	letter-spacing: -0.03em;
	line-height: 1.05;
	margin-bottom: 1rem;
}
.hero .subtitle {
	font-size: 1.2rem;
	font-weight: 400;
	opacity: 0.9;
}
.title {
	font-weight: 700;
}
.eye {
	position: absolute;
	top: calc(x * 1vw);
	left: calc(y * 1vw);
	width: calc(z * 1vw);
	height: auto;
}

.container2 {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	min-height: 100vh;
	padding-top: 5rem;
	padding: 1rem;
}
.left {
	flex: 1;
	padding: 1rem;
	flex-grow: 1;
}
.right {
	flex: 1;
	flex-grow: 1;
	min-width: 20rem;
	word-wrap: break-word;
	padding: 1rem;
}
.blob-container {
	position: relative;
	width: 100%;
	height: 100%; /* Adjust the height to your needs */
	overflow: hidden;
}
li {
	padding: 0.5rem;
}

.content {
	position: relative;
	z-index: 1;
	color: #fff;
	text-align: center;
	padding: 20px;
}

.skill-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 2rem;
	box-sizing: border-box;
}

.skill-item > img {
	width: 4rem;
}
.skill-item > h4 {
	text-align: center;
}

.skill-item {
	position: relative; /* Enables positioning for the pseudo-element */
	display: inline-block; /* Adjusts the size to fit content */
	overflow: hidden; /*Ensures the pseudo-element doesn't overflow*/
	padding: 16px; /* Optional: Adds some padding inside the div */
	font-size: 1.2rem; /* Optional: Adjust font size */
	cursor: pointer; /* Pointer effect for interactivity */
}

.skill-item::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	transform: scaleX(0); /* Initial state: background hidden */
	transform-origin: bottom right;
	background: var(--main-color); /* Light blue background */
	z-index: -1; /* Ensures the background stays behind the text */
	transition: transform 0.3s ease; /* Smooth scaling transition */
}

.skill-item:hover::before {
	transform: scaleX(1); /* Fully expand background on hover */
	transform-origin: bottom left;
}
.flex {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.project-section {
	padding: 1rem;
}
.card-project {
	width: 25rem;
	padding: 2rem;
	margin-bottom: 1rem;
}
.image img {
	width: 25rem;
	height: auto;
}
.content h3 {
	padding: 0;
	margin: 0;
}
.card-footer-item > a {
	padding: 0.5em;
	background-color: var(--main-color);
	color: white;
	border: none;
	font-size: inherit;
}
footer img {
	width: 5rem;
	height: auto;
}
footer {
	padding: 1rem;
	margin: auto;
	margin-bottom: 3rem;
	width: max-content;
}
footer > a {
	background-color: #181818;
	color: #181818;
}

/* scroll snap: each page fills at least one viewport */
html {
	scroll-snap-type: y mandatory;
	scroll-behavior: smooth;
}
.blob-container,
.container2,
.page-3,
.page-4 {
	min-height: 100vh;
	min-height: 100svh;
	overflow-x: hidden;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}
.page-3 {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.page-4 {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

/* page 2 (about + skills): centered, sized to fit one snap view */
.container2 {
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 3rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.5rem;
}
.left {
	flex: 0 1 440px;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 1rem;
}
.right {
	flex: 0 1 520px;
	min-width: 20rem;
	max-width: 520px;
	word-wrap: break-word;
	padding: 1rem 0.5rem;
}
.container2 .title {
	font-size: 1.9rem;
	margin-bottom: 0.4rem;
}
.container2 li {
	font-size: 1.2rem;
	line-height: 1.45;
	padding: 0.3rem 0.5rem;
}
main {
	max-height: 52vh;
	width: 100%;
	max-width: 440px;
}
.skill-container {
	gap: 0.75rem;
	margin-top: 0.25rem;
}
.skill-item {
	padding: 8px 10px;
	font-size: 1.05rem;
}
.skill-item > img {
	width: 3rem;
}
.skill-item > h4 {
	font-size: 1rem;
}

/* page 3 (projects): picture-only grid sized to fit one snap view */
.project-section {
	width: 100%;
	max-width: 820px;
	margin: 0 auto;
	padding: 1rem 1.5rem;
}
.project-section > .title {
	text-align: center;
	font-size: 1.9rem;
	margin-bottom: 1.25rem;
}
.project-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
	width: 100%;
}
.project-tile {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	cursor: pointer;
	background: #000;
	border: 2px solid #fff;
}
.project-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* desktop: size tiles so title + 2 rows fit within one snap viewport */
@media (min-width: 769px) {
	.project-tile {
		aspect-ratio: auto;
		height: clamp(160px, 34vh, 300px);
	}
	.project-grid {
		gap: 1rem;
	}
}
.project-date {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 2;
	padding: 0.3em 0.7em;
	font-size: 0.9rem;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
}
.project-overlay {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1rem;
	overflow: hidden;
}
/* same reveal animation as .skill-item::before */
.project-overlay::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	transform: scaleX(0);
	transform-origin: bottom right;
	background: var(--main-color);
	z-index: 0;
	transition: transform 0.3s ease;
}
.project-tile:hover .project-overlay::before,
.project-tile:focus-within .project-overlay::before,
.project-tile:focus .project-overlay::before {
	transform: scaleX(1);
	transform-origin: bottom left;
}
.project-info {
	position: relative;
	z-index: 1;
	opacity: 0;
	transition: opacity 0.2s ease 0.1s;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}
.project-tile:hover .project-info,
.project-tile:focus-within .project-info,
.project-tile:focus .project-info {
	opacity: 1;
}
.project-info h3 {
	font-size: 1.35rem;
	margin: 0;
}
.project-info p {
	font-size: 1.1rem;
	line-height: 1.4;
	opacity: 0.85;
	margin: 0;
}
.project-visit {
	display: inline-block;
	padding: 0.4em 0.9em;
	background-color: #000;
	color: white;
	text-decoration: none;
	font-size: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.25);
}
.project-visit:hover,
.project-visit:focus-visible {
	background-color: #fff;
	color: #181818;
}
/* touch / no-hover: tap (focus) still reveals via :focus-within above */
@media (hover: none) {
	.project-tile {
		cursor: default;
	}
}

/* mobile: pages 2 (about + skills) and 3 (projects) */
@media (max-width: 768px) {
	/* proximity instead of mandatory on mobile: still snaps, but lets
	   tall pages (2 & 3) scroll normally instead of being skipped */
	html {
		scroll-snap-type: y proximity;
	}

	.container2 {
		flex-direction: column;
		gap: 1.5rem;
		padding: 3.5rem 1rem 2.5rem;
	}

	.left,
	.right {
		flex: none;
		width: 100%;
		max-width: 100%;
		padding: 0;
	}
	.right {
		min-width: 0;
	}
	.container2 .title {
		font-size: 1.6rem;
	}
	.container2 li {
		font-size: 1.1rem;
		line-height: 1.5;
		padding: 0.3rem 0.5rem;
	}

	main {
		max-height: 38vh;
	}

	.skill-container {
		gap: 0.75rem;
	}
	.skill-item {
		padding: 8px 10px;
		font-size: 1rem;
	}
	.skill-item > img {
		width: 2.5rem;
	}
	.skill-item > h4 {
		font-size: 0.9rem;
	}

	.project-section {
		padding: 1rem 1rem 2rem;
	}
	.project-section > .title {
		font-size: 1.6rem;
		margin-bottom: 1.25rem;
	}
	.project-grid {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}
	.project-tile {
		aspect-ratio: auto;
		height: clamp(100px, 24vh, 200px);
	}
	.project-info h3 {
		font-size: 1.1rem;
	}
	.project-info p {
		font-size: 0.95rem;
	}
}

/* phones: make project tiles even smaller */
@media (max-width: 480px) {
	.project-section > .title {
		font-size: 1.4rem;
		margin-bottom: 1rem;
	}
	.project-grid {
		gap: 1rem;
	}
	.project-tile {
		height: clamp(90px, 22vh, 170px);
	}
	.project-date {
		font-size: 0.75rem;
		padding: 0.2em 0.5em;
	}
}
.contact-section {
	width: 100%;
	max-width: 950px;
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
	text-align: center;
}
.contact-section > .title {
	font-size: 2rem;
	margin-bottom: 1.5rem;
}
.contact-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
}
.contact-links img {
	width: 3rem;
	height: auto;
	display: block;
}
.contact-links a {
	color: white;
	text-decoration: none;
}

/* header */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.8rem 1.5rem;
	background-color: rgba(24, 24, 24, 0.6);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-logo {
	font-weight: 700;
	font-size: 1.1rem;
	color: #fff;
	text-decoration: none;
	letter-spacing: -0.02em;
}
.site-nav {
	display: flex;
	gap: 0.25rem;
	flex-wrap: wrap;
}
.site-nav a {
	color: #fff;
	text-decoration: none;
	padding: 0.4rem 0.75rem;
	border-radius: 6px;
	font-size: 1rem;
	opacity: 0.85;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible {
	background-color: rgba(255, 255, 255, 0.12);
	opacity: 1;
}
.site-nav a[aria-current="page"] {
	opacity: 1;
	border-bottom: 2px solid #fff;
}

/* global mouse-following background blob (deep layer, all pages) */
.bg-blob {
	position: fixed;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
}
.bg-blob .blob {
	position: absolute;
	width: 80vmax;
	height: 80vmax;
	top: 50%;
	left: 50%;
	margin-left: -40vmax;
	margin-top: -40vmax;
	background: radial-gradient(
		ellipse at center,
		var(--main-color),
		rgba(24, 24, 24, 0) 65%
	);
	filter: blur(120px);
	opacity: 0.55;
	/* eased mouse-follow driven by --blob-x / --blob-y updated each frame in eye.js */
	transform: translate(var(--blob-x, 0px), var(--blob-y, 0px));
	will-change: transform, background;
}
/* subtle idle drift so it never looks fully static */
.bg-blob .blob {
	animation: blob-idle 14s infinite ease-in-out;
}
@keyframes blob-idle {
	0%,
	100% {
		transform: translate(var(--blob-x, 0px), var(--blob-y, 0px)) scale(1);
	}
	50% {
		transform: translate(var(--blob-x, 0px), var(--blob-y, 0px)) scale(1.08);
	}
}
/* all content sections sit above the fixed background layer */
.blob-container,
.container2,
.page-3,
.page-4,
.blog-page {
	position: relative;
	z-index: 1;
}

/* blog page */
.blog-page {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 5rem 1.5rem 2rem;
}
.blog-page > .title {
	font-size: 2.4rem;
	margin-bottom: 1.5rem;
}
.blog-empty p {
	font-size: 1.2rem;
	opacity: 0.8;
}

@media (max-width: 768px) {
	.site-header {
		padding: 0.6rem 1rem;
	}
	.site-nav a {
		padding: 0.3rem 0.5rem;
		font-size: 0.9rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.project-overlay::before,
	.project-info {
		transition: none;
	}
	.bg-blob .blob {
		animation: none;
	}
}
