
:root {
  --page-max: 1280px;
  --ink: #111111;
  --mid: #707070;
  --light: #a2a2a2;
  --rule: #929292;
  --paper: #ffffff;
  --ease: 180ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 320px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
}

/* ---------- Shared page and header ---------- */

.page-shell {
  width: min(calc(100% - 96px), var(--page-max));
  min-height: 100svh;
  margin: 0 auto;
  padding: 46px 0 28px;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--rule);
}

.identity {
  display: flex;
  min-width: 300px;
  flex-direction: column;
  line-height: 1;
}

.site-name {
  font-size: clamp(27px, 2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.055em;
}

.site-subtitle {
  margin-top: 4px;
  color: var(--mid);
  font-size: clamp(15px, 1.12vw, 21px);
  letter-spacing: -0.035em;
}

.primary-nav {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: clamp(16px, 1.35vw, 27px);
  font-size: clamp(12px, 0.88vw, 16px);
  font-weight: 500;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-item {
  position: relative;
  display: block;
  padding: 13px 0 1px;
}

.nav-item:hover,
.nav-item:focus-visible,
.nav-item > a:hover,
.nav-item > a:focus-visible,
.nav-item.active {
  color: var(--mid);
}

.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 9px);
  left: -17px;
  z-index: 30;
  min-width: 190px;
  padding: 12px 17px 14px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
}

.dropdown::before {
  content: "";
  position: absolute;
  top: -14px;
  right: 0;
  left: 0;
  height: 14px;
}

.dropdown a {
  display: block;
  padding: 7px 0;
  color: var(--mid);
  font-size: 14px;
  text-transform: none;
}

