/* Desktop (1024px and above) */
@media screen and (min-width: 1024px) {
    .title-bar {
        flex-direction: row;
        padding: 2rem;
    }
    .profile-image {
        width: 11rem;
        height: 11rem;
    }
    .project-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
        margin-bottom: 4rem;
    }
    /* .project-image {
        width: 35rem ;
        height: 35rem ;
    } */
    .card-details {
        width: 30rem;
        margin-left: 1rem;
    }
    .home-body, .projects-body, .about-body {
        padding: 8.75rem 2rem 2rem 2rem;
    }
}

/* Tablet (768px to 1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    body {
        font-size: 1rem;
    }
    .title-bar {
        flex-direction: row;
        padding: 1.5rem;
        align-items: center;
    }
    .left-side, .right-side {
        width: auto;
    }
    .profile-image {
        width: 8rem;
        height: 8rem;
    }
    .nav-icons {
        gap: 1rem;
    }
    .project-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    .project-image {
        width: 50%;
        max-width: 400px;
        height: auto;
    }
    .card-details {
        width: 50%;
        margin-left: 0;
    }
    .home-body, .projects-body, .about-body {
        padding: 7rem 1.5rem 1.5rem 1.5rem;
    }
    h1 {
        font-size: 2.5rem !important;
    }
    .subtitle, .rotating-text {
        font-size: 1.2rem !important;
    }
}

/* Mobile (under 768px) */
@media screen and (max-width: 767px) {
    body {
        font-size: 1rem;
        padding: 0;
    }
	.title-icon{
		margin-bottom: 1.3rem;
		margin-right: 1rem;
	}
	.title{
		justify-content: center;
		align-items: center;
		margin-right: 1.2rem;
	}
    .title-bar {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
        text-align: center;
    }
	.title-bar p{
		display:none;
	}
    .left-side, .right-side {
        width: 100%;
        flex-direction: column;
        align-items: center;
        margin-bottom: 0.5rem;
    }
    .nav-icons {
        flex-wrap: wrap;
        justify-content: center;
		/* margin-left: 3rem; */
        gap: 0.5rem;
    }
    .icon {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
        margin-right: 0.25rem;
        min-width: 70px;
    }
    .profile-image {
        width: 6rem;
        height: 6rem;
        margin: 0.5rem 0;
		margin-top: 0 !important;
    }
	.profile-image {
		display: block;
		margin-left: auto;
		margin-right: auto;
	}
	.home-body{
		margin-top: 4rem;
	}
	.home-body button{
		margin-left: auto;
		margin-right: auto;
	}
    .home-body, .projects-body, .about-body {
        padding: 10rem 1rem 1rem 1rem !important;
        text-align: center;
    }
    .project-card {
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-bottom: 2.5rem;
        gap: 1rem;
    }
    .project-image {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    .card-details {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 1rem;
    }
    .card-details p {
        width: 100%;
        font-size: 0.9rem;
        text-align: left;
    }
    .lang span {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
        margin: 0.1rem;
    }
    h1 {
        font-size: 2rem !important;
    }
    h2, h3 {
        font-size: 1.2rem !important;
    }
    .subtitle, .rotating-text {
        font-size: 1rem !important;
    }
    .end {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
        text-align: center;
    }
    .logo img {
        height: 50px !important;
    }
    .about-body {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

.rotating-text {
	display: inline-block;
	transition: transform 0.6s cubic-bezier(.68,-0.55,.27,1.55), opacity 0.6s;
	will-change: transform, opacity;
}
.rotating-text.rotate-out {
	opacity: 0;
	transform: rotateX(90deg) scaleY(0.7);
}
.rotating-text.rotate-in {
	opacity: 1;
	transform: rotateX(0deg) scaleY(1);
}


body {
	margin: 0;
	height: 100vh;
	overflow: auto;
	font-family: 'Rubik', sans-serif;
	position: relative;
	color:#d1d1c7;
	cursor:none !important;
	background-color: rgb(0, 0, 0);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Custom cursor only for desktop devices */
@media (hover: hover) and (pointer: fine) {
    body, button, a, div, img {
        cursor: none !important;
    }

    .custom-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 40px;
        height: 40px;
        pointer-events: none;
        border-radius: 50%;
        background: radial-gradient(circle at 40% 40%, rgba(200,160,255,0.35) 0%, rgba(120,60,255,0.22) 80%, rgba(0,0,0,0.01) 100%);
        box-shadow: 0 0 24px 8px rgba(120,60,255,0.22), 0 0 0 3px rgba(255,255,255,0.18);
        z-index: 9999;
        transition: transform 0.15s cubic-bezier(.22,.68,.43,1.01), background 0.2s;
        mix-blend-mode: lighten;
        will-change: transform;
        display: block;
    }
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    body, button, a, div, img {
        cursor: auto !important;
    }

    .custom-cursor {
        display: none !important;
    }
}


.slide-in-left {
                opacity: 0;
                transform: translateX(-40px);
                animation: slideInLeft 0.7s forwards;
            }

.subtitle.slide-in-left {
                animation-delay: 0.2s;
            }
            @keyframes slideInLeft {
                to {
                    opacity: 1;
                    transform: translateX(0);
                }
            }

#bg-canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 0;
	display: block;
}

.profile-image {
	width: 11rem;
	height: 11rem;
	border-radius: 20%;
	margin-top: 6rem;
	z-index: 1;
}

.title-bar {
	padding: 1.5rem 2rem;
	display: flex;
	margin: 0;
	position: fixed; 
	top: 0;
	left: 0;
	right: 0;
	color: #d1d1c7;
	width: 100%;
	justify-content: space-between;
	align-items: center;
	background: rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	z-index: 1000;
	transform: translateZ(0);
	-webkit-transform: translateZ(0);
	will-change: transform;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

/* Compact title-bar when user scrolls down */
.title-bar,
.title-bar * {
	transition: all 220ms ease;
}
.title-bar .title-icon,
.title-bar .subtitle {
	transition: transform 260ms ease, opacity 260ms ease, max-height 260ms ease;
}
.title-bar .subtitle {
	/* allow smooth collapse */
	max-height: 48px;
	overflow: hidden;
}
.title-bar.compact {
	padding: 0.6rem 1rem 0.4rem 1rem;
}
.title-bar.compact .title-icon {
	opacity: 0;
	transform: translateY(-6px) scale(0.92);
	max-height: 0;
	pointer-events: none;
}
.title-bar.compact .title {
	margin-left: 0.75rem;
}
.title-bar.compact .subtitle {
	opacity: 0;
	transform: translateY(-4px) scale(0.98);
	max-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	pointer-events: none;
}
.title-bar.compact .nav-icons {
	gap: 0.4rem;
}
.title-bar.compact .nav-icons .icon {
	padding: 0.35rem 0.75rem;
	border-width: 3px;
}


.left-side {
	/* display: flex;
	align-items: center;
	flex: 1 1 0; */
}

.right-side {
	padding-right: 0;
	display: flex;
	justify-content: right;
	align-items: center;
	flex: 1 1 0;
}

.title-icon{
	display: flex;
	
	margin-left: .5rem;
	
}

.title{
	margin-left: 2rem;
}

.nav-icons{
	display: flex;
	justify-content: center;
	align-items: center;
}

.icon{
	display: flex;
	margin-right: 1rem;
	border: 4px solid #d1d1c7;
	border-radius: 50px;
	padding: 0.5rem 1rem;
	cursor: pointer;
	transition: background 0.3s, box-shadow 0.3s;
	background: rgba(30, 0, 60, 0.12);
	box-shadow: 0 0 0px 0px rgba(120,60,255,0.0);
}
.icon.active {
	background: rgba(120,60,255,0.18);
	box-shadow: 0 0 16px 4px rgba(120,60,255,0.25), 0 0 32px 8px rgba(180,120,255,0.18);
	border-color: #b478ff;
	color: #fff;
}


.icon:hover {
	background: rgba(255, 255, 255, 0.1);
}

.home-body {
	display: flex;
	position: relative;
	color: #d1d1c7;
	font-size: 3rem;
	/* height: 100%; */
	padding: 2rem;
	margin-top: 2.5rem;
	flex-direction: column;
	align-items: left;
	/* scroll-margin-top: 8.75rem; */
}

.home-body p{
	font-size: 1.5rem;
}
.header{
	display: flex;
	flex-direction:column;
	justify-content:center;

}

.front-body h1{
	margin:0;
}

.front-body h1 p{
	margin:0;
	font-size: 1.75rem;
}

p{
	display: flex;
	position:relative;
	color: #d1d1c7;
	font-size: 1.5rem;
	line-height: 1.6;
	margin: 1rem 0;
	overflow-wrap: break-word;
}

.projects-body{
	padding: 2rem;
	scroll-margin-top: 120px;
}

.project-card{
	display: flex;
}
.project-image {
        width: 35rem ;
        height: 35rem ;
    }
.project-card p{
	font-size: 1rem;
	/* height: 6rem; */
	width: 24rem;
}


.lang span{
	border: 3px solid lightgreen;
	border-radius:7px;
	color:#d1d1c7;
	padding:7px;
	margin-right: 5px;
	margin-bottom: 4rem;
}

.card-details button{
	border: 3px solid;
	background: #41b445;
	padding:10px;
	border-radius:10px;
	cursor:pointer;
	margin-top:1rem;
	transition: background 0.3s, box-shadow 0.3s;
}

.git-but span{
	color:black;
	font-size: 1rem;
	font-weight: bold;
}

.git-but:hover{
	transform: scale(1.05);
	box-shadow: 0 4px 8px rgba(52, 126, 18, 0.753);
}

.git-icon{
	width: 2px;
	height: 2px;
	margin-right: 0.5rem;
}

.card-details{
	border: 4px solid rgba(255, 255, 255, 0.1);
	border-radius:20px;
	margin-left:1rem;
	width: 30rem;
	padding:1rem;
	display:flex;
	flex-direction: column;
	position:relative;
	box-sizing: border-box;
}

.card-details p{
	font-size: 1rem;
	width: 100%;
	margin: 0.5rem 0;
	box-sizing: border-box;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.project-card img{
	max-width: 100%;
	width: 40rem;
	height: auto;
	aspect-ratio: 2 / 1;
	object-fit: cover;
	border: 4px solid rgba(255, 255, 255, 0.1);
	border-radius: 25px;
	box-sizing: border-box;
}

.project-card img:hover{
	border:4px solid rgb(150, 150, 150);
	transform: scale(1.05);
	box-shadow: 0 2px 4px rgb(150, 150, 150);
}

.about-body{
	padding: 2rem;
	scroll-margin-top: 120px;
}

.about-body p{
	margin: 0;
	line-height: 1.5;
	border:3px solid rgba(255, 255, 255, 0.1);
	padding: 1rem;
	border-radius: 10px;
	background: blur(8px);
}

.skills{
	display: flex;
	flex-wrap: wrap;
	margin-top: 1rem;
}

.skills span{
	background: rgba(255, 255, 255, 0.1);
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 5px;
	color: #d1d1c7;
	padding: 0.5rem 1rem;
	margin-right: 0.5rem;
	margin-bottom: 0.5rem;
	transition: background 0.3s, border 0.3s;
}

.skills span:hover{
	background: rgba(255, 255, 255, 0.2);
	border: 2px solid rgb(255, 153, 0);
}

.skill-box{
	/* flex: 1 1 30%; */
	min-width: 200px;
	margin: 0.5rem;
	padding: 1rem;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.05);
	transition: background 0.3s, border 0.3s;
}

.skill-box:hover{
	background: rgba(255, 255, 255, 0.1);
	border: 2px solid rgb(255, 153, 0);
}

.ski{
	margin-top: 0.5rem;
	display: flex;
	flex-wrap: wrap;
}

.end{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	color: #d1d1c7;
}

.end socials{
	display: flex;
	
	margin-top: 0.5rem;
}

.socials a{
	text-decoration: none;
}

.socials img{
	filter: invert(1);
}

.end logo{
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
}

.credits{
	text-align: center;
	margin-top: 1rem;
	font-size: 0.875rem;
	color: #d1d1c7;
}

/* From Uiverse.io by AqFox */ 
.spinner {
	width: 44px;
	height: 44px;
	animation: spinner-y0fdc1 2s infinite ease;
	transform-style: preserve-3d;
}

.spinner > div {
	background-color: rgba(0,77,255,0.2);
	height: 100%;
	position: absolute;
	width: 100%;
	border: 2px solid #004dff;
}

.spinner div:nth-of-type(1) {
	transform: translateZ(-22px) rotateY(180deg);
}

.spinner div:nth-of-type(2) {
	transform: rotateY(-270deg) translateX(50%);
	transform-origin: top right;
}

.spinner div:nth-of-type(3) {
	transform: rotateY(270deg) translateX(-50%);
	transform-origin: center left;
}

.spinner div:nth-of-type(4) {
	transform: rotateX(90deg) translateY(-50%);
	transform-origin: top center;
}

.spinner div:nth-of-type(5) {
	transform: rotateX(-90deg) translateY(50%);
	transform-origin: bottom center;
}

.spinner div:nth-of-type(6) {
	transform: translateZ(22px);
}

@keyframes spinner-y0fdc1 {
	0% {
	transform: rotate(45deg) rotateX(-25deg) rotateY(25deg);
	}

	50% {
	transform: rotate(45deg) rotateX(-385deg) rotateY(25deg);
	}

	100% {
	transform: rotate(45deg) rotateX(-385deg) rotateY(385deg);
	}
}

/* From Uiverse.io by mrhyddenn */ 
	.button {
	-moz-appearance: none;
	-webkit-appearance: none;
	appearance: none;
	border: none;
	background: none;
	color: #0f1923;
	cursor: pointer;
	position: relative;
	padding: 8px;
	margin-bottom: 20px;
	text-transform: uppercase;
	font-weight: bold;
	font-size: 14px;
	transition: all .15s ease;
	
	}

.button::before,
	.button::after {
	content: '';
	display: block;
	position: absolute;
	right: 0;
	left: 0;
	height: calc(50% - 5px);
	border: 1px solid #7D8082;
	transition: all .15s ease;
	}

	.button::before {
	top: 0;
	border-bottom-width: 0;
	}

	.button::after {
	bottom: 0;
	border-top-width: 0;
	}

	.button:active,
	.button:focus {
	outline: none;
	}

	.button:active::before,
	.button:active::after {
	right: 3px;
	left: 3px;
	}

	.button:active::before {
	top: 3px;
	}

	.button:active::after {
	bottom: 3px;
	}

	.button_lg {
	position: relative;
	display: block;
	padding: 10px 20px;
	color: #fff;
	background-color: #0f1923;
	overflow: hidden;
	box-shadow: inset 0px 0px 0px 1px transparent;
	}

	.button_lg::before {
	content: '';
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 2px;
	height: 2px;
	background-color: #0f1923;
	}

	.button_lg::after {
	content: '';
	display: block;
	position: absolute;
	right: 0;
	bottom: 0;
	width: 4px;
	height: 4px;
	background-color: #0f1923;
	transition: all .2s ease;
	}

	.button_sl {
	display: block;
	position: absolute;
	top: 0;
	bottom: -1px;
	left: -8px;
	width: 0;
	background-color: #ff4655;
	transform: skew(-15deg);
	transition: all .2s ease;
	}

	.button_text {
	position: relative;
	}

	.button:hover {
	color: #0f1923;
	}

	.button:hover .button_sl {
	width: calc(100% + 15px);
	}

	.button:hover .button_lg::after {
	background-color: #fff;
	}

.project-live-overlay {
	width: 48px;
	height: 48px;
	object-fit: contain;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s;
	z-index: 2;
}

.socials a img {
	transition: box-shadow 0.3s, transform 0.3s;
}
.socials a:hover img {
	transform: scale(1.15);
}