*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:  #111110;
  --white:  #F9F8F6;
  --grey1:  #E5E3DF;
  --grey2:  #9E9890;
  --grey3:  #5C5850;
  --font:   'Calibri', 'Calibri CY', 'Arial', 'Arial CY', 'Helvetica Neue', system-ui, sans-serif;
  --bar-h:  46px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ── TOP BAR ─────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--bar-h);
  background: var(--black);
  display: flex;
  align-items: stretch;
  z-index: 200;
}
.topbar__home {
  display: flex;
  align-items: center;
  padding: 0 22px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: background 0.15s;
}
.topbar__home:hover { background: rgba(255,255,255,0.07); }

.topbar__nav {
  display: flex;
  align-items: stretch;
  flex: 1;
}
.topbar__nav > a {
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.topbar__nav > a:hover { color: rgba(255,255,255,0.85); }
.topbar__nav > a.active { color: #fff; border-bottom-color: rgba(255,255,255,0.4); }

/* Paintings dropdown */
.nav-group {
  position: relative;
  display: flex;
  align-items: stretch;
}
.nav-group > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.nav-group:hover > a { color: #fff; }
.nav-group > a.active { color: #fff; border-bottom-color: rgba(255,255,255,0.4); }
.nav-group > a .caret { font-size: 8px; opacity: 0.45; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--black);
  min-width: 230px;
  border-top: 1px solid rgba(255,255,255,0.1);
  z-index: 300;
  padding: 4px 0;
}
.nav-group:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  transition: color 0.12s, background 0.12s;
}
.nav-dropdown a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-dropdown a.active { color: #fff; }

.topbar__lang {
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 9px;
  border-left: 1px solid rgba(255,255,255,0.1);
  margin-left: auto;
}
.topbar__lang a {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  transition: color 0.15s;
}
.topbar__lang a.active, .topbar__lang a:hover { color: #fff; }
.topbar__lang span { color: rgba(255,255,255,0.18); }

/* ── SITE SHELL ──────────────────────────────────────────── */
.site {
  padding-top: var(--bar-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page { display: none; flex: 1; flex-direction: column; }
.page.active { display: flex; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page.active { animation: fadeIn 0.22s ease both; }

/* ── HOME ────────────────────────────────────────────────── */
.home {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.home__inner {
  display: flex;
  align-items: center;
  gap: 52px;
}
.home__photo {
  width: 220px; height: 260px;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(6%);
  flex-shrink: 0;
}
.home__photo-ph {
  width: 220px; height: 260px;
  background: var(--grey1);
  flex-shrink: 0;
}
.home__divider {
  width: 1px; height: 200px;
  background: var(--grey1);
  flex-shrink: 0;
}
.home__name {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.home__sub {
  font-size: 12px;
  color: var(--grey2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── GALLERY ─────────────────────────────────────────────── */
.gallery-page { flex: 1; display: flex; flex-direction: column; }

.gallery-series-bar {
  position: sticky;
  top: var(--bar-h);
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--grey1);
  padding: 10px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gallery-series-bar__title {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey3);
}
.gallery-series-bar__counter {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--grey2);
}

.painting-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--bar-h) - 37px);
  padding: 48px;
  border-bottom: 1px solid var(--grey1);
  gap: 56px;
}
.painting-section:last-child { border-bottom: none; }
.painting-section:nth-child(even) { flex-direction: row-reverse; }

.painting-section__img-wrap {
  flex: 0 0 auto;
  max-width: 58vw;
  cursor: zoom-in;
}
.painting-section__img {
  max-width: 58vw;
  max-height: calc(100vh - var(--bar-h) - 37px - 96px);
  width: auto; height: auto;
  display: block;
  transition: opacity 0.2s;
  box-shadow: 0 4px 32px rgba(0,0,0,0.10);
}
.painting-section__img-wrap:hover .painting-section__img { opacity: 0.92; }

.painting-section__ph {
  max-width: 58vw;
  width: 440px; height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--grey2);
  text-align: center;
  padding: 20px;
  cursor: zoom-in;
  box-shadow: 0 4px 32px rgba(0,0,0,0.07);
}
.painting-section__info {
  flex: 0 0 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.painting-section__num {
  font-size: 11px;
  color: var(--grey1);
  letter-spacing: 0.08em;
}
.painting-section__name {
  font-size: 19px;
  font-weight: 300;
  line-height: 1.3;
}
.painting-section__meta {
  font-size: 12px;
  color: var(--grey2);
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.painting-section__zoom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey2);
  cursor: pointer;
  transition: color 0.15s;
  background: none;
  border: none;
  font-family: var(--font);
  padding: 0;
}
.painting-section__zoom:hover { color: var(--black); }
.painting-section__zoom::before { content: '⊕'; font-size: 13px; }

/* ── BIOGRAPHY ───────────────────────────────────────────── */
.bio-page {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 240px;
}
.bio-text {
  padding: 44px 52px 60px;
  border-right: 1px solid var(--grey1);
  max-width: 660px;
}
.bio-text h1 {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--grey1);
}
.bio-text p {
  font-size: 14px;
  line-height: 1.8;
  color: #2A2820;
  margin-bottom: 10px;
}
.bio-text p strong { font-weight: 600; color: var(--black); }
.bio-text em { font-style: italic; }
.bio-text h2 {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey2);
  margin: 36px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--grey1);
}
.bio-sidebar {
  padding: 44px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: var(--bar-h);
  align-self: start;
  max-height: calc(100vh - var(--bar-h));
  overflow-y: auto;
}
.bio-sidebar img { width: 100%; height: auto; display: block; }
.bio-sidebar .img-ph {
  width: 100%;
  background: var(--grey1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--grey2);
  letter-spacing: 0.05em;
  text-align: center;
  padding: 8px;
}

/* ── LIGHTBOX ────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(8,8,7,0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  object-fit: contain;
  display: block;
}
.lightbox__ph {
  width: min(1100px, 92vw);
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a18;
  color: rgba(255,255,255,0.3);
  font-size: 14px;
  letter-spacing: 0.06em;
}
.lightbox__caption {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-align: center;
}
.lightbox__meta {
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-align: center;
}
.lightbox__close {
  position: fixed; top: 18px; right: 22px;
  background: none; border: none;
  color: rgba(255,255,255,0.45);
  font-size: 26px; cursor: pointer;
  font-family: var(--font);
  transition: color 0.15s;
  line-height: 1;
}
.lightbox__close:hover { color: #fff; }
.lightbox__nav {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: rgba(255,255,255,0.3);
  font-size: 32px; cursor: pointer;
  font-family: var(--font);
  padding: 12px 18px;
  transition: color 0.15s;
  line-height: 1;
}
.lightbox__nav:hover { color: #fff; }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  padding: 16px 48px;
  border-top: 1px solid var(--grey1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer span {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--grey2);
}

/* ── TEXT PAGES ──────────────────────────────────────────── */
.text-page {
  flex: 1;
  padding: 44px 52px 60px;
  max-width: 680px;
}
.text-page h1 {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--grey1);
}
.text-page p { font-size: 13px; color: var(--grey2); letter-spacing: 0.04em; }

/* ── TEXTS ───────────────────────────────────────────────── */
.texts-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.texts-list {
  flex: 1;
  max-width: 780px;
  padding: 40px 52px 60px;
}
.texts-list__header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--grey1);
  margin-bottom: 0;
}
.texts-list__label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey2);
}
.text-entry {
  padding: 28px 0;
  border-bottom: 1px solid var(--grey1);
  cursor: pointer;
  transition: background 0.12s;
}
.text-entry:hover { background: #F4F2EE; margin: 0 -52px; padding: 28px 52px; }
.text-entry__title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 5px;
}
.text-entry__meta {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--grey2);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.text-entry__preview {
  font-size: 13px;
  color: var(--grey3);
  line-height: 1.65;
}
.text-entry__lang {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--grey2);
  border: 1px solid var(--grey1);
  padding: 1px 4px;
  vertical-align: middle;
  margin-left: 6px;
  font-style: normal;
}

