:root {
  --bg: #0a0a0a;
  --bg-elevated: #151515;
  --text: #e8e8e8;
  --text-muted: #999;
  --accent: #fff;
  --border: #2a2a2a;
  --shadow: rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 3rem 2rem 2rem;
  text-align: center;
  background: var(--bg);
  z-index: 100;
}

.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-header .home-link {
  position: absolute;
  top: 3rem;
  right: 2rem;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-header .home-link:hover {
  color: var(--accent);
}

/* Site Navigation */
.site-nav {
  margin-top: 1.5rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
}

.site-nav .nav-link {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.site-nav .nav-link:hover {
  color: var(--accent);
}

.site-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.site-nav .nav-link:hover::after {
  transform: scaleX(1);
}

.site-nav .nav-link.active {
  color: var(--accent);
  cursor: default;
}

.site-nav .nav-link.active::after {
  transform: scaleX(1);
}

/* Add padding to body to account for fixed header */
body {
  padding-top: 7rem;
}

/* Album Grid */
.albums {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.albums ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.album-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow);
}

.album-item a {
  display: block;
  position: relative;
  text-decoration: none;
  color: var(--text);
}

.album-cover {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  background: var(--bg-elevated);
  transition: transform 0.4s ease;
}

.album-item:hover .album-cover {
  transform: scale(1.05);
}

.album-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: padding 0.3s ease;
}

.album-item:hover .album-title {
  padding-bottom: 1.75rem;
}

/* Album Page */
.album {
  max-width: 100%;
  margin: 0 auto;
}

.album > h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin: 4rem 0 2rem;
  color: var(--text);
  text-transform: uppercase;
}

/* Album Description */
.album-description {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
  color: var(--text);
  line-height: 1.8;
  font-size: 1rem;
}

.album-description p {
  margin: 0 0 1.2rem;
}

.album-description p:last-child {
  margin-bottom: 0;
}

.album-description a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.album-description a:hover {
  border-bottom-color: var(--accent);
}

/* Client Gallery Instructions */
.client-instructions {
  max-width: 800px;
  margin: 2rem auto 3rem;
  padding: 1.5rem 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  line-height: 1.7;
}

.client-instructions h3 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.client-instructions ol {
  margin: 0;
  padding-left: 1.5rem;
}

.client-instructions li {
  margin: 0.75rem 0;
}

.client-instructions ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.client-instructions ul li {
  margin: 0.5rem 0;
}

.client-instructions p {
  margin: 1.5rem 0 0;
  padding: 1rem;
  background: rgba(255, 215, 0, 0.1);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
}

.client-instructions strong {
  color: var(--accent);
}

/* Text Page */
.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.page > h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin: 2rem 0 3rem;
  color: var(--text);
  text-transform: uppercase;
}

.page-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.page-body h1,
.page-body h2,
.page-body h3 {
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.page-body h1 {
  font-size: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.page-body h2 {
  font-size: 1.6rem;
}

.page-body h3 {
  font-size: 1.3rem;
}

.page-body p {
  margin: 1.25rem 0;
}

.page-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.page-body a:hover {
  border-bottom-color: var(--accent);
}

.page-body ul,
.page-body ol {
  margin: 1.25rem 0;
  padding-left: 2rem;
}

.page-body li {
  margin: 0.5rem 0;
}

.page-body blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  font-style: italic;
  color: var(--text-muted);
}

.page-body code {
  background: var(--bg-elevated);
  padding: 0.2rem 0.4rem;
  border-radius: 2px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.page-body pre {
  background: var(--bg-elevated);
  padding: 1rem;
  border-radius: 2px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.page-body pre code {
  background: none;
  padding: 0;
}

.page-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.page-body strong {
  font-weight: 600;
  color: var(--accent);
}

.page-body em {
  font-style: italic;
  color: var(--text-muted);
}

/* Gallery */
.gallery {
  position: relative;
  padding: 0;
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
}

.photo {
  position: absolute;
  margin: 0;
  padding: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  cursor: pointer;
}

.photo.positioned {
  opacity: 1;
}

/* Culling overlay buttons */
.cull-overlay {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.photo:hover .cull-overlay {
  opacity: 1;
}

/* Show overlay for selected images even without hover */
figure[data-selection="favorite"] .cull-overlay,
figure[data-selection="rejected"] .cull-overlay {
  opacity: 1;
}

/* Add colored border to selected images */
figure[data-selection="favorite"] {
  outline: 4px solid gold;
  outline-offset: -4px;
}

figure[data-selection="rejected"] {
  outline: 4px solid #ff4444;
  outline-offset: -4px;
}

.cull-overlay button {
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.cull-overlay button:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.1);
}

/* Active favorite button - bright gold */
figure[data-selection="favorite"] .cull-overlay .fav {
  background: gold;
  color: #000;
  border-color: gold;
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

/* Active reject button - bright red */
figure[data-selection="rejected"] .cull-overlay .rej {
  background: #ff4444;
  color: #fff;
  border-color: #ff4444;
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(255, 68, 68, 0.8);
}

.photo img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--bg-elevated);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo:hover img {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

button {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
}

button:hover {
  background: var(--border);
  border-color: var(--text-muted);
}

.client-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem auto;
  max-width: 600px;
}

.client-actions button {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  flex: 1;
  max-width: 250px;
}

#export-selections {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 500;
}

#export-selections:hover {
  background: var(--text);
  border-color: var(--text);
}

#clear-selections {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

#clear-selections:hover {
  background: rgba(255, 0, 0, 0.1);
  border-color: #ff4444;
  color: #ff4444;
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}

