/* AbhayAkul — Documentary Photography Portfolio
   Palette: black / white / grey. Mobile-first, responsive. */

:root {
  --black: #0a0a0a;
  --white: #fafafa;
  --grey-dark: #2a2a2a;
  --grey: #777;
  --grey-light: #d8d8d8;
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 64px;
}

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;   /* blocks the iOS long-press "Save Image" menu */
}

a { color: inherit; text-decoration: none; }

/* ---------- NAV ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  z-index: 100;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.logo {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .logo { font-size: 1rem; letter-spacing: 0.1em; }
}

@media (min-width: 640px) {
  .site-nav { padding: 0 20px; }
  .logo { font-size: 1.1rem; letter-spacing: 0.12em; }
}

.nav-links {
  display: flex;
  gap: 14px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a, .nav-links button {
  background: none;
  border: none;
  color: var(--white);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .nav-links { gap: 20px; }
  .nav-links a, .nav-links button { font-size: 0.78rem; letter-spacing: 0.06em; }
}

@media (min-width: 640px) {
  .nav-links { gap: 28px; }
  .nav-links a, .nav-links button { font-size: 0.85rem; letter-spacing: 0.08em; }
}

/* ---------- Top padding for a gallery/page with no header above it ---------- */
.gallery-top {
  padding-top: calc(var(--nav-h) + 40px);
}

/* ---------- LISTING GRID (Commissioned / Projects — links to each gallery) ----------
   True masonry: column count/placement is computed in JS (main.js) so columns
   balance by actual content height instead of CSS column-count's "fill column 1
   completely, then column 2" behaviour, which leaves large gaps in the last
   column whenever tile heights are uneven. This container just lays out the
   .masonry-col wrapper divs JS creates, side by side. */
.listing-grid {
  padding: calc(var(--nav-h) + 40px) 20px 60px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.masonry-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
}

.listing-item {
  display: block;
}

.listing-item img {
  width: 100%;
  height: auto;           /* natural aspect ratio — no crop, no stretch */
  display: block;
  transition: opacity 0.3s ease;
}

.listing-item:hover img { opacity: 0.85; }

.listing-title {
  margin-top: 12px;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

/* ---------- EMPTY STATE (Commissioned / Projects before content is added) ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px 120px;
  color: var(--grey-light);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ---------- ABOUT PAGE ---------- */
.about-page {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 50px) 20px 80px;
}

.about-page h1 {
  font-size: 1.8rem;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  font-weight: 500;
}

.about-page h2 {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 36px 0 14px;
}

.about-page p {
  color: var(--grey-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- PROJECT PAGE ---------- */
.project-header {
  padding: calc(var(--nav-h) + 40px) 20px 30px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.project-header h1 {
  font-size: 1.8rem;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  font-weight: 500;
}

.project-header p {
  color: var(--grey-light);
  font-size: 0.95rem;
}

/* True masonry via JS (see .listing-grid comment above for why). */
.project-gallery {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding-bottom: 60px;
}

.project-gallery img {
  width: 100%;
  height: auto;           /* natural aspect ratio — no crop, no stretch */
  display: block;
}

.back-link {
  display: inline-block;
  margin: 24px 20px 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-light);
  border-bottom: 1px solid var(--grey);
  padding-bottom: 2px;
}

/* ---------- CONTACT FORM (About page) ---------- */
.contact-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }

.contact-form input,
.contact-form textarea {
  border: none;
  border-bottom: 1px solid var(--grey);
  padding: 10px 2px;
  font-family: inherit;
  font-size: 0.9rem;
  background: transparent;
  color: var(--white);
}

.contact-form button {
  margin-top: 10px;
  padding: 12px;
  background: var(--white);
  color: var(--black);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  cursor: pointer;
}

.contact-form button:hover { background: var(--grey-light); }

/* Honeypot spam trap: off-screen for humans, still reachable by bots that
   auto-fill every field. Not display:none/visibility:hidden on purpose —
   some bots skip fields hidden that way. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.social-links { display: flex; gap: 18px; margin-top: 8px; align-items: center; }
.social-links a { font-size: 0.85rem; text-decoration: none; }
.social-links a.social-icon { color: var(--white); line-height: 0; transition: opacity 0.2s ease; }
.social-links a.social-icon:hover { opacity: 0.7; }
.social-links a.social-icon svg { width: 26px; height: 26px; display: block; }

.about-photo {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  margin: 0 auto 28px;
  border-radius: 4px;
}

/* ---------- FOOTER ---------- */
.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.75rem;
  color: var(--grey);
  letter-spacing: 0.05em;
}

/* ---------- LIGHTBOX (full-size photo viewer) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 300;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;    /* full photo, no crop, no stretch */
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 1;
  padding: 10px;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  color: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 8px 16px;
  opacity: 1;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-hint {
  position: absolute;
  bottom: 18px;
  right: 18px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--grey-light);
  opacity: 0.7;
}

.lightbox-prev {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--grey-light);
}

@media (min-width: 640px) {
  .lightbox-prev, .lightbox-next { font-size: 3rem; padding: 16px; }
  .lightbox-close { font-size: 1.2rem; padding: 10px 20px; }
}
