/* Robin Lively — dark gallery theme, after mikebeeman.com:
   near-black background, thin gold frames, info on hover. */

:root {
	--bg: #14110c;
	--bg-soft: #1d1913;
	--ink: #e9e2d2;
	--ink-dim: #a89e86;
	--gold: #c9a24b;
	--gold-dim: #8a6f33;
	--frame-pad: 7px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

h1, h2, h3, .masthead-name {
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 400;
	letter-spacing: 0.04em;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: #e3c178; text-decoration: underline; }

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

/* ---------- masthead ---------- */

.masthead {
	text-align: center;
	padding: 2.5rem 1rem 0;
}

.masthead-name {
	font-size: clamp(2rem, 5vw, 3rem);
	margin: 0;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.masthead-name a { color: var(--ink); text-decoration: none; }
.masthead-name a:hover { color: var(--gold); }

.masthead-tag {
	margin: 0.4rem 0 0;
	color: var(--ink-dim);
	font-style: italic;
	font-family: Georgia, serif;
}

.main-nav {
	margin-top: 1.4rem;
	border-top: 1px solid #2c2619;
	border-bottom: 1px solid #2c2619;
}

.main-nav ul {
	list-style: none;
	margin: 0;
	padding: 0.7rem 1rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem 1.6rem;
}

.main-nav a {
	color: var(--ink-dim);
	text-transform: uppercase;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--gold); }

/* ---------- layout ---------- */

.wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.25rem 4rem;
}

.section-title {
	text-align: center;
	font-size: 1.7rem;
	margin: 0.5rem 0 2rem;
	color: var(--ink);
}

.section-title::after {
	content: "";
	display: block;
	width: 64px;
	height: 1px;
	background: var(--gold-dim);
	margin: 0.9rem auto 0;
}

.empty-note {
	text-align: center;
	color: var(--ink-dim);
	font-style: italic;
	font-family: Georgia, serif;
	padding: 3rem 1rem;
	border: 1px dashed #3a3222;
	max-width: 560px;
	margin: 0 auto;
}

/* ---------- gallery : justified rows, whole paintings, no cropping ----------
   Each card's width grows in proportion to its painting's aspect ratio
   (--ar, set per card), so every row fills the full width at one height
   and no painting is ever cropped. */

.gallery-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 2.2rem 1.8rem;
	align-items: flex-start;
}

.card {
	/* Justified rows: width stays proportional to the painting's aspect ratio
	   (--ar) in every flex term, so each row fills the full width at one
	   uniform height and no painting is ever cropped. */
	flex-grow: var(--ar, 1.33);
	flex-shrink: 1;
	flex-basis: calc(var(--ar, 1.33) * 150px);
	min-width: 0;
	max-width: 560px;
}

@media (max-width: 559px) {
	.card { flex-basis: calc(var(--ar, 1.33) * 92px); }
}

.card a {
	display: block;
	text-decoration: none;
	color: inherit;
}

.card .frame {
	position: relative;
	display: block;
	background: #0c0a07;
	border: 1px solid var(--gold-dim);
	padding: var(--frame-pad);
	transition: border-color 0.25s ease;
}

.card a:hover .frame,
.card a:focus-visible .frame { border-color: var(--gold); }

.card .frame img {
	width: 100%;
	height: auto;
	aspect-ratio: var(--ar, 4 / 3);
}

