:root {
  --bg: #0b0b0a;
  --bone: #ece6db;
  --mute: rgba(236, 230, 219, .52);
  --faint: rgba(236, 230, 219, .22);
  --line: rgba(236, 230, 219, .13);
  --pad: clamp(22px, 6.5vw, 120px);
  --top: 38px;
  --ease: cubic-bezier(.165, .84, .44, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Futura", "Century Gothic", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); }
body {
  font-family: var(--sans); font-weight: 300;
  color: var(--bone); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
::selection { background: var(--bone); color: var(--bg); }

.label { font-family: var(--sans); font-size: 10.5px; font-weight: 400; letter-spacing: .26em; text-transform: uppercase; }

.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.stage__layer {
  position: absolute; inset: -2%; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.08);
  transition: opacity 1.6s var(--ease), transform 9s linear, filter 1.2s var(--ease);
  will-change: opacity, transform;
}
.stage__layer.on { opacity: 1; transform: scale(1); }
.stage__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11,11,10,.95) 0%, rgba(11,11,10,.86) 26%, rgba(11,11,10,.45) 52%, rgba(11,11,10,.12) 78%, rgba(11,11,10,.3) 100%),
    linear-gradient(0deg, rgba(11,11,10,.7) 0%, rgba(11,11,10,0) 30%);
  transition: background .8s var(--ease), opacity .8s var(--ease);
}
body.mode-works .stage__layer { filter: blur(38px) brightness(.32) saturate(1.1); transform: scale(1.12); transition: opacity .9s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease); }
body.mode-works .stage__layer.on { transform: scale(1.06); }
body.mode-works .stage__veil { background: rgba(11,11,10,.35); }
body.mode-plain .stage__layer { opacity: 0 !important; }

.brand {
  position: fixed; z-index: 60; left: var(--pad); top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif); font-weight: 500; font-size: 15px; line-height: 1;
  color: var(--bone); white-space: nowrap;
  transition: top 1.1s var(--ease-io), font-size 1.1s var(--ease-io), opacity .6s;
}
.brand__inner { display: inline-flex; }
.brand .ch { display: inline-block; letter-spacing: .4em; will-change: transform, opacity; }
.brand .sp { display: inline-block; width: .5em; }
body.is-intro .brand { pointer-events: none; }
body.layout-top .brand { top: var(--top); font-size: 13px; }

.mainnav {
  position: fixed; z-index: 50; left: var(--pad); top: calc(50% + 22px);
  transition: opacity .8s var(--ease), top 1.1s var(--ease-io), left 1.1s var(--ease-io);
}
.mainnav ul { display: flex; flex-direction: column; gap: 6px; }
.mainnav a { font-size: 10.5px; font-weight: 400; letter-spacing: .26em; text-transform: uppercase; color: var(--mute); transition: color .3s; position: relative; }
.mainnav a::after { content: ""; position: absolute; left: 0; right: .26em; bottom: -3px; height: 1px; background: var(--bone); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.mainnav a:hover, .mainnav a.active { color: var(--bone); }
.mainnav a.active::after, .mainnav a:hover::after { transform: scaleX(1); }
body.layout-top .mainnav { top: calc(var(--top) - 6px); left: auto; right: var(--pad); }
body.layout-top .mainnav ul { flex-direction: row; gap: 34px; }
body.is-intro .mainnav, body.is-intro .footer, body.is-intro .caption { opacity: 0; pointer-events: none; }

.footer { position: fixed; z-index: 40; right: var(--pad); bottom: 30px; transition: opacity .8s var(--ease); }
.footer ul { display: flex; gap: 28px; }
.footer li, .footer a { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--mute); }
.footer a:hover { color: var(--bone); }
body.layout-top .footer { display: none; }

.caption {
  position: fixed; z-index: 40; left: var(--pad); bottom: 30px; max-width: 40vw;
  font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--mute);
  transition: opacity .8s var(--ease);
}
.caption b { font-style: normal; font-family: var(--sans); font-weight: 400; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; margin-left: 12px; }
body.layout-top .caption { display: none; }

.signature {
  position: fixed; z-index: 45; right: calc(var(--pad) - 6px); bottom: 14px;
  display: flex; align-items: baseline; gap: 10px; pointer-events: auto;
  color: var(--bone); opacity: .62; transition: opacity .5s var(--ease);
}
.signature:hover { opacity: 1; }
.signature__label { font-size: 8.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--mute); }
.signature__name {
  font-family: "Mrs Saint Delafield", "Brush Script MT", cursive;
  font-size: 34px; line-height: 1; padding: 0 6px 0 2px; transform: rotate(-6deg); display: inline-block;
  clip-path: inset(0 100% 0 0);
}
body:not(.is-intro) .signature__name { animation: sign 1.8s cubic-bezier(.6, .05, .3, 1) .9s forwards; }
@keyframes sign { to { clip-path: inset(0 0 0 0); } }
body.is-intro .signature { opacity: 0; }
.footer { bottom: 62px; }

