:root {
  --color-bg: #faf8f5;
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-accent: #d4a574;
  --color-border: #e0dbd4;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #1a1a1a;
    --color-text: #f5f5f5;
    --color-text-muted: #999;
    --color-accent: #e8c89e;
    --color-border: #333;
  }
}

:root[data-theme="dark"] {
  --color-bg: #1a1a1a;
  --color-text: #f5f5f5;
  --color-text-muted: #999;
  --color-accent: #e8c89e;
  --color-border: #333;
}

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

[hidden] {
  display: none !important;
}

html {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  margin-bottom: var(--space-4);
}

.site-header {
  padding: var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.site-header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  color: inherit;
}

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

.site-logo {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  color: var(--color-text);
  transition: color 0.2s;
}

.site-header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 40px;
}

.site-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 0;
  margin: 0;
  color: var(--color-text);
  line-height: 1.2;
}

.site-tagline {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 2px 0 0 0;
  line-height: 1.2;
}

.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

.site-footer {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Hero section */
.hero {
  position: relative;
  margin-bottom: var(--space-8);
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 16 / 9;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  border: rgba(0, 0, 0, 0.6) 2px solid;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  padding: var(--space-6);
  color: white;
}

.hero-overlay h1 {
  margin-bottom: 0;
  color: white;
}

.hero-text {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.hero-text h1 {
  font-size: 48px;
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }
}

/* Album grid (homepage) */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.album-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s;
}

.album-cover {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  border: rgba(0, 0, 0, 0.6) 2px solid;
}

.album-info {
  padding: var(--space-4);
  background: var(--color-bg);
  flex-grow: 1;
}

.album-info h2 {
  font-size: 18px;
  margin-bottom: var(--space-2);
}

.album-info p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}

/* Album page */
.album-header {
  margin-bottom: var(--space-8);
  text-align: center;
}

.album-header h1 {
  font-size: 40px;
}

.album-description {
  font-size: 18px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.album-date {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-4);
  grid-auto-flow: dense;
  margin-bottom: var(--space-8);
}

.grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-border);
}

.grid-item a {
  display: block;
  width: 100%;
  height: 100%;
}

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

.grid-item--normal {
  grid-column: span 1;
  grid-row: span 1;
  aspect-ratio: 1;
}

.grid-item--wide {
  grid-column: span 2;
  grid-row: span 1;
  aspect-ratio: 2;
}

.grid-item--tall {
  grid-column: span 1;
  grid-row: span 2;
  aspect-ratio: 0.5;
}

.grid-item--large {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 1;
}

.photo-caption {
  padding: var(--space-3) var(--space-2);
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
  position: relative;
  z-index: 1001;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  color: white;
  padding: var(--space-4) 0;
  text-align: center;
  font-size: 14px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  z-index: 1002;
  padding: var(--space-2);
  line-height: 1;
}

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

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  padding: var(--space-3) var(--space-4);
  z-index: 1002;
}

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

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* 404 page */
.not-found {
  text-align: center;
  padding: var(--space-8);
}

.not-found h1 {
  font-size: 72px;
  margin-bottom: var(--space-2);
}

.not-found p {
  font-size: 20px;
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
}

.link-home {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  color: var(--color-accent);
}

.link-home:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .albums-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .album-header h1 {
    font-size: 28px;
  }

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

  .grid-item--wide,
  .grid-item--large {
    grid-column: span 2;
  }

  .grid-item--tall {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 1;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 24px;
    padding: var(--space-2) var(--space-3);
  }
}