/* ===== BASE STYLES ===== */
:root {
  --bg-primary: #240606;
  --bg-secondary: #2d0a0a;
  --bg-tertiary: #3a1212;
  --text-primary: #f0e6e6;
  --text-secondary: #b89999;
  --text-muted: #7a5555;
  --border: #4a1818;
  --transition: 0.3s ease;

  /* Solarized-inspired accent palette */
  --accent: #e8734a;       /* orange - primary */
  --accent-yellow: #d4a843;
  --accent-orange: #e8734a;
  --accent-red: #dc5f5f;
  --accent-magenta: #d46a9e;
  --accent-violet: #9a7fd4;
  --accent-blue: #5a9fd4;
  --accent-cyan: #5abfbf;
  --accent-green: #7fba5a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

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

a:hover {
  color: var(--text-primary);
}

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

/* ===== LAYOUT ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== HEADER & NAV ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(36, 6, 6, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  position: relative;
  overflow: hidden;
  height: 40px;
}

.logo-icon img {
  height: 40px;
  width: auto;
  position: relative;
  z-index: 2;
}

.logo-text {
  font-family: 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.14rem;
  font-weight: 400;
  font-stretch: condensed;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.logo:hover .logo-text {
  color: var(--text-primary);
}

/* Mini bouncing balls container */
.logo-balls-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.logo-icon .logo-balls-container {
  /* Ensure balls stay within logo icon area */
}

.logo-ball {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  opacity: 0.7;
}

.logo-ball:nth-child(1) { background: var(--accent-orange); }
.logo-ball:nth-child(2) { background: var(--accent-magenta); }
.logo-ball:nth-child(3) { background: var(--accent-cyan); }
.logo-ball:nth-child(4) { background: var(--accent-violet); }
.logo-ball:nth-child(5) { background: var(--accent-yellow); }
.logo-ball:nth-child(6) { background: var(--accent-green); }
.logo-ball:nth-child(7) { background: var(--accent-blue); }

/* Animation: balls expanding from logo (subpage -> home) */
.nav-circle.expanding {
  animation: ballsExpand 0.5s ease-out forwards;
}

@keyframes ballsExpand {
  0% {
    transform: translate(var(--expand-x, 0), var(--expand-y, 0)) scale(0.02);
    opacity: 0.5;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
}

/* Animation: balls shrinking to logo (home -> subpage) */
.nav-circle.shrinking {
  animation: ballsShrink 0.35s ease-in forwards;
}

@keyframes ballsShrink {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--shrink-x, 0), var(--shrink-y, 0)) scale(0.02);
  }
}

/* Animation: logo balls appearing (arriving on subpage from home) */
@keyframes logoBallsAppear {
  0% {
    transform: scale(3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}

.logo-ball.appearing {
  animation: logoBallsAppear 0.3s ease-out forwards;
}

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

.nav-links a {
  font-family: 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-secondary);
  font-size: 1.14rem;
  font-weight: 400;
  font-stretch: condensed;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--nav-accent, var(--accent));
  transition: width var(--transition);
}

.nav-links li:nth-child(1) a { --nav-accent: var(--accent-orange); }
.nav-links li:nth-child(2) a { --nav-accent: var(--accent-magenta); }
.nav-links li:nth-child(3) a { --nav-accent: var(--accent-cyan); }
.nav-links li:nth-child(4) a { --nav-accent: var(--accent-violet); }
.nav-links li:nth-child(5) a { --nav-accent: var(--accent-yellow); }
.nav-links li:nth-child(6) a { --nav-accent: var(--accent-green); }
.nav-links li:nth-child(7) a { --nav-accent: var(--accent-blue); }

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* ===== HOMEPAGE PREVIEW SECTIONS ===== */
.preview-sections {
  padding: 6rem 0 4rem;
}

.preview-section {
  margin-bottom: 5rem;
}

