/* ───────────────────────── */
/* RESET */
/* ───────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f3ee;
  --fg: #1a1a1a;
  --border: rgba(26, 26, 26, 0.18);
  --border-soft: rgba(26, 26, 26, 0.1);
  --muted: rgba(26, 26, 26, 0.42);
  --hover-bg: #eeece6;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ───────────────────────── */
/* NAV */
/* ───────────────────────── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 3rem;
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 40;
}

.nav-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--fg);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--fg);
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 1;
}

/* ───────────────────────── */
/* BACK LINK */
/* ───────────────────────── */
.back-bar {
  padding: 1.2rem 3rem;
  border-bottom: 0.5px solid var(--border-soft);
}

.back-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  opacity: 0.38;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 0.85;
}

/* ───────────────────────── */
/* HERO IMAGE */
/* ───────────────────────── */
.hero-image {
  max-width: 1000px;
  height: calc(100vh - 137px);
  margin: 0 auto;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ───────────────────────── */
/* PROJECT INTRO */
/* ───────────────────────── */
.project-intro {
  display: grid;
  grid-template-columns: 2fr 1fr;
  border-bottom: 0.5px solid var(--border);
}

.intro-main {
  padding: 4rem 3rem;
  border-right: 0.5px solid var(--border);
}

.project-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.3;
  margin-bottom: 1.2rem;
}

.project-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  margin-bottom: 2rem;
}

.project-title em {
  font-style: italic;
  color: #666;
}

.project-intro-text {
  font-size: 0.92rem;
  line-height: 1.9;
  opacity: 0.6;
  max-width: 52ch;
}

.intro-meta {
  padding: 4rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.meta-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.3;
  margin-bottom: 0.5rem;
}

.meta-value {
  font-size: 0.86rem;
  line-height: 1.6;
  opacity: 0.72;
}

/* ───────────────────────── */
/* TEXT BLOCK */
/* ───────────────────────── */
.text-block {
  padding: 4rem 3rem;
  border-bottom: 0.5px solid var(--border-soft);
}

.text-block h2,
.text-block p {
  max-width: 72ch;
}

.text-block h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.text-block h2 em {
  font-style: italic;
  color: #666;
}

.text-block p {
  font-size: 0.9rem;
  line-height: 1.9;
  opacity: 0.58;
  margin-bottom: 1rem;
}

.text-block p:last-child {
  margin-bottom: 0;
}

