/* =========================================================
   Kody Guffey — Portfolio
   Modern, dependency-free stylesheet
   ========================================================= */

:root {
	--bg: #0a0e14;
	--bg-2: #0f141d;
	--surface: #131a24;
	--surface-2: #182230;
	--border: #223044;
	--text: #e6edf3;
	--muted: #93a1b1;
	--faint: #64748b;
	--accent: #34d399;
	--accent-2: #10b981;
	--accent-soft: rgba(52, 211, 153, 0.12);
	--radius: 16px;
	--radius-sm: 10px;
	--maxw: 1080px;
	--font-display: "Space Grotesk", system-ui, sans-serif;
	--font-body: "Inter", system-ui, -apple-system, sans-serif;
	--shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

* {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1, h2, h3 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.1;
	margin: 0;
	letter-spacing: -0.02em;
}

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

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

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

/* ---------- Background decoration ---------- */
.bg-grid {
	position: fixed;
	inset: 0;
	z-index: -2;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

.bg-glow {
	position: fixed;
	top: -30vh;
	left: 50%;
	transform: translateX(-50%);
	width: 90vw;
	height: 80vh;
	z-index: -1;
	background: radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.14), transparent 60%);
	filter: blur(20px);
	pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
	border-bottom: 1px solid transparent;
}

.site-header.scrolled {
	background: rgba(10, 14, 20, 0.72);
	backdrop-filter: blur(14px);
	border-bottom-color: var(--border);
}

.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 72px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-weight: 600;
}

.brand-mark {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #04120b;
	font-weight: 700;
	font-size: 15px;
}

.nav {
	display: flex;
	align-items: center;
	gap: 28px;
}

.nav a {
	color: var(--muted);
	font-size: 15px;
	font-weight: 500;
	transition: color 0.2s ease;
}

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

.nav-cta {
	padding: 8px 16px;
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text) !important;
}

.nav-cta:hover {
	border-color: var(--accent);
	background: var(--accent-soft);
}

.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 8px;
}

.nav-toggle span {
	width: 24px;
	height: 2px;
	background: var(--text);
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 26px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 15px;
	font-family: var(--font-display);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
	cursor: pointer;
	border: 1px solid transparent;
}

.btn-primary {
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #04120b;
	box-shadow: 0 10px 30px -10px rgba(52, 211, 153, 0.5);
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 40px -12px rgba(52, 211, 153, 0.6);
}

.btn-ghost {
	border-color: var(--border);
	color: var(--text);
}

.btn-ghost:hover {
	border-color: var(--accent);
	background: var(--accent-soft);
	transform: translateY(-2px);
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding: 120px 0 80px;
}

.hero-inner {
	max-width: 820px;
}

.hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--accent);
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	margin: 0 0 22px;
	padding: 6px 14px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--accent-soft);
}

.hero-title {
	font-size: clamp(2.6rem, 7vw, 5rem);
	line-height: 1.04;
	margin: 0 0 18px;
}

.grad {
	background: linear-gradient(120deg, var(--accent), #7dd3fc 90%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero-role {
	font-family: var(--font-display);
	font-size: clamp(1.05rem, 2.4vw, 1.35rem);
	font-weight: 500;
	color: var(--text);
	margin: 0 0 18px;
}

.hero-lead {
	font-size: 1.15rem;
	color: var(--muted);
	max-width: 620px;
	margin: 0 0 34px;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 40px;
}

.hero-social {
	list-style: none;
	display: flex;
	gap: 26px;
	padding: 0;
	margin: 0;
}

.hero-social a {
	color: var(--muted);
	font-size: 15px;
	font-weight: 500;
	position: relative;
	transition: color 0.2s ease;
}

.hero-social a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 0;
	height: 2px;
	background: var(--accent);
	transition: width 0.25s ease;
}

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

.hero-social a:hover::after {
	width: 100%;
}

.scroll-cue {
	position: absolute;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%);
	width: 26px;
	height: 42px;
	border: 2px solid var(--border);
	border-radius: 999px;
	display: grid;
	place-items: start center;
	padding-top: 8px;
}

.scroll-cue span {
	width: 4px;
	height: 8px;
	background: var(--accent);
	border-radius: 2px;
	animation: scrollcue 1.6s ease-in-out infinite;
}

@keyframes scrollcue {
	0% { opacity: 0; transform: translateY(0); }
	40% { opacity: 1; }
	80% { opacity: 0; transform: translateY(12px); }
	100% { opacity: 0; }
}

.mobile-break { display: none; }

/* ---------- Sections ---------- */
.section {
	padding: 96px 0;
	position: relative;
}

.section-head {
	display: flex;
	align-items: baseline;
	gap: 16px;
	margin-bottom: 44px;
}

.section-head h2 {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.section-index {
	font-family: var(--font-display);
	color: var(--accent);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.1em;
}

.section-lead {
	color: var(--muted);
	margin: -28px 0 40px;
	max-width: 620px;
}

/* ---------- About ---------- */
.about-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 48px;
	align-items: start;
}

.about-body p {
	color: var(--muted);
	margin: 0 0 18px;
}

.about-body strong {
	color: var(--text);
	font-weight: 600;
}

