/* ============================================================
   AJ PHOTOGRAPHY — style.css
   ============================================================ */
/* Only regular woff2 provided — Bold/Italic removed to prevent
   browser falling back to system Times New Roman              */
@font-face {
  font-family: 'TNR';
  src: url('/fonts/TimesNewRoman.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --black:      #000;
  --text:       #414141;   /* plain gray — no blend on black background */
  --font:       'TNR', Times, serif;
  --font-size:  1.4rem;
  --pad:        .75rem;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: 1.0;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}

/* Hide default cursor on mouse devices */
@media (pointer: fine) {
  *, *::before, *::after { cursor: none !important; }
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { opacity: 0.5; }

/* ── Custom cursor ─────────────────────────────────────────── */
#cursor {
  position: fixed;
  inset: 0 auto auto 0;
  pointer-events: none;
  z-index: 9999;
  font-family: var(--font);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: #fff;
  mix-blend-mode: exclusion;
  transform: translate(6px, 4px);
  white-space: normal;
  width: 10rem;
  text-align: left;
  line-height: 1.0;
  opacity: 0;
  transition: opacity 0.2s;
  display: none;
}
@media (pointer: fine) {
  #cursor { display: block; }
  #cursor.visible { opacity: 1; }
}

/* ── Loading overlay ───────────────────────────────────────── */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  background: rgba(0,0,0,0.04);
  transition:
    opacity 1s ease,
    backdrop-filter .5s ease,
    -webkit-backdrop-filter .5s ease;
}
#loading-overlay.out {
  opacity: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
}
#loading-title {
  font-family: var(--font);
  font-weight: normal;
  font-size: clamp(1.5rem, 3vw, 5rem);
  color: var(--text);
  letter-spacing: -0.02em;
  user-select: none;
}

/* ── Page shell ────────────────────────────────────────────── */
#page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  #page { flex-direction: row; }
}

/* ── Info panel ────────────────────────────────────────────── */
#info-panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--pad);
}
@media (min-width: 768px) {
  #info-panel {
    width: 50%;
    height: 100%;
    padding: var(--pad);
    overflow: hidden;
  }
}

.bio {
  font-size: var(--font-size);
  line-height: 1.0;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  -webkit-text-stroke: .9px currentColor;
}

.meta {
  margin-top: auto;
  padding-top: 1rem;
  padding-left: 0rem;
}
.meta-cameras {
  font-size: var(--font-size);
  line-height: 1.1;
  -webkit-text-stroke: 0.9px currentColor;
}
.meta-photo {
  display: none;
}

@media (max-width: 767px) {
  .meta { display: none; }

  .bio,
  .m-cameras,
  .m-photo-info {
    font-size: calc(var(--font-size) - 0.35rem);
    -webkit-text-stroke: 0.7px currentColor;
  }
}

/* ── Main column ───────────────────────────────────────────── */
#main-col {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Photo panel ───────────────────────────────────────────── */
#photo-panel {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: var(--black);
}

#photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.9s ease, opacity 0.4s ease;
}
#photo.loading {
  filter: blur(19px);
  opacity: 0;
}
@media (max-width: 767px) {
  #photo {
    object-fit: contain;
    padding: 0.4rem;
  }

  /* Blurred background for landscape photos on mobile — top/bottom only, portrait width */
  #photo-panel::before {
    content: '';
    position: absolute;
    top: -15%; bottom: -15%;
    left: 18%; right: 18%;
    background-image: var(--blur-src, none);
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.35);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
  }
  #photo-panel.has-blur-bg::before {
    opacity: 1;
  }
  #photo {
    position: relative;
    z-index: 1;
  }
  /* Landscape photos constrained to portrait-like width */
  #photo.landscape-mobile {
    padding: 0.4rem 18%;
  }
}

.no-photos {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size);
}

/* ── Mobile footer ─────────────────────────────────────────── */
#mobile-footer {
  flex-shrink: 0;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  #mobile-footer { display: none; }
}

.m-count {
  display: none;
}
.m-photo-info {
  display: none;
}
.m-cameras {
  font-size: calc(var(--font-size) - 0.35rem);
  line-height: 1.1;
  -webkit-text-stroke: 0.7px currentColor;
}

@media (max-width: 767px) {
  .m-count {
    display: block;
    position: absolute;
    bottom: calc(var(--pad) + 0.75rem * 1.55 * 2 + 0.2rem);
    left: 18%; right: 18%;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.1;
    letter-spacing: 0.12em;
    color: #fff;
    mix-blend-mode: exclusion;
    -webkit-text-stroke: 0;
    pointer-events: none;
    z-index: 5;
  }
  .m-photo-info {
    display: block;
    position: absolute;
    bottom: var(--pad);
    left: 18%; right: 18%;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.1;
    min-height: calc(0.75rem * 1.55 * 2);
    color: #fff;
    mix-blend-mode: exclusion;
    -webkit-text-stroke: 0;
    pointer-events: none;
    z-index: 5;
  }
}

/* ── Nav arrows ────────────────────────────────────────────── */
.nav-btn {
  display: none;
}

/* ── Desktop landscape: exclusion blend over photo ─────────── */
@media (min-width: 768px) {
  body.photo-landscape #page { display: block; }

  body.photo-landscape #info-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    z-index: 10;
    background: transparent;
    mix-blend-mode: exclusion;
    color: #fff;
  }

  /* Strip stroke from every text element inside landscape panel */
  body.photo-landscape #info-panel *,
  body.photo-landscape #info-panel *::before,
  body.photo-landscape #info-panel *::after {
    -webkit-text-stroke: 0 !important;
  }

  body.photo-landscape #main-col {
    position: absolute;
    inset: 0;
  }

  body.photo-landscape #photo-panel {
    position: absolute;
    inset: 0;
  }

  body.photo-landscape #photo {
    object-fit: cover;
  }
}