/* ===== VARIABLES ===== */
:root {
  /* Kleuren */
  --black: #000000;
  --white: #ffffff;
  --bg: #ffffff;
  --accent: #f5f5f5;         /* neutrale achtergrond */
  --accent-link: #2eccd8;    /* cyaan: hover states links, knoppen */
  --hero-bg: #2eccd8;        /* cyaan: hero achtergrond */
  --hero-accent: #2eccd8;    /* cyaan: hero knop */

  /* Layout */
  --topnav-height: 80px;
  --page-padding: clamp(16px, 5vw, 80px);
  --portfolio-gap: 16px;
  --section-pad-v: 56px;
  --max-content-width: 1920px;
  --h-pad: max(var(--page-padding), calc((100% - var(--max-content-width)) / 2));
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* voorkomt horizontale scrollbar door illustratie-overflow */
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--black);
  font-family: "General Sans", sans-serif;
  font-kerning: normal;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a,
button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

/* ===== HERO ILLUSTRATION SWAY ANIMATIONS ===== */
@keyframes hi-sway-a {
  0%, 100% { transform: rotate(0deg); }
  50%       { transform: rotate(1deg); }
}
@keyframes hi-sway-b {
  0%, 100% { transform: rotate(0deg); }
  50%       { transform: rotate(-1.2deg); }
}
@keyframes hi-sway-c {
  0%, 100% { transform: rotate(0deg); }
  50%       { transform: rotate(0.7deg); }
}
@keyframes hi-sway-d {
  0%, 100% { transform: rotate(0deg); }
  50%       { transform: rotate(-0.9deg); }
}

#hi-f1, #hi-f2, #hi-f3, #hi-f4 {
  transform-box: fill-box;
  transform-origin: bottom center;
}
#hi-f1 { animation: hi-sway-a 6s    ease-in-out infinite; }
#hi-f2 { animation: hi-sway-b 7.5s  ease-in-out infinite; animation-delay: -3s; }
#hi-f3 { animation: hi-sway-c 9s    ease-in-out infinite; animation-delay: -5.5s; }
#hi-f4 { animation: hi-sway-d 5.5s  ease-in-out infinite; animation-delay: -1.5s; }

/* ===== HERO ILLUSTRATION (bloemen) ===== */
.hero-illustration {
  position: absolute;
  bottom: -5%;
  right: -7%;
  width: 70vw;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.hero-illustration svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* ===== HERO ILLUSTRATION FLOWER ANIMATIONS ===== */
@keyframes hi-sway-a {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(1deg); }
}
@keyframes hi-sway-b {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-1.2deg); }
}
@keyframes hi-sway-c {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(0.8deg); }
}
@keyframes hi-sway-d {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-0.9deg); }
}

#hi-f1, #hi-f3, #hi-f4 {
  transform-box: fill-box;
  transform-origin: bottom center;
}
/* hi-f2 (stengel) en hi-f2-bloom (crème bloem) draaien om hetzelfde punt:
   de basis van de groene stengel in SVG-coördinaten */
#hi-f2, #hi-f2-bloom {
  transform-box: view-box;
  transform-origin: 1470px 1879px;
}
#hi-f1 { animation: hi-sway-a 6s ease-in-out infinite; }
#hi-f2 { animation: hi-sway-b 7.5s ease-in-out infinite; animation-delay: -3s; }
#hi-f2-bloom { animation: hi-sway-b 7.5s ease-in-out infinite; animation-delay: -3s; }
#hi-f3 { animation: hi-sway-c 5.5s ease-in-out infinite; animation-delay: -1.5s; }
#hi-f4 { animation: hi-sway-d 8s ease-in-out infinite; animation-delay: -5s; }

@media (prefers-reduced-motion: reduce) {
  #hi-f1, #hi-f2, #hi-f2-bloom, #hi-f3, #hi-f4 { animation: none; }
}

/* ===== HERO BLOCK ===== */
.hero-block {
  height: clamp(500px, 56vw, 100vh);
  background: var(--hero-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: calc(var(--topnav-height) + clamp(32px, 4vw, 64px)) var(--page-padding) clamp(40px, 5vw, 80px);
  position: relative;
  overflow: hidden;
}

.hero-text {
  margin: 0;
  font-family: "General Sans", sans-serif;
  font-size: max(40px, 4.8vw);
  font-weight: 450;
  line-height: 1.06;
  letter-spacing: 0.01em;
  color: var(--black);
  text-align: left;
  max-width: 16em;
  position: relative;
  z-index: 1;
}

.hero-text-small {
  margin: clamp(16px, 2vw, 36px) 0 0;
  font-family: "General Sans", sans-serif;
  font-size: max(18px, 1.55vw);
  font-weight: 450;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--black);
  max-width: 17em;
  position: relative;
  z-index: 1;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  margin-top: 0;
  background: #fcfae6;
  color: var(--black);
  border: none;
  padding: 24px 32px;
  border-radius: 0;
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  letter-spacing: 0.03em;
  z-index: 1;
  transition: none;
  box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.22);
}