.about-facts {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.fact {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px 24px;
}

.fact-num {
	display: block;
	font-family: var(--font-display);
	font-size: 2.2rem;
	font-weight: 700;
	color: var(--accent);
	line-height: 1;
	margin-bottom: 8px;
}

.fact-label {
	color: var(--muted);
	font-size: 14.5px;
}

/* ---------- Timeline ---------- */
.timeline {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.timeline::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 8px;
	bottom: 8px;
	width: 2px;
	background: linear-gradient(var(--accent), transparent);
}

.timeline-item {
	position: relative;
	padding-left: 40px;
	margin-bottom: 26px;
}

.timeline-dot {
	position: absolute;
	left: 0;
	top: 8px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px 26px;
	transition: border-color 0.25s ease, transform 0.25s ease;
}

.timeline-card:hover {
	border-color: var(--accent);
	transform: translateX(4px);
}

.timeline-top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
}

.timeline-top h3 {
	font-size: 1.25rem;
}

.timeline-date {
	color: var(--faint);
	font-size: 14px;
	font-family: var(--font-display);
	white-space: nowrap;
}

.timeline-org {
	color: var(--accent);
	font-weight: 500;
	margin: 4px 0 14px;
	font-size: 15px;
}

.timeline-card ul {
	margin: 0;
	padding-left: 18px;
	color: var(--muted);
}

.timeline-card li {
	margin-bottom: 7px;
	font-size: 15.5px;
}

.timeline-card li::marker {
	color: var(--accent);
}

/* ---------- Skills ---------- */
.skills-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
}

.skill-group {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 26px;
}

.skill-group h3 {
	font-size: 1.1rem;
	margin-bottom: 18px;
	color: var(--text);
}

.chips {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.chips li {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 7px 15px;
	font-size: 14px;
	color: var(--muted);
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chips li:hover {
	color: var(--accent);
	border-color: var(--accent);
	background: var(--accent-soft);
}

/* ---------- Projects ---------- */
.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 26px;
}

.project-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
	transform: translateY(-6px);
	border-color: var(--accent);
	box-shadow: var(--shadow);
}

.project-media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--bg-2);
	border-bottom: 1px solid var(--border);
}

.project-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	transition: transform 0.4s ease;
}

.project-card:hover .project-media img {
	transform: scale(1.04);
}

.project-body {
	padding: 22px 24px 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.project-body h3 {
	font-size: 1.3rem;
	margin-bottom: 8px;
}

.project-body p {
	color: var(--muted);
	font-size: 15px;
	margin: 0 0 16px;
}

.tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
	margin: 0 0 18px;
}

.tags li {
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 500;
	color: var(--accent);
	background: var(--accent-soft);
	border-radius: 6px;
	padding: 4px 9px;
}

.project-link {
	margin-top: auto;
	color: var(--text);
	font-weight: 600;
	font-size: 14.5px;
	font-family: var(--font-display);
	transition: color 0.2s ease, gap 0.2s ease;
}

.project-link:hover {
	color: var(--accent);
}

/* ---------- Contact ---------- */
.contact {
	padding-bottom: 120px;
}

.contact-card {
	background: linear-gradient(160deg, var(--surface-2), var(--surface));
	border: 1px solid var(--border);
	border-radius: 24px;
	padding: clamp(36px, 6vw, 64px);
	text-align: center;
	position: relative;
	overflow: hidden;
}

.contact-card::before {
	content: "";
	position: absolute;
	top: -40%;
	left: 50%;
	transform: translateX(-50%);
	width: 60%;
	height: 100%;
	background: radial-gradient(circle, rgba(52, 211, 153, 0.16), transparent 65%);
	pointer-events: none;
}

.contact-card .section-index {
	display: block;
	margin-bottom: 12px;
}

.contact-card h2 {
	font-size: clamp(2rem, 5vw, 3rem);
	margin-bottom: 16px;
}

.contact-card p {
	color: var(--muted);
	max-width: 540px;
	margin: 0 auto 32px;
}

.contact-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
	border-top: 1px solid var(--border);
	padding: 28px 0;
}

.footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--faint);
	font-size: 14px;
	gap: 16px;
	flex-wrap: wrap;
}

.footer-top {
	color: var(--muted);
	font-weight: 500;
	transition: color 0.2s ease;
}

.footer-top:hover {
	color: var(--accent);
}

/* ---------- Reveal animation ---------- */
.reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
	opacity: 1;
	transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.about-grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

@media (max-width: 720px) {
	.nav {
		position: fixed;
		inset: 72px 0 auto 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: rgba(10, 14, 20, 0.97);
		backdrop-filter: blur(16px);
		border-bottom: 1px solid var(--border);
		padding: 12px 24px 24px;
		transform: translateY(-140%);
		transition: transform 0.35s ease;
	}

	.nav.open {
		transform: translateY(0);
	}

	.nav a {
		padding: 14px 0;
		border-bottom: 1px solid var(--border);
		font-size: 16px;
	}

	.nav-cta {
		margin-top: 14px;
		text-align: center;
		border-bottom: 1px solid var(--border) !important;
	}

	.nav-toggle {
		display: flex;
	}

	.mobile-break {
		display: inline;
	}

	.section {
		padding: 72px 0;
	}

	.hero {
		padding-top: 100px;
	}

	.timeline-top {
		flex-direction: column;
		gap: 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		scroll-behavior: auto !important;
	}

	.reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