.essay-reader {
  flex: 1;
  padding: 36px 52px 60px;
  max-width: 740px;
}
.essay-reader__back {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey2);
  cursor: pointer;
  margin-bottom: 36px;
  display: inline-block;
  transition: color 0.15s;
}
.essay-reader__back:hover { color: var(--black); }
.essay-reader__body h1 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--grey1);
}
.essay-reader__body h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 32px 0 10px;
}
.essay-reader__body p {
  font-size: 14px;
  line-height: 1.82;
  color: #2A2820;
  margin-bottom: 12px;
}
.essay-reader__body em { font-style: italic; }
.essay-reader__body strong { font-weight: 600; }
.essay-reader__body blockquote {
  border-left: 2px solid var(--grey1);
  margin: 20px 0;
  padding: 4px 20px;
  color: var(--grey3);
  font-style: italic;
}
.essay-reader__body .essay-meta {
  font-size: 12px;
  color: var(--grey2);
  margin-bottom: 28px;
  font-style: italic;
}

/* ── CONTACT ─────────────────────────────────────────────── */
.contact-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
}
.contact-section {
  padding: 44px 52px 60px;
  border-right: 1px solid var(--grey1);
}
.contact-section--links {
  padding: 44px 32px 60px;
  border-right: none;
}
.contact-h1 {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--grey1);
}
.contact-h2 {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey2);
  margin: 32px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--grey1);
}
.contact-h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.contact-email {
  font-size: 15px;
  margin-bottom: 0;
}
.contact-email a {
  color: var(--black);
  transition: color 0.15s;
}
.contact-email a:hover { color: var(--grey3); }
.contact-form { margin-top: 0; }
.form-row { margin-bottom: 14px; }
.form-row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group--wide { grid-column: 1 / -1; }
.form-group label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey2);
}
.form-group input,
.form-group textarea {
  font-family: var(--font);
  font-size: 13px;
  background: var(--white);
  border: 1px solid var(--grey1);
  padding: 9px 12px;
  color: var(--black);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--grey3); }
