/* =============================================================================
   aaf.css — AA&F site stylesheet
   ============================================================================= */

/* ── Variables + reset ──────────────────────────────────────────────────────── */
:root {
  --bg:     #f9f9f7;
  --ink:    #111111;
  --muted:  #6b7280;
  --border: #e4e4e2;
  --accent: #2563eb;
  --panel:  #f4f4f2;
  --mono:   'Space Mono', monospace;
  --sans:   'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html  { scroll-behavior: smooth }
/* Keep anchor targets clear of the sticky/fixed nav (52px + 8px breathing room) */
[id]  { scroll-margin-top: 60px }
body  { background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 300; line-height: 1.6 }


/* ── NAV ────────────────────────────────────────────────────────────────────── */
/* Base layout — shared by all pages */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 52px;
  z-index: 200;
}

/* Homepage: fixed, transparent until .scrolled is added by JS */
.nav.nav-fixed {
  position: fixed;
  top: 0; left: 0; right: 0;
  transition: background .35s, border-color .35s;
}
.nav.nav-fixed.scrolled {
  background: rgba(249,249,247,.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

/* Inner pages (gallery, me, about, archive, OM): sticky, always opaque */
.nav.nav-inner {
  position: sticky;
  top: 0;
  background: rgba(249,249,247,.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

/* Brand — stacked two-line text mark */
.nav-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .05rem;
  line-height: 1.15;
  text-decoration: none;
  color: var(--ink);
  transition: color .3s;
}
.nav.nav-fixed .nav-brand         { color: rgba(255,255,255,.85) }
.nav.nav-fixed.scrolled .nav-brand{ color: var(--ink) }
.nav.nav-inner .nav-brand:hover   { color: var(--accent) }

.brand-name {
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: -.01em;
}
.brand-aaf {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .3s;
}
.nav.nav-fixed .brand-aaf          { color: rgba(255,255,255,.38) }
.nav.nav-fixed.scrolled .brand-aaf { color: var(--muted) }

/* Nav links */
.nav-links { display: flex; gap: 2rem }
.nav-links a {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color .3s;
}
.nav.nav-fixed .nav-links a         { color: rgba(255,255,255,.65) }
.nav.nav-fixed.scrolled .nav-links a{ color: var(--muted) }
.nav-links a:hover,
.nav.nav-fixed.scrolled .nav-links a:hover { color: var(--accent) }


/* ── HERO (homepage only) ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 35%;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.hero-slide.active { opacity: 1 }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom,
    rgba(10,10,10,.10) 0%,
    rgba(10,10,10,.06) 40%,
    rgba(10,10,10,.62) 78%,
    rgba(10,10,10,.88) 100%);
}
.hero-body {
  position: relative;
  z-index: 2;
  padding: 0 2.5rem 4rem;
}
.hero-name {
  font-family: var(--sans);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 700;
  color: #fff;
  line-height: .95;
  letter-spacing: -.03em;
  margin-bottom: .75rem;
}
.hero-strapline {
  font-size: clamp(.8rem, 1.2vw, .92rem);
  font-weight: 300;
  color: rgba(255,255,255,.6);
  max-width: 480px;
  line-height: 1.7;
}

/* Scroll-down hint */
.scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: none;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.42);
  cursor: pointer;
  animation: hintBob 2.4s ease-in-out infinite;
  transition: opacity .5s ease, color .2s, border-color .2s;
  padding: 0;
}
.scroll-hint:hover {
  color: rgba(255,255,255,.75);
  border-color: rgba(255,255,255,.45);
}
.scroll-hint.fade { opacity: 0; pointer-events: none }
@keyframes hintBob {
  0%,100% { transform: translateX(-50%) translateY(0) }
  50%      { transform: translateX(-50%) translateY(5px) }
}


/* ── STATS STRIP ────────────────────────────────────────────────────────────── */
.stats {
  padding: .65rem 2.5rem;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .07em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  text-align: center;
}


/* ── GALLERY LIST (homepage) ────────────────────────────────────────────────── */
.gl-list { max-width: 1100px; margin: 0 auto; padding: 0 2.5rem }

.gl-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: start;
  gap: 0 2rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  transition: background .12s;
}
.gl-row:hover                 { background: rgba(0,0,0,.018) }
.gl-row:hover .gl-title       { color: var(--accent) }