#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

#lightbox .lightbox-content {
  max-width: calc(100vw - 4rem);
  max-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#lightbox .lightbox-content img {
  max-width: calc(100vw - 4rem);
  max-height: calc(100vh - 4rem);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#lightbox .lightbox-caption {
  max-width: calc(100vw - 4rem);
  margin: 0.5rem auto 0;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}

#lightbox .lightbox-caption p {
  margin: 0.5rem 0;
}

#lightbox .lightbox-caption p:first-child {
  margin-top: 0;
}

#lightbox .lightbox-caption p:last-child {
  margin-bottom: 0;
}

#lightbox .lightbox-caption a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

#lightbox .lightbox-caption a:hover {
  border-bottom-color: var(--accent);
}

/* Lightbox culling controls */
#lightbox .lightbox-cull {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 1001;
}

#lightbox .lightbox-cull button {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0.2rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#lightbox .lightbox-cull button .icon {
  font-size: 1.2rem;
}

#lightbox .lightbox-cull button:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateY(-2px);
}

#lightbox .lightbox-cull .lightbox-fav.active {
  background: rgba(255, 215, 0, 0.3);
  border-color: gold;
}

#lightbox .lightbox-cull .lightbox-rej.active {
  background: rgba(255, 0, 0, 0.3);
  border-color: #ff4444;
}

#lightbox .lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  color: var(--accent);
  font-size: 2.5rem;
  border: 0;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  line-height: 1;
}

#lightbox .lightbox-close:hover {
  transform: scale(1.1);
}

#lightbox .lightbox-prev,
#lightbox .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
  border: 0;
  padding: 1rem 1.25rem;
  font-size: 2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease;
  backdrop-filter: blur(10px);
}

#lightbox .lightbox-prev:hover,
#lightbox .lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

#lightbox .lightbox-prev {
  left: 1.5rem;
}

#lightbox .lightbox-next {
  right: 1.5rem;
}

#lightbox .lightbox-prev:focus,
#lightbox .lightbox-next:focus,
#lightbox .lightbox-close:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding-top: 5.5rem;
  }
  
  .site-header {
    padding: 2rem 1rem 1.5rem;
  }
  
  .site-header h1 {
    font-size: 1.2rem;
  }
  
  .site-header .home-link {
    top: 2rem;
    right: 1rem;
    font-size: 0.8rem;
  }
  
  .albums {
    padding: 2rem 1rem;
  }
  
  .albums ul {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .album > h2 {
    font-size: 1.4rem;
    margin: 2rem 0 1.5rem;
  }
  
  .page {
    padding: 1rem;
  }
  
  .page > h2 {
    font-size: 1.4rem;
    margin: 1.5rem 0 2rem;
  }
  
  .page-body {
    font-size: 1rem;
  }
  
  .page-body h1 {
    font-size: 1.6rem;
  }
  
  .page-body h2 {
    font-size: 1.3rem;
  }
  
  .page-body h3 {
    font-size: 1.1rem;
  }
  
  #lightbox .lightbox-prev,
  #lightbox .lightbox-next {
    padding: 0.75rem 1rem;
    font-size: 1.5rem;
  }
}
