/* ══════════════════════════════════════════════════════════════════
     STYLES.CSS
     Palette: "Silver Gelatin" — 13 true-gray tones.
     The UI chrome stays strictly neutral; PHOTOS carry the color:
     black & white at rest, original color on hover (see §6).
     ══════════════════════════════════════════════════════════════════ */

/* ── 1 · Tokens ─────────────────────────────────────────────────── */
:root {
  /* the 13 tones */
  --paper: #FFFFFF;
  --gallery: #FAFAFA;
  --matboard: #F5F5F5;
  --hairline: #E5E5E5;
  --silver: #D4D4D4;
  --mist: #A3A3A3;
  --smoke: #737373;
  --graphite: #525252;
  --iron: #404040;
  --basalt: #333333;
  --charcoal: #262626;
  --darkroom: #171717;
  --carbon: #0A0A0A;

  /* semantic roles — light theme ("The Gallery Wall") */
  --canvas: var(--gallery);
  --card: var(--paper);
  --wash: var(--matboard);
  --border: var(--hairline);
  --metadata: var(--mist);
  --secondary: var(--smoke);
  --body: var(--graphite);
  --strong: var(--iron);
  --ink: var(--darkroom);

  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.16, .68, .24, 1);
}

/* semantic roles — dark theme ("The Darkroom") */
.theme-dark {
  --canvas: var(--carbon);
  --card: var(--darkroom);
  --wash: var(--charcoal);
  --border: var(--basalt);
  --metadata: var(--mist);
  --secondary: var(--mist);
  --body: var(--silver);
  --strong: var(--gallery);
  --ink: var(--gallery);
}

/* ── 2 · Base ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px
}

body {
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%
}

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

::selection {
  background: var(--charcoal);
  color: var(--gallery)
}

:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 3px
}

.theme-dark :focus-visible,
.nav:not(.nav--solid) :focus-visible {
  outline-color: rgba(250, 250, 250, .6)
}

.container {
  width: min(1240px, 100% - clamp(40px, 8vw, 120px));
  margin-inline: auto
}

.label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--secondary)
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  background: var(--darkroom);
  color: var(--gallery);
  padding: 10px 18px;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: top .3s var(--ease);
}

.skip-link:focus {
  top: 12px
}

.section-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: clamp(36px, 6vh, 64px)
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--border)
}

/* ── 3 · Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(20px, 4vw, 48px);
  color: var(--gallery);
  transition: background .45s var(--ease), color .45s var(--ease),
    padding .45s var(--ease), border-color .45s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav--solid {
  background: rgba(250, 250, 250, .92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--darkroom);
  padding: 13px clamp(20px, 4vw, 48px);
  border-bottom-color: var(--hairline);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0
}

.brand-mark {
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  position: relative;
  flex: none
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: currentColor
}

.brand-name {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  white-space: nowrap
}

.nav-links {
  display: flex;
  gap: clamp(14px, 2.6vw, 34px)
}

.nav-links a {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .85;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: opacity .3s, border-color .3s;
}

.nav-links a:hover {
  opacity: 1;
  border-bottom-color: currentColor
}

/* ── 4 · Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 580px;
  background: var(--carbon);
  overflow: hidden
}

.hero-media {
  position: absolute;
  left: 0;
  right: 0;
  top: -22%;
  bottom: -22%;
  will-change: transform
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) contrast(1.05);
  transition: filter 1.1s var(--ease);
  animation: heroIn 2.4s var(--ease) both;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: scale(1.12)
  }

  to {
    opacity: 1;
    transform: scale(1.03)
  }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, .52) 0%, rgba(10, 10, 10, .16) 42%, rgba(10, 10, 10, .74) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(56px, 11vh, 120px);
  color: var(--gallery);
  will-change: transform, opacity;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 20px
}

.hero-label::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--mist)
}

.hero-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 7.6rem);
  line-height: 1.02;
  letter-spacing: -.012em;
  max-width: 12ch;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: var(--silver);
  margin-top: 18px
}

.hero-meta {
  display: inline-block;
  margin-top: 28px;
  padding: 9px 16px;
  border: 1px solid rgba(250, 250, 250, .25);
  background: rgba(10, 10, 10, .35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gallery);
}

.hero-content .container>* {
  animation: rise 1s var(--ease) backwards
}

.hero-content .hero-label {
  animation-delay: .25s
}

.hero-content .hero-name {
  animation-delay: .4s
}

.hero-content .hero-tagline {
  animation-delay: .55s
}

.hero-content .hero-meta {
  animation-delay: .7s
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.hero-scroll {
  position: absolute;
  right: clamp(20px, 4vw, 48px);
  bottom: clamp(56px, 11vh, 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--silver);
  font-size: .6rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  animation: rise 1s var(--ease) .95s backwards;
}

.hero-scroll-line {
  width: 1px;
  height: 52px;
  background: rgba(250, 250, 250, .28);
  position: relative;
  overflow: hidden
}

.hero-scroll-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--gallery);
  animation: scrollLine 2.2s var(--ease) infinite
}

@keyframes scrollLine {
  0% {
    top: -100%
  }

  55% {
    top: 0
  }

  100% {
    top: 100%
  }
}

/* ── 5 · About ──────────────────────────────────────────────────── */
.about {
  padding: clamp(96px, 16vh, 180px) 0
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start
}

.about-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.4vw, 3.8rem);
  line-height: 1.14;
  color: var(--ink);
  letter-spacing: -.01em;
}