.gl-year {
  font-family: var(--mono);
  font-size: .68rem;
  color: #4b5563;
  padding-top: .18rem;
  letter-spacing: .02em;
}
.gl-body  { min-width: 0 }
.gl-head  { display: flex; align-items: center; gap: .6rem; margin-bottom: .22rem; flex-wrap: wrap }
.gl-title { font-size: .88rem; font-weight: 500; transition: color .15s; line-height: 1.3 }
.gl-desc  {
  font-size: .76rem;
  color: #4b5563;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gl-coord {
  font-family: var(--mono);
  font-size: .58rem;
  color: var(--accent);
  text-align: right;
  line-height: 1.9;
  opacity: .75;
  white-space: nowrap;
  padding-top: .18rem;
}


/* ── REGION BADGES ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.b-africa   { background: #f0fdf4; color: #166534; border: 1px solid rgba(34,197,94,.3) }
.b-pakistan { background: #eff6ff; color: #1e40af; border: 1px solid rgba(59,130,246,.3) }
.b-green    { background: #f0f9ff; color: #1e4976; border: 1px solid rgba(125,186,232,.4) }
.b-ant      { background: #f9fafb; color: #4b5563; border: 1px solid rgba(156,163,175,.3) }
.b-india    { background: #fff7ed; color: #9a3412; border: 1px solid rgba(249,115,22,.3) }
.b-russia   { background: #fff1f2; color: #9f1239; border: 1px solid rgba(244,63,94,.3) }
.b-europe   { background: #f5f3ff; color: #5b21b6; border: 1px solid rgba(139,92,246,.3) }
.b-usa      { background: #fff7ed; color: #c2410c; border: 1px solid rgba(234,88,12,.3) }


/* ── MAP (shared — world map on homepage, location map on gallery pages) ─────── */
.map-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: .75rem 2.5rem 2rem;
}
/* Extra top padding on homepage world map section */
.map-section.map-section--home {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--border);
}
.section-label {
  font-family: var(--mono);
  font-size: .63rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}
#world-map {
  width: 100%;
  height: 370px;
  border: 1px solid var(--border);
  background: var(--panel);
}
#map {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border);
  background: var(--panel);
}

/* Leaflet overrides */
.map-tip.leaflet-tooltip {
  font-family: 'Space Mono', monospace;
  font-size: .62rem;
  letter-spacing: .03em;
  background: rgba(17,17,17,.9);
  color: #e5e7eb;
  border: none;
  border-radius: 2px;
  padding: 3px 8px;
  box-shadow: none;
  white-space: nowrap;
}
.map-tip.leaflet-tooltip::before        { display: none }
.leaflet-control-attribution {
  font-family: 'Space Mono', monospace !important;
  font-size: .52rem !important;
}


/* ── PAGE HEADER (gallery + inner pages) ────────────────────────────────────── */
.page-header {
  padding: 1.75rem 2.5rem 0;
  max-width: 1100px;
  margin: 0 auto;
}
.breadcrumb {
  font-family: var(--mono);
  font-size: .63rem;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.breadcrumb .sep { margin: 0 .4rem; opacity: .4 }

.gallery-title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: .6rem;
}
.gallery-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.gallery-dates {
  font-family: var(--mono);
  font-size: .67rem;
  color: #374151;
  letter-spacing: .06em;
}
.gallery-coords {
  font-family: var(--mono);
  font-size: .67rem;
  color: var(--accent);
  opacity: .75;
  letter-spacing: .06em;
}


/* ── DESCRIPTION PANEL (gallery pages) ─────────────────────────────────────── */
.description {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2.5rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.desc-text p {
  font-size: .93rem;
  line-height: 1.85;
  color: #333;
  margin-bottom: 1rem;
}
.desc-text p:last-child { margin-bottom: 0 }
.desc-text a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(37,99,235,.3);
  text-underline-offset: 2px;
}
.desc-text a:hover { text-decoration-color: var(--accent) }
/* No links column — text spans full width */
.description:not(:has(.desc-places)) { grid-template-columns: 1fr }