.hero-btn:hover .hero-btn-arrow {
  animation: arrow-bounce 850ms infinite;
}

.hero-btn-arrow {
  height: 1em;
  width: auto;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2px;
  overflow: visible;
}

@keyframes arrow-bounce {
  0%   { translate: 0 0;     animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6); }
  25%  { translate: 0 10px;  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);   }
  100% { translate: 0 0; }
}

/* ===== TOP NAV ===== */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topnav-height);
  background: var(--white);          /* default: wit op alle pagina's behalve homepage */
  display: flex;
  align-items: center;
  padding: 0 var(--page-padding);
  z-index: 100;
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1),
              background-color 200ms ease,
              height 200ms ease,
              box-shadow 200ms ease;
}

/* Nav hidden (scrolling down) */
.topnav.nav-hidden {
  transform: translateY(-100%);
}

/* Homepage: nav altijd transparant */
body[data-page="projects"] .topnav {
  background: transparent;
}


.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: block;
  flex-shrink: 0;
  overflow: visible;
  transform-origin: 50% 50%;
}

/* Logo crème op cyaanblauwe hero */
body[data-page="projects"] .topnav:not(.nav-scrolled) .brand-icon polygon {
  fill: #fcfae6 !important;
}

.brand:hover .brand-icon,
.brand:focus-visible .brand-icon {
  animation: logo-spin 0.95s cubic-bezier(0.2, 0, 0.3, 1) forwards;
}

/* ── Bol-animaties: bollen bewegen naar midden, daarna terug terwijl logo draait ── */
.logo-bol {
  transform-box: view-box;          /* percentages relatief aan SVG viewport */
}

.brand:hover .logo-bol-1,
.brand:focus-visible .logo-bol-1 { animation: bol1-anim 0.9s forwards; }
.brand:hover .logo-bol-2,
.brand:focus-visible .logo-bol-2 { animation: bol2-anim 0.9s forwards; }
.brand:hover .logo-bol-3,
.brand:focus-visible .logo-bol-3 { animation: bol3-anim 0.9s forwards; }
.brand:hover .logo-bol-4,
.brand:focus-visible .logo-bol-4 { animation: bol4-anim 0.9s forwards; }

