/* =========================================================
	 Tokens
	 ========================================================= */
:root {
	--bg: #0a0d12;
	--bg-alt: #10141b;
	--border: #1f2530;
	--text: #e6e9ef;
	--text-dim: #97a1b0;
	--text-faint: #5c6575;
	--accent: #7ee787;
	--accent-dim: #5fb768;
	--danger: #ff6b6b;
	--warn: #f5c451;
	--font-display: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
	--radius: 10px;
	--max-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-display);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: none;
}

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

hr {
	border: none;
	height: 1px;
	background: var(--border);
	margin: 20px 0 32px;
}

/* Shared page-width wrapper: applied directly to the sections/footer
	 instead of extra wrapper divs and classes. */
#about, #projects, footer {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 32px;
}

/* =========================================================
	 About / hero
	 ========================================================= */
#about {
	min-height: 100vh;
	padding-top: 60px;
	padding-bottom: 64px;
	display: grid;
	grid-template-columns: 400px minmax(auto, 640px);
	justify-content: center;
	gap: 56px;
	align-items: center;
}

#about .photo {
	width: 400px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--radius);
	border: 1px solid var(--border);
}

.eyebrow {
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin: 0 0 12px;
}

#about h1 {
	font-size: 56px;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0 0 24px;
	line-height: 1.05;
}

#about p {
	color: var(--text-dim);
	font-size: 16px;
	max-width: 640px;
	margin: 0 0 18px;
}

.link {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: rgba(126, 231, 135, 0.35);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.link:hover {
	color: var(--accent-dim);
	text-decoration-color: var(--accent-dim);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}

/* =========================================================
	 Buttons
	 ========================================================= */
.button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid var(--border);
	background: var(--bg-alt);
	color: var(--text);
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
	cursor: pointer;
}

.button:active { transform: translateY(1px); }

.button:hover {
	border-color: #313a49;
	background: #151b24;
}

.button.primary {
	background: var(--accent);
	color: #06280f;
	border-color: var(--accent);
}

.button.primary:hover {
	background: var(--accent-dim);
	border-color: var(--accent-dim);
}

.ext {
	font-size: 12px;
	opacity: 0.7;
}

.email-reveal {
	position: relative;
	display: inline-flex;
}

.email-popover {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	background: var(--bg-alt);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 10px 16px;
	font-family: var(--font-mono);
	font-size: 13.5px;
	color: var(--accent);
	white-space: nowrap;
	z-index: 10;
	user-select: all;
}

/* =========================================================
	 Projects
	 ========================================================= */
#projects {
	padding-top: 40px;
	padding-bottom: 60px;
}

.heading {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 16px;
}

#projects h2 {
	font-size: 32px;
	font-weight: 800;
	margin: 0 0 6px;
	letter-spacing: -0.01em;
}

.heading a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--text-dim);
	transition: color 0.15s ease;
}

.heading a:hover { color: var(--text); }

.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

/* --- Card --- */
.card {
	background: var(--bg-alt);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
	border-color: #303a49;
	transform: translateY(-2px);
}

.card header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--border);
	background: #0d1117;
}

.dots { display: flex; gap: 6px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; }
.dots span:nth-child(1) { background: #ff5f56; }
.dots span:nth-child(2) { background: #ffbd2e; }
.dots span:nth-child(3) { background: #27c93f; }

.filename {
	font-family: var(--font-mono);
	font-size: 12.5px;
	color: var(--text-faint);
}

.card > div {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}

.title-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
}

.name {
	font-family: var(--font-mono);
	font-size: 15.5px;
	font-weight: 700;
	color: var(--text);
	display: flex;
	align-items: center;
	gap: 6px;
}

.name .prompt {
	color: var(--accent);
}

.year {
	font-family: var(--font-mono);
	font-size: 12.5px;
	color: var(--text-faint);
	white-space: nowrap;
}

.card p {
	color: var(--text-dim);
	font-size: 13.5px;
	line-height: 1.55;
	margin: 0;
	flex: 1;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
}

.tag {
	font-family: var(--font-mono);
	font-size: 11.5px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 5px;
	background: #1b2230;
	color: var(--text-dim);
	border: 1px solid var(--border);
}

.tag.type { background: rgba(245, 196, 81, 0.12); color: var(--warn); border-color: rgba(245, 196, 81, 0.3); }
.tag.lang { background: rgba(126, 231, 135, 0.12); color: var(--accent); border-color: rgba(126, 231, 135, 0.3); }

.links {
	margin-left: auto;
	display: flex;
	gap: 8px;
	color: var(--text-faint);
}

.links a { display: flex; }
.links a:hover { color: var(--text); }

/* =========================================================
	 Footer
	 ========================================================= */
footer {
	border-top: 1px solid var(--border);
	padding-top: 26px;
	padding-bottom: 26px;
	color: var(--text-faint);
	font-size: 13.5px;
}

/* =========================================================
	 Responsive
	 ========================================================= */
@media (max-width: 900px) {
	.grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 720px) {
	#about {
		grid-template-columns: 1fr;
	}
	#about .photo {
		width: 240px;
	}
	#about h1 {
		font-size: 40px;
	}
	.grid {
		grid-template-columns: 1fr;
	}
}