.dropdown a:hover,
.dropdown a:focus-visible {
  color: var(--ink);
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-toggle {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  text-transform: uppercase;
  cursor: pointer;
}

/* ---------- Homepage ---------- */

.home-main {
  display: flex;
  height: calc(100svh - 151px);
  min-height: 430px;
  align-items: center;
  justify-content: center;
  padding: 28px 0 8px;
}

.featured-photo {
  display: flex;
  width: min(100%, 760px);
  height: 100%;
  margin: 0;
  flex-direction: column;
  align-items: flex-start;
}

.featured-photo .image-display {
  display: flex;
  min-height: 0;
  max-width: 100%;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
}

.featured-photo .image-display img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.featured-photo figcaption {
  width: 100%;
  flex: 0 0 auto;
  padding-top: 14px;
  color: var(--mid);
  font-size: clamp(12px, 0.82vw, 15px);
  font-style: italic;
  letter-spacing: -0.02em;
  text-align: left;
}

.site-footer {
  margin-top: 22px;
  color: var(--mid);
  font-size: 10px;
  text-align: right;
}

/* ---------- Individual photograph pages ---------- */

.detail-shell {
  display: flex;
  height: 100svh;
  min-height: 520px;
  flex-direction: column;
  overflow: hidden;
}

.detail-shell .site-header {
  flex: 0 0 auto;
}

/*
  On desktop, the photograph is centered against the entire usable page width,
  not merely centered inside a right-hand column. The information remains
  independently aligned at the upper left.
*/
.detail-layout {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  padding-top: 20px;
}

.photo-information {
  position: relative;
  z-index: 2;
  width: 280px;
  padding-top: 0;
  color: var(--mid);
}

.photo-information h1 {
  margin: 0;
  color: var(--mid);
  font-size: clamp(18px, 1.4vw, 27px);
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: -0.04em;
}

.print-information {
  max-width: 260px;
  margin-top: 42px;
  font-size: clamp(12px, 0.88vw, 17px);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.print-information p {
  margin: 0 0 20px;
}

.detail-image-wrap {
  position: absolute;
  inset: 20px 0 0;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  pointer-events: none;
}

.detail-image-wrap .image-display {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  place-items: center;
}

.detail-image-wrap .image-display img {
  display: block;
  width: auto;
  max-width: min(64vw, 100%);
  height: auto;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

/* ---------- Recent work and gallery grids ---------- */

.recent-page,
.portfolio-page,
.search-page,
.text-page,
.country-portfolio,
.blog-page {
  padding: 48px 0 70px;
}

.recent-page > h1,
.portfolio-page > h1,
.search-page > h1,
.country-portfolio > h1,
.text-page > h1 {
  margin: 0 0 40px;
  color: var(--mid);
  font-size: 36px;
  font-weight: 500;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 46px 40px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 52px;
}

.recent-card img,
.portfolio-card img,
.search-result img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--paper);
}

.recent-card span,
.portfolio-card span,
.search-result span {
  display: block;
  margin-top: 12px;
  color: var(--mid);
  font-size: 18px;
}

.recent-card small,
.portfolio-card small,
.search-result small {
  display: block;
  margin-top: 3px;
  color: var(--light);
  font-size: 14px;
}

.country-gallery-page {
  padding-top: 48px;
}

.empty-collection {
  margin: 0;
  color: var(--mid);
  font-size: 18px;
}

/* ---------- Portfolio country covers ---------- */

.country-portfolio > h1 {
  margin-bottom: 48px;
}

.country-cover {
  width: min(100%, 1080px);
  margin: 0 auto 92px;
}

.country-cover h2 {
  margin: 0 0 16px;
  color: var(--mid);
  font-size: clamp(20px, 1.4vw, 26px);
  font-weight: 500;
}

.country-cover img {
  display: block;
  width: 100%;
  max-height: 74svh;
  object-fit: contain;
  object-position: left center;
}

.country-cover-link:hover h2,
.country-cover-link:focus-visible h2 {
  color: var(--ink);
}

.country-placeholder {
  display: grid;
  min-height: 330px;
  place-items: center;
  background: #f7f7f7;
  color: var(--light);
  font-size: 15px;
}

/* ---------- Search ---------- */

.search-label {
  display: block;
  margin-bottom: 10px;
  color: var(--mid);
  font-size: 17px;
}

.search-input {
  width: min(100%, 700px);
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  outline: none;
  color: var(--ink);
  font-size: 24px;
}

.search-input:focus {
  border-bottom-color: var(--ink);
}

.search-count {
  margin: 17px 0 31px;
  color: var(--light);
  font-size: 14px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 43px 38px;
}

.search-result[hidden] {
  display: none;
}

/* ---------- About and Contact ---------- */

.text-page {
  max-width: 860px;
  color: var(--mid);
  font-size: clamp(15px, 0.92vw, 17px);
  line-height: 1.72;
}

.about-page {
  padding-top: 30px;
}

.about-page p {
  margin: 0 0 1.35em;
}

.contact-minimal {
  display: grid;
  min-height: calc(100svh - 145px);
  grid-template-columns: 280px 1fr;
  padding-top: 24px;
}

.contact-block {
  grid-column: 1;
  max-width: 280px;
}

.contact-copy {
  margin: 0 0 28px;
  color: var(--mid);
  font-size: clamp(16px, 1.04vw, 20px);
  line-height: 1.55;
}

.contact-email {
  margin: 0;
}

.contact-email a {
  color: var(--mid);
  font-size: clamp(18px, 1.16vw, 22px);
  text-decoration: none;
  transition: color var(--ease);
}

.contact-email a:hover,
.contact-email a:focus-visible {
  color: var(--ink);
}

/* ---------- Blog ---------- */

.blog-entry {
  width: min(100%, 980px);
  margin: 0 auto;
}

.blog-entry h1 {
  margin: 0 0 28px;
  color: var(--mid);
  font-size: clamp(22px, 1.5vw, 29px);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.blog-hero {
  display: block;
  width: 75%;
  max-width: 735px;
  height: auto;
  margin: 0 0 38px;
}

.blog-copy {
  width: min(100%, 820px);
  color: var(--mid);
  font-size: clamp(16px, 1vw, 19px);
  line-height: 1.72;
}

.blog-copy p {
  margin: 0 0 1.55em;
}

.blog-process {
  width: 75%;
  max-width: 735px;
  margin: 34px 0 40px;
}

.blog-process img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Tablet and mobile ---------- */

@media (max-width: 1050px) {
  .page-shell {
    width: min(calc(100% - 40px), var(--page-max));
    padding-top: 32px;
  }

  .site-header {
    align-items: center;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 0 8px;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .nav-item {
    width: 100%;
    padding: 8px 0;
  }

  .dropdown {
    position: static;
    display: none;
    min-width: 0;
    padding: 6px 0 3px 18px;
    border: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown {
    display: block;
  }

  .home-main {
    height: calc(100svh - 135px);
    min-height: 370px;
  }

  .detail-shell {
    min-height: 480px;
  }

  .photo-information {
    width: 220px;
  }

  .photo-information h1 {
    font-size: clamp(16px, 2.2vw, 23px);
  }

  .print-information {
    margin-top: 32px;
    font-size: clamp(11px, 1.55vw, 15px);
  }

  .detail-image-wrap .image-display img {
    max-width: min(66vw, 100%);
  }

  .recent-grid,
  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-minimal {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: calc(100% - 24px);
    padding-top: 22px;
  }

  .identity {
    min-width: 0;
  }

  .site-name {
    font-size: 27px;
  }

  .site-subtitle {
    font-size: 15px;
  }

  .home-main {
    height: calc(100svh - 120px);
    min-height: 320px;
    padding-top: 20px;
  }

  /*
    On narrow screens retain the requested left-information/right-image
    relationship, but use a normal grid to prevent overlap.
  */
  .detail-layout {
    display: grid;
    grid-template-columns: minmax(102px, 31vw) minmax(0, 1fr);
    gap: 12px;
    padding-top: 14px;
  }

  .photo-information {
    position: static;
    width: auto;
    min-width: 0;
    overflow: hidden;
  }

  .photo-information h1 {
    font-size: clamp(12px, 3.3vw, 17px);
  }

  .print-information {
    margin-top: 18px;
    font-size: clamp(9px, 2.5vw, 12px);
    line-height: 1.2;
  }

  .print-information p {
    margin-bottom: 11px;
  }

  .detail-image-wrap {
    position: static;
    display: grid;
    min-height: 0;
    place-items: center;
    pointer-events: auto;
  }

  .detail-image-wrap .image-display {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
  }

  .detail-image-wrap .image-display img {
    max-width: 100%;
    max-height: 100%;
  }

  .recent-grid,
  .portfolio-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

  .recent-page,
  .portfolio-page,
  .search-page,
  .text-page,
  .country-portfolio,
  .blog-page {
    padding-top: 36px;
  }

  .country-cover {
    margin-bottom: 62px;
  }

  .country-placeholder {
    min-height: 220px;
  }

  .contact-minimal {
    grid-template-columns: minmax(102px, 31vw) 1fr;
    padding-top: 15px;
  }

  .contact-block {
    max-width: none;
  }

  .blog-entry h1 {
    margin-bottom: 20px;
  }

  .blog-hero,
  .blog-process {
    width: 100%;
    max-width: none;
  }

  .blog-hero {
    margin-bottom: 28px;
  }

  .blog-process {
    margin: 26px 0 30px;
  }
}


/* Version 35: stable two-column photograph layout.
   Keeps the image clear of the text and fully visible. */
.detail-layout {
  position: static !important;
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  column-gap: 48px !important;
  align-items: start !important;
  min-height: 0 !important;
  padding-top: 20px !important;
}

.photo-information {
  position: static !important;
  width: auto !important;
  align-self: start !important;
}

.detail-image-wrap {
  position: static !important;
  inset: auto !important;
  display: flex !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}

.detail-image-wrap .image-display {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  align-items: center !important;
  justify-content: center !important;
}

.detail-image-wrap .image-display img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: calc(100svh - 155px) !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

@media (max-width: 1050px) {
  .detail-layout {
    grid-template-columns: 220px minmax(0, 1fr) !important;
    column-gap: 30px !important;
  }

  .detail-image-wrap .image-display img {
    max-height: calc(100svh - 175px) !important;
  }
}

@media (max-width: 700px) {
  .detail-layout {
    grid-template-columns: minmax(102px, 31vw) minmax(0, 1fr) !important;
    column-gap: 12px !important;
    padding-top: 14px !important;
  }

  .detail-image-wrap .image-display img {
    max-height: calc(100svh - 145px) !important;
  }
}


/* Version 36: reduce photograph title size by ~20% */
.photo-information h1{
  font-size: clamp(14px, 1.12vw, 22px) !important;
  line-height: 1.18;
}


/* Version 37 */
.search-page{
  padding-top:30px;
}


/* Version 1.3.1 — Back to top control on long collection pages */
.back-to-top{
  position:fixed;
  right:22px;
  bottom:26px;
  z-index:80;
  display:inline-flex;
  align-items:baseline;
  gap:7px;
  padding:7px 9px;
  border:0;
  background:rgba(255,255,255,.88);
  color:#737373;
  font-family:inherit;
  font-size:13px;
  line-height:1;
  text-decoration:none;
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  transform:translateY(7px);
  transition:opacity .18s ease, visibility .18s ease, transform .18s ease, color .18s ease;
  -webkit-backdrop-filter:blur(3px);
  backdrop-filter:blur(3px);
}

.back-to-top.is-visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

.back-to-top .back-to-top-arrow{
  display:inline-block;
  font-size:1.35em;
  line-height:.8;
  transition:transform .18s ease, color .18s ease;
}

.back-to-top:hover,
.back-to-top:focus-visible{
  color:#111;
}

.back-to-top:hover .back-to-top-arrow,
.back-to-top:focus-visible .back-to-top-arrow{
  transform:translateY(-2px);
  color:#111;
}

@media(max-width:700px){
  .back-to-top{
    right:10px;
    bottom:14px;
    font-size:11px;
    padding:6px 7px;
  }
}


/* Version 1.3.2 — centered-right Back to top */
.back-to-top{
  right:24px !important;
  top:50% !important;
  bottom:auto !important;
  transform:translateY(calc(-50% + 7px)) !important;
}

.back-to-top.is-visible{
  transform:translateY(-50%) !important;
}

@media(max-width:700px){
  .back-to-top{
    top:auto !important;
    right:10px !important;
    bottom:14px !important;
    transform:translateY(7px) !important;
  }

  .back-to-top.is-visible{
    transform:translateY(0) !important;
  }
}


/* Version 1.1 — final portfolio polish */

/* Keep homepage captions a consistent distance below the actual image. */
.featured-photo{
  height:auto !important;
  max-height:100% !important;
  justify-content:center !important;
}

.featured-photo .image-display{
  width:100% !important;
  flex:0 1 auto !important;
  min-height:0 !important;
  height:auto !important;
}

.featured-photo .image-display img{
  max-height:calc(100svh - 205px) !important;
}

.featured-photo figcaption{
  padding-top:14px !important;
}

/* Add one line of breathing room before Print inquiries. */
.contact-minimal{
  padding-top:46px !important;
}

/* Back-to-top: slightly farther inward and 15% larger. */
.back-to-top{
  right:54px !important;
  font-size:15px !important;
}

@media(max-width:700px){
  .back-to-top{
    right:12px !important;
    font-size:12px !important;
  }
}