.preview-section:last-child {
  margin-bottom: 0;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.preview-header h2 {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.preview-header a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

/* Color accents for preview headers */
.preview-section:nth-child(1) .preview-header h2 { color: var(--accent-orange); }
.preview-section:nth-child(2) .preview-header h2 { color: var(--accent-magenta); }
.preview-section:nth-child(3) .preview-header h2 { color: var(--accent-cyan); }
.preview-section:nth-child(4) .preview-header h2 { color: var(--accent-violet); }
.preview-section:nth-child(5) .preview-header h2 { color: var(--accent-green); }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.preview-grid .gallery-item {
  aspect-ratio: 1;
}

.preview-writing {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-writing-item {
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-left: 2px solid var(--accent-green);
  transition: var(--transition);
}

.preview-writing-item:hover {
  background: var(--bg-secondary);
}

.preview-writing-item h3 {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.preview-writing-item h3 a {
  color: var(--text-primary);
}

.preview-writing-item h3 a:hover {
  color: var(--accent-green);
}

.preview-writing-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Video preview grid */
.preview-video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.preview-video-item {
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 2px dashed var(--border);
}

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 8rem 2rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 200;
  letter-spacing: 0.15em;
  margin-bottom: 0;
}

/* ===== ALBUM LAYOUT WITH COLOR FILTER ===== */
.album-layout {
  display: flex;
  min-height: calc(100vh - 73px);
  padding-top: 73px;
}

/* Mobile nav wrapper - on desktop, just displays contents inline */
.mobile-nav-wrapper {
  display: contents;
}

/* Left album navigation - compact at top */
.album-nav {
  position: sticky;
  top: 73px;
  height: fit-content;
  max-height: calc(100vh - 73px);
  overflow-y: auto;
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding: 1.5rem 1rem;
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  z-index: 100;
}

.album-nav a {
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left !important;
  border-left: 2px solid transparent;
  transition: all var(--transition);
}

.album-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.album-nav a.active {
  color: var(--text-primary);
  border-left-color: var(--album-accent, var(--accent));
  background: var(--bg-tertiary);
}

/* Album color accents */
.album-nav a:nth-child(1) { --album-accent: var(--accent-orange); }
.album-nav a:nth-child(2) { --album-accent: var(--accent-cyan); }
.album-nav a:nth-child(3) { --album-accent: var(--accent-magenta); }
.album-nav a:nth-child(4) { --album-accent: var(--accent-green); }
.album-nav a:nth-child(5) { --album-accent: var(--accent-violet); }
.album-nav a:nth-child(6) { --album-accent: var(--accent-blue); }
.album-nav a:nth-child(7) { --album-accent: var(--accent-yellow); }
.album-nav a:nth-child(8) { --album-accent: var(--accent-red); }

.album-nav a:hover,
.album-nav a.active {
  border-left-color: var(--album-accent);
}

/* Main content area */
.album-content {
  flex: 1;
  min-width: 0;
  padding: 0 2rem;
}

/* Color filter sidebar (left side) */
.color-filter-sidebar {
  position: sticky;
  top: 73px;
  height: fit-content;
  max-height: calc(100vh - 73px);
  overflow-y: auto;
  width: 5%;
  min-width: 50px;
  max-width: 70px;
  flex-shrink: 0;
  padding: 1rem 0.5rem;
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  z-index: 100;
}

.color-filter-sidebar h3 {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  margin: 0 auto 1rem;
}

.color-filter-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.2);
}

.color-swatch.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.color-swatch-clear {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px dashed var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: all var(--transition);
}

.color-swatch-clear:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Scroll to top button - hidden on desktop */
.scroll-to-top {
  display: none;
}

.color-count {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.5rem;
  padding: 0 3px;
  border-radius: 2px;
}

/* Filtered results (color filter view) */
.filtered-results {
  padding: 2rem 0;
}

/* Album sections */
.album-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.album-section:last-child {
  border-bottom: none;
}

.album-section h2 {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--accent);
}