@keyframes bol1-anim {
  0%   { transform: translate(0, 0);           animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  20%  { transform: translate(23.5%, 23%);     animation-timing-function: cubic-bezier(0, 0, 0.12, 1); }
  100% { transform: translate(0, 0); }
}
@keyframes bol2-anim {
  0%   { transform: translate(0, 0);           animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  20%  { transform: translate(-23%, 23%);      animation-timing-function: cubic-bezier(0, 0, 0.12, 1); }
  100% { transform: translate(0, 0); }
}
@keyframes bol3-anim {
  0%   { transform: translate(0, 0);           animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  20%  { transform: translate(23.5%, -23.5%);  animation-timing-function: cubic-bezier(0, 0, 0.12, 1); }
  100% { transform: translate(0, 0); }
}
@keyframes bol4-anim {
  0%   { transform: translate(0, 0);           animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  20%  { transform: translate(-23%, -23.5%);   animation-timing-function: cubic-bezier(0, 0, 0.12, 1); }
  100% { transform: translate(0, 0); }
}

@keyframes logo-spin {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(0deg);    animation-timing-function: cubic-bezier(0.2, 0, 0.3, 1); }
  100% { transform: rotate(360deg); }
}


/* Nav right-aligned */
.main-nav {
  display: flex;
  align-items: center;
  gap: 80px;
  margin-left: auto;
}

.menu-item {
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.03em;
  color: var(--black);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color 180ms ease;
}

.menu-item:hover,
.menu-item:focus-visible {
  color: var(--accent-link);
}

/* Transparante nav op lichtblauwe hero: tekst zwart, hover donkergroen */
body[data-page="projects"] .topnav:not(.nav-scrolled) .menu-item {
  color: var(--black);
}

body[data-page="projects"] .topnav:not(.nav-scrolled) .menu-item:hover,
body[data-page="projects"] .topnav:not(.nav-scrolled) .menu-item:focus-visible {
  color: #fcfae6;
}

/* Scrolled nav: altijd transparant, geen schaduw */
.topnav.nav-scrolled {
  background: transparent;
  box-shadow: none;
}

/* Scrolled nav: zwart */
.topnav.nav-scrolled .menu-item {
  color: var(--black);
}

/* Scrolled nav: hover groen */
.topnav.nav-scrolled .menu-item:hover,
.topnav.nav-scrolled .menu-item:focus-visible {
  color: var(--accent-link);
}

/* Letter-bounce animation for desktop nav */
@keyframes letter-bounce {
  0%   { translate: 0 0; }
  35%  { translate: 0 -5px; }
  70%  { translate: 0 1px; }
  100% { translate: 0 0; }
}

.main-nav .menu-item .letter {
  display: inline-block;
}

.main-nav .menu-item:hover .letter,
.main-nav .menu-item:focus-visible .letter {
  animation: letter-bounce 380ms ease both;
  animation-delay: calc(var(--i) * 25ms);
}

/* ===== LANG SWITCHER ===== */
.lang-switcher {
  position: relative;
  margin-left: 80px;
  flex-shrink: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  color: var(--black);
  cursor: pointer;
  white-space: nowrap;
  transition: color 180ms ease;
}

.lang-btn:hover {
  color: var(--accent-link);
}

body[data-page="projects"] .topnav:not(.nav-scrolled) .lang-btn:hover {
  color: #fcfae6;
}

.lang-arrow {
  width: 10px;
  height: 6px;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.lang-btn[aria-expanded="true"] .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  min-width: 70px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 200;
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 8px 16px;
  text-align: left;
  background: transparent;
  border: 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--black);
  transition: color 150ms ease;
}

.lang-option:hover {
  color: var(--accent-link);
}

/* Logo in mobile drawer — zelfde positie als topnav-logo */
.mobile-drawer-logo {
  position: absolute;
  top: 0;
  left: var(--page-padding);
  height: var(--topnav-height);
  display: flex;
  align-items: center;
}

.mobile-drawer-logo img {
  width: 26px;
  height: 26px;
  display: block;
  filter: brightness(0); /* wit SVG → zwart */
}

/* Mobile drawer lang toggle — pinned to bottom of drawer */
.lang-toggle {
  position: absolute;
  bottom: 40px;
  display: inline-flex;
  align-items: center;
  background: #e6e6e6;
  border-radius: 999px;
  padding: 5px;
  gap: 0;
}

.lang-toggle-knob {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  background: var(--hero-accent);
  border-radius: 999px;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.lang-toggle[data-active="en"] .lang-toggle-knob {
  transform: translateX(100%);
}

.lang-toggle-btn {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  cursor: pointer;
  font-size: clamp(40px, 10vw, 73px);
  font-weight: 500;
  line-height: 1.09;
  letter-spacing: 0.005em;
  color: var(--black);
  padding: 0.1em 0.5em;
  transition: color 150ms ease;
}

/* ===== HAMBURGER (mobile only) ===== */
.hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  z-index: 201; /* boven de fullscreen overlay */
}

.hamburger span {
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--black);
  transition: transform 180ms ease, opacity 160ms ease, background 200ms ease;
}

.hamburger span:first-child { transform: translateY(-5px); }
.hamburger span:last-child  { transform: translateY(5px); }


.hamburger.open span:first-child {
  transform: rotate(45deg);
}

.hamburger.open span:last-child {
  transform: rotate(-45deg);
}

/* Wanneer menu open: hamburgericoon altijd zwart (op witte overlay) */
.hamburger.open span {
  background: var(--black);
}

/* Topnav boven overlay zodat hamburger klikbaar blijft */
body.menu-open .topnav {
  z-index: 201;
  background: transparent;
  box-shadow: none;
}

/* Logo in topnav verbergen wanneer overlay open is */
body.menu-open .topnav .brand {
  opacity: 0;
  pointer-events: none;
}

/* ===== MOBILE DRAWER (fullscreen overlay) ===== */
@keyframes drawer-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes drawer-item-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 0 var(--page-padding);
}

.mobile-drawer.open {
  display: flex;
  animation: drawer-in 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mobile-drawer.open .menu-item {
  animation: drawer-item-in 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mobile-drawer.open .menu-item:nth-child(1) { animation-delay: 60ms; }
.mobile-drawer.open .menu-item:nth-child(2) { animation-delay: 110ms; }
.mobile-drawer.open .menu-item:nth-child(3) { animation-delay: 160ms; }

.mobile-drawer .menu-item {
  font-size: clamp(40px, 10vw, 73px);
  font-weight: 500;
  line-height: 1.09;
  letter-spacing: 0.005em;
  color: var(--black);
  opacity: 1;
}

/* ===== CONTENT AREA ===== */
.content {
  background: var(--bg);
  padding-top: var(--topnav-height);
  flex: 1;
}


.intro-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.38em);
  filter: blur(1.5px);
  animation: introWordIn 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--word-delay, 0ms);
}

@keyframes introWordIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
  padding: var(--section-pad-v) 0;
}

.projects-section .section-heading {
  padding: 0 var(--page-padding);
  margin-bottom: 64px;
}

.section-heading {
  margin: 0 0 44px;
  font-family: "General Sans", sans-serif;
  font-size: clamp(28px, 3.1vw, 60px);
  font-weight: 450;
  line-height: 1.0;
  letter-spacing: 0.01em;
  color: var(--black);
}

