/*
Theme Name: Maxim Perry Portfolio
Theme URI: https://maximperry.ca
Author: Maxim Perry
Author URI: https://maximperry.ca
Description: A clean, single-column portfolio theme with a frosted-glass project grid. Built to recreate the existing maximperry.ca design while making content, projects, menus, and styling editable through WordPress.
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: maximperry
*/

/* ---------------------------------------------------------------
   Base
   --------------------------------------------------------------- */
:root {
	--mp-text: #ffffff;
	--mp-text-muted: rgba(255, 255, 255, 0.85);
	--mp-bg-overlay: rgba(0, 0, 0, 0.25);
	--mp-card-bg: rgba(255, 255, 255, 0.18);
	--mp-card-border: rgba(255, 255, 255, 0.25);
	--mp-card-radius: 12px;
	--mp-accent: #bfa07a;
	--mp-max-width: 980px;
	--mp-gutter: 2rem;
	--mp-font: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--mp-bg-image: none;
}

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

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--mp-font);
	font-weight: 300;
	line-height: 1.6;
	color: var(--mp-text);
	background-color: #1a120b;
	background-image: var(--mp-bg-image);
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
	background-repeat: no-repeat;
}

body::before {
	content: '';
	position: fixed;
	inset: 0;
	background: var(--mp-bg-overlay);
	backdrop-filter: blur(3px);
	z-index: -1;
}

a {
	color: var(--mp-text);
	text-decoration: none;
	transition: opacity 0.2s ease, color 0.2s ease;
}

a:hover,
a:focus {
	opacity: 0.85;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	font-weight: 300;
	line-height: 1.2;
}

p {
	margin: 0 0 1em;
}

/* ---------------------------------------------------------------
   Layout
   --------------------------------------------------------------- */
.site {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.container {
	width: 100%;
	max-width: var(--mp-max-width);
	margin: 0 auto;
	padding: 0 var(--mp-gutter);
}

.site-content {
	flex: 1 0 auto;
	padding: 2.5rem 0 4rem;
}

/* ---------------------------------------------------------------
   Header / Branding
   --------------------------------------------------------------- */
.site-header {
	padding-top: 4rem;
	padding-bottom: 2rem;
}

.site-branding {
	margin-bottom: 2rem;
}

.site-title {
	margin: 0;
	font-weight: 300;
	font-size: 3rem;
	line-height: 1;
	letter-spacing: 0.02em;
}

.site-title a {
	display: inline-flex;
	flex-direction: column;
}

.site-title-first {
	font-size: 0.55em;
	font-weight: 300;
}

.site-title-last {
	font-size: 1em;
	font-weight: 300;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.site-tagline {
	margin: 0.4rem 0 0;
	font-size: 1rem;
	color: var(--mp-text-muted);
}

.custom-logo-link {
	display: inline-block;
	max-width: 320px;
}

.custom-logo-link img {
	height: auto;
	max-height: 120px;
	width: auto;
}

/* ---------------------------------------------------------------
   Navigation
   --------------------------------------------------------------- */
.main-navigation {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 255, 255, 0.35);
	padding-bottom: 0.5rem;
}

.menu-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--mp-text-muted);
	color: var(--mp-text);
	padding: 0.4rem 0.8rem;
	font: inherit;
	cursor: pointer;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 2.2rem;
}

.main-navigation li {
	position: relative;
}

.main-navigation a {
	font-size: 0.95rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.25rem 0.1rem;
}

.main-navigation .current-menu-item a,
.main-navigation .current_page_item a,
.main-navigation a:hover,
.main-navigation a:focus {
	border-bottom: 2px solid var(--mp-text);
	margin-bottom: -2px;
}

.language-switcher {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.6rem;
}

.language-switcher a {
	font-size: 0.95rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* ---------------------------------------------------------------
   Homepage sections
   --------------------------------------------------------------- */
.home-intro {
	margin-bottom: 3rem;
}

.section-title {
	font-size: 1.5rem;
	font-weight: 300;
	margin-bottom: 1rem;
}

.intro-text {
	max-width: 720px;
	font-size: 1rem;
	color: var(--mp-text-muted);
}

.intro-text a {
	text-decoration: underline;
	color: var(--mp-text);
}

.projects-section {
	margin-top: 2rem;
}

.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.4rem;
	margin-top: 1.5rem;
}

.project-card {
	background: var(--mp-card-bg);
	border: 1px solid var(--mp-card-border);
	border-radius: var(--mp-card-radius);
	overflow: hidden;
	backdrop-filter: blur(8px);
	transition: transform 0.2s ease, background 0.2s ease;
}

.project-card:hover,
.project-card:focus-within {
	transform: translateY(-3px);
	background: rgba(255, 255, 255, 0.26);
}

.project-link {
	display: block;
}

.project-thumbnail {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
}

.project-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.project-thumbnail-placeholder {
	width: 60%;
	height: 60%;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 50%;
}

.project-meta {
	padding: 0.9rem;
	text-align: center;
}

.project-title {
	font-size: 1rem;
	font-weight: 400;
	margin: 0 0 0.2rem;
}

.project-type {
	font-size: 0.85rem;
	color: var(--mp-text-muted);
	margin: 0;
}

.no-projects {
	color: var(--mp-text-muted);
	font-style: italic;
}

/* ---------------------------------------------------------------
   Single page / project
   --------------------------------------------------------------- */
.entry-header {
	margin-bottom: 1.5rem;
}

.entry-title {
	font-size: 2rem;
	font-weight: 300;
	margin-bottom: 0.3rem;
}

.entry-content {
	font-size: 1rem;
	color: var(--mp-text-muted);
	max-width: 720px;
}

.entry-content p {
	margin-bottom: 1rem;
}

.entry-content a {
	text-decoration: underline;
}

.project-featured-image {
	margin-bottom: 1.5rem;
	border-radius: var(--mp-card-radius);
	overflow: hidden;
}

.project-featured-image img {
	width: 100%;
	height: auto;
}

.project-type-single {
	font-size: 0.95rem;
	color: var(--mp-text-muted);
	margin: 0;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer {
	padding: 1.5rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.copyright {
	margin: 0;
	font-size: 0.85rem;
	color: var(--mp-text-muted);
}

/* ---------------------------------------------------------------
   Accessibility helpers
   --------------------------------------------------------------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 768px) {
	.site-header {
		padding-top: 2.5rem;
	}

	.site-title {
		font-size: 2.2rem;
	}

	.menu-toggle {
		display: block;
	}

	.main-navigation {
		flex-wrap: wrap;
	}

	.main-navigation ul {
		display: none;
		flex-direction: column;
		width: 100%;
		gap: 0.8rem;
		padding-top: 1rem;
	}

	.main-navigation ul.toggled {
		display: flex;
	}

	.language-switcher {
		margin-left: auto;
	}

	.projects-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
}

@media (max-width: 480px) {
	.projects-grid {
		grid-template-columns: 1fr;
	}

	.main-navigation {
		justify-content: flex-end;
	}

	.site-branding {
		width: 100%;
	}
}
