/* Fonts: Inter, Poppins are loaded in index.html */
/* Theme variables */
:root {
	--bg: #0b0f1a;
	--bg-2: #0d1222;
	--text: #e8ebff;
	--muted: #a9b2d6;
	--primary: #7c3aed; /* purple */
	--accent: #22d3ee;  /* cyan */
	--neon: #59f;       /* blue neon */
	--glass-bg: rgba(255, 255, 255, 0.08);
	--glass-stroke: rgba(255, 255, 255, 0.18);
	--blur: 16px;
	--radius: 16px;
	--shadow-soft: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
	--grad: radial-gradient(1200px 800px at 10% -10%, rgba(124, 58, 237, 0.35), transparent 60%), radial-gradient(1200px 800px at 110% 10%, rgba(34, 211, 238, 0.35), transparent 60%), linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
}

[data-theme="light"] {
	--bg: #edf1ff;
	--bg-2: #f7f8ff;
	--text: #0c0f1a;
	--muted: #445;
	--glass-bg: rgba(255, 255, 255, 0.6);
	--glass-stroke: rgba(17, 25, 40, 0.15);
	--shadow-soft: 0 10px 30px rgba(17, 25, 40, 0.12), inset 0 1px 0 rgba(255,255,255,0.7);
	--grad: radial-gradient(1200px 800px at 10% -10%, rgba(124, 58, 237, 0.15), transparent 60%), radial-gradient(1200px 800px at 110% 10%, rgba(34, 211, 238, 0.15), transparent 60%), linear-gradient(180deg, rgba(17,25,40,0.02), rgba(17,25,40,0));
}

* { box-sizing: border-box; }
html, body {
	padding: 0;
	margin: 0;
	scroll-behavior: smooth;
}
body {
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	min-height: 100vh;
	background-image: var(--grad);
}

/* Particles backdrop */
#particles {
	position: fixed;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(600px 400px at 80% -20%, rgba(89, 153, 255, 0.15), transparent 65%),
		radial-gradient(600px 400px at -10% 30%, rgba(124,58,237,0.18), transparent 60%);
}

/* Glass utility */
.glass {
	background: var(--glass-bg);
	backdrop-filter: blur(var(--blur));
	-webkit-backdrop-filter: blur(var(--blur));
	border: 1px solid var(--glass-stroke);
	border-radius: var(--radius);
	box-shadow: var(--shadow-soft);
}

/* Header / Nav */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px;
	margin: 12px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
}
.brand-mark {
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--primary), var(--accent));
	color: white;
	font-weight: 800;
	text-shadow: 0 0 10px rgba(255,255,255,0.5);
}
.brand-name { font-weight: 700; letter-spacing: 0.4px; }
.site-nav {
	display: flex;
	align-items: center;
	gap: 8px;
}
.nav-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 12px;
	color: var(--text);
	text-decoration: none;
	opacity: 0.9;
	transition: all .25s ease;
}
.nav-link:hover { opacity: 1; transform: translateY(-1px); }
.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	border: 1px solid var(--glass-stroke);
	background: var(--glass-bg);
	color: var(--text);
	cursor: pointer;
	transition: all .25s ease;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:focus-visible, .nav-link:focus-visible, .btn:focus-visible, .chip:focus-visible, .skill-card:focus-visible, .contact-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sections */
.section {
	position: relative;
	padding: 96px 20px;
}
.container {
	max-width: 1200px;
	margin: 0 auto;
}
.section-title {
	font-family: "Poppins", "Inter", sans-serif;
	font-size: 32px;
	margin: 0 0 28px;
	letter-spacing: 0.2px;
}

/* Hero */
.hero { padding-top: 48px; }
.hero-inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	align-items: center;
	justify-items: center;
	max-width: 1200px;
	margin: 0 auto;
	position: relative;
	min-height: 540px;
}
.avatar-wrap {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(520px, 90vw);
	aspect-ratio: 1 / 1;
	border-radius: 28px;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}
