:root {
	--bg-color: #fff;
	--text-color: #1a1a1a;
	--text-muted: #666;
	--project-bg: #f6f6f4;
	--project-hover: #efefec;
	--border-color: #eee;
	--accent: #1a1a1a;
	--hex-color: #999;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg-color: #0a0a0a;
		--text-color: #b8c2cc;
		--text-muted: #6b7480;
		--project-bg: #141414;
		--project-hover: #1c1c1c;
		--border-color: #1f1f1f;
		--accent: #b8c2cc;
	}
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	max-width: 540px;
	margin: 0 auto;
	padding: 8rem 2rem 2rem 2rem;
	background: var(--bg-color);
	color: var(--text-color);
	transition: background-color 0.3s ease, color 0.3s ease;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	position: relative;
}

/* Header */
header {
	margin-bottom: 4rem;
}

.brand-mark {
	position: absolute;
	top: 2rem;
	right: 2rem;
	z-index: 10;
}

.brand-mark svg {
	height: 28px;
	width: auto;
	color: var(--text-color);
	display: block;
}

.header-logo {
	margin-bottom: 1.75rem;
	min-height: 3rem;
	display: flex;
	align-items: center;
}

.wordmark {
	font-family: 'Outfit', sans-serif;
	font-weight: 200;
	font-size: 2rem;
	letter-spacing: -0.03em;
	color: var(--text-color);
	margin: 0;
	line-height: 1.2;
	min-width: 300px;
	white-space: nowrap;
	transition: font-family 0s, font-size 0s, color 0s;
}

.wordmark .accent {
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 6px;
}

.wordmark.hex-mode {
	font-family: 'Space Mono', 'Courier New', monospace;
	font-size: 1.5rem;
	font-weight: 400;
	color: var(--hex-color);
	letter-spacing: 0.02em;
}

.cursor {
	display: inline-block;
	width: 2px;
	height: 0.85em;
	background: var(--text-color);
	margin-left: 3px;
	vertical-align: -0.05em;
	animation: cursorBlink 0.6s step-end infinite;
}

.wordmark.hex-mode .cursor {
	background: var(--hex-color);
}

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

.tagline {
	font-size: 1.375rem;
	color: var(--text-muted);
	line-height: 1.4;
	font-weight: 300;
	letter-spacing: -0.01em;
	margin-bottom: 2rem;
}

.tagline p {
	margin: 0;
}

.tagline p + p {
	margin-top: 0.5em;
}

/* Projects */
.projects {
	display: grid;
	gap: 1rem;
	margin-bottom: 4rem;
}

.project {
	padding: 1.75rem;
	background: var(--project-bg);
	border-radius: 24px;
	transition: background 0.3s ease, transform 0.3s ease;
}

.project-content {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.project-logo {
	width: 50px;
	height: 50px;
	flex-shrink: 0;
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
	background: #000;
}

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

.project-details {
	flex: 1;
	min-width: 0;
}

.project-name {
	margin: 0 0 0.25rem 0;
	font-size: 1rem;
	font-weight: 500;
	color: var(--text-color);
	letter-spacing: -0.01em;
}

.project-details p {
	margin: 0 0 0.5rem 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--text-color);
}

.project-details a,
.project-year {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--text-muted);
	text-decoration: none;
	font-size: 0.875rem;
	transition: color 0.3s ease;
}

/* Vppbox hover — warm cream from their own theme */
.project.vppbox:hover {
	background: #ede9e3;
	transform: translateY(-2px);
}
.project.vppbox:hover .project-name,
.project.vppbox:hover .project-details p,
.project.vppbox:hover .project-details a {
	color: #1a1814;
}
.project.vppbox:hover .project-logo {
	transform: scale(1.05);
}

/* Coming soon — no hover */
.project.soon {
	opacity: 0.85;
}
.project.soon .project-year {
	color: var(--text-muted);
	font-style: italic;
}

/* Built with — marquee */
.featured {
	margin-bottom: 4rem;
	position: relative;
}

.featured h2 {
	font-size: 1rem;
	font-weight: 500;
	margin: 0 0 1.5rem 0;
	color: var(--text-muted);
}

.featured-container {
	position: relative;
	overflow: hidden;
	height: 24px;
	mask-image: linear-gradient(to right, transparent, black 50px, black calc(100% - 50px), transparent);
	-webkit-mask-image: linear-gradient(to right, transparent, black 50px, black calc(100% - 50px), transparent);
}

