/* One palette source of truth. No transitions are applied to theme colors. */
:root {
  --page: #f7f6f2;
  --surface: #eeece6;
  --ink: #171717;
  --muted: #696762;
  --line: rgba(23, 23, 23, 0.17);
  --sidebar: #eeece6;
  --sidebar-ink: #171717;
  --button: #eeece6;
  --button-ink: #171717;
}

:root[data-theme="dark"] {
  --page: #101010;
  --surface: #1a1a1a;
  --ink: #f4f2ed;
  --muted: #aaa7a0;
  --line: rgba(244, 242, 237, 0.18);
  --sidebar: #151515;
  --sidebar-ink: #f4f2ed;
  --button: #151515;
  --button-ink: #f4f2ed;
}

html,
body {
  background: var(--page) !important;
}

body {
  color: var(--ink) !important;
  font-family: Arial, Helvetica, sans-serif;
  transition: none !important;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .post-title,
body .post-title a {
  color: var(--ink);
}

body a,
body strong {
  color: inherit;
}

.transition-fade,
html.is-animating .transition-fade {
  opacity: 1 !important;
  transition: none !important;
}

/* SIDEBAR - niet exhibition */
body:not(:has(.exhibition-home)) .sidebar {
  color: var(--sidebar-ink);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}

body:not(:has(.exhibition-home)) .sidebar a,
body:not(:has(.exhibition-home)) .sidebar-parent,
body:not(:has(.exhibition-home)) .sidebar summary,
body:not(:has(.exhibition-home)) .dropdown-icon {
  color: inherit;
}

body:not(:has(.exhibition-home)) .sidebar-child:hover,
body:not(:has(.exhibition-home)) .sidebar-child:focus {
  color: inherit;
  background: transparent;
  transform: translateX(0.25rem);
}

body:not(:has(.exhibition-home)) .sidebar-child.active {
  color: inherit;
  background: transparent;
  transform: translateX(0.25rem);
}

body:not(:has(.exhibition-home)) .sidebar-spacer {
  background: var(--line);
}

body:not(:has(.exhibition-home)) .sidebar p,
body:not(:has(.exhibition-home)) .sidebar .lead {
  color: var(--muted);
}

/* Shared sidebar typography and spacing. Both the homepage and project pages
   use this same foundation; theme rules above only provide the palette. */
body .sidebar .sidebar-about > a,
body .sidebar .sidebar-about h1 {
  color: inherit;
}

body .sidebar .sidebar-about h1 {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(1.55rem, 2.3vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

body .sidebar .sidebar-nav {
  max-height: calc(100svh - 12rem);
  margin: 3rem 0 0;
  padding: 0;
}

body .sidebar .sidebar-information-links {
  display: grid;
  gap: 0.15rem;
}

body .sidebar .sidebar-parent {
  margin: 0;
  color: inherit;
}

body .sidebar .sidebar-nav a,
body .sidebar .sidebar-parent,
body .sidebar .sidebar summary,
body .sidebar .dropdown-icon {
  color: inherit;
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

body .sidebar .parent-item {
  padding: 0.36rem 0;
}

body .sidebar .sidebar-child {
  padding: 0.2rem 0;
  font-size: 0.63rem;
}

body .sidebar .sidebar-nav a:hover,
body .sidebar .sidebar-nav a:focus,
body .sidebar .sidebar-nav a.active {
  display: block;
  letter-spacing: 0.1em;
  transform: translateX(0.25rem);
}

body .sidebar summary::-webkit-details-marker {
  display: none;
}

/* SIDEBAR - exhibition homepage */
body:has(.exhibition-home) .sidebar {
  color: #f4f2ed;
  background: rgba(13, 13, 13, 0.88);
  border-color: rgba(244, 242, 237, 0.12);
}

body:has(.exhibition-home) .sidebar a,
body:has(.exhibition-home) .sidebar-parent,
body:has(.exhibition-home) .sidebar summary,
body:has(.exhibition-home) .dropdown-icon {
  color: inherit;
}

body:has(.exhibition-home) .sidebar-child:hover,
body:has(.exhibition-home) .sidebar-child:focus {
  color: #ffffff;
  background: transparent;
  transform: translateX(0.25rem);
}

body:has(.exhibition-home) .sidebar-child.active {
  color: #ffffff;
  background: transparent;
  transform: translateX(0.25rem);
}

body:has(.exhibition-home) .sidebar-spacer {
  background: rgba(244, 242, 237, 0.12);
}

body:has(.exhibition-home) .sidebar p,
body:has(.exhibition-home) .sidebar .lead {
  color: rgba(244, 242, 237, 0.45);
}

/* LIGHTMODE - exhibition sidebar */
:root[data-theme="light"] body:has(.exhibition-home) .sidebar {
  color: #171717;
  background: rgba(247, 246, 242, 0.92) !important;
  border-color: rgba(23, 23, 23, 0.16) !important;
}

:root[data-theme="light"] body:has(.exhibition-home) .sidebar .sidebar-child {
  color: rgba(23, 23, 23, 0.68);
}

:root[data-theme="light"] body:has(.exhibition-home) .sidebar .sidebar-child:hover,
:root[data-theme="light"] body:has(.exhibition-home) .sidebar .sidebar-child:focus,
:root[data-theme="light"] body:has(.exhibition-home) .sidebar .sidebar-child.active {
  color: #171717;
  background: transparent;
}

:root[data-theme="light"] body:has(.exhibition-home) .sidebar .sidebar-parent {
  color: #171717;
}

:root[data-theme="light"] body:has(.exhibition-home) .sidebar .dropdown-icon {
  color: #171717;
}

:root[data-theme="light"] body:has(.exhibition-home) .sidebar .sidebar-header h1 {
  color: #171717;
}

:root[data-theme="light"] body:has(.exhibition-home) .sidebar p {
  color: rgba(23, 23, 23, 0.6);
}

:root[data-theme="light"] body:has(.exhibition-home) .sidebar .sidebar-spacer {
  background: rgba(23, 23, 23, 0.16);
}

/* Theme button */
.theme-btn {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--button-ink);
  cursor: pointer;
  background: var(--button);
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 1rem;
  line-height: 1;
  place-items: center;
  transition: none !important;
}

.theme-btn:hover,
.theme-btn:focus-visible {
  color: var(--button-ink);
  letter-spacing: normal;
  transform: none;
}

/* Exhibition homepage overlays */
:root[data-theme="light"] .exhibition-home::before {
  background: transparent;
}

:root[data-theme="light"] .exhibition-home::after {
  background: transparent;
}

:root[data-theme="light"] .exhibition-home {
  background: var(--page);
}

:root[data-theme="light"] .home-hero h1,
:root[data-theme="light"] .home-hero__intro {
  color: #171717;
}

:root[data-theme="light"] .home-hero__label,
:root[data-theme="light"] .home-hero__note {
  color: rgba(23, 23, 23, 0.68);
}

/* Floating cards - lightmode */
:root[data-theme="light"] .home-float-card {
  background: var(--page);
  color: #171717;
  box-shadow: 0 1.25rem 3.5rem rgba(0, 0, 0, 0.10);
}

:root[data-theme="light"] .home-float-card span {
  color: #171717;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.6);
}

/* Light mode applies to the complete exhibition, not only its opening hero. */
:root[data-theme="light"] .project-stage,
:root[data-theme="light"] .project-stage__link {
  color: var(--ink);
  background: var(--surface);
}

:root[data-theme="light"] .project-stage__link::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 40%, rgba(0, 0, 0, 0.55));
}

:root[data-theme="light"] .project-stage__title,
:root[data-theme="light"] .project-stage__number,
:root[data-theme="light"] .project-stage__category {
  color: var(--ink);
  text-shadow: 0 1px 8px rgba(247, 246, 242, 0.92);
}

:root[data-theme="light"] .project-stage__title {
  color: #f4f2ed;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

:root[data-theme="light"] .project-stage__number,
:root[data-theme="light"] .project-stage__category {
  color: #f4f2ed;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

:root[data-theme="light"] body:has(.exhibition-home) .theme-btn {
  color: #171717;
}

/* Sidebar hierarchy, active-page state and the discreet footer. */
body .sidebar .sidebar-sticky {
  display: flex;
  flex-direction: column;
}

body .sidebar .sidebar-nav {
  flex: 1 1 auto;
}

body .sidebar .sidebar-sticky > p {
  position: static;
  margin: auto 0 0;
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  line-height: 1.35;
}

/* The same vertical sidebar rhythm is used on the homepage and every project. */
body .sidebar .sidebar-about .lead {
  display: none;
}

body .sidebar .sidebar-parent > details > .parent-item {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

body .sidebar .sidebar-child.active,
body:has(.exhibition-home) .sidebar .sidebar-child.active,
body .sidebar a.sidebar-item.active {
  display: block;
  font-weight: 700;
  transform: translateX(0.25rem);
}

body .sidebar .sidebar-child:hover,
body .sidebar .sidebar-child:focus-visible,
body:has(.exhibition-home) .sidebar .sidebar-child:hover,
body:has(.exhibition-home) .sidebar .sidebar-child:focus-visible {
  transform: translateX(0.25rem);
}

/* Mobile menu */
:root[data-theme="light"] .mobile-menu,
:root[data-theme="light"] .mobile-menu-toggle {
  color: #171717;
  background: #f7f6f2;
  border-color: rgba(23, 23, 23, 0.2);
}

:root[data-theme="light"] .mobile-menu-toggle span {
  background: #171717;
}

:root[data-theme="light"] .mobile-menu__group h2 {
  color: rgba(23, 23, 23, 0.56);
}

:root[data-theme="light"] .mobile-menu__page {
  border-color: rgba(23, 23, 23, 0.18);
}

:root[data-theme="light"] .contact-text,
:root[data-theme="light"] .biography-text {
  color: #171717;
  background: rgba(247, 246, 242, 0.84);
}

@media (max-width: 47.99rem) {
  .theme-btn {
    top: 1rem;
    right: 1rem;
  }
}
