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

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 12px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ---- SIDEBAR ---- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 140px;
  height: 100vh;
  border-right: 1px solid #e8e8e8;
  padding: 28px 14px 28px 26px;
  display: flex;
  flex-direction: column;
}

.artist-name {
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.55;
  font-weight: 400;
  color: #111111;
  margin-bottom: 50px;
  display: block;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.nav-link {
  font-size: 11px;
  letter-spacing: 0.13em;
  font-weight: 400;
  color: #c2c2c2;
}

.nav-link:hover {
  color: #888888;
}

.nav-link.active {
  color: #111111;
  font-weight: 600;
}

/* ---- MAIN CONTENT ---- */

#content {
  margin-left: 140px;
  padding: 30px 60px 80px 68px;
  min-height: 100vh;
}

/* ---- GALLERY GRIDS ---- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 52px;
  row-gap: 48px;
  align-items: start;
}

.gallery-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 52px;
  row-gap: 48px;
  align-items: start;
}

.gallery-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-caption {
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 0.11em;
  color: #aaaaaa;
  text-align: center;
}

/* ---- DETAIL PAGE ---- */

.detail-back {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: #aaaaaa;
  margin-bottom: 28px;
}

.detail-back:hover {
  color: #666666;
}

.detail-title {
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: #111111;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.detail-meta {
  font-size: 12px;
  color: #555555;
  line-height: 1.65;
  margin-bottom: 26px;
}

.detail-description {
  font-size: 13.5px;
  line-height: 1.78;
  color: #333333;
  max-width: 640px;
  margin-bottom: 36px;
}

.detail-description p + p {
  margin-top: 1.2em;
}

.detail-images {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-image {
  max-width: 700px;
  width: 100%;
}

/* ---- ABOUT PAGE ---- */

.about-section {
  margin-bottom: 52px;
}

.about-section-heading {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #aaaaaa;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.about-body {
  font-size: 13.5px;
  line-height: 1.78;
  color: #333333;
  max-width: 640px;
}

.about-body p + p {
  margin-top: 1.2em;
}

.about-contact {
  font-size: 13px;
  color: #333333;
}

.exhibitions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exhibition-item {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: #333333;
  line-height: 1.55;
}

.exhibition-year {
  color: #aaaaaa;
  flex-shrink: 0;
  min-width: 32px;
}

/* ---- RESPONSIVE ---- */

/* Mobile: sidebar collapses to horizontal top bar, 1-column grid */
@media (max-width: 767px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
    padding: 14px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    background: #ffffff;
  }

  .artist-name {
    margin-bottom: 0;
    line-height: 1.3;
  }

  nav {
    flex-direction: row;
    gap: 14px;
  }

  #content {
    margin-left: 0;
    padding: 72px 20px 60px 20px;
  }

  .gallery-grid,
  .gallery-grid-2 {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 32px;
  }

  .detail-image {
    max-width: 100%;
  }

  .detail-description,
  .about-body {
    max-width: 100%;
  }
}

/* Small (640px+): 2-column grid while still in mobile nav mode */
@media (min-width: 640px) and (max-width: 767px) {
  .gallery-grid,
  .gallery-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 24px;
  }
}

/* Tablet (768px+): sidebar visible, 2-column for 3-col grids */
@media (min-width: 768px) and (max-width: 1023px) {
  .sidebar {
    width: 140px;
  }

  #content {
    margin-left: 140px;
    padding: 30px 32px 80px 40px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 32px;
  }
}
