/* Stuff My Eyes Liked — full-photo grid test version. */
:root {
  --paper: #f7f6f3;
  --paper-deep: #ebe9e4;
  --ink: #161513;
  --ink-soft: #5f5c56;
  --ink-faint: #8a8780;
  --line: rgba(22, 21, 19, 0.16);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --edge: clamp(18px, 5vw, 72px);
  --grid-gap: clamp(8px, 1.4vw, 22px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
}
body.lightbox-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { color: inherit; font: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px var(--edge) 0;
}
.site-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}
.site-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
}
.site-subtitle {
  color: var(--ink);
  font-size: clamp(12px, 1.15vw, 14px);
  line-height: 1.25;
  letter-spacing: 0.02em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav a,
.back {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.site-nav a:hover,
.back:hover { color: var(--ink); }

main {
  width: 100%;
  flex: 1;
  padding: clamp(44px, 8vw, 108px) var(--edge) 56px;
}
.site-footer {
  margin-top: auto;
  padding: 28px var(--edge) 30px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.eyebrow,
.intro-note {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.wall-intro,
.gallery-header {
  max-width: 760px;
  margin: 0 auto clamp(42px, 8vw, 96px);
  text-align: center;
}
.wall-intro h1,
.gallery-header h1,
.about h1 {
  margin: 12px 0 14px;
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.wall-intro .intro-note { letter-spacing: 0.12em; }
.wall-intro h1 { margin-top: 0; }
.intro-copy {
  max-width: 650px;
  margin: 20px auto 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contact-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.contact-link:hover { color: var(--ink); }

.wall {
  width: min(100%, 1320px);
  margin: 0 auto 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
  filter: none;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), filter 350ms ease;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: none;
  opacity: 0;
  transition: opacity 350ms ease;
}
.frame-title {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: none;
}
.frame:hover img,
.frame:focus-visible img { transform: none; filter: none; }
.frame:hover::after,
.frame:focus-visible::after { opacity: 0.9; }

.gallery-header { margin-bottom: clamp(34px, 6vw, 72px); }
.gallery-header h1 { font-size: clamp(28px, 4.5vw, 48px); }
.back::before { content: "← "; }

.grid {
  width: min(100%, 1480px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 14px);
}
.thumb {
  aspect-ratio: 3 / 2;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--paper);
  cursor: zoom-in;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  transform: none;
  transition: transform 550ms cubic-bezier(0.16, 1, 0.3, 1), filter 300ms ease;
}
.thumb:hover img,
.thumb:focus-visible img { transform: none; filter: none; }

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 80px 0;
  text-align: center;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.about {
  max-width: 620px;
  margin: 0 auto;
}
.about h1 { margin-bottom: 34px; }
.about p:not(.eyebrow) {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: rgba(247, 246, 243, 0.98);
}
.lightbox.is-open { display: block; }
.lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(46px, 7vw, 88px);
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.99);
  transition: opacity 250ms ease, transform 250ms ease;
}
.lightbox-img.is-visible { opacity: 1; transform: scale(1); }
.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink-soft);
}
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover { color: var(--ink); }
.lb-close {
  top: 16px;
  right: 18px;
  padding: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.lb-prev,
.lb-next {
  top: 50%;
  padding: 18px;
  font-size: 24px;
  transform: translateY(-50%);
}
.lb-prev { left: 4px; }
.lb-next { right: 4px; }
.lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

@media (min-width: 900px) {
  .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 641px) and (max-width: 899px) {
  .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .site-header { padding-top: 20px; }
  main { padding-top: 54px; }
  .wall-intro { margin-bottom: 42px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .frame-title { left: 12px; bottom: 11px; font-size: 9px; }
  .lightbox-stage { padding: 56px 38px; }
  .lb-prev, .lb-next { padding: 10px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}


.contact-page {
  width: min(100%, 620px);
  margin: 0 auto;
}
.contact-page h1 {
  margin: 12px 0 34px;
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.contact-form {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.contact-form label {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 13px;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.contact-form textarea { resize: vertical; }
.contact-form button {
  justify-self: start;
  margin-top: 14px;
  border: 1px solid var(--ink);
  padding: 11px 16px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.contact-form button:hover { background: transparent; color: var(--ink); }
.form-note {
  margin: 0 0 28px;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.6;
}
.form-honeypot { position: absolute !important; left: -9999px !important; }

@media (max-width: 640px) {
  .site-header { align-items: flex-start; }
  .site-title { font-size: 25px; }
  .intro-copy { font-size: 10px; letter-spacing: 0.065em; }
}


/* Homepage identity and exhibition introduction */
.home-header {
  gap: clamp(28px, 5vw, 72px);
}
.home-identity {
  width: min(680px, 72vw);
}
.home-intro {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
.home-main {
  padding-top: clamp(24px, 3vw, 40px);
}

@media (max-width: 640px) {
  .home-header {
    flex-direction: column;
    gap: 24px;
  }
  .home-identity { width: 100%; }
  .site-title { font-size: 30px; }
  .site-subtitle { font-size: 13px; }
  .home-intro {
    margin-top: 20px;
    font-size: 10px;
    letter-spacing: 0.06em;
  }
  .home-main { padding-top: 26px; }
}

/* v6 layout refinements */
.site-title {
  font-weight: 500;
}

.home-identity {
  max-width: min(980px, calc(100vw - (2 * var(--edge)) - 180px));
}

.home-intro {
  margin: 15px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-intro span {
  display: block;
  white-space: nowrap;
}

.gallery-brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.gallery-context {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 18px;
}

.gallery-context h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}

.gallery-main {
  padding-top: clamp(24px, 3vw, 40px);
}

@media (max-width: 1050px) {
  .home-identity {
    max-width: calc(100vw - (2 * var(--edge)));
  }

  .home-intro span {
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .gallery-context {
    gap: 10px;
    margin-top: 15px;
  }

  .gallery-context h1 {
    font-size: 18px;
  }

  .gallery-main {
    padding-top: 26px;
  }
}

/* v10 mobile reading and lightbox sizing */
@media (max-width: 620px) {
  .home-intro {
    max-width: 36rem;
    margin-top: 13px;
    font-size: 12px;
    line-height: 1.55;
    letter-spacing: 0.015em;
    text-transform: none;
  }

  .home-intro span + span {
    margin-top: 7px;
  }

  .lightbox-stage {
    padding: 42px 6px 34px;
  }

  .lightbox-img {
    max-width: calc(100vw - 12px);
    max-height: calc(100dvh - 76px);
  }

  .lb-prev,
  .lb-next {
    z-index: 2;
    padding: 12px 8px;
    font-size: 22px;
    text-shadow: 0 1px 8px var(--paper);
  }

  .lb-prev { left: 0; }
  .lb-next { right: 0; }
  .lb-counter { bottom: 10px; }
}

/* v11 tablet introduction readability */
@media (min-width: 621px) and (max-width: 899px) {
  .home-intro {
    max-width: 42rem;
    margin-top: 13px;
    font-size: 12px;
    line-height: 1.55;
    letter-spacing: 0.015em;
    text-transform: none;
  }

  .home-intro span + span {
    margin-top: 7px;
  }
}

/* Homepage content keeps its established paragraph-to-cover spacing.
   Gallery pages use a slightly tighter paragraph-to-grid gap for the same
   perceived visual rhythm beside the hard-edged photograph grid. */
.site-header.home-header + .home-main {
  padding-top: clamp(24px, 3vw, 40px);
}

.gallery-main {
  padding-top: clamp(18px, 2.25vw, 30px);
}

.wall .frame img {
  object-position: center top;
}

@media (max-width: 620px) {
  .site-header.home-header + .home-main {
    padding-top: 26px;
  }

  .gallery-main {
    padding-top: 20px;
  }
}

/* v20: keep homepage titles close to the visible landscape cover.
   Covers are generated at approximately 3:2 and top-aligned inside the
   locked square card, so position the title immediately after that area. */
.wall .frame-title {
  left: 0;
  top: calc(66.6667% + 8px);
  bottom: auto;
}

@media (max-width: 620px) {
  .wall .frame-title {
    top: calc(66.6667% + 7px);
  }
}

/* v22: keep the homepage navigation at the top-right on phones.
   The introduction remains below the identity block. */
@media (max-width: 640px) {
  .home-header {
    position: relative;
    flex-direction: row;
    gap: 0;
  }

  .home-header .site-nav {
    position: absolute;
    top: 22px;
    right: var(--edge);
  }
}


/* v23: gallery descriptions beneath the gallery title. */
.gallery-description {
  max-width: 650px;
  margin: 15px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: none;
}

.gallery-description[hidden] {
  display: none;
}

/* Gallery-main already uses the same content-start spacing as the homepage. */

@media (min-width: 621px) and (max-width: 899px) {
  .home-intro {
    max-width: 46rem;
  }
}

@media (max-width: 620px) {
  .gallery-description {
    margin-top: 13px;
    max-width: 36rem;
    font-size: 12px;
    line-height: 1.55;
    letter-spacing: 0.015em;
    text-transform: none;
  }
}

/* v24: let gallery descriptions use the full content width while preserving
   equal page-edge margins on every screen size. */
.gallery-description {
  width: calc(100vw - (2 * var(--edge)));
  max-width: none;
}

/* v24: the previous tablet max-width was constrained by the narrower
   identity column. Give the introduction its intended usable width so the
   final word of the first sentence does not wrap onto a line by itself. */
@media (min-width: 621px) and (max-width: 899px) {
  .home-intro {
    width: min(46rem, calc(100vw - (2 * var(--edge))));
    max-width: none;
  }
}

/* Discourage casual image saving on portfolio photographs. */
.wall img,
.grid img,
.lightbox img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
