/* ==========================================================================
   Architectural Photographer – Portfolio (static build for Cloudflare Pages)
   ========================================================================== */

:root {
  --font-mono: "Courier Prime", "Courier New", monospace;
  --font-main: "Host Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --main: #000;
  --white: #fff;
  --gray: #afafaf;
  --lgray: #f0f0f0;
  --header-h: 34px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--white);
  color: var(--main);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.05;
  letter-spacing: .025em;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@media (min-width: 768px) { body { font-size: 14px; } }
@media (min-width: 1536px) { body { font-size: 15px; } }

::selection { background: var(--main); color: var(--white); }

a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; text-transform: inherit; cursor: pointer; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; }
@media (hover: hover) { a:hover { color: var(--gray); } }

.text-gray { color: var(--gray); }
.text-sm { font-size: 10px; }
@media (min-width: 768px) { .text-sm { font-size: 12px; } }
@media (min-width: 1536px) { .text-sm { font-size: 13px; } }

.text-md { font-family: var(--font-main); font-weight: 700; font-size: 30px; letter-spacing: 0; }

.text-max {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 75px;
  line-height: .75;
  letter-spacing: -.05em;
}
@media (min-width: 768px) { .text-max { font-size: 13.75vw; } }
@media (min-width: 1536px) { .text-max { font-size: 210px; } }

.nowrap { white-space: nowrap; }

/* responsive visibility helpers */
@media (max-width: 767.98px) { .hide-mobile { display: none !important; } }
@media (min-width: 768px) { .only-mobile { display: none !important; } }
@media (max-width: 1023.98px) { .hide-below-lg { display: none !important; } }
@media (max-width: 639.98px) { .hide-xs { display: none !important; } }
@media (min-width: 640px) { .only-xs { display: none !important; } }

/* text animation: each character fades in */
.text-anim .ch { opacity: 0; transition: opacity .05s linear; }
.text-anim.is-done .ch, .no-js .text-anim .ch { opacity: 1; }

/* page fade overlay (like the original's main-overlay) */
.main-overlay {
  position: fixed; inset: 0; z-index: 10000; background: var(--white);
  transition: opacity .25s ease-in-out, visibility .25s ease-in-out;
  opacity: 1; visibility: visible;
}
.main-overlay.to-remove { opacity: 0; visibility: hidden; z-index: -1; }
html.is-leaving .main-overlay { opacity: 1; visibility: visible; z-index: 10000; }

/* fade-in images */
.fade-img { opacity: 0; transition: opacity .25s; }
.fade-img.is-loaded { opacity: 1; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 900;
  background: var(--white);
  padding: 10px;
  transition: opacity .15s;
}
.header__row { display: flex; justify-content: space-between; }
.header__plus {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 16px; height: var(--header-h); display: flex; align-items: center; cursor: default;
}
.header__nav li, .menu-page__nav li { display: inline-block; margin-left: 6px; }
.header__nav ul { white-space: nowrap; }
.header__menu-btn { text-transform: uppercase; }

