@import url("font-awesome.min.css");

/* --- Reset --- */

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

/* --- Base --- */

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
	font-size: 14px;
	line-height: 1.6;
	color: #c9d1d9;
	background: #0d1117;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */

h1, h2, h3, h4 {
	font-weight: 600;
	line-height: 1.3;
	color: #e6edf3;
}

h1 {
	font-size: 1.75rem;
}

h2 {
	font-size: 1.2rem;
	margin-bottom: 0.6rem;
	color: #7ee787;
}

h3 {
	font-size: 0.95rem;
	margin-bottom: 0.5rem;
	color: #e6edf3;
}

h4 {
	font-size: 0.9rem;
	margin-bottom: 0.4rem;
	color: #e6edf3;
}

p {
	margin-bottom: 0.5rem;
	color: #8b949e;
	font-size: 0.82rem;
}

a {
	color: #58a6ff;
	text-decoration: none;
	transition: color 0.15s;
}

a:hover {
	color: #79c0ff;
}

strong {
	font-weight: 600;
	color: #c9d1d9;
}

/* --- Layout --- */

.container {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.container-narrow {
	max-width: 560px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* --- Hero --- */

.hero {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	padding: 3rem 2rem;
	border-bottom: 1px solid #21262d;
}

.hero-content {
	flex: 1;
	max-width: 440px;
}

.hero-content h1 {
	margin-bottom: 0.35rem;
}

.tagline {
	color: #7ee787;
	margin-bottom: 0.75rem;
	font-size: 0.82rem;
}

#hello-rotate::after {
	content: '\2588';
	color: #7ee787;
	animation: blink 1s step-end infinite;
}

@keyframes blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

#prompt {
	color: #484f58;
}

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

.social-links a {
	font-size: 1.4rem;
	color: #484f58;
	transition: color 0.15s;
}

.social-links a:hover {
	color: #58a6ff;
}

.hero-image {
	flex: 0 0 auto;
	width: 200px;
	height: 200px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #21262d;
}

.hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* --- Sections --- */

.about,
.projects,
.contact {
	padding: 2rem 0;
	border-bottom: 1px solid #21262d;
}

.about p {
	max-width: 640px;
}

/* --- Projects --- */

.section-intro {
	max-width: 640px;
	margin-bottom: 0.75rem;
}

.skills {
	display: flex;
	gap: 1.5rem;
	margin-bottom: 0.5rem;
}

.skill-group {
	flex: 1;
	background: #161b22;
	border: 1px solid #21262d;
	border-radius: 6px;
	padding: 0.75rem;
}

.skill-label {
	display: block;
	font-size: 0.7rem;
	color: #7ee787;
	margin-bottom: 0.4rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-align: center;
}

.skill-group .tags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem;
}

.skill-tag {
	font-size: 0.72rem;
	color: #c9d1d9;
	background: #0d1117;
	border: 1px solid #30363d;
	border-radius: 3px;
	padding: 0.15rem 0.45rem;
}

.resume-link {
	margin-top: 1rem;
	margin-bottom: 1.25rem;
	text-align: center;
}

a.button {
	display: inline-block;
	padding: 0.45rem 1.25rem;
	border: 1px solid #c9d1d9;
	border-radius: 4px;
	color: #c9d1d9;
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	transition: background 0.15s, color 0.15s;
}

a.button:hover {
	background: #c9d1d9;
	color: #0d1117;
}

.projects h3 {
	margin-bottom: 1rem;
}

.project-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.project-card {
	background: #161b22;
	border: 1px solid #21262d;
	border-radius: 6px;
	padding: 1rem;
	transition: border-color 0.15s;
}

.project-card:hover {
	border-color: #30363d;
}

.project-card h4 a {
	color: #58a6ff;
}

.project-card p {
	font-size: 0.8rem;
	color: #8b949e;
	margin-bottom: 0;
}

.github-cta {
	font-size: 0.8rem;
	color: #484f58;
}

/* --- Contact --- */

.contact {
	border-bottom: none;
}

.contact h2 {
	text-align: center;
	margin-bottom: 1rem;
}

.form-row {
	display: flex;
	gap: 1rem;
	margin-bottom: 0.5rem;
}

.form-field {
	flex: 1;
	margin-bottom: 0.75rem;
}

.form-field label {
	display: block;
	font-size: 0.75rem;
	color: #484f58;
	margin-bottom: 0.3rem;
}

.form-field input,
.form-field textarea {
	width: 100%;
	padding: 0.5rem 0.6rem;
	border: 1px solid #21262d;
	border-radius: 4px;
	font-family: inherit;
	font-size: 0.85rem;
	color: #c9d1d9;
	background: #0d1117;
	transition: border-color 0.15s;
}

.form-field input:focus,
.form-field textarea:focus {
	outline: none;
	border-color: #58a6ff;
}

.form-field textarea {
	resize: vertical;
}

button[type="submit"] {
	display: inline-block;
	padding: 0.5rem 1.25rem;
	background: #21262d;
	color: #c9d1d9;
	border: 1px solid #30363d;
	border-radius: 4px;
	font-family: inherit;
	font-size: 0.8rem;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

button[type="submit"]:hover {
	background: #30363d;
	border-color: #58a6ff;
}

/* --- Fade-in animation --- */

.fade-in {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

/* --- Responsive --- */

@media (max-width: 680px) {
	h1 {
		font-size: 1.6rem;
	}

	.hero {
		flex-direction: column-reverse;
		text-align: center;
		padding: 2rem 1.5rem;
		gap: 1rem;
	}

	.hero-content {
		max-width: 100%;
	}

	.social-links {
		justify-content: center;
	}

	.hero-image {
		width: 160px;
		height: 160px;
	}

	.about,
	.projects,
	.contact {
		padding: 1.5rem 0;
	}

	.skills {
		flex-direction: column;
		gap: 0.75rem;
	}

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

	.form-row {
		flex-direction: column;
		gap: 0;
	}
}