/* Row-based grid: each row contains a pair of items */
.projects-grid-wrap {
  display: flex;
  flex-direction: column;
  padding: 0 var(--page-padding);
  gap: clamp(64px, 9vw, 140px);
}

.project-row {
  display: grid;
  row-gap: var(--portfolio-gap);
  column-gap: clamp(16px, 2.5vw, 40px);
  align-items: start;
}

/* ===== PROJECT CARD ===== */
.project-card {
  min-width: 0;
}

.grid-pending {
  opacity: 0;
  transform: translateY(12px);
}

.grid-enter {
  opacity: 0;
  transform: translateY(12px);
  animation: gridBlockIn 560ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--enter-delay, 0ms);
}

@keyframes gridBlockIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-link {
  display: block;
  color: var(--black);
}

.project-client,
.project-title-grid {
  color: var(--black);
  transition: color 180ms ease;
}

.project-link:hover .project-client,
.project-link:hover .project-title-grid {
  color: #a5a295;
}

.project-thumb {
  position: relative;
  overflow: hidden;
  background: #e4e4e4;
}


.project-thumb.ratio-5-4 {
  aspect-ratio: 5 / 4;
}

.project-thumb.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  scale: 1.02;
  transition: scale 260ms ease-out;
  will-change: scale;
}

.project-link:hover .project-image,
.project-link:focus-visible .project-image {
  scale: 1.05;
}

.project-caption {
  padding: 20px 0 0 0;
}

.project-client {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
}

.project-title-grid {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
}

/* ===== CLIENTS BLOCK ===== */
.clients-block {
  background: var(--accent);
  padding: var(--section-pad-v) var(--page-padding);
}

.clients-list {
  margin: 0;
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 650;
  line-height: 1.65;
  text-align: justify;
}

/* ===== SITE FOOTER ===== */
.site-footer {
  padding: 28px var(--page-padding);
  display: flex;
  align-items: center;
  gap: clamp(24px, 4.17vw, 80px);
}

.site-footer a {
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--black);
  text-decoration: none;
  transition: color 200ms ease;
}

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

.copyright {
  margin: 0 0 0 auto;
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--black);
}

@media (max-width: 800px) {
  .site-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 14px;
    padding-top: 40px;
    padding-bottom: var(--page-padding);
  }

  #footer-instagram,
  #footer-linkedin {
    grid-column: 1 / -1;
  }

  #footer-email {
    grid-column: 1;
    align-self: center;
  }

  .site-footer .copyright {
    grid-column: 2;
    text-align: right;
    align-self: center;
    margin: 0;
  }

  .site-footer a,
  .site-footer .copyright {
    font-size: clamp(14px, 3.5vw, 20px);
  }

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

/* ===== PROJECT DETAIL PAGE ===== */
.project-detail-page {
  padding: calc(var(--topnav-height) + 32px) 0 56px;
}

.project-credits-section.has-content {
}

/* Back button */
.detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 450;
  letter-spacing: 0.02em;
  color: var(--black);
  transition: color 180ms ease;
  padding: 0 var(--h-pad);
}

.detail-back-btn:hover {
  color: #a5a295;
}

.detail-back-btn:hover .detail-back-arrow {
  animation: arrow-bounce-left 850ms infinite;
}

.detail-back-arrow {
  height: 1em;
  width: auto;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2px;
  overflow: visible;
  transform: rotate(90deg);  /* 90deg clockwise = points left ← */
}

@keyframes arrow-bounce-left {
  0%   { translate: 0 0;      animation-timing-function: cubic-bezier(0.4, 0, 1, 0.6); }
  25%  { translate: -10px 0;  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);   }
  100% { translate: 0 0; }
}

/* Two-column text block: [label] [text], optionally [sidebar] for first block */
.detail-block-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: clamp(32px, 5vw, 80px);
  align-items: start;
  margin-top: 56px;
  padding: 0 var(--h-pad);
}

.detail-block-row--has-sidebar {
  grid-template-columns: 120px 1fr auto;
}

.detail-block-label {
  margin: 0;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
  padding-top: 0.25em;
}

.detail-block-text {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
  max-width: 40em;
}

