:root {
  color-scheme: light;

  --bg:        #e0e0e0;
  --fg:        #565656;
  --accent:    #367f82;
  --ink:       #000000;
  --overlay:   rgba(229, 229, 229, 0.30);
  --card-bg:   #d6d6d6;
  --input-bg:  rgba(255, 255, 255, 0.55);
  --input-border: rgba(86, 86, 86, 0.25);
  --menu-bg:   #ffffff;
  --rule:      rgba(86, 86, 86, 0.18);

  --max-width: 1440px;
  --card-ratio: 3 / 4;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg:        #161616;
  --fg:        #c4c4c4;
  --accent:    #7fc1c4;          /* lighter teal reads better on dark */
  --ink:       #f0f0f0;
  --overlay:   rgba(22, 22, 22, 0.55);
  --card-bg:   #232323;
  --input-bg:  rgba(255, 255, 255, 0.05);
  --input-border: rgba(196, 196, 196, 0.2);
  --menu-bg:   #1c1c1c;
  --rule:      rgba(196, 196, 196, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Zen Maru Gothic", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body, a, button, .card, .mobile-menu,
.form-field input, .form-field textarea {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Header */
.site-header { padding-block: 2rem; }
.header__row {
  display: flex; flex-wrap: wrap;
  justify-content: center; align-items: center;
  gap: 1.5rem;
}
.brand {
  font-size: 40px; font-weight: 700; line-height: 1.1;
  color: var(--ink); letter-spacing: -0.01em;
  transition: color .2s ease;
}
.brand:hover { color: var(--accent); }

.nav { display: flex; flex-wrap: wrap; gap: 2rem; }
.nav a { color: var(--fg); transition: color .2s ease; }
.nav a:hover,
.nav a[aria-current="page"] { color: var(--accent); }

.menu-toggle {
  display: none; position: relative; z-index: 110;
  width: 32px; height: 32px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ink);
}
.menu-toggle span {
  position: absolute; left: 4px; right: 4px; height: 2.5px;
  background: currentColor; border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease;
}
.menu-toggle span:nth-child(1) { top: 8px; }
.menu-toggle span:nth-child(2) { top: 15px; }
.menu-toggle span:nth-child(3) { top: 22px; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0 0 0 auto;
  width: 100%; max-width: 24rem;
  background: var(--menu-bg); padding: 5rem 2rem 2rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  z-index: 100;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li + li { margin-top: .75rem; }
.mobile-menu a { font-size: 23px; color: var(--fg); }
.mobile-menu a:hover,
.mobile-menu a[aria-current="page"] { color: var(--accent); }

.menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
  z-index: 90;
}
.menu-backdrop.is-open { opacity: 1; visibility: visible; }

/* Intro + filters */
.intro {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400; line-height: 1.5;
  max-width: 60ch;
  margin: 0 auto clamp(2.5rem, 6vw, 5rem);
  justify-content: center !important;
  display: flex;
  text-align: center;
}
.filters {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  margin-bottom: 2rem;
}
.filters a {
  font-size: .85rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fg);
  padding-bottom: .25rem;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.filters a:hover { color: var(--accent); }
.filters a.is-active { color: var(--accent); border-bottom-color: var(--accent); }

/* Artwork grid */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: 4rem;
}
.card {
  position: relative; display: block; overflow: hidden;
  background: var(--card-bg);
}
.card__img {
  width: 100%; height: 100%;
  aspect-ratio: var(--card-ratio);
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4, 0, .2, 1), filter .4s ease;
}
.card:hover .card__img,
.card:focus-visible .card__img { transform: scale(1.04);
filter: grayscale(20%);
}