#view { position: relative; z-index: 10; opacity: 1; transition: opacity .5s var(--ease); }
#view.out { opacity: 0; }

.works { position: fixed; inset: 0; z-index: 10; }
.works__cats { position: absolute; left: var(--pad); top: 21vh; display: flex; gap: 26px; }
.works__cats a { color: var(--faint); transition: color .3s; }
.works__cats a.active, .works__cats a:hover { color: var(--bone); }
.works__cats sup { font-size: 8px; margin-left: 4px; letter-spacing: .1em; }
.works__listwrap {
  position: absolute; left: var(--pad); top: 27vh; bottom: 10vh; width: min(40vw, 560px);
  overflow-y: auto; scrollbar-width: none; padding-right: 20px;
  -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent);
          mask-image: linear-gradient(180deg, #000 85%, transparent);
}
.works__listwrap::-webkit-scrollbar { display: none; }
.works__list li { opacity: 0; transform: translateY(10px); animation: rise .9s var(--ease) forwards; }
.works__list a {
  display: flex; align-items: baseline; gap: 18px; padding: 7px 0;
  font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 1.9vw, 30px); line-height: 1.15;
  color: var(--bone); transition: color .4s var(--ease), opacity .4s var(--ease), transform .6s var(--ease);
  overflow-wrap: anywhere;
}
.works__list .n { font-family: var(--sans); font-size: 9.5px; letter-spacing: .2em; color: var(--mute); min-width: 22px; transform: translateY(-4px); }
.works__list .y { font-family: var(--sans); font-size: 9.5px; letter-spacing: .2em; color: var(--mute); margin-left: auto; padding-left: 12px; white-space: nowrap; }
.works__list.hovering a { opacity: .28; }
.works__list.hovering a.on { opacity: 1; transform: translateX(10px); }
.works__list a .t { font-style: normal; transition: font-style .3s; }
.works__list a.on .t { font-style: italic; }
@keyframes rise { to { opacity: 1; transform: none; } }
.works__list .thumb { display: none; }

.viewer {
  position: fixed; z-index: 5; top: 14vh; bottom: 12vh; right: var(--pad); left: 48vw;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.viewer img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  position: absolute; opacity: 0; transform: translateY(14px) scale(.985);
  transition: opacity .7s var(--ease), transform 1.1s var(--ease);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.viewer img.on { opacity: 1; transform: none; }
.viewer__meta { position: fixed; right: var(--pad); bottom: calc(12vh - 46px); text-align: right; color: var(--mute); transition: opacity .5s; }
.viewer__meta i { font-family: var(--serif); font-size: 15px; color: var(--bone); display: block; margin-bottom: 4px; }

.work { min-height: 100vh; padding-top: 110px; }
.work__hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 6vw; align-items: end; padding: 0 var(--pad) 10vh; min-height: calc(100vh - 110px); }
.work__img { height: calc(100vh - 110px - 12vh); display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.work__img img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; box-shadow: 0 40px 100px rgba(0,0,0,.6); }
.work__info { padding-bottom: 2vh; }
.work__cat { color: var(--mute); margin-bottom: 22px; display: block; }
.work__title { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(34px, 3.6vw, 60px); line-height: 1.02; margin-bottom: 36px; overflow-wrap: anywhere; }
.work__meta { display: grid; grid-template-columns: 90px 1fr; row-gap: 14px; border-top: 1px solid var(--line); padding-top: 22px; }
.work__meta dt { color: var(--mute); }
.work__meta dd { font-family: var(--serif); font-size: 17px; line-height: 1.2; }
.work__zoom { margin-top: 34px; display: inline-block; color: var(--mute); border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: color .3s, border-color .3s; }
.work__zoom:hover { color: var(--bone); border-color: var(--bone); }
.work__extra { padding: 4vh var(--pad) 12vh; }
.work__extra figure { margin: 0 auto; max-width: 1100px; }
.work__extra img { width: 100%; }
.work__extra figcaption { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--mute); margin-top: 14px; }
.work__pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.work__pager a { padding: 7vh var(--pad); display: flex; flex-direction: column; gap: 12px; transition: background .5s var(--ease); }
.work__pager a:last-child { text-align: right; border-left: 1px solid var(--line); }
.work__pager a:hover { background: rgba(236,230,219,.04); }
.work__pager .t { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 34px); overflow-wrap: anywhere; }
.work__pager .label { color: var(--mute); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.2s var(--ease), transform 1.4s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.about { min-height: 100vh; padding: 150px var(--pad) 14vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 7vw; }
.about__photo { position: sticky; top: 120px; align-self: start; }
.about__photo img { width: 100%; max-height: 76vh; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.about__photo figcaption { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--mute); margin-top: 12px; }
.about__text { max-width: 560px; padding-top: 2vh; }
.about__text .label { color: var(--mute); display: block; margin-bottom: 30px; }
.about__lead { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 1.85vw, 30px); line-height: 1.32; margin-bottom: 40px; }
.about__text p.body { font-size: 14.5px; line-height: 1.85; color: rgba(236,230,219,.78); margin-bottom: 1.3em; }
.about__text .about__links { margin-bottom: 0; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; gap: 30px; }
.about__links a { color: var(--mute); transition: color .3s; }
.about__links a:hover { color: var(--bone); }

