/* ================================
   Custom Styles - Juan Lange Portfolio
   ================================ */

/* Lenis Smooth Scroll */
html.lenis {
	height: 100%;
}

.lenis.lenis-smooth {
	scroll-behavior: auto;
}

/* Base Styles */
body {
	background-color: #f5f5f5;
	color: #111111;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

html {
	scroll-behavior: smooth;
}

::selection {
	background-color: #eb3a14;
	color: white;
}

/* ================================
   Custom Cursor
   ================================ */
@media (pointer: fine) {
	body {
		cursor: none;
	}

	.cursor-dot,
	.cursor-circle {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		transform: translate(-50%, -50%);
		pointer-events: none;
		z-index: 9999;
		mix-blend-mode: exclusion;
	}

	.cursor-dot {
		width: 6px;
		height: 6px;
		background: white;
		border-radius: 50%;
	}

	.cursor-circle {
		width: 32px;
		height: 32px;
		border: 1px solid white;
		border-radius: 50%;
		transition: width 0.2s, height 0.2s, background-color 0.2s;
	}

	body:hover .cursor-circle {
		opacity: 1;
	}

	.hover-active .cursor-circle {
		width: 64px;
		height: 64px;
		background-color: rgba(255, 255, 255, 0.1);
		border-color: transparent;
	}
}

@media (pointer: coarse) {
	.cursor-dot,
	.cursor-circle {
		display: none !important;
	}

	body {
		cursor: auto;
	}
}

/* ================================
   Typography & Utilities
   ================================ */
.text-balance {
	text-wrap: balance;
}

.loader {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: #111111;
	display: flex;
	justify-content: center;
	align-items: center;
	color: #f5f5f5;
}

.magnetic-btn {
	display: inline-block;
	will-change: transform;
}

/* ================================
   Hero Animations
   ================================ */
.hero-char {
	display: inline-block;
	opacity: 0;
	filter: blur(12px);
	transform: translateY(20px);
	will-change: transform, opacity, filter;
}

.hero-fade-in {
	opacity: 0;
	filter: blur(200px);
	transform: translateY(500px);
	will-change: opacity, transform, filter;
}

/* Build Text Animation */
.build-text-line {
	opacity: 1;
	filter: blur(0px);
	will-change: opacity, transform, filter;
}

.build-dot {
	display: inline-block;
	opacity: 1;
	scale: 1;
	will-change: opacity, transform;
}

/* ================================
   Marquee
   ================================ */
.marquee-track {
	display: flex;
	white-space: nowrap;
	width: max-content;
	will-change: transform;
	animation: marquee 40s linear infinite;
}

@keyframes marquee {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

/* ================================
   Project Cards
   ================================ */
.project-card .project-img {
	transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.5s;
}

.project-card:hover .project-img {
	transform: scale(1.03);
}

/* ================================
   Timeline
   ================================ */
.timeline-mask {
	mask-image: linear-gradient(
		to bottom,
		transparent 0%,
		black 15%,
		black 85%,
		transparent 100%
	);
	-webkit-mask-image: linear-gradient(
		to bottom,
		transparent 0%,
		black 15%,
		black 85%,
		transparent 100%
	);
}

.no-scrollbar::-webkit-scrollbar {
	display: none;
}

.no-scrollbar {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

/* ================================
   Scroll Indicator
   ================================ */
.scroll-down {
	text-decoration: none;
}

#scroll-indicator {
	z-index: 60;
	transition: opacity 0.45s cubic-bezier(0.22, 0.88, 0.32, 1),
		transform 0.45s cubic-bezier(0.22, 0.88, 0.32, 1);
	opacity: 0;
	transform: translate(-50%, -12px);
}

#scroll-indicator.scrolled-hidden {
	opacity: 0;
	transform: translate(-50%, -12px);
	pointer-events: none;
}

.mouse {
	display: inline-block;
	width: 30px;
	height: 48px;
	border: 2px solid rgba(17, 17, 17, 0.9);
	border-radius: 18px;
	position: relative;
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.02);
}

.mouse .wheel {
	position: absolute;
	left: 50%;
	top: 8px;
	width: 4px;
	height: 8px;
	background: rgba(17, 17, 17, 0.95);
	border-radius: 2px;
	transform: translateX(-50%);
	animation: wheel-drop 1.4s cubic-bezier(0.22, 0.88, 0.32, 1) infinite;
	opacity: 0;
}

@keyframes wheel-drop {
	0% {
		opacity: 0;
		transform: translate(-50%, 0);
	}
	20% {
		opacity: 1;
		transform: translate(-50%, 4px);
	}
	60% {
		opacity: 1;
		transform: translate(-50%, 18px);
	}
	100% {
		opacity: 0;
		transform: translate(-50%, 26px);
	}
}

.scroll-down:focus .mouse,
.scroll-down:hover .mouse {
	box-shadow: 0 0 0 6px rgba(17, 17, 17, 0.06);
}

@media (pointer: coarse) {
	#scroll-indicator {
		display: none !important;
	}
}

/* ================================
   Dot Navigation
   ================================ */
#dot-nav .dot-nav-link {
	width: 10px;
	height: 10px;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.18);
	display: block;
	transition: transform 0.28s cubic-bezier(0.22, 0.88, 0.32, 1),
		background-color 0.28s, box-shadow 0.28s;
	box-shadow: none;
	outline: none;
}

#dot-nav .dot-nav-link.active {
	background: #ffffff;
	transform: scale(1.25);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

#dot-nav {
	z-index: 60;
	mix-blend-mode: difference;
}

@media (max-width: 767px) {
	#dot-nav {
		display: none !important;
	}
}

#dot-nav .dot-rail-line {
	display: block;
	width: 2px;
	height: 88px;
	margin-top: 6px;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 2px;
	transition: background-color 0.2s, transform 0.2s;
	mix-blend-mode: difference;
}

#dot-nav .dot-social-link {
	width: 36px;
	height: 36px;
	border-radius: 9999px;
	display: inline-grid;
	place-items: center;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.02);
	transition: transform 0.18s ease, background-color 0.18s ease;
	mix-blend-mode: difference;
	box-shadow: none;
	border: 1px solid rgba(255, 255, 255, 0.04);
}

#dot-nav .dot-social-link:hover,
#dot-nav .dot-social-link:focus {
	transform: translateY(-4px) scale(1.03);
	background: rgba(255, 255, 255, 0.06);
	outline: none;
}

#dot-nav svg,
#dot-nav .dot-social-link svg,
#dot-nav .dot-social-link i {
	mix-blend-mode: difference;
}

/* ================================
   Mobile Responsive
   ================================ */
.mobile-stack {
	display: flex;
	flex-direction: column;
}

@media (min-width: 768px) {
	.mobile-stack {
		flex-direction: row;
	}
}