/* ───────────────────────── */
/* GALLERY */
/* werkt met jouw huidige HTML */
/* ───────────────────────── */
.context-gallery {
  max-width: 1280px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

/* bovenste rij */
.context-gallery-top {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

/* onderste rij */
.context-gallery-bottom {
  display: flex;
  justify-content: center;
  margin-top: 0.35rem;
}

/* basis gallery vak */
.gallery-item {
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 0.75rem;
  cursor: pointer;
  flex: 0 0 auto;
}

.context-gallery-top .gallery-item{
  width: 360px;
  height: 520px;
}
.context-gallery-bottom .gallery-item {
  height: 520px;
  width: calc((360px * 3) + (0.35rem * 2));
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.02);
}

.img-hint {
  position: absolute;
  bottom: 0.8rem;
  right: 0.8rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(245, 243, 238, 0.92);
  padding: 0.3rem 0.6rem;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.gallery-item:hover .img-hint {
  opacity: 0.7;
}

.img-caption {
  max-width: 1280px;
  margin: 0 auto 3rem;
  padding: 1rem 2rem 0;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ───────────────────────── */
/* ONDERZOEK VISUALS */
/* ───────────────────────── */
.research-visuals {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 2rem;
  padding: 4rem 3rem;
  border-bottom: 0.5px solid var(--border-soft);
  align-items: start;
}

.research-text h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.research-text h2 em {
  font-style: italic;
  color: #666;
}

.research-text p {
  font-size: 0.9rem;
  line-height: 1.9;
  opacity: 0.58;
  margin-bottom: 1rem;
  max-width: 46ch;
}

.research-text p:last-child {
  margin-bottom: 0;
}

.research-images {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem;
  align-items: start;
}

.research-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg);
  padding: 0.75rem;
  position: relative;
  cursor: pointer;
  border-bottom: none;
}

.research-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.research-img:hover img {
  transform: scale(1.02);
}

.research-img:hover .img-hint {
  opacity: 0.7;
}

/* ───────────────────────── */
/* ALGEMENE IMG BLOCKS */
/* ───────────────────────── */
.img-block {
  border-bottom: 0.5px solid var(--border-soft);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.img-block img {
  display: block;
}

.context-gallery .img-block,
.context-gallery-top .img-block,
.context-gallery-bottom .img-block {
  border-bottom: none;
}

/* placeholders voor andere delen */
.img-placeholder {
  width: 100%;
  background: var(--hover-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.3;
}

.img-placeholder.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.img-placeholder.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.img-placeholder.ratio-3-4 {
  aspect-ratio: 3 / 4;
}

.img-placeholder.ratio-1-1 {
  aspect-ratio: 1 / 1;
}

.img-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 0.5px solid var(--border-soft);
}

.img-grid-2 .img-block {
  border-bottom: none;
  border-right: 0.5px solid var(--border-soft);
}

.img-grid-2 .img-block:last-child {
  border-right: none;
}

.img-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 0.5px solid var(--border-soft);
}

.img-grid-3 .img-block {
  border-bottom: none;
  border-right: 0.5px solid var(--border-soft);
}

.img-grid-3 .img-block:last-child {
  border-right: none;
}

/* ───────────────────────── */
/* LIGHTBOX */
/* ───────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0);
  z-index: 49;
  pointer-events: none;
  transition: background 0.4s ease;
}

.overlay.active {
  background: rgba(26, 26, 26, 0.82);
  pointer-events: all;
}

.expand-container {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  padding: 2rem;
}

.expand-container.active {
  pointer-events: all;
  opacity: 1;
}

.expand-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expand-img-wrap img {
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.expand-caption {
  width: auto;
  padding: 0;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(245, 243, 238, 0.65);
}

.expand-close {
  position: fixed;
  top: 24px;
  right: 28px;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  z-index: 60;
}

.expand-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.04);
}

/* ───────────────────────── */
/* QUOTE */
/* ───────────────────────── */
.quote-block {
  padding: 4rem 3rem;
  border-bottom: 0.5px solid var(--border-soft);
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  line-height: 1.5;
  max-width: 900px;
}

/* ───────────────────────── */
/* NEXT PROJECT */
/* ───────────────────────── */
.next-project {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem;
  border-top: 0.5px solid var(--border);
  text-decoration: none;
  color: var(--fg);
  transition: background 0.3s;
}

.next-project:hover {
  background: var(--hover-bg);
}

.next-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.3;
}

.next-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
}

.next-arrow {
  width: 48px;
  height: 48px;
  border: 0.5px solid rgba(26, 26, 26, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ───────────────────────── */
/* FOOTER */
/* ───────────────────────── */
footer {
  padding: 2.5rem 3rem;
  border-top: 0.5px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-family: 'DM Serif Display', serif;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.4;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
}

/* ───────────────────────── */
/* FADE IN */
/* ───────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ───────────────────────── */
/* RESPONSIVE */
/* ───────────────────────── */
@media (max-width: 900px) {
  nav,
  .back-bar,
  .text-block,
  .quote-block,
  footer,
  .next-project {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .project-intro {
    grid-template-columns: 1fr;
  }

  .intro-main {
    border-right: none;
    border-bottom: 0.5px solid var(--border-soft);
  }

  .context-gallery {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .context-gallery-top,
  .context-gallery-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .context-gallery-top .gallery-item,
  .context-gallery-bottom .gallery-item {
    width: 100%;
    height: 360px;
  }

  .img-caption {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .img-grid-2,
  .img-grid-3 {
    grid-template-columns: 1fr;
  }

  .img-grid-2 .img-block,
  .img-grid-3 .img-block {
    border-right: none;
    border-bottom: 0.5px solid var(--border-soft);
  }
}