.card__overlay {
  position: absolute; inset: 0;
  background: var(--overlay);
  opacity: 0; transition: opacity .3s ease;
}
.card__body {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 1rem;
  opacity: 0; transition: opacity .3s ease;
}
.card__title {
  margin: 0 0 .4rem;
  font-size: 1.05rem; font-weight: 700;
  line-height: 1.3; color: var(--fg);
}
.card__cat {
  font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.card:hover .card__overlay,
.card:hover .card__body,
.card:focus-visible .card__overlay,
.card:focus-visible .card__body { opacity: 1; }

/* Detail page */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start; padding-bottom: 4rem;
}
.detail__image { width: auto; height: auto; }
.detail__meta { position: sticky; top: 2rem; }
.detail__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;                /* ← bold, only here */
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 .75rem;
}
.detail__cat {
  font-size: .75rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1.5rem;
}
.detail__specs {
  margin: 0 0 1.5rem; padding: 0; list-style: none;
  font-size: .95rem;
}
.detail__specs li {
  padding: .4rem 0;
  border-top: 1px solid var(--rule);
}
.detail__body p { margin: 0 0 1rem; }
.back-link {
  display: inline-block; margin-bottom: 2rem; color: var(--accent);
}
.back-link:hover { text-decoration: underline; }

/* Generic page */
.page { max-width: 62ch; padding-bottom: 4rem; }
.page h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700; line-height: 1.2;
  color: var(--ink); margin: 0 0 1.5rem;
}
.page p { margin: 0 auto 1.25rem; }
.page a { color: var(--accent); text-decoration: underline; }

/* Forms */
.form-field { margin-bottom: 1.25rem; }
.form-field label {
  display: block; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: .4rem;
}
.form-field input,
.form-field textarea {
  width: 100%; padding: .75rem .9rem;
  font: inherit; font-weight: 300; color: var(--fg);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 3px;
  transition: border-color .2s ease, background .2s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none; border-color: var(--accent); background: #fff;
}
.form-error { color: #a33; font-size: .85rem; margin-top: .3rem; }

.btn {
  display: inline-block; padding: .8rem 1.9rem;
  font: inherit; font-weight: 400;
  color: #fff; background: var(--accent);
  border: 0; border-radius: 3px; cursor: pointer;
  transition: opacity .2s ease;
}
.btn:hover { opacity: .85; }

.alert {
  padding: .9rem 1.2rem; margin-bottom: 1.5rem;
  border-left: 3px solid var(--accent);
  background: rgba(54, 127, 130, .08);
}

/* Footer */
.site-footer { padding: 3rem 0 2.5rem; font-size: .88rem; }
.footer__row {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center;
  gap: 1rem; padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

/* Empty state */
.empty { padding: 4rem 0 6rem; color: rgba(86, 86, 86, .7); }
.empty code {
  background: rgba(0, 0, 0, .06);
  padding: .15em .45em; border-radius: 3px;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: 1fr; }
  .detail__meta { position: static; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
  .brand { font-size: 32px; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .site-header { padding-block: 1.5rem; }
}

.profile-photo {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  margin: 0 auto 2rem;
  filter: grayscale(15%);
}

/* Contact page */
.contact-page {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
  padding-bottom: 4rem;
}

.contact-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 1.5rem;
}

.contact-lead {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0 0 2.5rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(86, 86, 86, 0.2);
}
.contact-list li:last-child {
  border-bottom: 1px solid rgba(86, 86, 86, 0.2);
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.contact-list a {
  font-size: 1.05rem;
  color: var(--fg);
  transition: color 0.2s ease;
}
.contact-list a:hover {
  color: var(--accent);
}

.text-center { text-align: center}
.text-left { text-align: center}
.text-right { text-align: center}
.exhibition-list { text-align: center}

/* ----------------------------------------------------------
   Theme toggle
   ---------------------------------------------------------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--fg);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle__icon { display: none; }

/* Show the icon for the theme you'd switch *to* */
[data-theme="light"] .theme-toggle__moon { display: block; }
[data-theme="dark"]  .theme-toggle__sun  { display: block; }

/* Mobile menu placement */
.mobile-menu__theme {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

/* ----------------------------------------------------------
   Cookie consent banner
   ---------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  background: var(--menu-bg);
  color: var(--fg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
  max-width: 32rem;
  margin-inline: auto;

  /* Hidden by default */
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease;
}

.cookie-banner.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
}

.cookie-banner__text {
  margin: 0;
  font-size: .85rem;
  line-height: 1.5;
  flex: 1;
}

.cookie-banner__text a {
  color: var(--accent);
  text-decoration: underline;
}

.cookie-banner__btn {
  flex-shrink: 0;
  padding: .55rem 1.2rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity .2s ease;
}

.cookie-banner__btn:hover { opacity: .85; }

@media (max-width: 560px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .cookie-banner__btn { width: 100%; }
}