/* =============================================================================
   Larry Zgoda Studio — style.css
   ============================================================================= */

/* 1. DESIGN TOKENS
   ============================================================================= */
:root {
	--color-bg: #faf9f7;
	--color-text: #1c1c1a;
	--color-text-muted: #6b6460;
	--color-accent: #8b6000;
	--color-header-bg: #862e1b;
	--color-header-text: #f0ede8;
	--color-border: #ddd8d0;
	--color-overlay: rgba(20, 30, 35, 0.92);

	--font-serif: Georgia, 'Times New Roman', serif;
	--font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;

	--max-width: 1100px;
	--text-width: 72ch;
	--gap: 4px;
}

/* 2. RESET / BASE
   ============================================================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-sans);
	line-height: 1.65;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1;
}

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

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

a:hover {
	text-decoration: underline;
}

h1,
h2,
h3 {
	font-family: var(--font-serif);
	font-weight: normal;
	line-height: 1.25;
	color: var(--color-text);
}

h1 {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	margin-bottom: 1rem;
}
h2 {
	font-size: clamp(1.35rem, 3vw, 1.85rem);
	margin-bottom: 0.75rem;
}
h3 {
	font-size: 1.2rem;
	margin-bottom: 0.5rem;
}

p {
	margin-bottom: 1em;
}

ul,
ol {
	padding-left: 1.5em;
	margin-bottom: 1em;
}

strong {
	font-weight: 600;
}
em {
	font-style: italic;
}

/* 3. HEADER & NAVIGATION
   ============================================================================= */
.site-header {
	background: var(--color-header-bg);
	color: var(--color-header-text);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.site-nav {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	gap: 2rem;
	height: 64px;
}

.site-title {
	text-decoration: none;
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.site-title img {
	display: block;
	height: 42px;
	width: auto;
}

.site-title:hover {
	opacity: 0.85;
	text-decoration: none;
}

.nav-links {
	list-style: none;
	display: flex;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	margin-left: auto;
}

.nav-links a {
	color: var(--color-header-text);
	text-decoration: none;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	padding: 0.4rem 0.75rem;
	border-radius: 3px;
	transition:
		background 0.15s,
		color 0.15s;
	white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	text-decoration: none;
}

.nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	margin-left: auto;
	flex-direction: column;
	gap: 5px;
}

.nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-header-text);
	transition:
		transform 0.2s,
		opacity 0.2s;
}

.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);
}

/* 4. HERO CAROUSEL
   ============================================================================= */
.hero-carousel {
	position: relative;
	overflow: hidden;
	background: var(--color-header-bg);
	max-height: 400px;
}

.hero-carousel .carousel-track {
	display: flex;
	transition: transform 0.6s ease;
}

.hero-carousel .carousel-slide {
	min-width: 100%;
	position: relative;
}

.hero-carousel .carousel-slide img {
	width: 100%;
	height: 345px;
	object-fit: cover;
	object-position: center;
	display: block;
}

.hero-carousel .carousel-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(20, 30, 35, 0.75));
	color: #fff;
	padding: 2rem 2rem 1.25rem;
	font-family: var(--font-serif);
	font-size: 1rem;
	font-style: italic;
}

.carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(20, 30, 35, 0.55);
	color: #fff;
	border: none;
	cursor: pointer;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
	z-index: 10;
}

.carousel-btn:hover {
	background: rgba(20, 30, 35, 0.85);
}
.carousel-btn.prev {
	left: 1rem;
}
.carousel-btn.next {
	right: 1rem;
}

.carousel-dots {
	position: absolute;
	bottom: 0.5rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 6px;
	z-index: 10;
}

.carousel-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s;
}

.carousel-dot.active {
	background: #fff;
}

/* 5. HOME INTRO & SECTION CARDS
   ============================================================================= */
.home-intro {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 3rem 1.5rem 2rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
}

.home-intro blockquote {
	font-family: var(--font-serif);
	font-size: 1.2rem;
	font-style: italic;
	color: var(--color-accent);
	border-left: 3px solid var(--color-accent);
	padding-left: 1.25rem;
	margin-bottom: 1.25rem;
	line-height: 1.5;
}

.section-cards {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1.5rem 3rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

.section-card {
	display: block;
	text-decoration: none;
	color: var(--color-text);
	border: 1px solid var(--color-border);
	border-radius: 4px;
	overflow: hidden;
	transition:
		box-shadow 0.2s,
		transform 0.2s;
}

.section-card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
	text-decoration: none;
}