.detail-block-text--lead {
  font-family: "General Sans", sans-serif;
  font-size: clamp(26px, 2.4vw, 47px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  max-width: 22em;
}

.detail-sidebar {
  align-self: stretch;
  border-left: 2px solid var(--black);
  padding-left: 24px;
  max-width: clamp(200px, 22vw, 350px);
  padding-right: 48px;
  display: flex;
  flex-direction: column;
}

.detail-sidebar-client {
  margin: 0;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
}

.detail-sidebar-title {
  margin: 12px 0 0;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
}

.detail-sidebar-year-wrap {
  margin: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-sidebar-year {
  margin: 0;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
}

/* Legacy category classes (kept for backward compat) */
.detail-category-block { margin-top: 56px; }
.detail-category-label { margin: 0 0 8px; font-size: clamp(14px, 1.25vw, 18px); font-weight: 450; line-height: 1.41; letter-spacing: 0.01em; }
.detail-category-text  { margin: 0; font-size: clamp(18px, 1.6vw, 23px); font-weight: 450; line-height: 1.41; letter-spacing: 0.01em; max-width: 40em; }

/* Image rows — break out of the 1920px max-width centering, but keep page-padding
   on left and right. At mobile (≤640px) the margin is overridden to 0 so images
   run edge to edge like the portfolio grid. */
.detail-image-row {
  display: grid;
  gap: var(--portfolio-gap);
  margin-top: 80px;
  margin-inline: calc(50% - 50vw);
}

.detail-image-frame {
  margin: 0;
  overflow: hidden;
}

.detail-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Credits section */
.project-credits-section {
  display: none;
  padding: 52px var(--h-pad) 52px;
  background: #f7f6eb;
  overflow-x: hidden; /* creates BFC to prevent ::before lines from adding body scrollbar */
}

.project-credits-section.has-content {
  display: block;
}

/* Credits: subgrid gives equal fixed-width label cols and equal 1fr value cols.
   column flow fills items top-to-bottom within each column pair before moving right.
   --credits-rows is set by JS to Math.ceil(n/3) for even distribution across 3 pairs. */
.detail-credits-inner {
  display: grid;
  grid-template-columns: repeat(3, 180px 1fr);
  grid-template-rows: repeat(var(--credits-rows, 3), auto);
  grid-auto-flow: column;
  column-gap: 24px;
  row-gap: 0;
  align-items: stretch;
}

/* Separator classes set by JS based on item position within 3-pair layout */
.credit-col-separator {
  border-right: 2px solid var(--black);
}
.credit-col-separator .detail-credit-value {
  padding-right: 12px;
}
.credit-col-pad-left .detail-credit-label {
  padding-left: 12px;
}

.detail-credit-item {
  display: grid;
  grid-column: span 2;
  grid-template-columns: subgrid;
  align-items: start;
  padding: 10px 0;
}

@media (max-width: 1400px) {
  .detail-credits-inner {
    grid-template-columns: repeat(2, 180px 1fr);
    grid-template-rows: repeat(5, auto); /* 2 pairs, up to 5 items each */
  }
  /* Reset JS-assigned 3-pair separator classes */
  .credit-col-separator               { border-right: none; }
  .credit-col-separator .detail-credit-value { padding-right: 0; }
  .credit-col-pad-left .detail-credit-label  { padding-left: 0; }
  /* Apply 2-pair separators via nth-child */
  .detail-credit-item:nth-child(-n+5)               { border-right: 2px solid var(--black); }
  .detail-credit-item:nth-child(-n+5) .detail-credit-value { padding-right: 12px; }
  .detail-credit-item:nth-child(n+6)  .detail-credit-label { padding-left: 12px; }
}

.detail-credit-label {
  margin: 0;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
}

.detail-credit-value {
  margin: 0;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
}

.detail-credit-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 200ms ease;
}

.detail-credit-link:hover {
  color: var(--accent-link);
}

/* ===== ABOUT PAGE ===== */

.about-contact-page {
  padding: 0;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(40px, 5vw, 80px);
  align-items: start;
  padding: 0 var(--page-padding);
}

/* Image column — left */
.about-image-col {
  order: 1;
  padding-top: calc(var(--topnav-height) + 32px);
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
}

.about-tags {
  margin: 0;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
  color: var(--black);
}

/* Aspect-ratio wrapper */
.about-image-wrap {
  aspect-ratio: clamp(0.8, calc(0.8 + tan(atan2(100vw - 900px, 700px)) * 0.45), 1.25);
  overflow: hidden;
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text column — right */
.about-text-col {
  order: 2;
  padding: calc(var(--topnav-height) + 32px) 0 56px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-sizing: border-box;
}

.about-intro-large {
  margin: 0;
  font-family: "General Sans", sans-serif;
  font-size: clamp(26px, 2.4vw, 47px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--black);
  max-width: 22em;
}

.about-intro-small {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
  color: var(--black);
  max-width: 40em;
}

/* Email + phone grouped with no gap between them */
.about-contact-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-contact-link {
  display: block;
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
  color: var(--black);
  text-decoration: none;
  transition: color 180ms ease;
}

.about-contact-link:hover {
  color: var(--accent-link);
}

/* ===== GENERIC PAGE ===== */
.generic-page {
  padding: calc(var(--topnav-height) + 32px) var(--page-padding) 80px;
}

.generic-page h1 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.generic-page p {
  font-size: 15px;
  line-height: 1.7;
}

/* ===== ADMIN ===== */

body[data-page="admin"] {
  background: #f0f1f3;
  font-family: "Inter", system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
}

/* Toast */
.a-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1a1a;
  color: #fff;
  padding: 11px 18px;
  border-radius: 6px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms, transform 200ms;
  pointer-events: none;
  z-index: 9999;
  font-family: "Inter", system-ui, sans-serif;
}

.a-toast--show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Admin login overlay ── */
.admin-login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #f5f5f4;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.admin-login-overlay.visible {
  display: flex;
}
.admin-login-box {
  background: #fff;
  border: 1px solid #e0e0de;
  border-radius: 8px;
  padding: 32px;
  width: 100%;
  max-width: 360px;
}
.admin-login-title {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 20px;
  color: #111;
}
.admin-login-error {
  color: #c0392b;
  font-size: 13px;
  margin: 6px 0 0;
  min-height: 18px;
}

