@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500&display=swap');

:root {
  --page-width: 1440px;
  --page-side: clamp(22px, 3.2vw, 52px);
  --gap: clamp(18px, 2vw, 34px);
  --text: #171717;
  --background: #fff;
  --nav-size: 15px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Raleway, sans-serif;
  font-weight: 400;
}

.site-header {
  position: relative;
  width: min(var(--page-width), calc(100% - (2 * var(--page-side))));
  min-height: 54px;
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-link {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.logo-link img {
  display: block;
  width: min(280px, 28vw);
  height: auto;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 2.2vw, 34px);
}
nav a {
  color: inherit;
  text-decoration: none;
  font-size: var(--nav-size);
  line-height: 1.2;
  white-space: nowrap;
}
nav a.active { text-decoration: underline; text-underline-offset: 5px; }

main {
  width: min(var(--page-width), calc(100% - (2 * var(--page-side))));
  margin: clamp(42px, 5vw, 70px) auto 120px;
}

.project-intro {
  margin: 0 0 clamp(55px, 7vw, 100px);
  max-width: 680px;
}
.project-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(27px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: .01em;
}
.project-intro p {
  margin: 0;
  max-width: 650px;
  font-size: 14px;
  line-height: 1.65;
}

/* V2: balanced masonry-style columns. Images retain their original proportions. */
.photo-sequence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}
.photo-column {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}
.featured-row {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--gap);
  align-items: start;
}
.featured-row.featured-one { grid-template-columns: minmax(0, 1fr); }
.featured-row.featured-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.featured-row .photo img { width: 100%; }
.hunters-more summary { color: #555; font-size: 12px; cursor: pointer; }
.hunters-more summary::marker { color: #555; }
.photo {
  margin: 0;
  min-width: 0;
}
.photo img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 520ms ease, transform 520ms ease;
  will-change: opacity, transform;
}
.photo img.is-loaded {
  opacity: 1;
  transform: translateY(0);
}

footer {
  width: 100vw;
  margin: 28px 0 0 calc(50% - 50vw);
  padding: 16px var(--page-side) 18px;
  box-sizing: border-box;
  background: #f4f4f1;
  color: #555;
  font-size: 11px;
  line-height: 1.5;
}

.back-to-top {
  display: block;
  width: 40px;
  height: 39px;
  margin: 42px auto 0;
  padding: 0;
  border-radius: 50%;
  text-decoration: none;
  opacity: .82;
  transition: opacity 180ms ease, transform 180ms ease;
}
.back-to-top:hover { opacity: 1; transform: translateY(-2px); }
.back-to-top img { display: block; width: 40px; height: 39px; }

/* Full-screen image view */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(255,255,255,.97);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 260ms ease;
}
.lightbox.is-visible { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 300ms ease;
}
.lightbox img.is-visible { opacity: 1; }
.lightbox button {
  position: fixed;
  border: 0;
  background: transparent;
  color: #111;
  font-family: inherit;
  cursor: pointer;
  z-index: 21;
}
.lightbox-close { top: 18px; right: 25px; font-size: 34px; line-height: 1; }
.lightbox-prev, .lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  padding: 20px;
}
.lightbox-prev { left: 15px; }
.lightbox-next { right: 15px; }

@media (max-width: 900px) {
  :root { --nav-size: 14px; }
  .site-header { min-height: 48px; }
  .logo-link img { width: min(230px, 25vw); }
  nav { gap: 16px; }
  .photo-sequence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header {
    display: block;
    min-height: 0;
    margin-top: 18px;
  }
  .logo-link {
    position: static;
    display: block;
    transform: none;
    margin-bottom: 18px;
  }
  .logo-link img { width: min(240px, 60vw); }
  nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 13px 18px;
  }
  main { margin-top: 58px; }
  .project-intro { margin-bottom: 50px; }
  .photo-sequence { grid-template-columns: 1fr; }
  .photo-column { gap: 30px; }
  .featured-row.featured-two { grid-template-columns: 1fr; }
  .lightbox img {
    max-width: calc(100vw - 45px);
    max-height: calc(100vh - 100px);
  }
  .lightbox-prev, .lightbox-next { font-size: 38px; padding: 14px; }
}

 .lightbox-prev, .lightbox-next {\n  color: #777;\n  background: rgba(255,255,255,.86);\n  border-radius: 50%;\n  width: 44px;\n  height: 44px;\n  padding: 0;\n  display: grid;\n  place-items: center;\n}\n\n@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .photo img, .lightbox, .lightbox img { transition: none; }
}