.about-title em {
  font-style: italic;
  color: var(--graphite)
}

.about-copy p {
  max-width: 60ch;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.85
}

.about-copy p+p {
  margin-top: 1.4em
}

.about-sign {
  margin-top: 2.4em;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--secondary)
}

/* ── 6 · Work / Collections ─────────────────────────────────────── */
.work {
  padding: clamp(24px, 6vh, 64px) 0 clamp(96px, 14vh, 160px)
}

.work-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--ink);
}

.work-intro {
  margin-top: 20px;
  max-width: 52ch;
  color: var(--secondary);
  font-size: clamp(.95rem, 1.2vw, 1.08rem)
}

.collections {
  margin-top: clamp(56px, 9vh, 110px)
}

.collection {
  padding: clamp(48px, 8vh, 104px) 0
}

.collection+.collection {
  border-top: 1px solid var(--border)
}

.collection-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: clamp(40px, 7vh, 84px)
}

.collection-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-top: 10px;
}

.collection-note {
  margin-top: 14px;
  max-width: 48ch;
  color: var(--secondary);
  font-size: .98rem
}

.collection-index {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1;
  color: var(--silver);
  flex: none
}

/* frames — mounted-print look (Paper mat + Hairline border) */
.portraits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4.5vw, 80px);
  align-items: start
}

.frame {
  background: var(--card);
  border: 1px solid var(--border);
  padding: clamp(10px, 1.3vw, 18px);
  box-shadow: 0 30px 70px -46px rgba(10, 10, 10, .5);
}

.photo {
  position: relative;
  overflow: hidden;
  background: var(--wash)
}

.portrait .photo {
  aspect-ratio: 3/4
}

.landscape .photo {
  aspect-ratio: 3/2
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* black & white at rest — hover reveals the original color */
  filter: grayscale(1) contrast(1.05);
  transform: scale(1.001);
  transition: transform 1.2s var(--ease), filter .9s var(--ease);
}

/* hover a frame: gentle zoom + the photo returns to its original colors */
@media (hover:hover) {
  .frame:hover .photo img {
    transform: scale(1.045);
    filter: grayscale(0) contrast(1)
  }

  .hero:hover .hero-img {
    filter: grayscale(0) contrast(1)
  }
}

.caption {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 4px 6px
}

.caption-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--strong)
}

.caption-desc {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--body)
}

.caption-meta {
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--metadata)
}

/* landscape — starts narrow, JS expands it to full width on scroll.
   JS reserves the wrap's final height (min-height) and the frame is
   vertically centered inside that slot, so expanding the frame never
   pushes the page content down — otherwise the document would grow
   while you drag the scrollbar and the page would shift under it. */
.landscape-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: clamp(48px, 9vh, 110px)
}

.frame.landscape {
  width: 58%;
  will-change: width
}

/* ── 7 · Contact + Footer ───────────────────────────────────────── */
.contact {
  padding: clamp(110px, 16vh, 200px) 0;
  background: var(--canvas);
  color: var(--body)
}

.contact-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--ink);
  max-width: 17ch;
}

.contact-note {
  margin-top: 24px;
  max-width: 52ch;
  color: var(--secondary)
}

.contact-actions {
  margin-top: clamp(36px, 6vh, 64px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(20px, 4vw, 44px)
}

.btn {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 16px 28px;
  border: 1px solid var(--border);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}

.theme-dark .btn-solid {
  background: var(--gallery);
  color: var(--carbon);
  border-color: var(--gallery)
}

.theme-dark .btn-solid:hover {
  background: var(--charcoal);
  color: var(--gallery);
  border-color: var(--charcoal)
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--secondary)
}

.contact-links a {
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .3s, border-color .3s
}

.contact-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--metadata)
}

.contact-links .dot {
  color: var(--border)
}

.footer {
  background: var(--darkroom);
  border-top: 1px solid var(--basalt);
  padding: 26px 0;
  color: var(--mist)
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase
}

.noscript-note {
  padding: 48px 0;
  color: var(--secondary);
  font-style: italic
}

/* ── 8 · Scroll reveals (JS adds .is-visible) ───────────────────── */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .95s var(--ease), transform .95s var(--ease)
}

.js [data-reveal="left"] {
  transform: translate3d(-44px, 30px, 0)
}

.js [data-reveal="right"] {
  transform: translate3d(44px, 30px, 0)
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none
}

/* ── 9 · Responsive ─────────────────────────────────────────────── */
@media (max-width:960px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px
  }

  .collection-index {
    display: none
  }

  .collection-head {
    gap: 16px
  }
}

@media (max-width:720px) {
  html {
    scroll-padding-top: 80px
  }

  .portraits {
    grid-template-columns: 1fr;
    gap: clamp(36px, 7vh, 56px)
  }

  .hero-scroll {
    display: none
  }

  .collection-head {
    flex-direction: column
  }

  .frame.landscape {
    width: 86%
  }
}

@media (max-width:440px) {
  .brand-name {
    font-size: .68rem;
    letter-spacing: .16em
  }

  .nav-links {
    gap: 14px
  }

  .nav-links a {
    font-size: .6rem;
    letter-spacing: .13em
  }
}

/* ── 10 · Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none
  }

  .hero-img,
  .hero-content .container>*,
  .hero-scroll {
    animation: none
  }

  .hero-scroll-line::after {
    animation: none
  }

  .photo img,
  .hero-img {
    transition: none
  }

  .frame.landscape {
    width: 100% !important
  }
}