/* Mobile menu page */
.menu-page { position: fixed; inset: 0; background: var(--white); z-index: 800; }
.menu-page__nav { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
.menu-page__nav li { display: inline-block; margin-left: 6px; }
.menu-page__social { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; padding: 10px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { position: relative; padding: 10px; }
.footer__row { display: flex; justify-content: space-between; }
.footer__plus {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  font-size: 16px; height: 37px; display: flex; align-items: center; cursor: default;
}
.footer li { display: inline-block; margin-left: 6px; }

.contact-line { display: flex; white-space: nowrap; }
.contact-line__label { min-width: 80px; padding-right: 12px; color: var(--gray); }

section { padding-inline: 10px; }
section.first { padding-top: 96px; }
@media (min-width: 768px) { section.first { padding-top: calc(23.8svh - 10px); } }

/* ==========================================================================
   HOME
   ========================================================================== */
.home-vertical {
  position: fixed; bottom: 0; left: 0; padding: 10px; z-index: 2;
}
.home-vertical__inner {
  position: absolute; bottom: 0; left: 0; padding: 10px;
  display: flex; flex-direction: column-reverse; gap: 14px; width: max-content;
  transform-origin: 0 100%;
  transform: rotate(-90deg) translateY(100%);
}
.home-stage { position: fixed; inset: 0; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.home-slide { position: fixed; bottom: 0; right: 0; padding: 10px; display: none; }
.home-slide.is-active { display: block; }
.home-slide img {
  width: auto; height: auto;
  max-height: 76.2svh;
  max-width: calc(89vw - 1.25rem);
  padding-left: 11vw;
}
.home-mobile { position: fixed; bottom: 0; right: 0; left: 0; padding: 10px; }
.home-mobile img { width: auto; height: auto; max-width: 100%; }
@media (min-width: 640px) {
  .home-mobile img { max-height: 76.2svh; max-width: calc(100vw - 1.25rem); margin-left: auto; }
}
.home-mobile__contact { padding-top: 5px; }
.home-mobile__contact .contact-line { padding-top: 4px; }
@media (max-width: 767.98px) { .home-stage { display: none; } }

/* ==========================================================================
   WORKS INDEX
   ========================================================================== */
.works { padding-inline: 0; padding-bottom: 40svh; }
@media (min-width: 768px) { .works { padding-bottom: 45svh; } }

.work-item { padding-bottom: 56px; }
.work-item:first-child { padding-top: 8px; }
@media (min-width: 768px) { .work-item { padding-bottom: 10svh; } }

.work-item__title-wrap { margin-top: -6px; margin-bottom: 12px; padding-inline: 10px; }
.work-item__title {
  display: inline-block; text-transform: uppercase; margin-left: -4px;
  transition: opacity .2s; hyphens: manual; -webkit-hyphens: manual;
  overflow-wrap: anywhere;
}
@media (min-width: 768px) { .work-item__title { margin-left: -8px; } }
.work-item__title:hover { color: var(--main); opacity: .7; }

.work-meta { padding-inline: 10px; position: relative; cursor: default; }
.meta-row { display: flex; width: fit-content; line-height: 1.05; align-items: flex-end; overflow: hidden; }
.meta-row > div { margin-right: 24px; }
.meta-row .meta-val { display: block; white-space: nowrap; }
.work-meta__num { position: absolute; bottom: 0; right: 10px; line-height: 1.05; }

.project-gallery {
  padding-top: 16px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  cursor: grab;
  transition: opacity .25s, filter .25s;
}
.project-gallery::-webkit-scrollbar { display: none; }
.project-gallery.is-dragging { cursor: grabbing; }
.project-gallery__track { display: flex; width: max-content; }
.gallery-slide { flex-shrink: 0; }
.gallery-slide:first-child { padding-left: 10px; }
.gallery-slide:last-child { padding-right: 10px; }
.gallery-slide a { display: flex; align-items: flex-start; padding-right: 1px; transition: opacity .15s; }
.gallery-slide a > div + div { padding-left: 1px; }
.gallery-slide a:hover { opacity: .7; }
.gallery-slide img { width: auto; height: 77px; pointer-events: none; -webkit-user-drag: none; user-select: none; }
@media (min-width: 768px) {
  .gallery-slide a { align-items: flex-end; }
  .gallery-slide img { height: 10vw; }
  .project-gallery { opacity: .2; filter: grayscale(100%); }
  .work-item:has(.work-item__title:hover) .project-gallery,
  .work-item:has(.work-meta:hover) .project-gallery { opacity: 1; }
  .project-gallery:hover { opacity: 1; filter: grayscale(0%); }
}
@media (min-width: 1536px) { .gallery-slide img { height: 152px; } }

/* ==========================================================================
   WORK DETAIL
   ========================================================================== */
.project-intro {
  position: fixed; inset: 0; height: 100svh; z-index: 1200;
  background: rgba(255, 255, 255, .9);
  color: #ececec;
  text-align: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.project-intro.is-hidden { opacity: 0; visibility: hidden; }
.project-intro ul { position: fixed; left: 0; right: 0; width: 100%; padding: 8px; }
.project-intro ul.top { top: 0; }
.project-intro ul.top li { margin-left: -12px; }
.project-intro ul.bottom { bottom: 0; }

.project-center-title {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  background: var(--white); z-index: 950; height: var(--header-h);
  display: flex; align-items: center; justify-content: center; cursor: default;
  padding-inline: 6px;
}

.project-scroll-hint {
  position: fixed; bottom: 0; left: 0; width: 100%; padding: 10px; text-align: center;
  color: #fff; mix-blend-mode: difference; z-index: 5; transition: opacity .25s;
}
.project-scroll-hint.is-hidden { opacity: 0; }

/* desktop slider */
.slider { position: relative; height: 100svh; }
.slide { position: absolute; inset: 0; background: var(--white); visibility: hidden; }
.slide.is-active { visibility: visible; }
.slide__media {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  height: calc(100svh - 124px);
  display: flex; min-height: 0;
}
.slide__box {
  min-width: 0; min-height: 0;
  max-height: calc(100svh - 124px);
  max-width: var(--mw);
  aspect-ratio: var(--ar);
  width: min(var(--mw), calc((100svh - 124px) * var(--ar)));
}
.slide__box img { display: block; width: 100%; height: 100%; object-fit: contain; }
.slide__num { position: absolute; bottom: 46px; left: 0; line-height: 1; }

.slider__zone {
  position: absolute; top: 50%; transform: translateY(calc(-50% - 1rem));
  height: calc(100svh - 120px); width: 50%; z-index: 2; cursor: crosshair; outline: none;
}
.slider__zone--prev { left: 0; }
.slider__zone--next { right: 0; }

.project-meta { position: fixed; bottom: 0; left: 0; width: fit-content; padding: 10px; z-index: 10; cursor: default; }

.project-thumbs {
  position: fixed; bottom: 0; right: 0; padding: 10px; z-index: 15;
  display: flex; justify-content: flex-end;
  background-image: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,.7), #fff);
}
.project-thumbs__fade { width: 40px; background-image: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,.7), #fff); }
@media (min-width: 1024px) { .project-thumbs__fade { width: 50px; } }
.project-thumbs__list { display: flex; justify-content: flex-end; background: var(--white); }
.project-thumbs__list a {
  display: flex; align-items: flex-end; padding-left: 1px;
  filter: grayscale(100%); opacity: .3; transition: all .2s;
}
.project-thumbs__list a > img + img { margin-left: 1px; }
.project-thumbs__list a:hover, .project-thumbs__list a.is-active { opacity: 1; filter: grayscale(0%); color: inherit; }
.project-thumbs__list img { width: auto; height: 36px; }

/* mobile: vertical stack */
.mobile-stack { display: none; }
@media (max-width: 767.98px) {
  .slider { display: none; }
  .mobile-stack { display: block; }
  .mobile-stack__item {
    height: 100svh; display: flex; align-items: center; justify-content: center;
    padding: calc(var(--header-h) + 10px) 0 40px;
  }
  .mobile-stack__item img { max-height: 100%; width: 100%; object-fit: contain; }
  .mobile-stack__pair { display: flex; flex-direction: column; gap: 10px; height: auto; min-height: 100svh; }
  .project-meta { background: transparent; }
  .mobile-stack__end { height: 40svh; }
}

/* ==========================================================================
   PUBLICATIONS
   ========================================================================== */
.dotted {
  width: 100%; height: 1px;
  background-image: radial-gradient(circle at .5px .5px, rgba(0,0,0,.55) .5px, transparent .75px);
  background-size: 4px 1px; background-repeat: repeat-x;
}
.pubs-digital { margin-bottom: 80px; }
@media (min-width: 768px) { .pubs-digital { margin-bottom: 20svh; } }
.pubs h1 { margin-bottom: 16px; }

.pub-row {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0;
  padding-top: 10px; padding-bottom: 5px; position: relative; cursor: pointer;
}
@media (min-width: 768px) { .pub-row { padding-top: 11px; padding-bottom: 9px; } }
.pub-row:hover { color: var(--gray); }
.pub-row .dotted { position: absolute; bottom: 0; left: 0; }
.pub-row.is-hidden { display: none; }
.pub-row__pub { grid-column: span 5; }
.pub-row__proj { grid-column: span 4; text-align: right; }
.pub-row__firm { grid-column: span 2; }
.pub-row__link { text-align: right; }
@media (min-width: 768px) {
  .pub-row__pub { grid-column: span 3; }
  .pub-row__proj { grid-column: span 2; text-align: left; }
}
@media (min-width: 1024px) { .pub-row__pub { grid-column: span 2; } }

.load-more-wrap { display: flex; justify-content: flex-start; padding-block: 24px; }
.load-more { text-transform: uppercase; }
.load-more:hover { color: var(--gray); }
.load-more[hidden] { display: none; }

.pubs-print { margin-bottom: 45svh; }
@media (min-width: 768px) { .pubs-print { margin-bottom: 30svh; } }
.print-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: 10px; row-gap: 8svh; }
.print-item, .print-blank { grid-column: span 4; }
@media (min-width: 1024px) { .print-item, .print-blank { grid-column: span 2; } }
.print-blank { aspect-ratio: 1; background: var(--white); }
@media (min-width: 1024px) { .print-blank { aspect-ratio: 36 / 24; } }
@media (max-width: 1023.98px) { .print-blank { display: none; } }
.print-item { cursor: default; }
.print-cover { position: relative; background: var(--lgray); aspect-ratio: 1; }
@media (min-width: 1024px) { .print-cover { aspect-ratio: 36 / 24; } }
.print-cover__layer { position: absolute; inset: 0; transition: opacity .2s; }
.print-cover__img {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100%; height: 100%; padding-block: 20px;
  display: flex; align-items: center; justify-content: center;
  max-height: 86%;
}
@media (min-width: 640px) { .print-cover__img { max-height: 76%; } }
@media (min-width: 1024px) { .print-cover__img { max-height: 86%; } }
@media (min-width: 1536px) { .print-cover__img { max-height: 76%; } }
.print-cover__alt .print-cover__img { max-height: 84%; }
@media (min-width: 1536px) { .print-cover__alt .print-cover__img { max-height: 72%; } }
.print-cover__img img { width: auto; height: 100%; object-fit: contain; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.print-cover__alt { opacity: 0; }
@media (max-width: 767.98px) { .print-cover__alt { display: none; } }
@media (min-width: 768px) {
  .print-cover.has-alt:hover .print-cover__alt { opacity: 1; }
  .print-cover.has-alt:hover .print-cover__primary { opacity: 0; }
}
.print-caption { padding-top: 8px; display: flex; justify-content: space-between; gap: 10px; }
.print-caption__proj { opacity: 0; }
.print-item:hover .print-caption__proj { opacity: 1; }
@media (max-width: 767.98px) { .print-caption__proj { display: none; } }

/* ==========================================================================
   404
   ========================================================================== */
.nf { min-height: 100svh; display: flex; align-items: flex-end; padding: 10px; }
.nf .text-max { text-transform: uppercase; }
@media (max-width: 767.98px) { .project-meta { display: none; } }

/* ---------- Magazine cover / spread mockups (publications) ---------- */
.mag {
  position: relative; height: 100%; aspect-ratio: 3 / 4; overflow: hidden;
  background: #ddd; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 14px rgba(0,0,0,.08);
  text-transform: none; letter-spacing: 0; color: #fff;
}
.mag > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mag__mast {
  position: absolute; top: 5%; left: 6%; right: 6%;
  font-size: clamp(11px, 1.45vw, 26px); line-height: .9; z-index: 2;
}
.mag__issue { position: absolute; top: 3%; right: 6%; font-size: clamp(4px, .38vw, 7px); z-index: 2; font-family: var(--font-mono); text-transform: uppercase; }
.mag__lines {
  position: absolute; left: 6%; bottom: 6%; right: 30%; z-index: 2;
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font-main); font-size: clamp(4px, .42vw, 8px); line-height: 1.1;
}
.mag__lines b { font-size: 1.7em; line-height: 1; }
.mag--serif-dark .mag__mast, .mag--serif-light .mag__mast { font-family: "Times New Roman", Georgia, serif; font-weight: 400; letter-spacing: -.02em; text-transform: uppercase; }
.mag--sans-light .mag__mast, .mag--sans-dark .mag__mast { font-family: var(--font-main); font-weight: 700; letter-spacing: -.05em; text-transform: uppercase; font-size: clamp(12px, 1.7vw, 30px); }
.mag--mono-light .mag__mast { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; font-size: clamp(8px, .95vw, 17px); }
.mag--serif-dark, .mag--sans-dark { color: #111; }
.mag--serif-dark::after, .mag--sans-dark::after,
.mag--serif-light::after, .mag--sans-light::after, .mag--mono-light::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.28), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 65%, rgba(0,0,0,.3));
}
.mag--serif-dark::after, .mag--sans-dark::after {
  background: linear-gradient(to bottom, rgba(255,255,255,.55), rgba(255,255,255,0) 30%, rgba(255,255,255,0) 70%, rgba(255,255,255,.5));
}