.album-section:nth-child(1) h2 { border-color: var(--accent-orange); }
.album-section:nth-child(2) h2 { border-color: var(--accent-cyan); }
.album-section:nth-child(3) h2 { border-color: var(--accent-magenta); }
.album-section:nth-child(4) h2 { border-color: var(--accent-green); }
.album-section:nth-child(5) h2 { border-color: var(--accent-violet); }
.album-section:nth-child(6) h2 { border-color: var(--accent-blue); }

/* ===== GALLERY GRID ===== */
.gallery {
  padding: 6rem 0 4rem;
  padding-top: calc(73px + 2rem);
}

.gallery-grid {
  display: block;
}

.justified-row {
  display: flex;
}

.justified-row:last-child {
  margin-bottom: 0 !important;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--bg-tertiary);
  cursor: pointer;
  border-radius: 2px;
  transition: opacity var(--transition);
  flex-grow: 0;
  flex-shrink: 0;
}

.gallery-item.filtered-out {
  display: none;
}

.gallery-item img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  transition: transform 0.6s ease, opacity var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
  opacity: 0.7;
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.8));
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.gallery-item .caption {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.gallery-item .caption span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Placeholder for empty galleries */
.gallery-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 6rem 2rem;
  color: var(--text-muted);
  border: 2px dashed var(--border);
  border-radius: 4px;
}

.gallery-placeholder p {
  margin-bottom: 1rem;
}

.gallery-placeholder code {
  background: var(--bg-tertiary);
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.9rem;
}

/* ===== VIDEO GALLERY ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

.video-item {
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.video-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== WRITING SECTION ===== */
.writing-list {
  padding: 4rem 0;
}

.writing-item {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.writing-item:first-child {
  border-top: 1px solid var(--border);
}

.writing-item:hover {
  padding-left: 1rem;
}

.writing-item h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.writing-item h2 a {
  color: var(--text-primary);
}

.writing-item h2 a:hover {
  color: var(--accent);
}

.writing-item .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.writing-item .excerpt {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== ARTICLE PAGE ===== */
.article {
  padding: 8rem 0 4rem;
}

.article-content {
  max-width: 700px;
  margin: 0 auto;
}

.article-content h1 {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

.article-content .meta {
  color: var(--text-muted);
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-content p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.article-content h2,
.article-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 400;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition);
  background: none;
  border: none;
}

.lightbox-close:hover {
  color: var(--text-primary);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition);
  background: none;
  border: none;
  padding: 1rem;
  user-select: none;
}

.lightbox-nav:hover {
  color: var(--text-primary);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

@media (max-width: 768px) {
  .lightbox-nav {
    font-size: 2rem;
    padding: 0.5rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}

/* ===== BRIEFS LAYOUT ===== */
.briefs-layout {
  display: flex;
  min-height: calc(100vh - 73px);
  padding-top: 73px;
}

.briefs-nav {
  position: sticky;
  top: 73px;
  height: fit-content;
  max-height: calc(100vh - 73px);
  overflow-y: auto;
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding: 1.5rem 1rem;
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
}

.briefs-nav a {
  padding: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-align: left;
  border-left: 2px solid transparent;
  transition: all var(--transition);
}

.briefs-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.briefs-nav a.active {
  color: var(--text-primary);
  border-left-color: var(--accent-yellow);
  background: var(--bg-tertiary);
}

.briefs-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.briefs-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 1rem;
}

.pdf-viewer {
  width: 100%;
  height: calc(100vh - 73px);
  border: none;
  background: var(--bg-secondary);
}

/* ===== POETRY LAYOUT ===== */
.poetry-layout {
  display: flex;
  min-height: calc(100vh - 73px);
  padding-top: 73px;
}

.poetry-nav {
  position: sticky;
  top: 73px;
  height: fit-content;
  max-height: calc(100vh - 73px);
  overflow-y: auto;
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding: 1.5rem 1rem;
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
}

.poetry-nav a {
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-align: left;
  border-left: 2px solid transparent;
  transition: all var(--transition);
}

.poetry-nav a:hover,
.poetry-nav a.active {
  color: var(--text-primary);
  border-left-color: var(--accent-green);
}

.poetry-nav .nav-placeholder {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-style: italic;
}

.poetry-content {
  flex: 1;
  min-width: 0;
  padding: 2rem 3rem;
}

.poetry-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: var(--text-muted);
  gap: 1rem;
}

.poetry-placeholder code {
  background: var(--bg-tertiary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.poem {
  max-width: 1000px;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}

.poem:last-child {
  border-bottom: none;
}

.poem h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.poem .meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.poem .poem-text {
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 1.05rem;
}

/* ===== VIDEO LAYOUT ===== */
.video-layout {
  padding-top: 73px;
}

.video-thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 180px));
  gap: 1.5rem;
  padding: 1.5rem 0;
}