.section-card img {
	width: 100%;
	height: 220px;
	object-fit: cover;
}

.section-card-body {
	padding: 1.25rem;
}

.section-card-body h2 {
	font-size: 1.4rem;
	margin-bottom: 0.5rem;
	color: var(--color-header-bg);
}

.section-card-body p {
	font-size: 0.9rem;
	color: var(--color-text-muted);
	margin-bottom: 0;
}

/* 6. PAGE HEADER (inner pages)
   ============================================================================= */
.page-header {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2.5rem 1.5rem 1rem;
	border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
	margin-bottom: 0.25rem;
}

.page-header .breadcrumb {
	font-size: 0.8rem;
	color: var(--color-text-muted);
	margin-bottom: 0.75rem;
}

.page-header .breadcrumb a {
	color: var(--color-text-muted);
}

.page-header .breadcrumb a:hover {
	color: var(--color-accent);
}

/* 7. SECTION INDEX (subcategory cards grid)
   ============================================================================= */
.subcategory-grid {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
}

.subcategory-intro {
	max-width: var(--text-width);
	margin-bottom: 2rem;
}

.subcategory-intro blockquote {
	font-family: var(--font-serif);
	font-size: 1.1rem;
	font-style: italic;
	color: var(--color-accent);
	border-left: 3px solid var(--color-accent);
	padding-left: 1.25rem;
	margin-bottom: 1rem;
	line-height: 1.55;
}

.subcategory-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.25rem;
}

.subcat-card {
	display: block;
	text-decoration: none;
	color: var(--color-text);
	border: 1px solid var(--color-border);
	border-radius: 4px;
	overflow: hidden;
	transition:
		box-shadow 0.2s,
		transform 0.2s;
}

.subcat-card:hover {
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
	text-decoration: none;
}

.subcat-card img {
	width: 100%;
	height: 160px;
	object-fit: cover;
}

.subcat-card-body {
	padding: 0.75rem 1rem;
}

.subcat-card-body h3 {
	font-size: 1rem;
	color: var(--color-header-bg);
	margin-bottom: 0;
}

/* 8. GALLERY GRID
   ============================================================================= */
.gallery-page {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
}

.gallery-intro {
	max-width: var(--text-width);
	margin-bottom: 2rem;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--gap);
}

.gallery-item {
	display: block;
	overflow: hidden;
	position: relative;
	background: #1c1c1a;
	aspect-ratio: 4 / 3;
}

.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition:
		transform 0.3s ease,
		opacity 0.3s ease;
	opacity: 0.95;
}

.gallery-item:hover img {
	transform: scale(1.04);
	opacity: 1;
}

/* 9. LIGHTBOX
   ============================================================================= */
.lightbox-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: var(--color-overlay);
	z-index: 1000;
	align-items: center;
	justify-content: center;
}

.lightbox-overlay.open {
	display: flex;
}

.lightbox-inner {
	position: relative;
	max-width: 92vw;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox-inner img {
	max-width: 90vw;
	max-height: 88vh;
	object-fit: contain;
	display: block;
	box-shadow: 0 8px 48px rgba(0, 0, 0, 0.7);
}

.lightbox-close {
	position: fixed;
	top: 1rem;
	right: 1.25rem;
	background: none;
	border: none;
	color: #fff;
	font-size: 2rem;
	cursor: pointer;
	line-height: 1;
	padding: 0.25rem 0.5rem;
	opacity: 0.8;
	transition: opacity 0.15s;
	z-index: 1001;
}

.lightbox-close:hover {
	opacity: 1;
}

.lightbox-nav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #fff;
	font-size: 2rem;
	cursor: pointer;
	padding: 0.75rem 1rem;
	transition: background 0.15s;
	z-index: 1001;
	line-height: 1;
}

.lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.28);
}
.lightbox-nav.prev {
	left: 0;
	border-radius: 0 3px 3px 0;
}
.lightbox-nav.next {
	right: 0;
	border-radius: 3px 0 0 3px;
}

.lightbox-counter {
	position: fixed;
	bottom: 1rem;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.85rem;
	font-family: var(--font-sans);
	z-index: 1001;
}

/* 10. TEXT / ARTICLE LAYOUT
   ============================================================================= */
.text-page {
	max-width: var(--text-width);
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
}

.text-page h2 {
	margin-top: 2rem;
	margin-bottom: 0.75rem;
	color: var(--color-header-bg);
}

.text-page h3 {
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
	color: var(--color-header-bg);
}

.text-page h4 {
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-text-muted);
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}

