/* Ashish Mehta — Photography
   Dark, minimalist single page. No frameworks. */

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --text: #e8e6e3;
  --muted: #8a8a8a;
  --faint: #4d4d4d;
  --gap: clamp(10px, 1.6vw, 22px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

/* ---------- Hero ---------- */

.hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(64px, 14vh, 140px) var(--gap) clamp(40px, 8vh, 90px);
  text-align: center;
}

.hero__name {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 300;
  letter-spacing: 0.28em;
  text-indent: 0.28em; /* re-center tracked text */
  text-transform: uppercase;
}

.hero__tagline {
  margin: 1rem 0 0;
  font-size: clamp(0.72rem, 1.4vw, 0.85rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Gallery (CSS columns masonry) ---------- */

.gallery {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gap);
  columns: 1;
  column-gap: var(--gap);
}

.card {
  break-inside: avoid;
  margin: 0 0 var(--gap);
}

.card__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.card__thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: var(--surface); /* placeholder while lazy-loading */
  transition: opacity 0.35s ease;
}

@media (hover: hover) {
  .card__thumb:hover img { opacity: 0.82; }
  .card__thumb:focus-visible img { opacity: 0.82; }
}

.card__thumb:focus-visible {
  outline: 1px solid var(--muted);
  outline-offset: 3px;
}

/* 1 col mobile (default) → 2-3 tablet → 3-4 desktop */
@media (min-width: 620px)  { .gallery { columns: 2; } }
@media (min-width: 980px)  { .gallery { columns: 3; } }
@media (min-width: 1380px) { .gallery { columns: 4; } }

/* ---------- Footer ---------- */

.footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(48px, 10vh, 110px) var(--gap) 48px;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--faint);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 6, 0.96);
  padding: clamp(16px, 4vw, 56px);
}

.lightbox[hidden] { display: none; }

.lightbox__figure {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - clamp(32px, 8vw, 112px));
  object-fit: contain;
  animation: lightbox-in 0.25s ease;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.lightbox__caption {
  margin-top: 14px;
  display: flex;
  gap: 1.25em;
  align-items: baseline;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: center;
}

.lightbox__count { color: var(--faint); font-variant-numeric: tabular-nums; }

.lightbox__btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 12px;
  color: var(--muted);
  cursor: pointer;
  line-height: 0;
  transition: color 0.2s ease;
}

.lightbox__btn:hover,
.lightbox__btn:focus-visible { color: var(--text); }

.lightbox__btn:focus-visible {
  outline: 1px solid var(--muted);
  outline-offset: 2px;
}

.lightbox__btn svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 20px 14px;
}

.lightbox__nav--prev { left: 4px; }
.lightbox__nav--next { right: 4px; }

@media (max-width: 700px) {
  .lightbox { padding: 12px; padding-bottom: 64px; }
  .lightbox__nav { padding: 24px 8px; bottom: 8px; top: auto; transform: none; }
  .lightbox__nav--prev { left: calc(50% - 72px); }
  .lightbox__nav--next { right: calc(50% - 72px); }
  .lightbox__caption { position: absolute; bottom: 18px; left: 12px; right: 12px; justify-content: center; }
}
