.page-homepage {
	background: var(--color-bg);
	color: var(--color-text);
}

@keyframes float2 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(-40px, -60px) scale(1.15); }
}

@keyframes float3 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	25% { transform: translate(-30px, 20px) scale(1.1); }
	75% { transform: translate(20px, -30px) scale(0.9); }
}

.left-panel {
	flex: 0 0 45%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem;
	background: var(--color-panel-gradient);
	color: var(--color-text);
	position: relative;
	overflow: hidden;
}

.left-panel-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	overflow: hidden;
}

.floating-shape {
	position: absolute;
	border-radius: 50%;
	opacity: 0.08;
	filter: blur(40px);
}

.shape-1 {
	width: 300px;
	height: 300px;
	background: var(--green-primary);
	top: -100px;
	left: -50px;
}

.shape-2 {
	width: 200px;
	height: 200px;
	background: #3b82f6;
	bottom: -50px;
	right: -30px;
	animation: float2 25s ease-in-out infinite;
}

.shape-3 {
	width: 150px;
	height: 150px;
	background: #f59e0b;
	top: 50%;
	left: 60%;
	animation: float3 18s ease-in-out infinite;
}

.brand-content,
.dashboard-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	position: relative;
	z-index: 1;
}

.brand-content {
	max-width: 500px;
}

.welcome-header {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.welcome-header .logo {
	width: 110px;
	flex-shrink: 0;
}

.welcome-header .logo img {
	width: 100%;
	height: auto;
	filter: drop-shadow(0 0 20px rgba(74, 124, 41, 0.3));
}

[data-theme="high-contrast"] .welcome-header .logo img {
	filter: none;
}

.welcome-title {
	display: flex;
	flex-direction: column;
}

.welcome-title h1 {
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--color-text-muted);
	margin-bottom: 0.5rem;
	letter-spacing: 0.02em;
}

.welcome-title .text-logo {
	width: 260px;
}

.brand-content .tagline {
	font-size: 1rem;
	color: var(--color-text-muted);
	line-height: 1.6;
	margin-bottom: 2.5rem;
}

.version-note {
	margin-top: 1.5rem;
	color: var(--color-text-muted);
	font-size: 0.875rem;
}

.version-note a {
	color: var(--color-accent);
	text-decoration: none;
	border-bottom: 1px solid var(--color-accent);
}

.version-note a:hover {
	color: var(--color-accent-hover);
	border-bottom-color: var(--color-accent-hover);
}

.cta-buttons {
	display: flex;
	gap: 1rem;
}

.right-panel {
	flex: 0 0 55%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	background: var(--color-bg-raised);
	position: relative;
	overflow: hidden;
}

.video-container {
	position: relative;
	width: 100%;
	max-width: 640px;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
}

/* Logged-in Dashboard */
.dashboard-content {
	width: 360px;
	max-width: 360px;
	gap: 2.5rem;
}

.welcome-section h1 {
	font-size: 2rem;
	font-weight: 500;
	color: var(--color-text);
	margin-bottom: 0.75rem;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.username-highlight {
	color: var(--color-accent);
	font-weight: 600;
}

.welcome-subtitle {
	font-size: 1.125rem;
	color: var(--color-text-muted);
	font-weight: 400;
	letter-spacing: 0.01em;
}

.primary-action {
	width: 100%;
}

.btn-large {
	width: 100%;
	padding: 1.125rem 2rem;
	font-size: 1.0625rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
}

.btn-large .btn-icon {
	width: 20px;
	height: 20px;
	display: block;
}

.quick-links {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 100%;
}

.quick-link {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 0.875rem 1rem;
	background: var(--color-card-bg);
	border-radius: 6px;
	color: var(--color-text-muted);
	text-decoration: none;
	border: 1px solid var(--color-card-border);
}

.quick-link:hover {
	background: var(--color-card-bg-hover);
	color: var(--color-text);
}

.link-icon,
.link-external-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.link-icon img,
.link-external-icon img {
	display: block;
	width: 100%;
	height: 100%;
	filter: var(--homepage-icon-filter, none);
}

.link-icon {
	width: 20px;
	height: 20px;
}

.link-icon img[src$="icon-projects.svg"],
.link-icon img[src$="icon-assets.svg"],
.link-icon img[src$="icon-tutorials.svg"],
.link-icon img[src$="icon-wiki.svg"] {
	filter: none;
}

.link-external-icon {
	width: 16px;
	height: 16px;
	color: var(--color-text-muted);
	opacity: 0.85;
	margin-left: auto;
}

.link-text {
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0.01em;
}

.featured-section {
	width: 100%;
	max-width: 700px;
	padding: 2rem 0;
}

.featured-section .section-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--color-text);
	margin-bottom: 1.5rem;
	letter-spacing: -0.01em;
}

.featured-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.25rem;
}