.avatar-orb {
	position: absolute;
	inset: -20%;
	background:
		radial-gradient(200px 200px at 30% 30%, rgba(124,58,237,0.6), transparent 60%),
		radial-gradient(220px 220px at 70% 70%, rgba(34,211,238,0.6), transparent 60%),
		radial-gradient(320px 320px at 50% 20%, rgba(89,153,255,0.5), transparent 70%);
	filter: blur(40px) saturate(120%);
	transform: scale(1.2);
}
.avatar-glow {
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 0 2px rgba(255,255,255,0.08);
	border-radius: 28px;
}
.avatar img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	mix-blend-mode: screen;
	filter: contrast(1.05) saturate(1.15);
}
.avatar.abstract {
	position: absolute;
	inset: 10%;
	border-radius: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.avatar.abstract .ring {
	position: absolute;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,0.3);
	box-shadow: 0 0 30px rgba(89,153,255,0.35);
	animation: pulse-ring 12s ease-in-out infinite;
}
.avatar.abstract .ring-1 {
	width: 60%;
	height: 60%;
	animation-delay: 0s;
}
.avatar.abstract .ring-2 {
	width: 80%;
	height: 80%;
	animation-delay: 3s;
}
.avatar.abstract .ring-3 {
	width: 100%;
	height: 100%;
	animation-delay: 6s;
}
@keyframes pulse-ring {
	0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
	50% { transform: scale(1.1) rotate(8deg); opacity: 0.4; }
}
.hero-copy .eyebrow { color: var(--muted); margin: 0 0 6px; }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.hero-copy .eyebrow,
.hero-copy .headline,
.hero-copy .tagline,
.hero-copy .hero-cta { text-align: center; }
.headline {
	font-family: "Poppins", "Inter", sans-serif;
	font-size: clamp(28px, 5vw, 56px);
	line-height: 1.05;
	margin: 0 0 10px;
}
.headline .grad {
	background: linear-gradient(90deg, var(--accent), var(--primary));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.headline .sub {
	display: block;
	font-size: clamp(16px, 2.2vw, 22px);
	font-weight: 500;
	color: var(--muted);
	margin-top: 8px;
}
.tagline {
	opacity: 0.9;
	margin: 10px 0 18px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; }
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 16px;
	border-radius: 12px;
	border: 1px solid var(--glass-stroke);
	background: var(--glass-bg);
	color: var(--text);
	text-decoration: none;
	cursor: pointer;
	box-shadow: var(--shadow-soft);
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn.primary { background: linear-gradient(135deg, rgba(124,58,237,0.6), rgba(34,211,238,0.6)); border-color: transparent; }
.btn.ghost { background: var(--glass-bg); }
.btn.small { padding: 8px 12px; font-size: 14px; }
.btn:hover { transform: translateY(-2px); }

/* Skills marquee */
.skills-marquee {
	position: relative;
	margin: 40px auto 0;
	max-width: 1200px;
	overflow: hidden;
	padding: 12px;
}

.skills-marquee .track {
	display: inline-flex;
	align-items: center;
	gap: 28px;
	min-width: max-content;
	animation: marquee 24s linear infinite;
}
.skills-marquee img {
	height: 36px;
	filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
	opacity: 0.9;
}
@keyframes marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

.scroll-down {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 24px;
	display: inline-flex;
	gap: 8px;
	align-items: center;
	color: var(--muted);
	text-decoration: none;
	opacity: 0.85;
	transition: opacity .2s ease;
}
.scroll-down:hover { opacity: 1; }

/* About */
.about-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: center;
}
.about-visual {
	padding: 10px;
}
.photo-3d {
	position: relative;
	overflow: hidden;
	border-radius: 20px;
}
.photo-3d::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, rgba(124,58,237,0.25), rgba(34,211,238,0.25));
	mix-blend-mode: soft-light;
}
.photo-3d img {
	width: 100%;
	display: block;
	transform-origin: center;
	transform: perspective(1000px) rotateY(-8deg) scale(1.03);
	transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.photo-3d:hover img { transform: perspective(1000px) rotateY(0deg) scale(1.05); }
.about-copy p { margin: 0 0 10px; opacity: 0; transform: translateY(10px); }
.about-copy p.show { opacity: 1; transform: translateY(0); transition: all .5s ease; }

/* Skills grid */
.skills-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
}
.skill-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 10px;
	border: 0;
	cursor: pointer;
	color: var(--text);
}
.skill-card img { width: 40px; height: 40px; }
.skill-card span { font-size: 14px; opacity: 0.95; }
.skill-card:hover { box-shadow: 0 8px 30px rgba(89,153,255,0.25); }