.video-thumbnail {
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-secondary);
  aspect-ratio: 9 / 16;
  transition: transform var(--transition);
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail:hover {
  transform: scale(1.02);
}

.video-thumbnail .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.video-thumbnail .play-icon::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 18px solid white;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

.video-thumbnail:hover .play-icon {
  background: rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%) scale(1.1);
}

/* Video Lightbox */
.video-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.video-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.video-lightbox video {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
}

.video-lightbox .lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 2001;
  line-height: 1;
  padding: 0.5rem;
}

.video-lightbox .lightbox-close:hover {
  color: var(--accent);
}

/* ===== FOOTER ===== */
footer {
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right var(--transition);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .menu-toggle {
    display: flex;
    z-index: 1001;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

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

  /* Album sidebar becomes horizontal scrollable on mobile */
  .album-layout {
    flex-direction: column;
  }

  /* Wrapper for sticky mobile nav elements - sticks as one unit */
  .mobile-nav-wrapper {
    position: sticky;
    top: 73px;
    z-index: 100;
    background: var(--bg-primary);
  }

  .album-nav {
    position: relative;
    top: auto;
    height: auto;
    max-height: none;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    gap: 0.5rem;
    background: var(--bg-primary);
  }

  .album-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  .album-nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.4rem 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .album-nav a.active,
  .album-nav a:hover {
    border-left-color: transparent;
    border-bottom-color: var(--album-accent);
  }

  .album-content {
    padding: 0 1rem;
  }

  /* Color filter becomes horizontal bar below album nav on mobile */
  .color-filter-sidebar {
    display: flex;
    position: relative;
    top: auto;
    width: 100%;
    min-width: unset;
    max-width: unset;
    height: auto;
    max-height: none;
    flex-direction: row;
    align-items: center;
    padding: 0.5rem 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.5rem;
    background: var(--bg-primary);
  }

  .color-filter-sidebar::-webkit-scrollbar {
    display: none;
  }

  .color-filter-sidebar h3 {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    transform: none;
    margin: 0 0.5rem 0 0;
    white-space: nowrap;
    font-size: 0.55rem;
  }

  .color-filter-list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .color-swatch,
  .color-swatch-clear {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  /* When filter is active, make color bar sticky independently */
  .color-filter-sidebar.filter-active {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    z-index: 150;
    border-bottom: 2px solid var(--accent);
  }

  /* Add padding to content when filter is fixed */
  .album-layout.filter-active .album-content {
    padding-top: 45px;
  }

  /* Scroll to top button - mobile only */
  .scroll-to-top {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.3s;
    z-index: 200;
  }

  .scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
  }

  .scroll-to-top:hover,
  .scroll-to-top:active {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }

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

  .preview-video-grid {
    grid-template-columns: 1fr;
  }

  /* Briefs responsive */
  .briefs-layout {
    flex-direction: column;
  }

  .briefs-nav {
    position: relative;
    top: auto;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .briefs-nav a {
    border-left: none;
    padding: 0.5rem 1rem;
  }

  .pdf-viewer {
    height: calc(100vh - 200px);
  }

  /* Poetry responsive */
  .poetry-layout {
    flex-direction: column;
  }

  .poetry-nav {
    position: relative;
    top: auto;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .poetry-content {
    padding: 1.5rem;
  }

  /* Video responsive */
  .video-grid.vertical-videos {
    grid-template-columns: repeat(2, 1fr);
  }
}
