@font-face { font-family: "Open Sans"; font-weight: 300; font-display: swap; src: url(fonts/opensans-light.woff) format("woff"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url(fonts/opensans-regular.woff) format("woff"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: swap; src: url(fonts/opensans-semibold.woff) format("woff"); }

:root {
  --red: #e74c3c;
  --slate: #34495e;
  --panel: #0b0b0b;
  --paper: #f2f2f0;
  --ink: #eceae6;
  --muted: #a3a09a;
  --gap: clamp(12px, 3vw, 30px);
  --nav-w: 170px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0;
  font: 300 17px/1.6 "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--panel);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { font-weight: 300; line-height: 1.15; margin: 0 0 .6em; }
h2 { font-size: clamp(26px, 5vw, 36px); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- masthead + navigation (mobile/tablet: original-style hamburger + vertical list) ---------- */
.masthead {
  position: sticky; top: 0; z-index: 10;
  background: var(--panel);
  min-height: 56px;
}
.menu-toggle {
  display: none; position: absolute; top: 0; right: 0;
  width: 64px; height: 56px; padding: 0; cursor: pointer;
  background: var(--panel); border: 0;
}
.menu-toggle span { display: block; width: 28px; height: 3px; margin: 5px auto; background: #fff; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.js .menu-toggle { display: block; }
.nav { list-style: none; margin: 0; padding: 0; }
.js .nav { display: none; padding-top: 56px; }
.js .masthead.is-open .nav { display: block; }
.nav li { border-top: 1px solid var(--panel); }
.nav a {
  display: block; padding: 13px var(--gap); min-height: 48px;
  background: var(--slate); text-decoration: none; font-size: 18px; line-height: 22px;
}
.nav a:hover { background: #3f5871; }
.nav a[aria-current="page"] { background: var(--red); }

/* ---------- content panel ---------- */
.panel { padding: var(--gap); }
.view { margin: 0 0 56px; }
.js .view { display: none; margin: 0; animation: fade .35s ease; }
.js .view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .view { animation: none; } }

/* hero */
.hero { display: grid; }
.js .hero.is-active { display: grid; }
.hero-tile { background: var(--red); color: #fff; padding: 20px 24px 22px; aspect-ratio: 731 / 771; }
.hero-tile h1 { font-size: clamp(34px, 7vw, 46px); margin: 0; }
.hero-img { width: 100%; aspect-ratio: 1000 / 640; object-fit: cover; }

/* text: full text (post) + teaser tile for the other language, as in the original */
.text { display: grid; gap: var(--gap); }
.js .text.is-active { display: grid; }
.post { background: var(--slate); color: #fff; padding-bottom: 8px; }
.post h2 { padding: 18px 20px 0; }
.post p { margin: 0 0 1em; padding: 0 20px; max-width: 72ch; }
.portrait { width: 100%; margin: 0; }
.teaser { display: grid; grid-template-columns: 110px 1fr; gap: 0 16px; align-items: start; background: var(--slate); color: #fff; text-decoration: none; padding: 14px; }
.teaser img { grid-row: 1 / span 2; }
.teaser h3 { margin: 0 0 6px; font-weight: 300; font-size: 22px; color: #fff; }
.teaser p { margin: 0; font-size: 15px; color: #fff; }
.teaser:hover h3 { text-decoration: underline; }

/* exhibitions */
.exhibitions { list-style: none; margin: 0; padding: 16px 20px; max-width: 80ch; background: #fff; color: #111; }
.exhibitions li { display: grid; grid-template-columns: 3.4em 1fr; gap: 12px; padding: 5px 0; }
.exhibitions .year { font-variant-numeric: tabular-nums; }

/* galleries: masonry columns so artworks are never cropped */
.grid { list-style: none; margin: 0; padding: 0; columns: 2 150px; column-gap: 10px; }
.grid li { break-inside: avoid; margin: 0 0 10px; }
.grid a { display: block; background: #1a1a1a; overflow: hidden; }
.grid img { width: 100%; transition: transform .4s ease, opacity .3s; }
.grid a:hover img { transform: scale(1.03); }
.quote { margin: 0 0 14px; padding: 18px 20px; background: var(--slate); color: #fff; }
.quote p { margin: 0 0 .6em; }
.quote footer { color: #fff; }

/* contact */
.contact { background: var(--slate); color: #fff; padding: 20px; }
.mail-icon { margin-bottom: 14px; }
.contact a { color: #fff; text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }

.foot { padding: 20px var(--gap) 32px; color: #77746f; font-size: 13px; }
.foot p { margin: 0; }

/* ---------- lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(0, 0, 0, .94); color: #fff; overflow: hidden;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .94); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; touch-action: pan-y pinch-zoom; }
.lightbox img { max-width: 94vw; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute; border: 0; background: rgba(40, 40, 40, .7); color: #fff; cursor: pointer;
  width: 48px; height: 48px; font: 300 34px/44px "Open Sans", sans-serif;
}
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- tablet ---------- */
@media (min-width: 700px) {
  .grid { columns: 3 180px; column-gap: 14px; }
  .grid li { margin-bottom: 14px; }
  .hero { grid-template-columns: minmax(220px, 1fr) 2fr; }
  .hero-tile { aspect-ratio: auto; }
  .hero-img { height: 100%; aspect-ratio: auto; min-height: 340px; }
}

/* ---------- desktop: original layout – paper background, vertical tabs left, dark panel ---------- */
@media (min-width: 1100px) {
  body { background: var(--paper) url(images/bg.png); }
  .masthead {
    position: fixed; top: 60px; left: 0; width: var(--nav-w);
    background: none; backdrop-filter: none; border: 0;
  }
    .masthead { min-height: 0; }
  .js .menu-toggle { display: none; }
  .nav, .js .nav { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 0; }
  .nav li { border: 0; }
  .nav a { padding: 8px 20px; font-size: 19px; line-height: 26px; min-height: 0; }
  .panel {
    width: min(1000px, calc(100vw - 2 * var(--nav-w) - 40px));
    margin: 50px auto 0; padding: 30px; background: var(--panel);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
  }
  .foot { width: min(1000px, calc(100vw - 2 * var(--nav-w) - 40px)); margin: 0 auto 40px; padding: 14px 30px 18px; background: var(--panel); text-align: right; }
  .hero { grid-template-columns: 300px 1fr; }
  .hero-img { min-height: 400px; }
  .text, .js .text.is-active { grid-template-columns: 2fr 1fr; align-items: start; }
  .teaser { grid-template-columns: 1fr; padding: 0 0 16px; }
  .exhibitions { padding: 24px 30px; }
  .teaser img { grid-row: auto; margin-bottom: 14px; }
  .teaser h3, .teaser p { padding: 0 16px; }
  .grid { columns: 3; }
  html { scroll-padding-top: 20px; }
}
@media (min-width: 1500px) {
  .panel, .foot { width: 1100px; }
}

/* programmatic focus targets (headings after navigation, dialog) need no ring */
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