.featured-track {
	display: flex;
	width: max-content;
	animation: marqueeScroll 38s linear infinite;
}

.featured-track:hover {
	animation-play-state: paused;
}

.featured-list {
	display: flex;
	align-items: center;
	gap: 3rem;
	padding-right: 3rem;
	flex-shrink: 0;
}

.featured-list span {
	display: flex;
	align-items: center;
	height: 24px;
}

.featured-logo {
	height: 22px;
	width: auto;
	opacity: 0.5;
	filter: grayscale(1);
	transition: opacity 0.25s ease, filter 0.25s ease;
}

.featured-logo:hover {
	opacity: 1;
	filter: grayscale(0);
}

@keyframes marqueeScroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-color-scheme: dark) {
	.featured-logo {
		filter: grayscale(1) invert(1);
		opacity: 0.45;
	}
	.featured-logo:hover {
		filter: grayscale(0) invert(0);
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.featured-track {
		animation: none;
	}
}

/* Contact */
.contact {
	margin-bottom: 2.5rem;
}

.contact h2 {
	font-size: 1rem;
	font-weight: 500;
	margin: 0 0 1rem 0;
	color: var(--text-muted);
}

.contact address {
	font-style: normal;
	color: var(--text-muted);
	margin-bottom: 0.75rem;
	font-size: 0.95rem;
	line-height: 1.6;
}

.contact a {
	color: var(--text-muted);
	text-decoration: none;
	transition: color 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.95rem;
}
.contact a:hover {
	color: var(--text-color);
}
.contact p {
	margin: 0.25rem 0;
}

/* Footer */
footer {
	border-top: 1px solid var(--border-color);
	padding-top: 1.25rem;
	color: var(--text-muted);
	font-size: 0.85rem;
}

.legal {
	margin: 0;
	color: var(--text-muted);
	font-size: 0.8rem;
	line-height: 1.5;
}

/* Arrow icon for external links */
.project-details a::after,
.contact a::after {
	content: '';
	width: 12px;
	height: 12px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666666' viewBox='0 0 256 256'%3E%3Cpath d='M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.project-details a:hover::after,
.contact a:hover::after {
	transform: translate(2px, -2px);
}

@media (prefers-color-scheme: dark) {
	.project-details a::after,
	.contact a::after {
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999999' viewBox='0 0 256 256'%3E%3Cpath d='M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z'/%3E%3C/svg%3E");
	}

	.project.vppbox:hover {
		background: #1a1814;
	}
	.project.vppbox:hover .project-name,
	.project.vppbox:hover .project-details p,
	.project.vppbox:hover .project-details a {
		color: #ede9e3;
	}
}

/* Responsive */
@media (max-width: 600px) {
	body {
		padding: 3rem 1.25rem 1.25rem 1.25rem;
	}

	/* Vertical rhythm: section breaks ~3.5rem, inner spacing tight */
	header {
		margin-bottom: 3.5rem;
	}
	.tagline {
		font-size: 1.25rem;
		margin-bottom: 1.5rem;
	}
	.projects {
		gap: 0.625rem;
		margin-bottom: 3.5rem;
	}
	.featured {
		margin-bottom: 3.5rem;
	}
	.featured h2 {
		margin: 0 0 1rem 0;
	}
	.contact {
		margin-bottom: 2rem;
	}

	.project {
		padding: 1.5rem;
	}
	.project-content {
		gap: 1.25rem;
	}
	.project-logo {
		width: 44px;
		height: 44px;
	}
	.wordmark {
		font-size: 1.75rem;
		min-width: 260px;
	}
	.wordmark.hex-mode {
		font-size: 1.3rem;
	}
	.brand-mark {
		top: 1rem;
		right: 1rem;
	}
	.brand-mark svg {
		height: 36px;
		width: 36px;
	}

	/* Built-with: shrink logos + tighten gap to fit mobile viewport */
	.featured-list {
		gap: 2rem;
		padding-right: 2rem;
	}
	.featured-logo {
		height: 18px;
	}
	.featured-container {
		mask-image: linear-gradient(to right, transparent, black 28px, black calc(100% - 28px), transparent);
		-webkit-mask-image: linear-gradient(to right, transparent, black 28px, black calc(100% - 28px), transparent);
	}
}

/* Reduced motion respects user preference */
@media (prefers-reduced-motion: reduce) {
	.cursor { animation: none; }
}
