/* Anand Paranjpe — Photography
   Dark gallery-wall palette, single committed theme. */
:root {
  --ground: #0e0f11;
  --ground-2: #15171a;
  --surface: #1c1f23;
  --line: #2a2e33;
  --text: #ece9e3;
  --muted: #9a9790;
  --accent: #d8a15c;
  --accent-ink: #1a1207;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --maxw: 1320px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(34px, 4.5vw, 56px); letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 62ch; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .3s, backdrop-filter .3s;
}
.site-header.scrolled { background: rgba(14,15,17,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--font-display); font-size: 20px; text-decoration: none; letter-spacing: .01em; }
.brand em { font-style: italic; color: var(--accent); }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 720px) {
  .hero .wrap { padding-bottom: 72px; }
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; top: calc(68px + env(safe-area-inset-top, 0px)); right: var(--gutter); flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); padding: 10px 6px; border-radius: 12px; min-width: 180px; }
  .nav a { padding: 10px 14px; }
  .nav[hidden] { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 78vh; display: grid; align-items: end;
  background: var(--ground-2); overflow: hidden;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-img.loaded { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,15,17,.95) 0%, rgba(14,15,17,.35) 45%, rgba(14,15,17,.15) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-block: 120px 56px; display: grid; gap: 22px; }
.hero h1 { font-size: clamp(38px, 6.2vw, 84px); max-width: 16ch; font-variation-settings: "opsz" 144; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--muted); font-size: 14px; letter-spacing: .04em; }
.hero-meta span::before { content: "—"; margin-right: 10px; color: var(--accent); }
.hero-cap { position: absolute; right: var(--gutter); bottom: 22px; z-index: 1; font-size: 12px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }

/* ---------- Sections ---------- */
section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; }
.section-head .row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; }

/* Themes strip */
.themes { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ground-2); }
.themes .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; }
.theme { padding: 30px 26px; border-left: 1px solid var(--line); display: grid; gap: 10px; text-decoration: none; transition: background .25s; }
.theme:first-child { border-left: 0; }
.theme:hover { background: var(--surface); }
.theme h3 { font-size: 26px; }
.theme p { color: var(--muted); font-size: 15px; }
.theme .count { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 720px) { .theme { border-left: 0; border-top: 1px solid var(--line); } .theme:first-child { border-top: 0; } }

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  cursor: pointer; transition: all .2s;
}
.filters button:hover { color: var(--text); border-color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.gallery { columns: 3; column-gap: 14px; }
@media (max-width: 1000px) { .gallery { columns: 2; } }
@media (max-width: 560px) { .gallery { columns: 1; } }
.tile {
  break-inside: avoid; margin-bottom: 14px; position: relative; overflow: hidden; border-radius: 4px;
  background: var(--surface); cursor: zoom-in; border: 0; padding: 0; width: 100%; text-align: left;
  opacity: 0; transform: translateY(12px); animation: rise .6s ease forwards;
}
.tile img { width: 100%; height: auto; transition: transform .6s ease; }
.tile:hover img { transform: scale(1.03); }
.tile figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(14,15,17,.85), transparent);
  font-size: 13px; letter-spacing: .04em; color: var(--text);
  opacity: 0; transition: opacity .3s;
}
.tile:hover figcaption, .tile:focus-visible figcaption { opacity: 1; }
.tile figcaption small { display: block; color: var(--accent); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2px; }
.tile[hidden] { display: none; }
@keyframes rise { to { opacity: 1; transform: none; } }
.gallery-empty { color: var(--muted); padding: 40px 0; }
.more { display: flex; justify-content: center; margin-top: 28px; }
.btn-ghost { background: none; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,9,10,.96); display: grid; grid-template-rows: 1fr auto; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; margin: auto; object-fit: contain; }
.lightbox .stage { display: grid; place-items: center; padding: 56px 16px 8px; min-height: 0; }
.lightbox .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--gutter) 18px; color: var(--muted); font-size: 14px; }
.lightbox .bar b { color: var(--text); font-weight: 500; }
.lb-btn { position: absolute; background: rgba(28,31,35,.8); border: 1px solid var(--line); color: var(--text); width: 44px; height: 44px; border-radius: 999px; cursor: pointer; display: grid; place-items: center; font-size: 20px; }
.lb-btn:hover { background: var(--surface); }
.lb-close { top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Story ---------- */
.story { background: var(--ground-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.story .cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .story .cols { grid-template-columns: 1fr; } }
.story .text { display: grid; gap: 22px; }
.story .text p { max-width: 62ch; }
.pull { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; font-style: italic; color: var(--text); border-left: 2px solid var(--accent); padding-left: 20px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 1px solid var(--line); }
.timeline li { padding: 18px 0 18px 26px; position: relative; display: grid; gap: 4px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 27px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline .year { font-family: var(--font-display); font-size: 28px; color: var(--accent); font-variant-numeric: tabular-nums; }
.timeline p { color: var(--muted); font-size: 15px; }
.story-photo { border-radius: 4px; overflow: hidden; background: var(--surface); aspect-ratio: 4 / 5; max-width: 100%; }
.story-photo img { width: 100%; height: 100%; object-fit: cover; }
.story .right { display: grid; gap: 32px; }

/* ---------- Contact ---------- */
.contact .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
@media (max-width: 860px) { .contact .cols { grid-template-columns: 1fr; } }
.contact h2 em { font-style: italic; color: var(--accent); }
.contact-links { display: grid; gap: 14px; margin-top: 28px; }
.contact-links a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); transition: color .2s; }
.contact-links a:last-child { border-bottom: 1px solid var(--line); }
.contact-links a:hover { color: var(--accent); }
.contact-links span { color: var(--muted); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  color: var(--text); padding: 12px 14px; font: inherit; font-size: 16px;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field textarea { min-height: 140px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-self: start;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 14px 24px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; cursor: pointer;
  transition: transform .2s, filter .2s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.form-note { color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
