/* Theme colors */
:root {
	--bg-900: #0d0d10;
	--accent: rgba(239, 62, 82, 0.5);
	--muted: #9aa3ab;
}

body.bg-dark-900 {
	background-color: var(--bg-900);
}

/* Smooth global transitions */
* {
	transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

/* Navbar brand box */
.logo-box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: .5rem;
	background: linear-gradient(135deg, var(--accent), #9b1d2a);
	color: #fff;
	font-weight: 900;
}

/* Left pane with dotted grid */
.left-pane {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(4px);
	position: relative;
}

.left-pane .dots-bg {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
	background-size: 22px 22px;
	opacity: .5;
	animation: pulse 6s ease-in-out infinite;
	pointer-events: none;
	border-radius: .75rem;
}

@keyframes pulse {

	0%,
	100% {
		opacity: .35;
	}

	50% {
		opacity: .6;
	}
}

/* Social rail hover */
.social-link {
	text-decoration: none;
	transition: color .2s ease, transform .2s ease;
}

.social-link:hover {
	color: #fff !important;
	transform: translateX(2px);
}

.social-link i {
	color: var(--accent);
}

/* Vertical social links */
.social-link-vertical {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
	color: #9aa3ab;
	text-decoration: none;
	font-size: .85rem;
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
	transition: color .2s ease, transform .2s ease;
}

.social-link-vertical span {
	writing-mode: vertical-rl;
}

.social-link-vertical i {
	color: var(--accent);
	font-size: 1.1rem;
	transition: transform .2s ease;
}

.social-link-vertical:hover {
	color: #fff;
	transform: translateX(4px);
}

.social-link-vertical:hover i {
	transform: scale(1.15);
}

/* Floating animation for social rail */
.social-rail {
	animation: floatY 6s ease-in-out infinite;
	opacity: 0;
	transform: translateX(-20px);
	top: 20% !important;
}

.social-rail.fade-in {
	opacity: 1;
	transform: translateX(0);
	transition: opacity .8s ease, transform .8s ease;
}

@keyframes floatY {

	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-6px);
	}
}

/* Contact chips */
.contact-chip {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .5rem .8rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #cfd6dd;
	border-radius: 999px;
	text-decoration: none;
	background: rgba(255, 255, 255, 0.02);
	transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.contact-chip i {
	color: var(--accent);
}

.contact-chip:hover {
	background: rgba(239, 62, 82, 0.08);
	border-color: rgba(239, 62, 82, 0.5);
	color: #fff;
	transform: translateY(-1px);
}

/* Hero media overlay */
.gradient-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, rgba(239, 62, 82, 0.55), rgba(13, 13, 16, 0.35));
	mix-blend-mode: multiply;
}

/* Glossy shine over image */
.shine {
	position: absolute;
	top: 0;
	left: -50%;
	width: 40%;
	height: 100%;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .35) 50%, rgba(255, 255, 255, 0) 100%);
	transform: skewX(-20deg);
	filter: blur(2px);
	opacity: 0.0;
}

.hero-media:hover .shine {
	animation: shine-move 1.2s ease;
	opacity: 1;
}

@keyframes shine-move {
	from {
		left: -50%;
	}

	to {
		left: 120%;
	}
}

.hero-media img {
	display: block;
	object-fit: cover;
	height: auto;
}

.hero-portrait {
	height: clamp(280px, 48vh, 440px);
	object-fit: cover;
}

/* Tiny dots indicator */
.tiny-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.35);
}

.tiny-dot.active {
	background: var(--accent);
}

/* Animations: fade sequence and slide-in */
.fade-seq {
	opacity: 0;
	transform: translateY(6px);
}

.slide-in {
	opacity: 0;
	transform: translateX(30px);
}

.fade-in {
	opacity: 1 !important;
	transform: translateY(0) !important;
	transition: all .6s ease;
}

.slide-in-active {
	opacity: 1 !important;
	transform: translateX(0) !important;
	transition: all .8s ease;
}

/* Utilities */
.hero-section {
	color: #e8eaed;
}

/* Animated underline under heading */
.underline-animate {
	width: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--accent), rgba(239, 62, 82, 0));
	border-radius: 999px;
}