.text-page blockquote {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 1.1rem;
	color: var(--color-accent);
	border-left: 3px solid var(--color-accent);
	padding-left: 1.25rem;
	margin: 1.5rem 0;
	line-height: 1.55;
}

.text-page .byline {
	font-size: 0.85rem;
	color: var(--color-text-muted);
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--color-border);
}

.article-photo {
	margin: 1.5rem auto;
	max-width: 400px;
}

.article-photo.float-right {
	float: right;
	margin: 0.25rem 0 1rem 1.75rem;
	max-width: 260px;
}

.article-photo.float-left {
	float: left;
	margin: 0.25rem 1.75rem 1rem 0;
	max-width: 220px;
}

.article-photo img {
	width: 100%;
	border-radius: 3px;
}

.article-photo figcaption {
	font-size: 0.8rem;
	color: var(--color-text-muted);
	margin-top: 0.4rem;
	text-align: center;
}

/* Resume / list items */
.resume-year {
	font-weight: 600;
	color: var(--color-header-bg);
	margin-top: 1.25rem;
	margin-bottom: 0.25rem;
	font-size: 1rem;
	font-family: var(--font-sans);
}

.resume-entry {
	margin-bottom: 0.5rem;
	padding-left: 1rem;
	border-left: 2px solid var(--color-border);
}

/* 11. ABOUT PAGE (photo float)
   ============================================================================= */
.about-photo {
	float: right;
	margin: 0 0 1.5rem 2rem;
	max-width: 260px;
	border-radius: 3px;
	overflow: hidden;
	border: 1px solid var(--color-border);
}

.about-photo img {
	width: 100%;
	display: block;
}

.clearfix::after {
	content: '';
	display: table;
	clear: both;
}

/* Edgar Miller page photos */
.inline-photos {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin: 2rem 0;
}

.inline-photos figure img {
	width: 100%;
	border-radius: 3px;
	border: 1px solid var(--color-border);
}

.inline-photos figcaption {
	font-size: 0.75rem;
	color: var(--color-text-muted);
	margin-top: 0.3rem;
}

/* 12. FOOTER
   ============================================================================= */
.site-footer {
	background: var(--color-header-bg);
	color: rgba(240, 237, 232, 0.75);
	text-align: center;
	padding: 2rem 1.5rem;
	font-size: 0.85rem;
	font-family: var(--font-sans);
	line-height: 1.7;
}

.site-footer p {
	margin-bottom: 0.25rem;
}

.footer-memorial {
	color: rgba(240, 237, 232, 0.55);
	font-style: italic;
	font-size: 0.8rem;
	margin-top: 0.5rem;
}

/* 13. RESPONSIVE
   ============================================================================= */
@media (max-width: 768px) {
	/* Nav */
	.nav-toggle {
		display: flex;
	}

	.nav-links {
		display: none;
		position: absolute;
		top: 64px;
		left: 0;
		right: 0;
		background: var(--color-header-bg);
		flex-direction: column;
		padding: 0.75rem 0;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
		margin-left: 0;
	}

	.nav-links.open {
		display: flex;
	}

	.nav-links li {
		width: 100%;
	}

	.nav-links a {
		display: block;
		padding: 0.75rem 1.5rem;
		border-radius: 0;
		font-size: 1rem;
	}

	/* Hero */
	.hero-carousel .carousel-slide img {
		height: 200px;
	}

	/* Home intro grid */
	.home-intro {
		grid-template-columns: 1fr;
		gap: 1.5rem;
		padding: 2rem 1.25rem 1rem;
	}

	/* Section cards */
	.section-cards {
		grid-template-columns: 1fr;
		padding: 0 1.25rem 2rem;
	}

	/* Gallery */
	.gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	}

	/* Subcategory cards */
	.subcategory-cards {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	}

	/* About photo float */
	.about-photo {
		float: none;
		margin: 0 auto 1.5rem;
		max-width: 200px;
	}

	/* Edgar Miller inline photos */
	.inline-photos {
		grid-template-columns: 1fr;
	}

	/* Text page padding */
	.text-page {
		padding: 1.5rem 1.25rem 2rem;
	}

	.gallery-page {
		padding: 1.5rem 1.25rem 2rem;
	}

	.subcategory-grid {
		padding: 1.5rem 1.25rem 2rem;
	}

	/* Lightbox nav */
	.lightbox-nav {
		font-size: 1.5rem;
		padding: 0.5rem 0.65rem;
	}
}

@media (max-width: 480px) {
	.gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}

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