/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
	--color-bg:          #1a1a2e;
	--color-bg-surface:  #16213e;
	--color-bg-elevated: #1f2b47;
	--color-text:        #e0e0e0;
	--color-text-muted:  #8892a4;
	--color-accent:      #e2a83e;
	--color-accent-hover:#c9922e;
	--color-border:      #2a2a4a;

	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	--container-width: 1100px;
	--section-padding: 80px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

* {
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

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

/* ==========================================================================
   Base
   ========================================================================== */

body {
	background-color: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.25;
}

h2 {
	margin-bottom: 24px;
}

h3 {
	margin-bottom: 8px;
}

p {
	color: var(--color-text);
}

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

a:hover {
	color: var(--color-accent-hover);
	text-decoration: underline;
}

.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 24px;
}

.section {
	padding: var(--section-padding) 0;
}

.section-surface {
	background-color: var(--color-bg-surface);
}

#about {
	padding-top: 40px;
	padding-bottom: 40px;
}

#about p + p {
	margin-top: 1.75em;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid var(--color-border);
	background-color: var(--color-bg);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding-top: 20px;
	padding-bottom: 20px;
}

.site-title {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--color-text);
}

.site-title:hover {
	color: var(--color-accent);
	text-decoration: none;
}

.site-nav {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
}

.site-nav a {
	color: var(--color-text-muted);
	font-weight: 500;
}

.site-nav a:hover {
	color: var(--color-accent);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
	padding: 120px 0 40px;
	text-align: center;
}

.hero h1 {
	font-size: 2.5rem;
	margin-bottom: 16px;
}

.hero .tagline {
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 8px;
}

.hero .sub-tagline {
	color: var(--color-text-muted);
	font-size: 1.1rem;
	margin-bottom: 32px;
}

.hero .cta {
	display: inline-block;
	font-weight: 600;
}

/* ==========================================================================
   Philosophy
   ========================================================================== */

.philosophy {
	padding: 24px 0 48px;
}

.philosophy-inner {
	display: flex;
	flex-direction: column;
}

.philosophy-intro {
	color: var(--color-text-muted);
	margin-bottom: 12px;
}

.philosophy-item + .philosophy-item {
	margin-top: 24px;
}

.philosophy-item {
	background-color: var(--color-bg-surface);
	border-left: 3px solid var(--color-accent);
	border-radius: 4px;
	padding: 24px 28px;
}

.philosophy-quote {
	font-style: italic;
	color: var(--color-text-muted);
}

.philosophy-title {
	font-family: var(--font-heading);
	font-weight: 700;
	margin-bottom: 8px;
}

/* ==========================================================================
   Experience / Timeline
   ========================================================================== */

#experience {
	padding-top: 40px;
}

.timeline-entry {
	padding: 24px 0;
	border-bottom: 1px solid var(--color-border);
}

.timeline-entry:last-child {
	border-bottom: none;
}

.timeline-entry p {
	margin-top: 8px;
}

.timeline-meta {
	color: var(--color-text-muted);
	font-size: 0.95rem;
}

.accomplishments {
	list-style: none;
	margin-top: 14px;
	padding-left: 14px;
	border-left: 2px solid var(--color-accent);
}

.accomplishments li {
	color: var(--color-accent);
	font-size: 0.95rem;
}

.accomplishments li + li {
	margin-top: 9px;
}

/* ==========================================================================
   Projects
   ========================================================================== */

.project-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

.project-card {
	position: relative;
	display: block;
	background-color: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.2s ease;
}

.project-card:hover {
	border-color: var(--color-accent);
	text-decoration: none;
}

.project-card-image {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 180px;
	background-color: var(--color-bg-surface);
	padding: 16px;
}

.project-card-image img {
	max-height: 100%;
	object-fit: contain;
}

.project-card-content {
	padding: 24px;
}

.project-card-content h3 {
	color: var(--color-text);
}

.project-card-content p {
	color: var(--color-text-muted);
}

.project-status {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.project-status--live {
	background-color: #2d6a4f;
	color: #e0e0e0;
}

.project-status--testing {
	background-color: rgba(226, 168, 62, 0.2);
	color: var(--color-accent);
}

.project-status--dev {
	background-color: transparent;
	border: 1px solid var(--color-border);
	color: var(--color-text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	border-top: 1px solid var(--color-border);
	padding: 32px 0;
	text-align: center;
}

.site-footer p {
	color: var(--color-text-muted);
}

/* ==========================================================================
   Project Detail Pages
   ========================================================================== */

.back-link {
	display: inline-block;
	margin-top: 24px;
	color: var(--color-text-muted);
	font-size: 0.9rem;
	text-decoration: none;
}

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

.project-hero {
	padding: 32px 0 56px;
	text-align: center;
}

.project-hero-logo {
	max-height: 100px;
	margin: 0 auto 24px;
}

.project-hero h1 {
	font-size: 2.25rem;
	margin-bottom: 12px;
}

.project-hero-tagline {
	font-weight: 700;
	color: var(--color-accent);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 1.1rem;
	margin-top: 8px;
}

.project-hero-subtitle {
	color: var(--color-text-muted);
	font-size: 1.1rem;
	max-width: 640px;
	margin: 0 auto 20px;
}

.project-hero .project-status {
	position: static;
	display: inline-block;
}

.project-detail {
	padding-bottom: var(--section-padding);
}

.project-detail h2 {
	margin-top: 48px;
}

.project-detail h2:first-child {
	margin-top: 0;
}

.project-detail p + p {
	margin-top: 1.5em;
}

.tech-stack {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.tech-stack li {
	background-color: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 0.9rem;
	color: var(--color-text-muted);
}

.project-detail .project-screenshots h2 {
	margin-top: 24px;
}

.screenshot-gallery {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

.screenshot-gallery--phone {
	grid-template-columns: repeat(2, 1fr);
}

.screenshot-item {
	background-color: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	overflow: hidden;
}

.screenshot-item img {
	width: 100%;
	display: block;
	cursor: pointer;
}

.screenshot-item figcaption {
	padding: 12px 16px;
	font-size: 0.85rem;
	color: var(--color-text-muted);
	text-align: center;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease;
}

.lightbox-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.lightbox-content {
	position: relative;
	max-width: 90vw;
	max-height: 85vh;
	cursor: default;
}

.lightbox-content img {
	display: block;
	max-width: 100%;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 4px;
}

.lightbox-caption {
	margin-top: 12px;
	color: var(--color-text-muted);
	font-size: 0.9rem;
	text-align: center;
}

.lightbox-close {
	position: fixed;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	color: var(--color-text);
	font-size: 1.5rem;
	cursor: pointer;
}

.lightbox-close:hover {
	color: var(--color-accent);
}

.lightbox-prev,
.lightbox-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: var(--color-text);
	font-size: 1.5rem;
	cursor: pointer;
}

.lightbox-prev {
	left: 20px;
}

.lightbox-next {
	right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
	color: var(--color-accent);
}

.lightbox-prev[hidden],
.lightbox-next[hidden] {
	display: none;
}

/* ==========================================================================
   Tablet and up
   ========================================================================== */

@media (min-width: 768px) {
	:root {
		--section-padding: 100px;
	}

	.hero h1 {
		font-size: 3.5rem;
	}

	.project-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.screenshot-gallery {
		grid-template-columns: repeat(3, 1fr);
	}

	.screenshot-gallery--2col {
		grid-template-columns: repeat(2, 1fr);
	}

	.screenshot-gallery--phone {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ==========================================================================
   Desktop
   ========================================================================== */

@media (min-width: 1024px) {
	:root {
		--section-padding: 120px;
	}
}