.desc-places ul { list-style: none; padding: 0 }
.desc-places li {
  font-size: .8rem;
  padding: .22rem 0;
  border-bottom: 1px solid var(--border);
}
.desc-places li:last-child { border-bottom: none }
.desc-places a {
  color: var(--ink);
  text-decoration: none;
  transition: color .15s;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.desc-places a:hover { color: var(--accent) }
.ext { font-size: .72em; opacity: .38; margin-left: .35rem; flex-shrink: 0 }


/* ── PHOTO GRID (gallery pages) ─────────────────────────────────────────────── */
.photos-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 2.5rem 0;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
.photo-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/2;
  display: block;
  cursor: zoom-in;
}
.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.photo-item:hover img { transform: scale(1.04) }
.photo-caption-hover {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem .75rem .6rem;
  background: linear-gradient(to top, rgba(10,10,10,.75), transparent);
  color: rgba(255,255,255,.9);
  font-size: .7rem;
  line-height: 1.3;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.photo-item:hover .photo-caption-hover { opacity: 1 }


/* ── GLightbox overrides ────────────────────────────────────────────────────── */
.glightbox-clean .gslide-description             { background: #111 !important }
.glightbox-clean .gdesc-inner                    { padding: .85rem 1rem }
.glightbox-clean .gdesc-inner .gslide-title      { display: none }
.glightbox-clean .gdesc-inner .gslide-desc       { font-family: var(--mono); font-size: .72rem; color: #d1d5db; line-height: 1.6; letter-spacing: .04em }
/* Main caption — slightly larger than the secondary description text */
.glightbox-clean .gdesc-inner .slide-caption     { font-size: .78rem }
/* Full-res arrow — subtle, brightens on hover */
.glightbox-clean .gdesc-inner .fullres-link      { color: #9ca3af; text-decoration: none; margin-left: .3em; transition: color .15s }
.glightbox-clean .gdesc-inner .fullres-link:hover{ color: #e5e7eb }
.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev                          { background: rgba(255,255,255,.08) !important }


/* ── Autoplay button ────────────────────────────────────────────────────────── */
#lb-play {
  display: none;
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.65);
  font-family: 'Space Mono', monospace;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .4rem 1.1rem;
  cursor: pointer;
  border-radius: 2px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
body.glightbox-open #lb-play       { display: block }
#lb-play:hover                     { background: rgba(255,255,255,.18); color: #fff }
#lb-play.playing                   { border-color: rgba(255,255,255,.4); color: #fff }


/* ── Full-res overlay (above GLightbox) ─────────────────────────────────────── */
#full-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1999999;
  background: rgba(0,0,0,.93);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#full-overlay.open { display: flex }
#full-img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  display: block;
  cursor: default;
}


/* ── FOOTER ─────────────────────────────────────────────────────────────────── */
footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 2rem 2.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: .63rem;
  letter-spacing: .07em;
  color: var(--muted);
  max-width: 1100px;
  margin: 0 auto;
}
footer > *:last-child { text-align: right }
footer nav            { display: flex; gap: .75rem }
footer nav a {
  color: var(--muted);
  text-decoration: none;
  width: 4.5rem;
  text-align: center;
  transition: color .15s;
}
footer nav a:hover { color: var(--accent) }


/* ── INNER PAGE CONTENT (me, about, archive, OM) ───────────────────────────── */
.inner-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2.5rem 3rem;
}
.inner-content p {
  font-size: .93rem;
  line-height: 1.85;
  color: #333;
  margin-bottom: 1rem;
}
.inner-content p:last-child { margin-bottom: 0 }
.inner-content h2 {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.25rem 0 .85rem;
}
.inner-content ul, .inner-content ol {
  font-size: .88rem;
  line-height: 1.8;
  padding-left: 1.4rem;
  margin-bottom: 1rem;
  color: #333;
}
.inner-content li { margin-bottom: .25rem }
.inner-content a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.inner-content a:hover { color: var(--accent) }
.inner-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0 }
.inner-content .tech-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.inner-content .tech-row img { flex-shrink: 0 }

/* Archive list */
.archive-list { list-style: none; padding: 0 !important; }
.archive-list li {
  padding: 1rem 0 !important;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0 !important;
}
.archive-list li:last-child { border-bottom: none }
.archive-list .al-title {
  font-size: .88rem;
  font-weight: 500;
  display: block;
  margin-bottom: .35rem;
  text-decoration: none !important;
  color: var(--ink) !important;
}
.archive-list .al-title:hover { color: var(--accent) !important }
.archive-list .al-desc { font-size: .82rem; color: #4b5563; line-height: 1.65 }


/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .description          { grid-template-columns: 1fr }
  .photo-grid           { grid-template-columns: repeat(2, 1fr) }
  .gl-row               { grid-template-columns: 3rem 1fr; }
  .gl-coord             { display: none }
  .nav                  { padding: 0 1.25rem }
  .page-header,
  .description,
  .photos-section,
  .map-section,
  .gl-list              { padding-left: 1.25rem; padding-right: 1.25rem }
  footer                { padding-left: 1.25rem; padding-right: 1.25rem }
  .hero-body            { padding-left: 1.25rem; padding-right: 1.25rem }
  .inner-content        { padding-left: 1.25rem; padding-right: 1.25rem }
}