.back-to-russian-soul {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 12px;
  background: #f1f1f1;
  color: #666;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

@media (max-width: 620px) {
  .back-to-russian-soul { padding: 9px 17px; }
}


/* ===== V2.1 FIXED: additions to the working V2 base ===== */
:root {
  --gap: clamp(14px, 1.35vw, 22px);
}

/* Wider usable canvas on large gallery displays / Studio Display */
@media (min-width: 1600px) {
  :root { --page-width: 1760px; }
}

/* Top-level navigation: exact shared baseline */
nav {
  gap: clamp(24px, 2.3vw, 36px);
  overflow: visible;
}

nav > a,
.nav-trigger {
  color: inherit;
  text-decoration: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-trigger {
  display: block;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

/* Invisible hover bridge: avoids needing padding that shifts the baseline */
.nav-dropdown::after {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  top: 100%;
  height: 14px;
}

.dropdown-menu {
  position: absolute;
  z-index: 100;
  left: 50%;
  top: calc(100% + 12px);
  transform: translateX(-50%);
  min-width: 190px;
  padding: 14px 16px;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(0,0,0,.10);
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  text-align: left;
  box-shadow: 0 5px 18px rgba(0,0,0,.04);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: flex;
}

.dropdown-menu a {
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 160ms ease, font-weight 160ms ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background: transparent;
  color: #333;
  font-weight: 500;
}

/* Softer lightbox and caption */
.lightbox {
  transition: opacity 360ms ease;
}

.lightbox-content {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-content > img {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 118px);
  transition: opacity 680ms ease;
}

.lightbox-caption {
  width: 100%;
  min-height: 22px;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  nav > a, .nav-trigger { font-size: 14px; }
  .dropdown-menu { min-width: 170px; }
}

@media (max-width: 620px) {
  .nav-dropdown {
    position: relative;
  }

  .dropdown-menu {
    left: 0;
    top: calc(100% + 10px);
    transform: none;
  }

  .lightbox-content {
    max-width: calc(100vw - 45px);
    max-height: calc(100vh - 80px);
  }

  .lightbox-content > img {
    max-width: calc(100vw - 45px);
    max-height: calc(100vh - 125px);
  }

  .lightbox-caption { font-size: 11px; }
}


/* ===== V3.1: V2 aesthetic + corrected header ===== */

/* Logo and Colors title share exactly the same left edge. */
.site-header,
main,
footer {
  width: min(var(--page-width), calc(100% - (2 * var(--page-side))));
}

/* Full-width copyright band */
footer {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.site-header {
  min-height: 92px;
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(330px, 430px) 1fr minmax(330px, 430px);
  align-items: end;
  justify-content: initial;
}

.logo-link {
  position: static;
  grid-column: 1;
  justify-self: start;
  align-self: end;
  transform: none;
}

.logo-link img {
  display: block;
  width: clamp(330px, 25vw, 410px);
  max-width: 100%;
  height: auto;
}

nav {
  grid-column: 2;
  justify-self: center;
  align-self: end;
  padding-bottom: 4px;
}

/* No automatic underline on Photography. */
.nav-trigger,
nav > a {
  text-decoration: none;
}

/* Keep the tighter V2.1 spacing. */
:root {
  --gap: clamp(14px, 1.35vw, 22px);
}

/* Studio Display / gallery presentation */
@media (min-width: 1600px) {
  :root {
    --page-width: 1760px;
    --gap: 20px;
  }

  .site-header {
    grid-template-columns: minmax(390px, 470px) 1fr minmax(390px, 470px);
    min-height: 104px;
  }

  .logo-link img {
    width: clamp(390px, 23vw, 450px);
  }

  nav > a,
  .nav-trigger {
    font-size: 16px;
  }
}

/* iPad / smaller desktop */
@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: minmax(250px, 320px) 1fr;
    min-height: 72px;
  }

  .logo-link img {
    width: min(310px, 29vw);
  }

  nav {
    grid-column: 2;
    justify-self: end;
    gap: 18px;
  }
}

/* Mobile */
@media (max-width: 620px) {
  .site-header {
    display: block;
    min-height: 0;
  }

  .logo-link {
    display: block;
    margin-bottom: 18px;
  }

  .logo-link img {
    width: min(330px, 72vw);
  }

  nav {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 13px 18px;
    padding: 0;
  }
}


/* ===== V3.2 HEADER ===== */

.site-header {
  width: 100%;
  margin: 0;
  display: block;
  min-height: 0;
  background: #f4f4f1;
}

.header-inner {
  width: min(var(--page-width), calc(100% - (2 * var(--page-side))));
  margin: 0 auto;
  padding-top: 24px;
}

.logo-link {
  display: inline-block;
  color: #171717;
  text-decoration: none;
  margin: 0 0 18px;
}

.site-logo {
  display: block;
  font-family: Raleway, sans-serif;
  font-weight: 400;
  font-size: clamp(38px, 2.7vw, 46px);
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}

nav {
  position: static;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(26px, 2.2vw, 38px);
  padding: 0 0 16px;
  overflow: visible;
}

nav > a,
.nav-trigger {
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
}

.header-rule {
  width: 100%;
  border-top: 1px solid rgba(0,0,0,.22);
}

/* Dropdowns start below the separator line, not directly below the text */
.nav-dropdown {
  position: relative;
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  left: -16px;
  right: -16px;
  top: 100%;
  height: 18px;
}

.dropdown-menu {
  top: calc(100% + 17px);
  z-index: 200;
}

/* Keep page content aligned with logo */
main,
footer {
  width: min(var(--page-width), calc(100% - (2 * var(--page-side))));
}

/* Studio Display */
@media (min-width: 1600px) {
  .header-inner {
    padding-top: 28px;
  }

  .site-logo {
    font-size: 48px;
  }

  nav > a,
  .nav-trigger {
    font-size: 18px;
  }

  nav {
    gap: 40px;
    padding-bottom: 18px;
  }

  .dropdown-menu {
    top: calc(100% + 19px);
  }
}

/* iPad / smaller screens */
@media (max-width: 1100px) {
  .header-inner {
    padding-top: 20px;
  }

  .site-logo {
    font-size: 38px;
  }

  nav {
    justify-content: flex-start;
    gap: 20px;
  }

  nav > a,
  .nav-trigger {
    font-size: 15px;
  }
}

/* Mobile */
@media (max-width: 620px) {
  .header-inner {
    padding-top: 18px;
  }

  .logo-link {
    margin-bottom: 16px;
  }

  .site-logo {
    font-size: 34px;
    letter-spacing: 0.07em;
  }

  nav {
    flex-wrap: wrap;
    gap: 12px 18px;
    padding-bottom: 14px;
  }

  .dropdown-menu {
    left: 0;
    transform: none;
    top: calc(100% + 15px);
  }
}


/* ===== V3.3: right-aligned top navigation ===== */

/* Logo remains aligned with the left edge of the page/grid.
   Navigation is aligned with the right edge of the page/grid. */
nav {
  width: 100%;
  justify-content: flex-end;
}

/* Dropdowns grow leftwards from their top-bar item.
   This keeps long series names away from the left-side project title. */
.dropdown-menu {
  left: auto;
  right: 0;
  transform: none;
  text-align: left;
}

/* Photography has a longer dropdown: keep it attached to the right side
   of the trigger instead of centering it under the word. */
.nav-dropdown .dropdown-menu {
  left: auto;
  right: 0;
}

@media (max-width: 1100px) {
  nav {
    justify-content: flex-end;
  }
}

@media (max-width: 620px) {
  /* On phones the navigation returns to the left for usability. */
  nav {
    justify-content: flex-start;
  }

  .dropdown-menu,
  .nav-dropdown .dropdown-menu {
    left: 0;
    right: auto;
    transform: none;
  }
}


/* ===== V3.3 centered dropdown correction ===== */
/* Keep the top bar right-aligned, but center each dropdown under its trigger. */
.dropdown-menu,
.nav-dropdown .dropdown-menu {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  text-align: left;
}

@media (max-width: 620px) {
  .dropdown-menu,
  .nav-dropdown .dropdown-menu {
    left: 0;
    right: auto;
    transform: none;
  }
}


/* ===== V3.5 — logo + nav same row, dropdown text aligned under trigger ===== */

/* Header: logo and navigation on the same horizontal line */
.site-header {
  width: 100%;
  margin: 0;
  display: block;
  min-height: 0;
}

.header-inner {
  width: min(var(--page-width), calc(100% - (2 * var(--page-side))));
  margin: 0 auto;
  padding-top: 24px;
  padding-bottom: 15px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 40px;
}

.logo-link {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  color: #171717;
  text-decoration: none;
}

.site-logo {
  display: block;
  font-family: Raleway, sans-serif;
  font-weight: 400;
  font-size: clamp(38px, 2.7vw, 46px);
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}

/* Right-aligned nav on the same baseline as the logo */
nav {
  position: static;
  transform: none;
  width: auto;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: clamp(26px, 2.1vw, 38px);
  overflow: visible;
}

nav > a,
.nav-trigger {
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
}

/* Dropdown: its LEFT edge aligns exactly with Photography / Paintings */
.nav-dropdown {
  position: relative;
  display: block;
}

.dropdown-menu,
.nav-dropdown .dropdown-menu {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 16px);
  transform: none;
  min-width: 205px;
  width: max-content;
  max-width: 320px;
  padding: 13px 16px;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  text-align: left;
  background: rgba(255,255,255,.965);
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 5px 18px rgba(0,0,0,.035);
  z-index: 250;
}

/* Keep all submenu titles aligned to the trigger's left edge */
.dropdown-menu a {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  text-align: left;
}

/* hover bridge */
.nav-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 18px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: flex;
}

