/* Design system: adrienchen.com
   Derived from Claude Design DA: cream gallery + cinematic black breaks,
   EB Garamond + IBM Plex Sans + IBM Plex Mono.
*/

:root {
  --cream:   #f6f3ed;
  --cream-2: #efece4;
  --rule:    #d9d4c8;
  --ink:     #161310;
  --ink-2:   #44403a;
  --ink-3:   #8a8479;
  --black:   #0a0807;
  --accent:  #6b2a1d;
  --frame:   #ffffff;

  --serif:   "EB Garamond", "Iowan Old Style", Georgia, serif;
  --sans:    "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono:    "IBM Plex Mono", "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--black);
  scroll-behavior: smooth;
  scroll-padding-top: 56px;
}
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--ink); color: var(--cream); }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Fixed top header. Discreet semi-transparent bar so brand + nav stay legible
   on any photo or background without relying on mix-blend-mode tricks. */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(246, 243, 237, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(217, 212, 200, 0.45);
}

.brand {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
}
.brand a { color: inherit; text-decoration: none; font-weight: inherit; }
.brand .dot { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.site-nav a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease;
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

@media (max-width: 720px) {
  .site-header { padding: 12px 18px; }
  .site-nav { gap: 16px; font-size: 10px; }
}

/* Black veil for hero fade-in */
.veil {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 90;
  pointer-events: none;
  transition: opacity 1800ms cubic-bezier(0.16, 1, 0.3, 1);
}
.veil.gone { opacity: 0; }

/* Scroll cue */
.scroll-cue {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  z-index: 80;
  mix-blend-mode: difference;
  transition: opacity 600ms ease;
}
.scroll-cue.hide { opacity: 0; }

/* Generic page padding */
.page {
  padding: 0 64px;
}
@media (max-width: 720px) {
  .page { padding: 0 24px; }
}

/* Passe-partout: museum-style white frame around a photograph */
.frame {
  display: block;
  background: var(--frame);
  padding: 14px 14px 16px;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 10px 32px -8px rgba(22, 19, 16, 0.12),
    0 24px 60px -20px rgba(22, 19, 16, 0.10);
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}
.frame .frame-aperture {
  position: relative;
  overflow: hidden;
  background: var(--cream-2);
}

/* Reveal animation for frames */
.frame-reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition:
    opacity 900ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 900ms cubic-bezier(0.22, 1, 0.36, 1);
}
.frame-reveal.in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Caption beneath frame */
.frame-meta {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.7;
}
.frame-meta .num { color: var(--accent); }

/* Pointer affordance on clickable frames */
.frame[role="button"],
.frame.is-clickable {
  cursor: zoom-in;
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 7, 0.96);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 6vw;
  cursor: zoom-out;
}
.lightbox.open {
  display: flex;
  animation: lb-fade 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox-figure {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  cursor: default;
}
.lightbox-figure .frame {
  padding: 24px 24px 28px;
  max-width: min(88vw, 1400px);
  max-height: 80vh;
}
.lightbox-figure .frame .frame-aperture {
  max-height: calc(80vh - 60px);
}
.lightbox-figure .frame img {
  max-height: calc(80vh - 60px);
  width: auto;
  object-fit: contain;
}
.lightbox-caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 243, 237, 0.7);
  text-align: center;
}
.lightbox-caption .num { color: #c4806f; margin-right: 8px; }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: 1px solid rgba(246, 243, 237, 0.4);
  color: rgba(246, 243, 237, 0.8);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 200ms, color 200ms;
  z-index: 1;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  border-color: rgba(246, 243, 237, 0.8);
  color: #fff;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

@media (max-width: 720px) {
  .lightbox { padding: 2vh 3vw; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 24px; transform: none; }
  .lightbox-prev { left: 24px; }
  .lightbox-next { right: 24px; }
}

/* Portrait photos: show full image, no crop */
figure[data-orientation="portrait"] .frame-aperture { aspect-ratio: unset !important; }
figure[data-orientation="portrait"] .frame img { height: auto; object-fit: initial; }

/* Footer shared */
.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--rule);
  padding: 48px 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.site-footer .copyright { color: var(--ink-3); }
.site-footer .contact-link {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 200ms, border-color 200ms;
}
.site-footer .contact-link:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 720px) {
  .site-footer { padding: 32px 24px; }
}
