/* === Base / Reset === */
*, *::before, *::after {
	box-sizing: border-box
}

:root {
	--bg: #0b1220;
	--panel: #131d2b;
	--muted: #8fa3c7;
	--text: #e7eefc;
	--brand: #4f9cff;
	--brand-2: #2dd4bf;
	--card: #172235;
	--ring: 0 0 0 2px rgba(79,156,255,.3);
	--shadow: 0 10px 30px rgba(0,0,0,.4)
}

html, body {
	margin: 0;
	height: 100%;
	scroll-behavior: smooth
}

body {
	font: 16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
	background: radial-gradient(1200px 600px at 10% -10%,rgba(79,156,255,.08),transparent 60%), radial-gradient(900px 500px at 110% 0,rgba(45,212,191,.06),transparent 60%), var(--bg);
	color: var(--text);
}

img, video {
	max-width: 100%;
	display: block
}

a {
	color: var(--brand);
	text-decoration: none
}

	a:focus-visible, button:focus-visible {
		outline: none;
		box-shadow: var(--ring);
		border-radius: .5rem
	}

/* === Layout === */
.wrap {
	max-width: 1100px;
	margin: auto;
	padding: 24px
}

header {
	display: grid;
	gap: 12px;
	justify-items: center;
	text-align: center;
	padding: 64px 24px
}

	header h1 {
		font-size: clamp(28px,4vw,44px);
		margin: 0
	}

	header p {
		max-width: 820px;
		color: var(--muted);
		margin: 0
	}

.pill {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	background: rgba(79,156,255,.12);
	color: #cfe4ff;
	border: 1px solid rgba(79,156,255,.25);
	padding: 8px 12px;
	border-radius: 999px;
	font-weight: 600
}

.cta {
	display: flex;
	gap: 12px;
	margin-top: 16px
}

.btn {
	background: linear-gradient(90deg,var(--brand),#7aa9ff);
	border: none;
	color: #06101f;
	padding: 10px 16px;
	border-radius: 10px;
	font-weight: 700;
	cursor: pointer
}

	.btn.secondary {
		background: transparent;
		border: 1px solid rgba(255,255,255,.15);
		color: var(--text)
	}

section {
	background: linear-gradient(180deg,rgba(255,255,255,.04),transparent),var(--panel);
	border: 1px solid rgba(255,255,255,.06);
	border-radius: 14px;
	box-shadow: var(--shadow);
	margin: 28px auto;
	padding: 24px
}

	section h2 {
		margin: 0 0 12px;
		font-size: clamp(22px,3vw,30px)
	}

.sub {
	color: var(--muted);
	margin: 0 0 18px
}

/* === Skills === */
.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px
}

.chip {
	background: var(--card);
	border: 1px solid rgba(255,255,255,.08);
	padding: 8px 12px;
	border-radius: 999px
}

/* === Experience === */
.xp {
	display: grid;
	gap: 14px
}

.xp-item {
	display: grid;
	gap: 6px;
	background: var(--card);
	border: 1px solid rgba(255,255,255,.08);
	padding: 14px;
	border-radius: 12px
}

	.xp-item h3 {
		margin: 0;
		font-size: 18px
	}

.xp-meta {
	color: var(--muted);
	font-size: 14px
}

.xp-bullets {
	margin: 6px 0 0;
	padding-left: 18px
}

/* === Projects grid === */
.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 14px
}

	.filters button {
		background: #0f1624;
		border: 1px solid rgba(255,255,255,.1);
		color: var(--text);
		padding: 6px 10px;
		border-radius: 999px;
		cursor: pointer
	}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
	gap: 16px
}

.card {
	background: var(--card);
	border: 1px solid rgba(255,255,255,.08);
	border-radius: 12px;
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease
}

	.card:hover {
		transform: translateY(-4px);
		box-shadow: 0 12px 30px rgba(79,156,255,.25)
	}

/* uniform square thumbnails for all cards */
.thumb {
	width: 100%;
	aspect-ratio: 1 / 1; /* square shape */
	height: auto;
	object-fit: cover; /* fills square, may crop a little */
	border-radius: 0; /* optional: remove rounding */
	background: #0f1624; /* fallback background if image smaller */
}

.card-body {
	padding: 12px
}

.card h3 {
	margin: 0 0 6px;
	font-size: 16px
}

.badge {
	display: inline-block;
	font-size: 12px;
	background: rgba(45,212,191,.12);
	border: 1px solid rgba(45,212,191,.35);
	color: #c8fff3;
	padding: 2px 8px;
	border-radius: 999px
}

/* === Modal === */
.modal {
	position: fixed;
	inset: 0;
	background: rgba(3,10,20,.92);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 18px;
	z-index: 50
}

	.modal[aria-hidden="false"] {
		display: flex
	}

/* roomier panel and taller viewport to avoid cropping */
.modal-panel {
	background: var(--panel);
	border: 1px solid rgba(255,255,255,.08);
	border-radius: 14px;
	max-width: 1000px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
	box-shadow: var(--shadow)
}