/* full-width rule remains below logo + nav */
.header-rule {
  width: 100%;
  border-top: 1px solid rgba(0,0,0,.22);
}

/* Studio Display */
@media (min-width: 1600px) {
  .header-inner {
    padding-top: 28px;
    padding-bottom: 17px;
  }

  .site-logo {
    font-size: 48px;
  }

  nav > a,
  .nav-trigger {
    font-size: 18px;
  }

  nav {
    gap: 40px;
  }

  .dropdown-menu,
  .nav-dropdown .dropdown-menu {
    top: calc(100% + 18px);
    min-width: 220px;
  }

  .dropdown-menu a {
    font-size: 15px;
  }
}

/* iPad */
@media (max-width: 1100px) {
  .header-inner {
    gap: 28px;
  }

  .site-logo {
    font-size: 36px;
  }

  nav {
    gap: 18px;
  }

  nav > a,
  .nav-trigger {
    font-size: 15px;
  }
}

/* Mobile: stack logo and nav, keep dropdown left aligned to trigger */
@media (max-width: 760px) {
  .header-inner {
    display: block;
    padding-top: 18px;
    padding-bottom: 14px;
  }

  .logo-link {
    margin-bottom: 17px;
  }

  .site-logo {
    font-size: 34px;
  }

  nav {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 13px 18px;
  }

  .dropdown-menu,
  .nav-dropdown .dropdown-menu {
    left: 0;
    right: auto;
    top: calc(100% + 14px);
    transform: none;
    width: max-content;
    max-width: calc(100vw - 36px);
  }
}

/* Copyright band: always spans the full browser viewport. */
footer {
  position: relative;
  left: 50%;
  width: 100vw;
  margin-left: 0;
  transform: translateX(-50%);
}
