* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 100px;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.6;
	color: #333;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	padding: 0;
}

/* Navigation Bar */
nav {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 1rem 2rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: center;
	justify-content: space-between;
}

.nav-links {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	align-items: center;
}

.nav-links a {
	color: #667eea;
	text-decoration: none;
	font-weight: 500;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	transition: background 0.2s, color 0.2s;
	font-size: 0.9rem;
}

.nav-links a:hover {
	background: #667eea;
	color: white;
}

.modality-key {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: center;
}

.modality-key-label {
	font-weight: 600;
	color: #333;
	font-size: 0.85rem;
}

.modality-key .badge {
	cursor: help;
}

.content-wrapper {
	padding: 2rem 1rem;
}

header {
	text-align: center;
	color: white;
	margin-bottom: 3rem;
	padding: 2rem 1rem;
}

header h1 {
	font-size: 2.5rem;
	margin-bottom: 0.5rem;
	font-weight: 700;
}

.subtitle {
	font-size: 1.2rem;
	margin-bottom: 1rem;
	opacity: 0.95;
}

.description {
	max-width: 800px;
	margin: 0 auto;
	font-size: 1rem;
	opacity: 0.9;
	line-height: 1.6;
}

main {
	max-width: 1400px;
	margin: 0 auto;
}

.category {
	background: white;
	border-radius: 12px;
	padding: 2rem;
	margin-bottom: 2rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category h2 {
	font-size: 1.8rem;
	margin-bottom: 1.5rem;
	color: #667eea;
	border-bottom: 3px solid #667eea;
	padding-bottom: 0.5rem;
}

.project-count {
	font-size: 1rem;
	color: #666;
	font-weight: normal;
}

.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.project-card {
	background: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.2s, box-shadow 0.2s;
	display: flex;
	flex-direction: column;
}

.project-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.project-content {
	padding: 1.5rem;
}

.screenshot-preview {
	position: relative;
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: #e9ecef;
	cursor: pointer;
}

.screenshot-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.screenshot-preview:hover img {
	transform: scale(1.05);
}

.screenshot-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(102, 126, 234, 0.9);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	color: white;
	gap: 0.5rem;
}

.screenshot-preview:hover .screenshot-overlay {
	opacity: 1;
}

.screenshot-overlay span {
	font-size: 0.9rem;
	font-weight: 500;
}

/* GitHub Badge Preview */
.github-badge-preview {
	position: relative;
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.github-badge-preview img {
	transition: transform 0.3s ease;
}

.github-badge-preview:hover img {
	transform: scale(1.1);
}

.project-card h3 {
	font-size: 1.3rem;
	margin-bottom: 0.75rem;
	color: #333;
}

.project-card p {
	color: #666;
	margin-bottom: 1rem;
	font-size: 0.95rem;
}

.modalities {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.badge {
	display: inline-block;
	background: #667eea;
	color: white;
	padding: 0.25rem 0.75rem;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 500;
}

.links {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.btn {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: #667eea;
	color: white;
	text-decoration: none;
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 500;
	transition: background 0.2s;
}

.btn:hover {
	background: #5568d3;
}

.btn-secondary {
	background: #764ba2;
}

.btn-secondary:hover {
	background: #663a8c;
}

.loading,
.error {
	text-align: center;
	padding: 3rem;
	font-size: 1.2rem;
	color: white;
}

.error {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 8px;
}

footer {
	text-align: center;
	margin-top: 3rem;
	padding: 2rem 1rem;
	color: white;
}

footer p {
	font-size: 1rem;
}

footer a {
	color: white;
	text-decoration: none;
	font-weight: 500;
	margin: 0 0.5rem;
}

footer a:hover {
	text-decoration: underline;
}

/* Modal Styles */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	padding-top: 50px;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.9);
	cursor: pointer;
}

.modal-content {
	margin: auto;
	display: block;
	max-width: 90%;
	max-height: 85vh;
	object-fit: contain;
	animation: zoom 0.3s;
}

@keyframes zoom {
	from {
		transform: scale(0.8);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

.modal-close {
	position: absolute;
	top: 20px;
	right: 35px;
	color: #f1f1f1;
	font-size: 40px;
	font-weight: bold;
	transition: 0.3s;
}

.modal-close:hover,
.modal-close:focus {
	color: #bbb;
	text-decoration: none;
	cursor: pointer;
}

.modal-caption {
	margin: auto;
	display: block;
	width: 80%;
	max-width: 700px;
	text-align: center;
	color: #ccc;
	padding: 10px 0;
}

@media (max-width: 768px) {
	.nav-container {
		padding: 1rem;
		flex-direction: column;
		gap: 1rem;
	}

	.nav-links {
		width: 100%;
		justify-content: center;
	}

	.modality-key {
		width: 100%;
		justify-content: center;
	}

	header h1 {
		font-size: 2rem;
	}

	.projects-grid {
		grid-template-columns: 1fr;
	}

	.category {
		padding: 1.5rem;
	}

	.screenshot-preview,
	.github-badge-preview {
		height: 180px;
	}

	.modal-content {
		max-width: 95%;
	}

	.modal-close {
		top: 10px;
		right: 20px;
		font-size: 35px;
	}
}
