:root {
  color-scheme: light;
  --outer: #deddd9;
  --paper: #f7f3f0;
  --ink: #1d1c1b;
  --muted: #898681;
  --line: #d9d4ce;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body { margin: 0; padding: 18px; background: var(--outer); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.page-frame { width: min(1600px, 100%); min-height: calc(100vh - 36px); margin: 0 auto; padding: 0 clamp(28px, 6vw, 92px); border: 5px solid #252422; border-radius: 27px; background: var(--paper); box-shadow: 0 15px 28px rgb(0 0 0 / .08); overflow: hidden; }
.site-header { min-height: 126px; display: flex; align-items: center; justify-content: space-between; }
.monogram { width: 54px; height: 54px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 500 27px var(--serif); letter-spacing: -.06em; }
.main-nav { display: flex; align-items: center; gap: clamp(25px, 4vw, 55px); }
.nav-link { padding: 8px 2px 10px; border-bottom: 1px solid transparent; font-size: 13px; }
.nav-link:hover, .nav-link.is-active { border-bottom-color: var(--ink); }
.about-hero { min-height: min(740px, calc(100vh - 170px)); display: grid; grid-template-columns: 1fr .88fr; align-items: stretch; gap: clamp(45px, 7vw, 110px); padding: 42px 5.5% 52px; }
.about-copy { display: flex; flex-direction: column; align-items: flex-start; padding: 0 0 8px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .16em; }
.about-copy .eyebrow { margin: 10px 0 24px; }
h1 { margin: 0 0 50px; font: 500 clamp(62px, 7.3vw, 112px)/.99 var(--serif); letter-spacing: -.065em; }
h1 span { display: inline-block; padding-left: clamp(22px, 3vw, 54px); }
.bio-copy { width: min(100%, 490px); margin: 0 0 32px auto; color: var(--muted); font-size: 14px; line-height: 1.95; }
.bio-copy p { margin: 0 0 20px; }
.text-link { display: inline-block; width: fit-content; padding-bottom: 7px; border-bottom: 1px solid var(--ink); font-size: 11px; font-weight: 600; letter-spacing: .07em; }
.text-link span { margin-left: 9px; }
.about-portfolio-link { margin: 0 0 0 auto; }
.social-links { display: flex; align-items: center; gap: 18px; margin-top: auto; padding-top: 45px; }
.social-separator, .social-note { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.portrait-placeholder { position: relative; min-height: 520px; max-height: 680px; background: #e7e3df; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.portrait-placeholder::before { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, #d6d2ce, #eeebe7 48%, #c9c5c0); }
.portrait-monogram { position: relative; color: rgb(29 28 27 / .15); font: 500 clamp(100px, 16vw, 230px)/1 var(--serif); letter-spacing: -.09em; }
.portrait-caption { position: absolute; bottom: 24px; left: 25px; color: #77736e; font-size: 9px; line-height: 1.7; letter-spacing: .15em; }
.portfolio-section { padding: 100px 0 35px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 0 5.5% 48px; }
.section-heading .eyebrow { margin-bottom: 15px; }
.section-heading h2, .site-footer h2 { margin: 0; font: 400 clamp(44px, 5vw, 72px)/1.05 var(--serif); letter-spacing: -.055em; }
.section-heading h2 em, .site-footer h2 em { font-weight: 400; }
.section-index { padding-bottom: 8px; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.filters { min-height: 58px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 600; letter-spacing: .13em; }
.filter-list { display: flex; gap: 27px; flex-wrap: wrap; }
.filter-button { padding: 20px 0 17px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font: inherit; letter-spacing: inherit; }
.filter-button:hover, .filter-button.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.photo-count { color: var(--muted); white-space: nowrap; }
.gallery { columns: 3 260px; column-gap: 18px; padding: 34px 0 90px; min-height: 260px; }
.photo-card { display: inline-block; width: 100%; margin: 0 0 18px; break-inside: avoid; cursor: zoom-in; }
.photo-card img { display: block; width: 100%; height: auto; background: transparent; }
.empty-state { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-mark { font: 300 30px var(--serif); color: #a45b3e; }
.empty-state p { margin: 14px 0 7px; color: var(--ink); font-size: 9px; font-weight: 600; letter-spacing: .14em; }
.empty-state > span:last-child { font-size: 11px; }
.site-footer { padding: 75px 5.5% 25px; border-top: 1px solid var(--line); }
.site-footer h2 { margin-top: 16px; }
.contact-note { color: var(--muted); font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 85px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .12em; }
.footer-bottom a { color: var(--ink); }
.lightbox { width: min(94vw, 1200px); max-width: none; max-height: 94vh; padding: 48px 65px 28px; border: 0; background: #171715; color: #f4f2ed; }
.lightbox::backdrop { background: rgb(0 0 0 / .88); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox img { max-width: 100%; max-height: 76vh; object-fit: contain; }
.lightbox-close, .lightbox-arrow { position: absolute; border: 0; background: none; color: white; cursor: pointer; font: 300 30px var(--sans); }
.lightbox-close { top: 12px; right: 20px; font-size: 34px; }
.lightbox-arrow { top: 50%; transform: translateY(-50%); padding: 15px; }
.lightbox-prev { left: 8px; } .lightbox-next { right: 8px; }
@media (max-width: 760px) {
  body { padding: 8px; }
  .page-frame { min-height: calc(100vh - 16px); padding: 0 22px; border-width: 3px; border-radius: 18px; }
  .site-header { min-height: 88px; }
  .monogram { width: 43px; height: 43px; font-size: 23px; }
  .main-nav { gap: 17px; }
  .nav-link { font-size: 11px; }
  .about-hero { min-height: 0; grid-template-columns: 1fr; gap: 38px; padding: 35px 2% 55px; }
  .about-copy .eyebrow { margin-top: 0; font-size: 9px; }
  h1 { margin-bottom: 28px; font-size: clamp(58px, 13vw, 90px); }
  h1 span { padding-left: 20px; }
  .bio-copy { margin-left: 0; font-size: 13px; }
  .about-portfolio-link { margin-left: 0; }
  .social-links { margin-top: 42px; padding-top: 0; }
  .portrait-placeholder { min-height: 440px; max-height: 560px; }
  .portfolio-section { padding-top: 65px; }
  .section-heading { align-items: flex-start; flex-direction: column; padding: 0 2% 32px; }
  .filters { align-items: flex-start; gap: 12px; flex-direction: column; padding: 8px 0; }
  .filter-list { gap: 18px; }
  .filter-button { padding: 10px 0; }
  .photo-count { padding-bottom: 8px; }
  .gallery { columns: 2 130px; column-gap: 10px; padding-top: 20px; }
  .photo-card { margin-bottom: 10px; }
  .site-footer { padding: 55px 2% 20px; }
  .footer-bottom { margin-top: 60px; flex-wrap: wrap; }
  .lightbox { padding: 48px 30px 24px; }
}
@media (max-width: 390px) {
  .page-frame { padding: 0 16px; }
  .main-nav { gap: 12px; }
  .nav-link { font-size: 10px; }
  .social-note { font-size: 8px; }
}

/* Accessibility and narrow-screen refinements */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.lightbox :focus-visible { outline-color: white; }
.photo-card button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.about-hero { grid-template-columns: minmax(0, 1fr) minmax(0, .88fr); }
@media (max-width: 1050px) and (min-width: 761px) { h1 { font-size: clamp(48px, 6.4vw, 72px); } .about-hero { gap: 30px; padding-inline: 0; } }
@media (max-width: 760px) { .about-hero { grid-template-columns: minmax(0, 1fr); } h1 { font-size: clamp(38px, 12vw, 90px); } .empty-state { column-span: all; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.empty-state { column-span: all; }

/* Collection sequence: one photograph at a time, no mosaic or cropping. */
.gallery { columns: auto; display: flex; flex-direction: column; align-items: center; gap: clamp(36px, 7vw, 88px); padding-top: 48px; }
.photo-card { display: block; width: min(100%, 900px); margin: 0; }
.photo-card button { width: 100%; }
.photo-card img { width: auto; max-width: 100%; max-height: 82vh; height: auto; margin: auto; object-fit: contain; }
.empty-state { width: 100%; }
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 760px; margin-top: 36px; }
.contact-form label { display: grid; gap: 9px; font-size: 11px; letter-spacing: .08em; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid var(--line); background: transparent; padding: 12px; font: inherit; color: var(--ink); }
.contact-form textarea { resize: vertical; }
.message-field, #form-status { grid-column: 1 / -1; }
.submit-button { justify-self: start; border: 0; padding: 14px 22px; background: var(--ink); color: var(--paper); cursor: pointer; font: inherit; font-size: 11px; letter-spacing: .08em; }
#form-status { margin: 0; font-size: 12px; color: var(--muted); }
.instagram-link { display: inline-flex; align-items: center; justify-content: center; margin-top: 12px; min-width: 44px; min-height: 44px; margin-left: -10px; color: var(--ink); transition: opacity .2s ease; }
.instagram-link:hover { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .instagram-link { transition: none; } }
@media (max-width: 600px) { .contact-form { grid-template-columns: 1fr; } .gallery { gap: 38px; padding-top: 30px; } }

/* Collection cover: no navigation until the viewer is opened. */
.gallery { padding: clamp(20px, 3vw, 40px) 2% 28px; gap: 0; min-height: 0; }
.gallery .photo-card { width: 100%; }
.gallery .photo-card button { display: grid; place-items: center; width: 100%; height: auto; min-height: 0; background: transparent; cursor: default; }
.gallery .photo-card img { width: auto; height: auto; max-width: 100%; max-height: 76vh; max-height: 76svh; object-fit: contain; cursor: zoom-in; }
.lightbox-arrow:disabled { opacity: .2; cursor: default; }

/* Instagram profile link */
.instagram-link { gap: 10px; margin-left: 0; text-decoration: none; }
.instagram-link svg { flex-shrink: 0; }
.instagram-handle { font-size: 13px; letter-spacing: .01em; }
.instagram-external { color: var(--muted); }

/* Contact form delivery and spam challenge */
.contact-privacy, .captcha-field { grid-column: 1 / -1; }
.contact-privacy { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.contact-privacy a { text-decoration: underline; }
.submit-button:disabled { opacity: .5; cursor: wait; }

/* Uniform ivory background and fine editorial frame */
:root { --outer: var(--paper); }
.page-frame { border-width: 1px; border-radius: 10px; box-shadow: none; }
@media (max-width: 760px) { .page-frame { border-width: 1px; border-radius: 8px; } }

/* Only the cover may gently enlarge. The open collection never has photo effects. */
.gallery .photo-card img, .lightbox img { opacity: 1; filter: none; box-shadow: none; animation: none; transform: none; }
.gallery .photo-card button { -webkit-tap-highlight-color: transparent; }
.gallery .cover-art { position: relative; display: grid; width: fit-content; max-width: 100%; min-width: 0; cursor: zoom-in; }
.gallery .cover-art::after { content: ""; position: absolute; inset: -2px; border: 2px solid #000; border-radius: 6px; opacity: 0; pointer-events: none; }
@keyframes cover-frame-fade { from { opacity: 1; } to { opacity: 0; } }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .gallery .cover-art { transition: transform 180ms ease-out; }
  .gallery .cover-art:hover { transform: scale(1.015); }
  .gallery .cover-art:hover::after { animation: cover-frame-fade 3s linear forwards; }
}
body.viewer-open { overflow: hidden; }
.lightbox { width: min(96vw, 1600px); height: 94vh; height: 94dvh; max-height: 94vh; max-height: 94dvh; margin: auto; padding: 48px 56px 24px; overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.lightbox img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; transition: none; }
.lightbox-close, .lightbox-arrow { min-width: 44px; min-height: 44px; padding: 0; z-index: 1; }
.lightbox-close { top: 4px; right: 8px; }
.lightbox-prev { left: 4px; }
.lightbox-next { right: 4px; }
@media (max-width: 760px) {
  .page-frame { padding-inline: clamp(12px, 4vw, 22px); }
  .site-header { gap: 10px; min-height: 80px; }
  .monogram { flex-shrink: 0; }
  .main-nav { gap: clamp(9px, 3vw, 20px); }
  .nav-link { display: flex; align-items: center; min-height: 44px; font-size: 12px; }
  .about-copy, .contact-form label, .contact-form input, .contact-form textarea { min-width: 0; }
  h1 { font-size: clamp(36px, 11vw, 80px); }
  .social-links { flex-wrap: wrap; gap: 10px; }
  .portrait-placeholder { min-height: 0; aspect-ratio: 4 / 5; max-height: 560px; }
  .filter-button { min-height: 44px; font-size: 11px; }
  .gallery { padding: 20px 0 24px; }
  .gallery .photo-card img { max-height: 70vh; max-height: 70svh; }
  .contact-form { grid-template-columns: minmax(0, 1fr); }
  .contact-form input, .contact-form textarea { font-size: 16px; }
  .captcha-field { min-width: 0; }
  .lightbox { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; padding: 52px 0 64px; }
  .lightbox-close { top: max(4px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); }
  .lightbox-arrow { top: auto; bottom: max(6px, env(safe-area-inset-bottom)); transform: none; }
  .lightbox-prev { left: max(12px, env(safe-area-inset-left)); }
  .lightbox-next { right: max(12px, env(safe-area-inset-right)); }
}
@media (max-width: 350px) { .main-nav { gap: 8px; } .nav-link { font-size: 11px; } }

/* Explicitly constrain the viewer to its available content box, including short viewports. */
.lightbox[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.lightbox figure { position: relative; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; }
.lightbox figure img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }

/* About portrait: retain the original composition on every screen. */
.about-portrait { margin: 0; min-width: 0; display: flex; align-items: center; justify-content: center; }
.about-portrait img { display: block; width: auto; height: auto; max-width: 100%; max-height: 680px; object-fit: contain; border-radius: 20px; clip-path: inset(0 round 20px); }
@media (max-width: 760px) { .about-portrait img { max-height: 560px; } }

/* Reveal the security challenge only when the visitor starts a message. */
.captcha-field:not([hidden]) { animation: captcha-reveal 500ms ease-out both; }
@keyframes captcha-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .captcha-field:not([hidden]) { animation: none; } }

/* Keep the submit button anchored while the challenge appears to its right. */
.contact-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.contact-actions .submit-button { flex: 0 0 auto; align-self: flex-start; }
.contact-actions .captcha-field { flex: 0 0 auto; max-width: 100%; }
@media (max-width: 420px) { .contact-actions { flex-direction: column; gap: 14px; } }

/* Optional collection statement and immediate viewer feedback. */
.collection-description { max-width: 620px; margin: 0 auto clamp(24px, 4vw, 48px); color: var(--muted); font-size: 14px; line-height: 1.85; white-space: pre-line; text-align: left; }
.lightbox-status { position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: rgb(23 23 21 / .88); color: white; font-size: 13px; text-align: center; pointer-events: none; }
.lightbox-status.is-loading::before { content: ""; width: 18px; height: 18px; flex-shrink: 0; border: 2px solid rgb(255 255 255 / .35); border-top-color: white; border-radius: 50%; animation: viewer-spin .8s linear infinite; }
.lightbox-arrow[aria-disabled="true"] { opacity: .4; cursor: default; }
@keyframes viewer-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lightbox-status.is-loading::before { animation: none; } }

/* Editorial collection spread: photograph left, statement right. */
.gallery.has-description { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(40px, 8vw, 150px); width: min(100%, 1120px); margin-inline: auto; }
.gallery.has-description .photo-card { min-width: 0; }
.gallery.has-description .collection-description { width: 100%; max-width: 420px; margin: 0; justify-self: center; }
@media (max-width: 760px) {
  .gallery.has-description { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .gallery.has-description .collection-description { max-width: 520px; }
}

/* Explicit placement, independent of DOM insertion order. */
#gallery.has-description { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#gallery.has-description > .photo-card { grid-column: 1; grid-row: 1; }
#gallery.has-description > .collection-description { grid-column: 2; grid-row: 1; }
#gallery > [hidden], .lightbox-status[hidden] { display: none; }
@media (max-width: 760px) {
  #gallery.has-description { grid-template-columns: minmax(0, 1fr); }
  #gallery.has-description > .collection-description { grid-column: 1; grid-row: 2; }
}

/* Collection title belongs to the editorial statement, not just navigation. */
.collection-description .collection-title { font-family: "Playfair Display", Georgia, serif; font-size: clamp(24px, 2.5vw, 36px); font-weight: 400; line-height: 1.2; text-align: center; color: var(--ink, #171715); margin: 0 0 28px; }
.collection-description > p { margin: 0; }

/* Justified editorial statement on desktop, natural alignment on mobile. */
.collection-description > p { text-align: justify; text-align-last: left; hyphens: auto; }
@media (max-width: 760px) { .collection-description > p { text-align: left; hyphens: manual; } }

/* A visible, keyboard-accessible invitation to enter the series. */
.collection-description .collection-explore { display: block; margin: 28px auto 0; padding: 8px 0 7px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); font-family: inherit; cursor: pointer; white-space: normal; }
.collection-explore:hover { opacity: .7; }
.collection-explore:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }

/* Bring viewer navigation inward on wide screens without covering wide photographs. */
@media (min-width: 1000px) {
  .lightbox .lightbox-prev { left: 12%; }
  .lightbox .lightbox-next { right: 12%; }
}

/* Fade the entire modal and its backdrop together. */
.lightbox[open] { animation: viewer-fade-in 500ms ease both; }
.lightbox[open]::backdrop { animation: viewer-fade-in 500ms ease both; }
.lightbox[open].is-closing, .lightbox[open].is-closing::backdrop { animation: viewer-fade-out 500ms ease both; }
@keyframes viewer-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes viewer-fade-out { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lightbox[open], .lightbox[open]::backdrop, .lightbox[open].is-closing, .lightbox[open].is-closing::backdrop { animation: none; } }

/* Typographic opening page and invisible boundary controls. */
.lightbox-title { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 0 15%; text-align: center; font-family: "Playfair Display", Georgia, serif; font-size: clamp(26px, 4vw, 56px); font-weight: 400; line-height: 1.2; }
.lightbox [hidden] { display: none !important; }