.card .overlay {
	position: absolute;
	inset: var(--frame-pad);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 1rem;
	background: rgba(12, 10, 7, 0.92);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.card a:hover .overlay,
.card a:focus-visible .overlay { opacity: 1; }

.card .overlay .t {
	font-family: Georgia, serif;
	font-size: 1.15rem;
	color: #f2ead6;
	margin-bottom: 0.35rem;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.card .overlay .d {
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gold);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.card .overlay .sold-flag {
	margin-top: 0.5rem;
	font-size: 0.72rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #0c0a07;
	background: var(--gold);
	padding: 0.2rem 0.7rem;
}

/* Touch devices: no hover, so show the info as a caption instead. */
@media (hover: none) {
	.card .overlay {
		position: static;
		opacity: 1;
		background: none;
		padding: 0.6rem 0 0;
	}
	.card .overlay .t,
	.card .overlay .d { text-shadow: none; }
	.card .overlay .t { font-size: 1rem; }
}

/* ---------- painting detail ---------- */

.detail { text-align: center; }

.detail .frame {
	display: inline-block;
	background: #0c0a07;
	border: 1px solid var(--gold-dim);
	padding: 10px;
	max-width: 100%;
}

.detail .frame img {
	/* Definite px cap (no %) so the shrink-to-fit frame measures the same
	   width the image actually renders at; a % here is unresolvable during
	   intrinsic sizing and leaves the frame wider than the image. */
	max-width: 880px;
}

@media (max-width: 920px) {
	.detail .frame img { max-width: 100%; }
}

.detail h1 {
	font-size: 2rem;
	margin: 1.8rem 0 0.3rem;
}

.detail .specs {
	color: var(--ink-dim);
	font-family: Georgia, serif;
	font-style: italic;
	margin: 0 0 0.4rem;
}

.detail .price {
	color: var(--gold);
	font-size: 1.25rem;
	letter-spacing: 0.06em;
	margin: 0.4rem 0;
}

.detail .body {
	max-width: 640px;
	margin: 1.5rem auto 0;
	text-align: left;
	color: var(--ink-dim);
}

.back-link {
	display: inline-block;
	margin-top: 2.5rem;
	font-size: 0.82rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* ---------- home ---------- */

.home-intro {
	text-align: center;
	max-width: 640px;
	margin: 0 auto 2.5rem;
	color: var(--ink-dim);
	font-family: Georgia, serif;
	font-style: italic;
	font-size: 1.1rem;
}

.section-links {
	list-style: none;
	margin: 3rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	text-align: center;
}

.section-links a {
	display: block;
	border: 1px solid #2c2619;
	padding: 1.1rem 0.6rem;
	color: var(--ink);
	text-decoration: none;
	transition: border-color 0.25s ease;
}

.section-links a:hover { border-color: var(--gold); }

.section-links .name {
	display: block;
	font-family: Georgia, serif;
	font-size: 1.05rem;
}

.section-links .count {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-dim);
}

/* ---------- news ---------- */

.news-list { list-style: none; margin: 0; padding: 0; max-width: 720px; margin: 0 auto; }

.news-list li {
	border-bottom: 1px solid #2c2619;
	padding: 1.4rem 0;
}

.news-list time {
	display: block;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-dim);
}

.news-list a.title {
	font-family: Georgia, serif;
	font-size: 1.3rem;
	color: var(--ink);
}

.news-list a.title:hover { color: var(--gold); }

.post { max-width: 720px; margin: 0 auto; }
.post h1 { font-size: 2rem; margin-bottom: 0.3rem; }
.post time { color: var(--ink-dim); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.post .frame {
	background: #0c0a07;
	border: 1px solid var(--gold-dim);
	padding: 8px;
	margin: 1.5rem 0;
}
.post .body { color: #d8d0bd; }
.post .body img { border: 1px solid var(--gold-dim); padding: 6px; background: #0c0a07; margin: 1rem 0; }

/* ---------- static pages / forms ---------- */

.page { max-width: 680px; margin: 0 auto; }
.page h1 { text-align: center; font-size: 1.8rem; }
.page h1::after {
	content: ""; display: block; width: 64px; height: 1px;
	background: var(--gold-dim); margin: 0.9rem auto 0;
}
.page .body { color: #d8d0bd; }
.page .headshot {
	float: left;
	width: 180px;
	height: auto;
	margin: 0.3rem 1.4rem 1rem 0;
	border: 1px solid var(--gold-dim);
	padding: 6px;
	background: #0c0a07;
}
@media (max-width: 520px) {
	.page .headshot { float: none; display: block; margin: 0 auto 1.2rem; }
}
.gallery-list {
	display: grid;
	gap: 1.4rem;
	margin-top: 1.6rem;
}
.gallery-card {
	border: 1px solid var(--gold-dim);
	background: #0c0a07;
	padding: 1.2rem 1.4rem;
}
.gallery-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
	color: var(--gold);
}
.gallery-card p { margin: 0; line-height: 1.7; }

.contact-form { max-width: 560px; margin: 2rem auto 0; }

.contact-form label {
	display: block;
	margin: 1.1rem 0 0.35rem;
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-dim);
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	background: var(--bg-soft);
	border: 1px solid #3a3222;
	color: var(--ink);
	padding: 0.7rem 0.8rem;
	font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: var(--gold);
}

.contact-form textarea { min-height: 160px; resize: vertical; }

.contact-form button {
	margin-top: 1.4rem;
	background: transparent;
	border: 1px solid var(--gold);
	color: var(--gold);
	padding: 0.8rem 2.2rem;
	font-size: 0.82rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease;
}

.contact-form button:hover { background: var(--gold); color: #14110c; }

/* ---------- footer ---------- */

.site-footer {
	text-align: center;
	padding: 2.5rem 1rem 3rem;
	border-top: 1px solid #2c2619;
	color: var(--ink-dim);
	font-size: 0.85rem;
}

.site-footer .rule {
	width: 64px; height: 1px; background: var(--gold-dim);
	margin: 0 auto 1.2rem;
}
