/* WillV art — shared gallery styles */
:root {
  --bg: #0f0e0d;
  --bg-elevated: #181614;
  --surface: #1f1c1a;
  --text: #e8e4df;
  --text-muted: #9a928a;
  --accent: #c4a574;
  --accent-soft: rgba(196, 165, 116, 0.22);
  --border: rgba(232, 228, 223, 0.08);
  --font-display: "Cormorant Garamond", "Georgia", serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --radius: 6px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(196, 165, 116, 0.12), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(80, 60, 40, 0.15), transparent 50%);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #dcc49a;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(15, 14, 13, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
}

.brand span {
  color: var(--accent);
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem;
  background: var(--surface);
  border-radius: 999px;
  border: 1px solid var(--border);
}

.nav a {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav a:hover {
  color: var(--text);
}

.nav a.is-active {
  color: var(--bg);
  background: var(--accent);
}

.hero {
  max-width: 56rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.hero p {
  margin: 0 auto;
  max-width: 32rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.5rem 0 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

@media (min-width: 768px) {
  .gallery {
    gap: 1.25rem;
  }
}

.gallery-item {
  position: relative;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  aspect-ratio: 1;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 56px rgba(0, 0, 0, 0.55);
}

.gallery-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), opacity 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 40%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.gallery-item:hover::after {
  opacity: 1;
}

.site-footer {
  margin-top: auto;
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 0.85rem;
}

.site-footer a {
  font-weight: 500;
}

.site-footer-sep {
  margin: 0 0.35rem;
  opacity: 0.65;
}

.site-footer code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: var(--surface);
  color: var(--accent);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 7, 6, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  position: relative;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: -2.75rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lightbox-close:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s, border-color 0.2s, opacity 0.25s var(--ease);
}

.lightbox-prev {
  left: max(0.5rem, env(safe-area-inset-left, 0px));
}

.lightbox-next {
  right: max(0.5rem, env(safe-area-inset-right, 0px));
}

.lightbox-nav:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.lightbox.is-solo .lightbox-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 640px) {
  .lightbox-close {
    top: auto;
    bottom: -3rem;
    right: 50%;
    transform: translateX(50%);
  }

  .lightbox-nav {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.6rem;
  }

  .lightbox-prev {
    left: 0.35rem;
  }

  .lightbox-next {
    right: 0.35rem;
  }
}

body.lightbox-open {
  overflow: hidden;
}