.modal-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 16px;
	border-bottom: 1px solid rgba(255,255,255,.06)
}

.modal-close {
	background: transparent;
	border: none;
	color: var(--text);
	font-size: 22px;
	cursor: pointer
}

.modal-body {
	padding: 16px
}

/* Responsive video wrapper for both <video> and <iframe> */
.video {
	position: relative;
	width: 100%;
	max-height: 75vh;
	display: flex;
	justify-content: center;
	align-items: center;
}

	/* Native <video> elements */
	.video video {
		width: 100%;
		height: auto;
		max-height: 75vh;
		object-fit: contain;
		border-radius: 12px;
	}

	/* YouTube / iframe videos — responsive scaling */
	.video iframe {
		width: 100%;
		aspect-ratio: 16 / 9;
		border: none;
		border-radius: 12px;
		max-height: 75vh;
	}

/* === Footer === */
footer {
	padding: 40px 24px;
	text-align: center;
	color: var(--muted)
}

.links {
	display: flex;
	gap: 18px;
	justify-content: center
}

.gallery {
	margin-top: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

	.gallery img {
		width: 100px;
		height: 70px;
		object-fit: cover;
		border-radius: 6px;
		cursor: pointer;
		opacity: 0.8;
		transition: transform .2s ease, opacity .2s ease;
	}

		.gallery img:hover {
			opacity: 1;
			transform: scale(1.05);
		}

.gallery-view {
	width: 100%;
	border-radius: 12px;
	max-height: 70vh;
	object-fit: contain;
}

/* ===== Slideshow ===== */
.slider {
	position: relative;
	margin-bottom: 14px;
}

.viewer {
	background: rgba(255,255,255,.03);
	border: 1px solid rgba(255,255,255,.06);
	border-radius: 12px;
	padding: 10px;
	display: flex;
	justify-content: center;
	align-items: center;
	max-height: 75vh;
	min-height: 240px;
	overflow: hidden;
}

	/* Media inside the viewer */
	.viewer video, .viewer img, .viewer iframe {
		width: 100%;
		height: auto;
		max-height: 72vh;
		object-fit: contain;
		border-radius: 10px;
	}

/* File/APK card */
.apk-card {
	display: grid;
	place-items: center;
	gap: 10px;
	text-align: center;
	padding: 26px;
	width: 100%;
}

	.apk-card .apk-icon {
		width: 88px;
		height: 88px;
		border-radius: 20px;
		background: #0f1624;
		display: grid;
		place-items: center;
		font-size: 42px;
		border: 1px solid rgba(255,255,255,.08);
	}

	.apk-card a {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 10px 14px;
		border-radius: 10px;
		font-weight: 700;
		background: linear-gradient(90deg,#4f9cff,#7aa9ff);
		color: #06101f;
	}

/* Nav arrows */
.nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,.4);
	border: 1px solid rgba(255,255,255,.2);
	color: #fff;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	cursor: pointer;
}

	.nav:hover {
		background: rgba(0,0,0,.55);
	}

	.nav.prev {
		left: 8px;
	}

	.nav.next {
		right: 8px;
	}

/* Counter */
.counter {
	position: absolute;
	right: 12px;
	bottom: 12px;
	background: rgba(0,0,0,.35);
	color: #fff;
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 999px;
}

/* Thumbnails row */
.gallery {
	margin-top: 12px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
}

	.gallery .thumb {
		width: 100px;
		height: 72px;
		object-fit: cover;
		border-radius: 6px;
		cursor: pointer;
		opacity: .8;
		border: 1px solid rgba(255,255,255,.08);
		transition: opacity .2s, transform .2s;
	}

		.gallery .thumb:hover {
			opacity: 1;
			transform: scale(1.04);
		}

		.gallery .thumb.is-active {
			outline: 2px solid #4f9cff;
			opacity: 1;
		}

/* Small screens */
@media (max-width:700px) {
	.viewer {
		max-height: 60vh;
	}

		.viewer video, .viewer img, .viewer iframe {
			max-height: 57vh;
		}

	.gallery .thumb {
		width: 82px;
		height: 58px;
	}
}

.skills-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 15px;
}

	.skills-tags span {
		background: #1e293b;
		color: #cbd5e1;
		padding: 8px 14px;
		border-radius: 20px;
		font-size: 0.95rem;
		border: 1px solid #3b82f6;
		transition: all 0.25s ease;
		user-select: none;
	}

		.skills-tags span:hover {
			background: #3b82f6;
			color: #fff;
			transform: scale(1.05);
			cursor: default;
		}

/* === Motion === */
@media (prefers-reduced-motion:no-preference) {
	[data-reveal] {
		opacity: 0;
		transform: translateY(12px);
		transition: opacity .6s ease,transform .6s ease
	}

		[data-reveal].is-in {
			opacity: 1;
			transform: none
		}
}

/* === Responsive tweaks === */
@media (max-width:700px) {
	.cta {
		flex-direction: column;
		align-items: center
	}

	.video {
		max-height: 60vh
	}

		.video video, .video iframe {
			max-height: 60vh
		}
}
