/* ABOUTME: Stylesheet for garitychapman.com painter portfolio */
/* ABOUTME: Responsive gallery grid, CSS lightbox, minimal typographic design */

:root {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #333;
  --max-width: 1100px;
  --gap: 1.5rem;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Chivo", sans-serif;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navigation ── */

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  padding: 3rem 1.8rem 0;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-size: 3rem;
  letter-spacing: -0.17rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.15s;
}

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

/* ── Main content ── */

main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.page-title {
  font-size: 1.4rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  color: var(--muted);
}

/* ── Gallery grid ── */

.series {
  margin-bottom: 4rem;
}

.series h2 {
  font-size: 1rem;
  font-weight: normal;
  letter-spacing: 0.08em;
  /*
  text-transform: uppercase;
  color: var(--muted);
  */
  margin-bottom: 1.5rem;
}

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

.gallery-item a {
  display: block;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  display: block;
  transition: opacity 0.2s, transform 0.3s;
}

.gallery-item img:hover {
  opacity: 0.92;
  transform: scale(1.015);
}

/* ── CSS Lightbox ── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.92);
  padding: 1rem;
}

.lightbox:target {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.lightbox img {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 2;
  color: #fff;
  font-size: 2rem;
  text-decoration: none;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}

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

/* ── Homepage intro ── */

.intro {
  margin-bottom: 3rem;
}

/* ── Homepage scroll paintings ── */

.scroll-paintings {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.scroll-painting {
  margin: 0;
}

.scroll-painting img {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
}

/* ── Prose (markdown pages) ── */

.prose {
  margin: 0 auto;
}

.prose h1 {
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

.prose h2 {
  font-size: 1.15rem;
  font-weight: normal;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.2rem;
}

.prose a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #ccc;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

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

/* ── Footer ── */

footer {
  border-top: 1px solid #e0e0de;
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  nav {
    padding: 0.75rem 0.8rem 0;
    line-height: 2.5em;
  }

  main {
    padding: 0 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 400px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