/* Top bar */
.a-bar {
  background: #1a1a1a;
  color: #fff;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 13px;
  font-weight: 600;
}

.a-bar-title {
  font-weight: 600;
}

.a-bar-link {
  color: #aaa;
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
}

.a-bar-link:hover {
  color: #fff;
}

.a-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.a-bar-btn {
  background: none;
  border: 1px solid #555;
  color: #ccc;
  font-size: 12px;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.a-bar-btn:hover {
  border-color: #aaa;
  color: #fff;
}

/* Main layout */
.a-main {
  max-width: 680px;
  width: 100%;
  margin: 28px auto;
  padding: 0 16px 80px;
}

/* Accordion */
.a-accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.a-panel {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}

.a-panel-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: "Inter", system-ui, sans-serif;
  text-align: left;
}

.a-panel-toggle:hover {
  background: #fafafa;
}

/* Chevron */
.a-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

.a-panel.open > .a-panel-toggle .a-chevron,
.a-new-row.open > .a-new-toggle .a-chevron {
  transform: rotate(180deg);
}

/* Accordion panels */
.a-panel-body {
  display: none;
}

.a-panel.open > .a-panel-body {
  display: block;
}

.a-panel-inner {
  padding: 4px 20px 20px;
}

/* Form wrap (for project rows) */
.a-form-wrap {
  display: none;
}

.a-new-row.open > .a-form-wrap,
.a-project-row.open > .a-form-wrap {
  display: block;
}

.a-form-inner {
  padding: 0 16px 16px;
}

/* Section divider between save and next sub-section */
.a-section-divider {
  border: none;
  border-top: 1px solid #e2e4e8;
  margin: 20px 0 4px;
}

/* Archived projects sub-heading */
.a-archived-heading {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 24px 0 8px;
  padding-top: 16px;
  border-top: 1px solid #e8eaed;
}

/* Form fields */
.a-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 14px 0 4px;
}

.a-input,
.a-textarea,
.a-select {
  width: 100%;
  border: 1px solid #d4d7dd;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: "Inter", system-ui, sans-serif;
  background: #fff;
  box-sizing: border-box;
  line-height: 1.5;
}

.a-input:focus,
.a-textarea:focus,
.a-select:focus {
  outline: none;
  border-color: #1a1a1a;
}

.a-file {
  font-size: 12px;
  width: 100%;
}

.a-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 8px;
}

.a-section-heading {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 20px 0 8px;
  padding-top: 16px;
  border-top: 1px solid #e8eaed;
}

.a-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}

/* Zwevende opslaan-knop */
.a-floating-save {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 300;
  background: #f0faf4;
  color: #1a7a3a;
  border: 1px solid #b8e0c4;
  border-radius: 6px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: "Inter", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,122,58,0.15);
  transition: background 150ms ease, transform 150ms ease;
}
.a-floating-save:hover {
  background: #d8f3e3;
  transform: translateY(-1px);
}
.a-floating-save:active {
  transform: translateY(0);
}

/* Buttons */
.a-btn-save {
  background: #f0faf4;
  color: #1a7a3a;
  border: 1px solid #b8e0c4;
  border-radius: 4px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: "Inter", system-ui, sans-serif;
  cursor: pointer;
}

.a-btn-save:hover {
  background: #d8f3e3;
}

.a-btn-add {
  border: 1px solid #d4d7dd;
  background: #fff;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 13px;
  font-family: "Inter", system-ui, sans-serif;
  cursor: pointer;
}

.a-btn-add:hover {
  background: #f5f5f5;
}

/* Thumbnail preview */
.a-thumb-preview {
  margin-bottom: 6px;
}

.a-thumb-img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  display: none;
  border-radius: 3px;
  margin-bottom: 4px;
}

/* Content blocks */
.a-blocks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.a-blocks-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.a-scan-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.a-scan-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.a-scan-row .a-input {
  flex: 1;
}

.a-scan-status {
  margin: 6px 0 0;
  font-size: 13px;
  color: #555;
}

/* Clients editor */
.a-clients-section {
  margin-top: 8px;
}

.a-clients-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.a-client-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.a-client-row .a-input {
  flex: 1;
}