.featured-card {
	display: flex;
	flex-direction: column;
	background: var(--color-card-bg);
	border: 1px solid var(--color-card-border);
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: var(--color-text);
}

.project-thumbnail {
	width: 100%;
	aspect-ratio: 16 / 10;
	background: #1a1a1a;
	overflow: hidden;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.project-thumbnail img,
.project-thumbnail video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
}

.project-info {
	padding: 1rem;
}

.project-title {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--color-text);
	margin-bottom: 0.25rem;
	letter-spacing: -0.01em;
}

.project-author {
	font-size: 0.8125rem;
	color: var(--color-text-muted);
	font-weight: 400;
}

/* Video slideshow */

.video-slide {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	opacity: 0;
	pointer-events: none;
}

.video-slide.active {
	opacity: 1;
	pointer-events: auto;
}

.video-slide video {
	max-width: 100%;
	max-height: 45vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.video-caption {
	color: var(--color-text);
	font-size: 1.125rem;
	font-weight: 500;
	margin-top: 1.5rem;
	text-align: center;
	letter-spacing: -0.01em;
}

.video-indicators {
	display: flex;
	gap: 8px;
	margin-top: 1.5rem;
}

.indicator {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: none;
	background: var(--color-border);
	cursor: pointer;
	padding: 0;
}

.indicator:hover {
	background: var(--color-border-strong);
}

.indicator.active {
	background: var(--color-text);
	transform: scale(1.1);
}

@media (max-width: 980px) {
	.hero > .split-container {
		flex-direction: column;
	}

	.left-panel,
	.right-panel {
		flex: 0 0 auto;
		width: 100%;
		min-width: 0;
	}

	.left-panel {
		align-items: flex-start;
		padding: 2.5rem 1.5rem;
	}

	.right-panel {
		padding: 2rem 1.5rem 2.5rem;
	}

	.brand-content,
	.dashboard-content,
	.featured-section {
		width: 100%;
		max-width: none;
	}

	.video-container {
		max-width: none;
		min-height: 0;
	}

	.video-slide {
		position: static;
		top: auto;
		left: auto;
		transform: none;
		width: 100%;
		display: none;
	}

	.video-slide.active {
		display: flex;
	}

	.video-slide video {
		width: 100%;
		max-height: none;
	}

	.featured-section {
		padding: 0;
	}
}

@media (max-width: 640px) {
	.page-homepage .hero,
	.page-homepage .hero > .split-container {
		min-height: 0;
	}

	.page-homepage .hero > .split-container {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
	}

	.left-panel,
	.right-panel {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}

	.page-homepage .right-panel {
		display: none;
	}

	.left-panel {
		flex: 1 1 auto;
		width: 100%;
		min-height: 0;
		align-items: center;
		padding-top: 2rem;
		padding-bottom: 1.25rem;
	}

	.page-homepage .left-panel {
		padding-bottom: 2.5rem;
	}

	.brand-content,
	.dashboard-content,
	.featured-section {
		max-width: 22rem;
		margin: 0 auto;
	}

	.welcome-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}

	.welcome-header .logo {
		width: 104px;
	}

	.welcome-title .text-logo {
		width: min(250px, 100%);
	}

	.brand-content {
		align-items: flex-start;
		text-align: left;
	}

	.welcome-title {
		align-items: flex-start;
	}

	.brand-content .tagline {
		margin-bottom: 2rem;
		font-size: 0.95rem;
		max-width: 20rem;
	}

	.cta-buttons {
		width: 100%;
		flex-direction: column;
	}

	.cta-buttons .btn,
	.btn-large {
		width: 100%;
	}

	.version-note {
		text-align: left;
	}

	.dashboard-content {
		gap: 2rem;
	}

	.welcome-section h1 {
		font-size: 1.75rem;
	}

	.welcome-subtitle {
		font-size: 1rem;
	}

	.quick-link {
		padding: 0.8125rem 0.9375rem;
	}

	.featured-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.project-info {
		padding: 0.875rem;
	}

	.video-caption {
		font-size: 1rem;
		margin-top: 1rem;
	}

	.right-panel {
		padding-top: 1rem;
	}

	.video-container {
		max-width: 22rem;
		margin: 0 auto;
	}
}

@media (max-width: 480px) {
	.left-panel {
		padding-top: 2rem;
		padding-bottom: 1rem;
	}

	.right-panel {
		padding-top: 0.75rem;
		padding-bottom: 2rem;
	}

	.welcome-title h1 {
		font-size: 1.125rem;
	}

	.welcome-header .logo {
		width: 112px;
	}

	.welcome-title .text-logo {
		width: min(230px, 100%);
	}

	.version-note {
		font-size: 0.8125rem;
	}

	.welcome-section h1 {
		font-size: 1.625rem;
	}

	.btn-large {
		padding: 1rem 1.25rem;
	}

	.video-indicators {
		margin-top: 1rem;
	}
}