.contact { position: fixed; z-index: 10; left: var(--pad); top: 50%; transform: translateY(-50%); max-width: 640px; }
.contact .label { color: var(--mute); display: block; margin-bottom: 26px; }
.contact a.big { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(40px, 6vw, 92px); line-height: 1; display: inline-block; transition: opacity .4s; }
.contact a.big:hover { opacity: .7; }
.contact p { font-size: 14px; line-height: 1.8; color: rgba(236,230,219,.7); margin-top: 28px; max-width: 420px; }

.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(8,8,7,.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); cursor: zoom-out;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; transform: scale(.97); transition: transform .9s var(--ease); }
.lightbox.open img { transform: none; }
.lightbox__close { position: absolute; top: 30px; right: var(--pad); font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--mute); }
.lightbox__close:hover { color: var(--bone); }
.lightbox__cap { position: absolute; left: var(--pad); bottom: 28px; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--mute); }

.grain {
  position: fixed; inset: -50%; z-index: 80; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block; position: fixed; z-index: 100; left: 0; top: 0; pointer-events: none;
    width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--bone);
    mix-blend-mode: difference; transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s;
  }
  .cursor span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--bg); opacity: 0; transition: opacity .3s; }
  .cursor.big { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
  .cursor.big span { opacity: 1; }
  body.is-intro .cursor { opacity: 0; }
}

.intro { position: fixed; inset: 0; z-index: 55; overflow: hidden; background: #000; }
.intro__hit { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; cursor: pointer; }
.intro__win { position: absolute; z-index: 1; background: #000; left: var(--pad); right: var(--pad); top: 21vh; height: 58vh; }
.intro__win img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.intro__win img.on { opacity: 1; }
.intro__curtain { position: absolute; z-index: 2; top: 0; bottom: 0; width: 100vw; background: #000; will-change: transform; }
.intro__curtain--l { left: -50vw; }
.intro__curtain--r { left: 50vw; }
.intro.fade { transition: opacity 1.2s ease; opacity: 0; }
.intro.gone { display: none; }
body.intro-running .intro__hit { cursor: default; }

@media (max-width: 820px) {
  :root { --top: 30px; }
  .brand { font-size: 12px; }
  .brand .ch { letter-spacing: .3em; }
  body.layout-top .brand { font-size: 11px; }
  body.layout-top .mainnav { top: auto; bottom: 22px; left: var(--pad); right: var(--pad); z-index: 70; }
  body.layout-top .mainnav ul { gap: 0; justify-content: space-between; }
  body.layout-top::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 110px; z-index: 65; background: linear-gradient(0deg, rgba(11,11,10,1) 0%, rgba(11,11,10,.97) 45%, rgba(11,11,10,0) 100%); pointer-events: none; }
  body:has(.contact) .stage__veil { background: linear-gradient(180deg, rgba(11,11,10,.55), rgba(11,11,10,.82) 45%, rgba(11,11,10,.9)); }
  .contact p { color: rgba(236,230,219,.82); }
  .caption { max-width: 60vw; font-size: 13px; }
  .footer ul { gap: 16px; }
  .works { position: static; padding: 100px var(--pad) 120px; }
  .works__cats { position: static; margin-bottom: 26px; }
  .works__listwrap { position: static; width: auto; overflow: visible; -webkit-mask-image: none; mask-image: none; padding: 0; }
  .works__list a { flex-wrap: wrap; font-size: 24px; border-bottom: 1px solid var(--line); padding: 14px 0; }
  .works__list .thumb { display: block; width: 100%; margin-top: 12px; }
  .viewer, .viewer__meta { display: none; }
  .work { padding-top: 80px; }
  .work__hero { grid-template-columns: 1fr; padding: 0 var(--pad) 8vh; min-height: 0; gap: 34px; }
  .work__img { height: auto; }
  .work__img img { max-height: 72vh; }
  .work__pager a { padding: 5vh var(--pad); }
  .work__pager { margin-bottom: 70px; }
  .about { grid-template-columns: 1fr; padding: 100px var(--pad) 120px; }
  .about__photo { position: static; }
  .contact { top: 46%; }
  body.layout-top .signature { display: none; }
  .signature { bottom: 10px; }
  .signature__name { font-size: 28px; }
  .footer { bottom: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01s !important; animation-duration: .01s !important; }
}

body.layout-top::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; height: 92px; z-index: 45; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,11,10,.96) 0%, rgba(11,11,10,.82) 55%, rgba(11,11,10,0) 100%);
}
body.mode-works::before { display: none; }
:focus { outline: none; }
:focus-visible { outline: 1px solid var(--faint); outline-offset: 5px; }
.work { padding-bottom: 64px; }