.form-submit {
  margin-top: 6px;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--black);
  color: #fff;
  border: none;
  padding: 11px 28px;
  cursor: pointer;
  transition: background 0.15s;
}
.form-submit:hover { background: var(--grey3); }

.contact-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.contact-links li {
  padding: 8px 0;
  border-bottom: 1px solid var(--grey1);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.contact-links a {
  font-size: 12px;
  color: var(--grey3);
  transition: color 0.15s;
}
.contact-links a:hover { color: var(--black); }
.link-note {
  font-size: 10px;
  color: var(--grey2);
  letter-spacing: 0.04em;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 800px) {
  .painting-section {
    flex-direction: column !important;
    min-height: auto;
    padding: 36px 20px;
    gap: 20px;
    align-items: flex-start;
  }
  .painting-section__img-wrap,
  .painting-section__img,
  .painting-section__ph { max-width: 100%; width: 100%; }
  .painting-section__info { flex: none; }
  .gallery-series-bar { padding: 10px 20px; }
  .home { padding: 32px 24px; }
  .home__inner { flex-direction: column; gap: 24px; }
  .home__divider { width: 48px; height: 1px; }
  .bio-page { grid-template-columns: 1fr; }
  .bio-sidebar { display: none; }
  .bio-text { padding: 28px 20px 40px; max-width: 100%; }
  .site-footer { padding: 14px 20px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .texts-list { padding: 28px 20px 40px; }
  .text-entry:hover { margin: 0 -20px; padding: 28px 20px; }
  .essay-reader { padding: 28px 20px 40px; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-section { padding: 28px 20px 32px; border-right: none; border-bottom: 1px solid var(--grey1); }
  .contact-section--links { padding: 28px 20px 40px; }
  .form-row--split { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .page.active { animation: none; }
}