/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --text: #666666;
  --text-muted: #999999;
  --accent: #333333;
  --border: #e0e0e0;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-width: 120px;
  --photo-gap: 0.25in;
  --header-height: 6rem;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.site-title {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-subtitle {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.site-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.1rem;
}

.site-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.site-links a:hover {
  color: var(--accent);
}

/* Gallery Layout */
.gallery-layout {
  display: flex;
  padding-top: var(--header-height);
}

/* Photo Feed - Left Side */
.photo-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--photo-gap);
  padding: var(--photo-gap);
  padding-right: var(--photo-gap);
  margin-right: var(--sidebar-width);
}

.photo-item {
  width: 100%;
  height: 75vh;
  overflow: hidden;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Sidebar - Right Side */
.sidebar {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  overflow: hidden;
  background: var(--bg);
  border-left: 1px solid var(--border);
  padding: 6px;
  z-index: 50;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.3s ease;
}

.thumb {
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.thumb:hover,
.thumb.active {
  opacity: 1;
}

.thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.97);
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

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

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

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

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 4rem;
  cursor: pointer;
  z-index: 1001;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 1rem;
  line-height: 1;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem;
  padding-right: calc(var(--sidebar-width) + 2rem);
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    padding: 1rem;
  }

  :root {
    --sidebar-width: 80px;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 2.5rem;
  }
}
