/* Color variables */
:root {
  --bg: #0f0f10;
  --text: #e9e9ea;
  --muted: #a8a8ad;
  --card: #161618;
  --border: #222228;
  --accent: #ffffff;
  --brand: #ffffff;
}

/* Global styles */
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  line-height: 1.55;
  font-size: 16px;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo img {
  height: 32px;
}
nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
nav a {
  opacity: 0.8;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
nav a:hover {
  opacity: 1;
}
select#lang {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: end;
  padding: 40px 0;
}
.hero .lead {
  color: var(--muted);
  margin-top: 4px;
}
.cta {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--card);
  font-size: 14px;
}
.btn.primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

/* Gallery containers use a masonry column layout instead of a fixed grid.  */
.grid {
  display: block;
  column-gap: 12px;
}
/* Home and work galleries should appear as masonry columns with variable height images. */
#home-gallery,
#work-gallery {
  display: block;
  column-count: 3;
  column-gap: 12px;
}
/* Responsive adjustments for masonry column count */
@media (max-width: 900px) {
  #home-gallery,
  #work-gallery {
    column-count: 2;
  }
}
@media (max-width: 600px) {
  #home-gallery,
  #work-gallery {
    column-count: 1;
  }
}
/* Prevent items from breaking inside columns and add spacing */
.card {
  break-inside: avoid;
  margin-bottom: 12px;
}
.card img,
.hero-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

/* Two-column layout */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list li {
  margin-bottom: 8px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
}

/* Lightbox overlay styles */
.lb {
  /* Hidden by default; made visible when a photo is opened */
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lb img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}
.lb button {
  position: absolute;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.lb .close {
  top: 20px;
  right: 20px;
}
.lb .prev {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
}
.lb .next {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

/* About photo */
.about-photo {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.about-photo img {
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  width: 100%;
  height: auto;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}
.pagination button {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
}
.pagination button.active {
  background: var(--accent);
  color: var(--bg);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  /* On smaller screens collapse hero and two-column layouts to single column */
  .hero {
    grid-template-columns: 1fr;
  }
  .two {
    grid-template-columns: 1fr;
  }
  /* Maintain masonry column counts via column-count rather than grid */
  #home-gallery,
  #work-gallery {
    column-count: 2;
  }
}
@media (max-width: 600px) {
  /* Further reduce to one column on very narrow screens */
  #home-gallery,
  #work-gallery {
    column-count: 1;
  }
  nav {
    gap: 12px;
    font-size: 14px;
  }
  .btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}