.a-btn-del--icon {
  flex-shrink: 0;
  padding: 6px 10px;
}

.a-proj-form {
  display: flex;
  flex-direction: column;
}

.a-radio-group {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.a-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.a-proj-group {
  display: flex;
  flex-direction: column;
}

.cb {
  border: 1px solid #e2e4e8;
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  background: #f8f9fb;
}

.cb-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cb-drag {
  cursor: grab;
  color: #bbb;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  flex-shrink: 0;
  user-select: none;
}
.cb-drag:active { cursor: grabbing; }

.cb-tag {
  flex: 1;
}

.cb-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  flex: 1;
}

.cb-del {
  border: none;
  background: none;
  color: #c00;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
}

.cb-preview {
  margin-bottom: 6px;
}

.cb-img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  display: none;
  border-radius: 3px;
  margin-bottom: 4px;
}

.cb-path {
  font-size: 11px;
  color: #777;
  margin: 0 0 4px;
  word-break: break-all;
}

/* Video content block */
.cb--video {
  border-color: #dde3f0;
  background: #f4f6fc;
}

/* Hint text below section headings */
.a-hint {
  font-size: 12px;
  color: #888;
  margin: -4px 0 10px;
  line-height: 1.5;
}

/* Secondary (destructive/clear) button */
.a-btn-secondary {
  border: 1px solid #e2e4e8;
  background: #fff;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: "Inter", system-ui, sans-serif;
  color: #c00;
  cursor: pointer;
  margin-top: 6px;
  align-self: flex-start;
}
.a-btn-secondary:hover {
  background: #fff0f0;
  border-color: #f5a5a5;
}

/* Animated thumbnail in project card / personal grid */
.project-anim-thumb,
.personal-anim-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Consecutive image rows: gap equals horizontal image grid gap */
.detail-image-row + .detail-image-row {
  margin-top: var(--portfolio-gap);
}

/* Text block after an image row: same larger gap */
.detail-image-row + .detail-block-row,
.detail-video-wrap + .detail-block-row {
  margin-top: 80px;
}

/* Video embed in project detail */
.detail-video-wrap {
  aspect-ratio: 16 / 9;
  margin: 80px calc(50% - 50vw) 0;
  padding-inline: var(--page-padding);
  border-radius: 4px;
  overflow: hidden;
  background: var(--white);
}
.detail-video-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* New project row */
.a-new-row {
  border: 1px dashed #c8cbd1;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 12px;
  width: 100%;
}

.a-new-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: "Inter", system-ui, sans-serif;
  text-align: left;
}

.a-new-toggle:hover {
  background: #f8f9fb;
}

/* Project list rows */
.a-project-row {
  border: 1px solid #e2e4e8;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 6px;
  width: 100%;
  transition: transform 180ms ease, box-shadow 160ms, opacity 160ms;
}

