/* ============================================================
   ESRAEL NATE — photographs
   Editorial-minimal: warm paper, big grotesque type, mono accents.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --paper: #f4f2ed;
  --ink: #141414;
  --hair: rgba(20, 20, 20, 0.18);
  --sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Space Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; overflow-anchor: none; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.5s ease, color 0.5s ease;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- shared bits ---------- */

.stamp {
  display: inline-block;
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 10px 22px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--paper);
}

.down-arrows {
  margin-top: 12vh;
  font-size: 20px;
  letter-spacing: 0.5em;
}

/* ---------- intro: fullscreen -> framed ---------- */

.intro {
  position: relative;
  height: 100vh;
  height: 100svh;
  background: var(--paper);
  overflow: hidden;
}
.intro-link {
  position: absolute;
  inset: 0;
  display: block;
}
.intro-frame {
  position: absolute;
  inset: 0;
  animation: frame-in 1.1s cubic-bezier(0.76, 0, 0.24, 1) 0.9s forwards;
}
.intro-frame picture,
.intro-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes frame-in {
  to { inset: 20px; }
}

.intro-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 5vh 20px 6vh;
  color: #f4f2ed;
  opacity: 0;
  animation: overlay-in 0.9s ease 1.6s forwards;
  pointer-events: none;
}
@keyframes overlay-in {
  to { opacity: 1; }
}
.intro-name {
  font-weight: 900;
  font-size: clamp(38px, 7vw, 96px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.4);
}
.intro-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.intro-sub {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}
.intro .down-arrows {
  margin-top: 0;
  font-size: 18px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .intro-frame { animation: none; inset: 20px; }
  .intro-overlay { animation: none; opacity: 1; }
}

/* ---------- album index: cinematic panels ---------- */

.albums {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.album-panel {
  position: relative;
  display: block;
  height: calc(100vh - 40px);
  height: calc(100svh - 40px);
  overflow: hidden;
  background: #e4e1da;
}
.album-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 1.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.album-panel:hover img {
  transform: scale(1.012);
}
.panel-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  color: #f4f2ed;
  padding: 20px;
}
.panel-title {
  font-weight: 900;
  font-size: clamp(34px, 6vw, 84px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.4);
}
.panel-meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* ---------- album page ---------- */

.album-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.album-top a:hover { text-decoration: underline; }

.album-head {
  text-align: center;
  padding: 14vh 20px 8vh;
}
.album-head h1 {
  font-weight: 900;
  font-size: clamp(52px, 12vw, 150px);
  letter-spacing: -0.04em;
  line-height: 0.92;
  text-transform: uppercase;
}
.album-head .album-meta {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.album-head .down-arrows { margin-top: 8vh; }

.grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 100px;
  columns: 2;
  column-gap: 20px;
}
.grid a {
  display: block;
  margin-bottom: 20px;
  break-inside: avoid;
  overflow: hidden;
}
.grid img {
  width: 100%;
  transition: transform 1.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.grid a:hover img { transform: scale(1.012); }

@media (max-width: 700px) {
  .grid { columns: 1; }
}

/* ---------- phone focus mode: bg to black, gaps breathe open ----------
   The grid layout itself never changes — only colors flip, and the
   zero-height meta bars between photos ease open to fit the text. */

.focus-meta {
  position: relative;
  display: flex;
  height: 0;
  opacity: 0;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* Height only animates on bars near the viewport (.animate, set by JS);
     off-screen bars jump instantly with the scroll compensated, so the
     whole page never visibly shifts during the transition. */
  transition: opacity 0.35s ease;
}
.focus-meta.animate {
  transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}
.focus-meta a {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: underline;
  text-underline-offset: 4px;
}

html.focus {
  --paper: #0a0a0a;
  --ink: #f4f2ed;
  --hair: rgba(244, 242, 237, 0.18);
}
/* In focus mode every bar opens (constant spacing), but only the bar
   belonging to the most-in-frame photo shows its text. */
html.focus .focus-meta {
  height: 72px;
}
html.focus .focus-meta.on {
  opacity: 1;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox .lb-counter {
  position: absolute;
  top: 16px;
  left: 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #f4f2ed;
}
.lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: #f4f2ed;
  font-family: var(--mono);
  font-size: 26px;
  cursor: pointer;
  padding: 16px;
  line-height: 1;
}
.lightbox button:hover { opacity: 0.7; }
.lightbox .lb-close { top: 8px; right: 12px; }
.lightbox .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

@media (max-width: 700px) {
  .lightbox .lb-prev, .lightbox .lb-next { display: none; }
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--hair);
  padding: 24px 20px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