.fade-in+.underline-animate,
.underline-animate.appear {
	width: 120px;
	transition: width .6s ease .2s;
}

/* Hero name animation (clean looping shine sweep) */
.hero-name { position: relative; display: inline-block; overflow: visible; }
.hero-name .word { position: relative; display: inline-block; }
.hero-name .w1 { animation: none; }
.hero-name .w2 { animation: none; }
.hero-name::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 3px; background: linear-gradient(90deg, transparent, #ef3e52, transparent); transform: translateX(-120%); animation: name-underline 1s .25s ease forwards, name-underline-loop 3s 1.1s ease-in-out infinite; }

/* No shine overlay on text */

@keyframes name-in-left { from { transform: translateX(-22px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes name-in-right { from { transform: translateX(22px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes name-underline { to { transform: translateX(0); } }
@keyframes name-underline-loop { 0% { transform: translateX(-120%); opacity: .55; } 50% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(120%); opacity: .55; } }

/* Tilt subtle effect */
.tilt {
	will-change: transform;
	transform-style: preserve-3d;
}

/* Navbar on scroll */
#siteNav.scrolled {
	background-color: rgba(13, 13, 16, 0.8) !important;
	backdrop-filter: blur(6px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Reveal on scroll */
[data-reveal] {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .6s ease, transform .6s ease;
}

[data-reveal].is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Bottom controls and info bar */
.btn-square {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: .25rem;
}

.btn-square i {
	pointer-events: none;
}

.hero-bottom-bar {
	background: linear-gradient(180deg, rgba(13, 13, 16, 0), rgba(13, 13, 16, .75));
}

.hover-op-100:hover {
	opacity: 1 !important;
}

/* Professional Footer */
.footer-section {
	background: linear-gradient(180deg, rgba(13, 13, 16, 0.8), rgba(13, 13, 16, 0.95));
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(8px);
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .8s ease, transform .8s ease;
}

.footer-section.footer-animate {
	opacity: 1;
	transform: translateY(0);
}

.footer-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: .5rem;
	color: #9aa3ab;
	text-decoration: none;
	transition: all .25s ease;
	background: rgba(255, 255, 255, 0.02);
}

.footer-social-link i {
	font-size: 1.1rem;
	color: var(--accent);
	transition: transform .25s ease;
}

.footer-social-link:hover {
	border-color: var(--accent);
	background: rgba(239, 62, 82, 0.08);
	color: #fff;
	transform: translateY(-2px);
}

.footer-social-link:hover i {
	transform: scale(1.15);
}

.footer-links li {
	margin-bottom: .75rem;
}

.footer-links a {
	text-decoration: none;
	transition: color .2s ease;
}

.footer-links a:hover {
	color: var(--accent) !important;
}

.footer-border {
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(239, 62, 82, 0.3), transparent);
}

/* Page Navigation */
.page-navigation {
	background: rgba(13, 13, 16, 0.8);
	backdrop-filter: blur(10px);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-btn {
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	border: 2px solid rgba(255, 255, 255, 0.2);
}

.nav-btn:hover:not(:disabled) {
	background: var(--accent);
	border-color: var(--accent);
	transform: scale(1.05);
	box-shadow: 0 4px 15px rgba(239, 62, 82, 0.3);
}

.nav-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.nav-btn i {
	font-size: 1.2rem;
}

.nav-placeholder {
	width: 50px;
}

/* Ensure pages with fixed bottom controls leave space for footer */
.has-bottom-controls {
	padding-bottom: 96px;
}

/* Typing title caret */
.typing {
	border-right: 2px solid var(--accent);
	white-space: nowrap;
	overflow: hidden;
	min-width: 5ch;
	display: inline-block;
}

/* Global scroll direction animation helpers */
body.scrolling-down .scroll-animate,
body.scrolling-down .skill-card,
body.scrolling-down .card {
	transform: translateY(4px);
}

body.scrolling-up .scroll-animate,
body.scrolling-up .skill-card,
body.scrolling-up .card {
	transform: translateY(-4px);
}

.scroll-animate,
.skill-card,
.card {
	transition: transform .25s ease;
	will-change: transform;
}

/* Parallax on scroll (subtle) */
.parallax-el { will-change: transform; }