/* genereese.com redesign (feat/redesign). Dark, quiet, one accent. No blur anywhere.
   Motion: reveals fade + slide, 1 s cubic-bezier(.22,1,.36,1), 80 ms stagger (site.js); none under reduced motion.
   Sticky hero portrait (desktop): plain position sticky, vertically centered below the nav, held until #projects (no motion).
   Safe areas: viewport-fit=cover + env(safe-area-inset-*) on the header, sides and footer (Android gesture bar). */

:root {
	--bg: #0b0d10; --bg-2: #12161b; --line: #232a33; --ink: #e8ecf1; --muted: #9aa5b1; --accent: #5ad1c3; --accent-ink: #062521;
	--ease: cubic-bezier(.22, 1, .36, 1); --radius: 14px; --nav-h: 64px;
	--pad-l: max(20px, env(safe-area-inset-left)); --pad-r: max(20px, env(safe-area-inset-right));
	color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + env(safe-area-inset-top) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 "Open Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: Exo, "Open Sans", sans-serif; font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: var(--pad-l); padding-right: var(--pad-r); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }
.eyebrow { color: var(--accent); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .9rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #c9d1da; max-width: 40em; }

/* Header: solid (no backdrop blur), safe-area aware */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(11, 13, 16, .96); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand { color: var(--ink); text-decoration: none; font: 600 1.15rem Exo, sans-serif; letter-spacing: .02em; }
.nav nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.nav nav a { color: var(--muted); text-decoration: none; font-size: .95rem; transition: color .2s; }
.nav nav a:hover, .nav nav a:focus-visible { color: var(--ink); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease); }
.btn:hover, .btn:focus-visible { border-color: #3a4552; transform: translateY(-2px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover, .btn-primary:focus-visible { background: #7fe0d5; border-color: #7fe0d5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); background: radial-gradient(1200px 500px at 85% 0%, rgba(90, 209, 195, .10), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-shot { margin: 0; }
.hero-shot img { width: 100%; border-radius: var(--radius); }
.hero-icon { display: grid; place-items: center; min-height: 260px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.hero-icon img { width: auto; max-height: 200px; filter: grayscale(1) brightness(1.5); }
.lead p { margin-bottom: .6em; }
.eyebrow a { color: inherit; text-decoration: none; }
.prose { max-width: 46em; }
.prose p, .prose li { color: #c9d1da; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.about a { color: var(--accent); }

/* Sections */
.section { padding: clamp(56px, 8vw, 112px) 0; border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 160px 1fr; gap: 32px; align-items: center; max-width: 860px; }
.headshot { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }

/* Projects grid (cards from the DB: image on top, text below) */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 2rem; }
.card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); color: var(--ink); text-decoration: none; overflow: hidden; transition: border-color .3s var(--ease), transform .3s var(--ease); }
.card:hover, .card:focus-within { border-color: #3a4552; transform: translateY(-4px); }
/* The whole card opens the project page (stretched title link); the outside link sits above it */
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-foot { margin-top: auto; padding-top: .5rem; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-out { position: relative; z-index: 1; color: var(--muted); font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; }
.card-out:hover, .card-out:focus-visible { color: var(--ink); }
.card-media { aspect-ratio: 16 / 10; border-bottom: 1px solid var(--line); background: #07090b; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card-media-icon { display: grid; place-items: center; }
.card-media-icon img { width: auto; height: 46%; object-fit: contain; filter: grayscale(1) brightness(1.5); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.card h3 { font-size: 1.5rem; }
.card p { color: var(--muted); margin-bottom: .75rem; }
.card .note { font-size: .85rem; color: #7d8894; }
.card .more { color: var(--accent); font-weight: 600; font-size: .9rem; }
.card .more::after { content: " \2192"; }
.tag { align-self: flex-start; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(90, 209, 195, .35); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }

/* Project sections */
.project-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.features { list-style: none; padding: 0; margin: 2.5rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.features li { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.features h3 { font-size: 1.02rem; margin-bottom: .35em; }
.features p { color: var(--muted); font-size: .95rem; margin: 0; }
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: min(520px, 84%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; overscroll-behavior-x: contain; }
.shot { margin: 0; scroll-snap-align: start; }
.shot img { border: 1px solid var(--line); border-radius: 10px; }
.shot figcaption { color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.contact { text-align: center; }
.contact .lead { margin-left: auto; margin-right: auto; }
.contact .actions { justify-content: center; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }

/* Reveals (site.js adds html.reveal; reduced motion: everything static) */
@media (prefers-reduced-motion: no-preference) {
	html.reveal [data-reveal] { opacity: 0; transform: translateY(2.5rem); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--delay, 0s); }
	html.reveal [data-reveal].in { opacity: 1; transform: none; }
	html.reveal [data-reveal].done { transition-delay: 0s; }
	html.reveal .card[data-reveal].done { transition: border-color .3s var(--ease), transform .3s var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; }
}

/* Tablet */
@media (max-width: 991px) {
	.hero-grid, .split { grid-template-columns: 1fr; }
	.features { grid-template-columns: repeat(2, 1fr); }
}
/* Phone */
@media (max-width: 600px) {
	body { font-size: 16px; }
	:root { --nav-h: 56px; }
	.nav nav { gap: 16px; }
	.nav nav a { font-size: .9rem; }
	.grid, .features { grid-template-columns: 1fr; }
	.about-grid { grid-template-columns: 1fr; justify-items: start; gap: 20px; }
	.headshot { width: 120px; height: 120px; }
	.actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* Personal hero (portrait) and the featured project card (Xirsix): wide, image beside the text */
.hero-me .lead a, .hero-me p a { color: var(--accent); }
.hero-me { padding-bottom: 0; }
.hero-me .hero-grid {
	grid-template-columns: 1.35fr .65fr;
	align-items: start;
	/* hero bottom padding lives inside the grid so the sticky portrait's containing block ends at #projects */
	padding-bottom: clamp(48px, 7vw, 96px);
	--portrait: clamp(180px, 24vw, 320px);
}
.hero-portrait {
	margin: 0;
	justify-self: center;
	align-self: start;
	position: sticky;
	/* vertical center of the visible area below the fixed nav */
	top: calc((100vh + var(--nav-h) + env(safe-area-inset-top) - var(--portrait)) / 2);
	z-index: 1;
}
.hero-portrait img {
	width: var(--portrait);
	height: auto;
	aspect-ratio: 1;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--line);
	box-shadow: 0 0 0 10px rgba(90, 209, 195, .06);
}
.card-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; }
.card-featured .card-media { aspect-ratio: auto; min-height: 300px; border-bottom: 0; border-right: 1px solid var(--line); }
.card-featured .card-media img { object-fit: contain; object-position: center; padding: 24px; }
.card-featured .card-body { padding: 32px; justify-content: center; }
.card-featured h3 { font-size: 2rem; }
.card-points { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); }
.card-points li { margin: .2rem 0; }
@media (max-width: 767px) {
	.hero-me .hero-grid { grid-template-columns: 1fr; }
	.hero-portrait {
		position: static;
		justify-self: start;
		order: -1;
		top: auto;
	}
	.hero-me .hero-grid { --portrait: 140px; }
	.card-featured { display: flex; }
	.card-featured .card-media { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
	.card-featured .card-body { padding: 22px 24px 24px; }
}