.a-project-row.open {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.a-project-row.dragging {
  opacity: 0.35;
}

.a-project-row.drag-over-top {
  transform: translateY(6px);
  border-top: 2px solid #000;
}

.a-project-row.drag-over-bottom {
  transform: translateY(-6px);
  border-bottom: 2px solid #000;
}

/* Visuele feedback voor blokken binnen een project */
.cb.dragging {
  opacity: 0.35;
}

.cb.drag-over-top {
  transform: translateY(4px);
  border-top: 2px solid #000;
}

.cb.drag-over-bottom {
  transform: translateY(-4px);
  border-bottom: 2px solid #000;
}

.a-drag-handle {
  font-size: 18px;
  color: #bbb;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
  line-height: 1;
  padding-right: 2px;
}

.a-drag-handle:active {
  cursor: grabbing;
}

.a-project-hdr {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 12px;
  background: #fff;
}

.a-project-row.open .a-project-hdr {
  background: #f8f9fb;
}

.a-project-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.a-project-client {
  font-size: 13px;
  font-weight: 600;
}

.a-project-title {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a-project-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.a-btn-edit {
  padding: 6px 12px;
  border: 1px solid #d4d7dd;
  border-radius: 4px;
  font-size: 12px;
  font-family: "Inter", system-ui, sans-serif;
  cursor: pointer;
  background: #fff;
}

.a-btn-edit:hover {
  background: #f5f5f5;
}

.a-btn-del {
  padding: 6px 12px;
  border: 1px solid #f0d0d0;
  color: #c00;
  border-radius: 4px;
  font-size: 12px;
  font-family: "Inter", system-ui, sans-serif;
  cursor: pointer;
  background: #fff;
}

.a-btn-del:hover {
  background: #fff5f5;
}

.a-btn-restore {
  padding: 6px 12px;
  border: 1px solid #b8e0c4;
  color: #1a7a3a;
  border-radius: 4px;
  font-size: 12px;
  font-family: "Inter", system-ui, sans-serif;
  cursor: pointer;
  background: #f0faf4;
}

.a-btn-restore:hover {
  background: #d8f3e3;
}

.a-empty {
  font-size: 13px;
  color: #999;
  text-align: center;
  padding: 20px 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 800px) {
  :root {
    --portfolio-gap: 12px;
    --section-pad-v: 40px;
  }

  .hero-block {
    height: 100svh;
  }

  .hero-illustration {
    width: 110vw;
    right: -8%;
    bottom: 8%;
  }

  .main-nav {
    display: none;
  }

  .lang-switcher {
    display: none;
  }

  .hamburger {
    display: inline-flex;
  }

  .about-layout {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .about-image-col {
    order: 1;
    padding: var(--topnav-height) 0 0;
  }

  .about-image-col .about-tags {
    padding: 0 var(--page-padding);
  }

  .about-text-col {
    order: 2;
    padding: 24px var(--page-padding) 48px;
  }

  .about-image-wrap {
    aspect-ratio: 5 / 4;
  }

  /* On smaller screens: collapse to single column, hide sidebar */
  .detail-block-row,
  .detail-block-row--has-sidebar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .detail-sidebar {
    display: none;
  }

  .detail-block-label {
    padding-top: 0;
  }

  .project-detail-page {
    padding: calc(var(--topnav-height) + 32px) 0 48px;
  }

  .project-credits-section {
    padding: 40px var(--h-pad);
  }

}


@media (max-width: 800px) {
  .projects-grid-wrap {
    gap: 56px;
    padding-inline: 0;
  }

  .project-caption {
    padding-inline: var(--page-padding);
  }

  .project-row {
    grid-template-columns: 1fr !important;
    row-gap: 56px;
  }

  .project-thumb.ratio-5-4,
  .project-thumb.ratio-16-9 {
    aspect-ratio: 5 / 4;
  }

  .projects-section {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 48px;
  }

  /* On mobile the bg-colour item fills the full block width;
     object-fit: contain keeps the natural ratio (bg shows top/bottom) */
  .personal-item.has-bg img {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .projects-section .section-heading {
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
  }


  /* Image pairs go single-column on very small screens */
  .detail-image-row {
    grid-template-columns: 1fr !important;
  }

  /* Credits mobile: 1 item per row, 2 cols (label | value), white line between items */
  .detail-credits-inner {
    grid-template-columns: 160px 1fr;
    grid-auto-flow: row;        /* reset column-major flow — single column pair anyway */
    grid-template-rows: none;   /* let rows auto-size naturally */
  }

  /* No separators on mobile — reset 4-col rules */
  .detail-credit-item:nth-child(-n+5)               { border-right: none; }
  .detail-credit-item:nth-child(-n+5) .detail-credit-value { padding-right: 0; }
  .detail-credit-item:nth-child(n+6)  .detail-credit-label { padding-left: 0; }

}

/* ===== PERSONAL WORK PAGE ===== */
.personal-section {
  padding: 72px 0 var(--section-pad-v);
}

.personal-section .section-heading {
  padding: 0 var(--page-padding);
  margin-bottom: 32px;
}


.personal-grid-wrap {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 2.5vw, 40px);
  padding: 0 var(--page-padding);
}

.personal-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 40px);
}

.personal-item {
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.personal-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: scale 400ms ease;
}

.personal-item:hover img {
  scale: 1.015;
}

/* Background-colour variant — image shrinks to 75%, colour fills the rest */
.personal-item.has-bg {
  position: relative;
}

.personal-item.has-bg img {
  position: absolute;
  top: 12.5%;
  left: 12.5%;
  width: 75%;
  height: 75%;
  object-fit: contain;
}

.personal-item.has-bg:hover img {
  scale: 1.015;
}

.personal-empty {
  font-size: 15px;
  color: #888;
}

@media (max-width: 800px) {
  /* Images run edge to edge; heading/intro keep their padding */
  .personal-grid-wrap {
    padding-inline: 0;
    gap: 32px;
  }

  .personal-col {
    gap: 32px;
  }

  .personal-section .section-heading {
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
  }

  .personal-intro {
    margin-inline: var(--page-padding);
  }
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  padding: 0 16px;
}

.lightbox-close {
  position: fixed;
  top: var(--page-padding);
  right: var(--page-padding);
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}

.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
}

.lightbox-title {
  color: var(--white);
  margin: 14px 0 0;
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 450;
  line-height: 1.41;
  letter-spacing: 0.01em;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .intro-word,
  .grid-enter {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .hero-btn:hover .hero-btn-arrow,
  .detail-back-btn:hover .detail-back-arrow {
    animation: none;
  }

  .project-detail-page,
  .project-credits-section {
    animation: none;
  }

  .main-nav .menu-item .letter {
    animation: none !important;
  }


  .hero-tile img {
    animation: none !important;
  }

  .mobile-drawer.open,
  .mobile-drawer.open .menu-item {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
