:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --border: #dddddd;
  --gap: 40px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

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

/* Deter casual image copying: no drag, no iOS long-press "save image" menu. */
img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 32px 60px 20px 60px;
  gap: 20px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 200;
  border-bottom: 1px solid var(--border);
}

.header__name {
  font-size: 13px;
  white-space: nowrap;
}

.header__nav {
  text-align: center;
  flex: 1;
}

.header__nav a {
  border-bottom: 1px solid transparent;
}

.header__nav a.active,
.header__nav a:hover {
  border-bottom: 1px solid var(--fg);
}

.header__nav span {
  color: var(--muted);
  margin: 0 2px;
}

.header__role {
  text-align: right;
  color: var(--fg);
  white-space: nowrap;
}

main {
  padding: 56px 60px 120px 60px;
}

/* ---- Project grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 180px);
  justify-content: space-between;
  row-gap: 80px;
}

.grid__item {
  display: block;
}

.grid__number {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
}

.grid__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #f2f2f2;
}

.grid__title {
  margin-top: 14px;
  text-align: center;
}

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

.grid__item:hover .grid__image {
  opacity: 0.85;
}

.filters {
  margin-top: 90px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.filters a {
  border-bottom: 1px solid transparent;
}

.filters a.active {
  border-bottom: 1px solid var(--fg);
}

/* ---- Project detail page ---- */
.project-header {
  padding: 0 60px;
  margin-bottom: 60px;
}

.project-header__title {
  font-size: 13px;
  font-weight: normal;
  margin: 0;
}

.project-back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
}

.project-back:hover {
  color: var(--fg);
}

.project-footer-nav {
  display: flex;
  justify-content: space-between;
  padding: 32px 60px 100px 60px;
  margin-top: 40px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---- Related projects ---- */
.related {
  padding: 100px 60px 40px 60px;
  text-align: center;
}

.related__label {
  color: var(--muted);
  margin-bottom: 60px;
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(4, 180px);
  justify-content: center;
  column-gap: var(--gap);
  row-gap: 60px;
  text-align: left;
}

.related__item {
  display: block;
}

.related__number {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
}

.related__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #f2f2f2;
}

.related__title {
  margin-top: 14px;
  text-align: center;
}

.related__item:hover .related__image {
  opacity: 0.85;
}

.project-footer-nav a:hover {
  color: var(--fg);
}

.project-images {
  padding: 0 60px 80px 60px;
  max-width: 1400px;
}

.project-images img {
  height: auto;
  display: block;
  position: relative;
  cursor: zoom-in;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  will-change: transform;
}

.project-images img.is-hover {
  transform: scale(1.08) translateY(-6px);
  z-index: 50;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

/* Scattered, editorial collage layout: images cycle through a 10-slot
   template with varying widths, alignment and vertical offsets so the
   sequence reads like a moodboard rather than a rigid grid. */
.project-images img:nth-child(10n+1) { width: 56%; margin: 90px 44% 0 0; }
.project-images img:nth-child(10n+2) { width: 38%; margin: -60px 0 0 auto; }
.project-images img:nth-child(10n+3) { width: 46%; margin: 70px auto 0 8%; }
.project-images img:nth-child(10n+4) { width: 60%; margin: 50px 0 0 auto; }
.project-images img:nth-child(10n+5) { width: 33%; margin: -40px 0 0 4%; }
.project-images img:nth-child(10n+6) { width: 50%; margin: 100px 0 0 22%; }
.project-images img:nth-child(10n+7) { width: 40%; margin: -50px 6% 0 auto; }
.project-images img:nth-child(10n+8) { width: 58%; margin: 80px 0 0 0; }
.project-images img:nth-child(10n+9) { width: 36%; margin: 30px 0 0 auto; }
.project-images img:nth-child(10n+0) { width: 48%; margin: 60px auto 0 14%; }
.project-images img:first-child { margin-top: 0; }

/* ---- Tirages (prints) page ---- */
.prints-intro {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 60px 0;
}

.prints-grid {
  display: grid;
  grid-template-columns: repeat(3, 320px);
  justify-content: space-between;
  row-gap: 80px;
}

.print-item__image {
  width: 100%;
  height: auto;
  display: block;
  background: #f2f2f2;
}

.print-item__title {
  margin-top: 16px;
}

.print-item__prices {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.print-item__price {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}

.print-item__price:hover {
  color: var(--fg);
  border-bottom-color: var(--border);
}

.print-item__price--live {
  color: var(--fg);
}

.print-item__price--live:hover {
  border-bottom-color: var(--fg);
}

/* ---- Information page ---- */
.info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.info__portrait {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%);
}

.info__text {
  max-width: 420px;
}

.info__role {
  margin: 0 0 30px 0;
  color: var(--muted);
}

.info__bio {
  margin: 0 0 40px 0;
  line-height: 1.8;
}

.info__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info__links a {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  width: fit-content;
}

.info__links a:hover {
  border-bottom-color: var(--fg);
}

footer {
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1000;
  cursor: zoom-out;
  padding: 40px;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: fixed;
  top: 32px;
  right: 40px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, 160px);
  }
  .prints-grid {
    grid-template-columns: repeat(3, 220px);
  }
  .related__grid {
    grid-template-columns: repeat(4, 140px);
  }
}

@media (max-width: 800px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .header__nav,
  .header__role {
    text-align: left;
  }
  main {
    padding: 40px 24px 80px 24px;
  }
  .grid {
    grid-template-columns: repeat(2, 160px);
    row-gap: 44px;
  }
  .prints-grid {
    grid-template-columns: repeat(2, 240px);
    row-gap: 44px;
  }
  .related__grid {
    grid-template-columns: repeat(2, 140px);
  }
  .related {
    padding-left: 24px;
    padding-right: 24px;
  }
  .info {
    grid-template-columns: 1fr;
  }
  .project-header,
  .project-images,
  .project-footer-nav {
    padding-left: 24px;
    padding-right: 24px;
  }
  .project-images img,
  .project-images img:nth-child(10n+1),
  .project-images img:nth-child(10n+2),
  .project-images img:nth-child(10n+3),
  .project-images img:nth-child(10n+4),
  .project-images img:nth-child(10n+5),
  .project-images img:nth-child(10n+6),
  .project-images img:nth-child(10n+7),
  .project-images img:nth-child(10n+8),
  .project-images img:nth-child(10n+9),
  .project-images img:nth-child(10n+0) {
    width: 100%;
    margin: 28px 0 0 0;
  }
  .project-images img:first-child {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 140px);
    row-gap: 36px;
  }
  .prints-grid {
    grid-template-columns: 1fr;
    row-gap: 44px;
  }
  .grid__title {
    font-size: 11px;
  }
}