.skill-zoom {
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(0,0,0,0.4);
	z-index: 60;
}
.skill-zoom-card {
	position: relative;
	width: min(420px, 92vw);
	padding: 28px 22px;
	text-align: center;
}
.skill-zoom-card .close {
	position: absolute;
	top: 8px;
	right: 8px;
}
.skill-zoom-card .icon { margin: 10px 0; }
.skill-zoom-card .icon img { width: 80px; height: 80px; }
/* (skill zoom removed) */

/* Projects */
.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}
.chip {
	border: 1px solid var(--glass-stroke);
	background: var(--glass-bg);
	color: var(--text);
	border-radius: 999px;
	padding: 8px 12px;
	cursor: pointer;
}
.chip.active { background: linear-gradient(135deg, rgba(124,58,237,0.45), rgba(34,211,238,0.45)); border-color: transparent; }

.project-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.project-card .thumb {
	position: relative;
	overflow: hidden;
	border-radius: 14px;
	height: 220px; /* medium size thumbnails */
}
.project-card .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1.02);
	transition: transform .4s ease;
}
.project-card:hover .thumb img { transform: scale(1.08); }
.project-card .meta { padding: 12px; }
.project-card h3 { margin: 0 0 6px; font-size: 18px; }
.project-card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }

/* Project detail pages */
.project-detail {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 24px;
	align-items: flex-start;
	margin-top: 40px;
}
.project-detail .gallery {
	display: flex;
	justify-content: center;
}
.project-detail .gallery img {
	width: min(100%, 640px);
	height: 360px;
	border-radius: 16px;
	object-fit: cover;
	box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.project-detail .details {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Project modal */
/* (project modal removed) */

/* Contact */
.contact-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}
.contact-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: var(--text);
	padding: 16px;
}
.contact-card i { font-size: 26px; margin-bottom: 8px; }
.contact-card strong { margin-top: 4px; }

/* Footer */
.site-footer {
	padding: 28px 20px 48px;
	text-align: center;
	color: var(--muted);
}
.footer-marquee {
	overflow: hidden;
	max-width: 1200px;
	margin: 0 auto 10px;
}
.footer-marquee .track {
	display: inline-flex;
	gap: 40px;
	min-width: max-content;
	animation: marquee 28s linear infinite;
}

/* Tilt effect */
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .12s ease; }
.tilt:hover { transform: perspective(900px) rotateX(4deg) rotateY(-4deg) translateY(-2px); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
}

/* Responsive */

/* ------------------------------
   1400px → Large Desktop / Windows
------------------------------ */
@media (max-width: 1400px) {
	.skills-grid { grid-template-columns: repeat(6, 1fr); }
	.project-card .thumb { height: 260px; }
}

/* ------------------------------
   1100px → Laptop & small desktops
------------------------------ */
@media (max-width: 1100px) {
	.skills-grid { grid-template-columns: repeat(5, 1fr); }
	.project-detail { grid-template-columns: 1fr; }
}

/* ------------------------------
   900px → Tablets (iPad, Android tab)
------------------------------ */
@media (max-width: 900px) {
	.hero-inner,
	.about-grid { grid-template-columns: 1fr; }

	.project-grid,
	.contact-grid { grid-template-columns: repeat(2, 1fr); }

	.project-card .thumb { height: 220px; }
	.project-detail .gallery img { height: 320px; }
}

/* ------------------------------
   768px → Large Mobile / Small Tablet
------------------------------ */
@media (max-width: 768px) {
	.skills-grid { grid-template-columns: repeat(4, 1fr); }
	.project-card .thumb { height: 200px; }
}

/* ------------------------------
   560px → Mobile Phones
------------------------------ */
@media (max-width: 560px) {
	.skills-grid { grid-template-columns: repeat(3, 1fr); }
	.project-grid { grid-template-columns: 1fr; }

	.site-header { margin: 6px; padding: 10px 12px; }

	.brand-name,
	.nav-link span { display: none; }

	.project-card .thumb { height: 170px; }
	.project-detail .gallery img { height: 250px; }
}

/* ------------------------------
   480px → Small Mobiles
------------------------------ */
@media (max-width: 480px) {
	.project-card .thumb { height: 150px; }
}

/* ------------------------------
   360px → Extra small phones
------------------------------ */
@media (max-width: 360px) {
	.project-card .thumb { height: 130px; }
	.skills-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------
   1600px → TV / Ultra-wide screens
------------------------------ */
@media (min-width: 1600px) {
	.hero-inner { max-width: 1500px; margin: auto; }
	.project-card .thumb { height: 320px; }
	.skills-grid { grid-template-columns: repeat(8, 1fr); }
}