.spread {
  position: relative; height: 100%; aspect-ratio: 3 / 2; display: flex; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 14px rgba(0,0,0,.08);
  text-transform: none; letter-spacing: 0;
}
.spread::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 6%; transform: translateX(-50%); background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,.12), rgba(0,0,0,0)); pointer-events: none; }
.spread__page { width: 50%; height: 100%; position: relative; overflow: hidden; }
.spread__page--photo img { width: 100%; height: 100%; object-fit: cover; }
.spread__page--text { padding: 7% 8%; display: flex; flex-direction: column; gap: 6%; }
.spread__kicker { font-family: var(--font-mono); font-size: clamp(3px, .33vw, 6px); text-transform: uppercase; color: #777; }
.spread__title { font-family: var(--font-main); font-weight: 700; font-size: clamp(8px, 1vw, 18px); letter-spacing: -.04em; line-height: .9; text-transform: uppercase; }
.spread__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8%; }
.spread__cols i { display: block; height: 2px; background: #cfcfcf; }
.spread__cols i:nth-child(3n) { width: 70%; }
.spread__small { margin-top: auto; width: 36%; align-self: flex-end; aspect-ratio: 4 / 5; overflow: hidden; min-height: 0; }
.spread__small img { width: 100%; height: 100%; object-fit: cover; }
