/* ==========================================================================
   Header Styles
   ========================================================================== */

/* Site Header */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 4rem; /* 64px */
	background-color: rgba(18, 18, 20, 0.95);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	z-index: 100;
	transition: all 0.3s ease;
}

.site-header.scrolled {
	background-color: rgba(18, 18, 20, 0.98);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Logo and Site Title */
.site-logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.site-logo:hover {
	opacity: 0.8;
}

.logo-icon {
	display: inline-block;
	color: #60a5fa;
}

.site-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: white;
}

/* Desktop Navigation */
.desktop-nav {
	display: none;
}

.nav-menu {
	display: flex;
	align-items: center;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-link {
	color: white;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
	color: #60a5fa;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 2.5rem;
	height: 2.5rem;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	border-radius: 0.375rem;
	transition: all 0.2s ease;
	gap: 0.25rem;
}

.mobile-menu-toggle:hover {
	background-color: rgba(96, 165, 250, 0.15);
}

.hamburger-line {
	width: 1.25rem;
	height: 2px;
	background-color: #60a5fa;
	transition: all 0.3s ease;
	transform-origin: center;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
	transform: rotate(45deg) translate(3px, 3px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
	opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
	transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	z-index: 40;
	transition: opacity 0.3s ease;
	opacity: 1;
}

.mobile-menu-overlay.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* Mobile Menu */
.mobile-menu {
	position: fixed;
	top: 4rem;
	right: 0;
	width: 16rem;
	max-height: calc(100vh - 4rem);
	overflow-y: auto;
	background-color: rgba(17, 24, 39, 0.98);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.4);
	z-index: 50;
	border-left: 1px solid rgba(255, 255, 255, 0.1);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	border-bottom-left-radius: 0.5rem;
	transition: transform 0.3s ease-out, opacity 0.3s ease-out;
	transform: translateX(0);
	opacity: 1;
}

.mobile-menu.hidden {
	transform: translateX(100%);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.mobile-nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-nav-menu a,
.mobile-nav-link {
	display: block;
	padding: 0.875rem 1.25rem;
	color: rgba(255, 255, 255, 0.9);
	text-decoration: none;
	font-weight: 500;
	text-align: right;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	transition: all 0.2s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:focus,
.mobile-nav-link:hover,
.mobile-nav-link:focus {
	background-color: rgba(96, 165, 250, 0.15);
	color: #60a5fa;
	border-right: 3px solid #60a5fa;
}

.mobile-nav-menu .current-menu-item a {
	color: #60a5fa;
	background-color: rgba(96, 165, 250, 0.1);
	border-right: 3px solid #60a5fa;
}

/* Scrollbar Styling */
.mobile-menu::-webkit-scrollbar {
	width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 3px;
}

.mobile-menu::-webkit-scrollbar-thumb {
	background: rgba(96, 165, 250, 0.6);
	border-radius: 3px;
	transition: background 0.2s ease;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
	background: rgba(96, 165, 250, 0.8);
}

/* Body Padding for Fixed Header */
body {
	padding-top: 4rem;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

/* Desktop Styles */
@media (min-width: 768px) {
	.desktop-nav {
		display: block;
	}
	
	.mobile-menu-toggle,
	.mobile-menu,
	.mobile-menu-overlay {
		display: none !important;
	}
	
	.site-header {
		background-color: rgba(18, 18, 20, 0.92);
		backdrop-filter: blur(14px);
		-webkit-backdrop-filter: blur(14px);
	}
	
	.site-header.scrolled {
		background-color: rgba(18, 18, 20, 0.96);
		backdrop-filter: blur(18px);
		-webkit-backdrop-filter: blur(18px);
	}
}

/* Small Mobile Devices */
@media (max-width: 480px) {
	.mobile-menu {
		width: 100%;
		right: 0;
		left: 0;
		border-radius: 0;
		border-left: none;
		border-top: 1px solid rgba(255, 255, 255, 0.15);
		box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.4);
	}
	
	.mobile-nav-menu a {
		text-align: center;
		padding: 1rem 1.25rem;
	}
	
	.mobile-nav-menu a:hover,
	.mobile-nav-menu a:focus {
		border-right: none;
		border-bottom: 3px solid #60a5fa;
	}
}

/* Focus Styles for Accessibility */
.nav-link:focus,
.mobile-nav-menu a:focus,
.mobile-menu-toggle:focus {
	outline: 2px solid #60a5fa;
	outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.site-header,
	.mobile-menu,
	.mobile-menu-overlay,
	.hamburger-line,
	.nav-link,
	.mobile-nav-menu a {
		transition: none;
	}
}