/* ============================================================
   parthivkhaund.com: shared base
   Theme files (home/library/art/film) override the variables.
   ============================================================ */

:root {
  --bg: #101014;
  --bg-soft: #15161c;
  --surface: #1a1c23;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eae6dd;
  --muted: #98948a;
  --faint: #6b675e;
  --accent: #c9a86a;
  --accent-soft: rgba(201, 168, 106, 0.13);
  --nav-bg: rgba(16, 16, 20, 0.84);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1120px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent-soft); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}
.brand span { color: var(--accent); }
/* cycling first name (Parthiv / Pierre / Assamese) */
.brand .brand-cycle {
  display: inline-block;
  color: var(--text);
  text-align: left;
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), filter 0.32s var(--ease);
}
.brand .brand-cycle.swapping { opacity: 0; transform: translateY(-0.28em); filter: blur(2px); }
@media (prefers-reduced-motion: reduce) {
  .brand .brand-cycle { transition: none; }
  .brand .brand-cycle.swapping { opacity: 1; transform: none; filter: none; }
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
  position: relative;
  padding-bottom: 3px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ---------- nav dropdown (Libraries → NYPL / US) ---------- */
.nav-dd { position: relative; display: inline-flex; align-items: center; }
.nav-dd > a .dd-caret {
  font-style: normal;
  font-size: 0.62em;
  margin-left: 5px;
  display: inline-block;
  opacity: 0.6;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-dd:hover > a .dd-caret,
.nav-dd:focus-within > a .dd-caret { transform: rotate(180deg); opacity: 1; }
/* invisible bridge so the menu stays open while crossing the gap */
.nav-dd::after {
  content: "";
  position: absolute;
  top: 100%; left: -12px; right: -12px;
  height: 16px;
}
.nav-dd-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 6px);
  min-width: 178px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 1001;
}
.nav-dd:hover .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav-dd-menu a {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
}
.nav-dd-menu a::after { display: none; }
.nav-dd-menu a:hover,
.nav-dd-menu a:focus-visible { color: var(--text); background: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) {
  .nav-dd-menu, .nav-dd > a .dd-caret { transition: none; }
}
@media (max-width: 880px) {
  .nav-dd-menu { left: 0; transform: translate(0, 6px); }
  .nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { transform: translate(0, 0); }
}

/* ---------- hero ---------- */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 0 80px;
  position: relative;
}
.hero.compact { min-height: 52vh; padding: 150px 0 40px; }
.kicker {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.kicker::before {
  content: "";
  width: 40px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.6vw, 4.9rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}
h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  margin-top: 26px;
  max-width: 580px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}
.text-link { color: var(--accent); font-weight: 600; }
.text-link:hover { opacity: 0.75; }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal-scale {
  opacity: 0;
  transform: scale(0.95) translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal-scale.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-scale { opacity: 1; transform: none; transition: none; }
}

/* ---------- sections ---------- */
section { padding: 88px 0; }
.section-head { margin-bottom: 46px; }
h2 {
  font-family: var(--font-display);
  font-weight: 440;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.15;
}
.section-head p { color: var(--muted); margin-top: 12px; max-width: 640px; }

/* ---------- chips & buttons ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- controls ---------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
}
.controls .label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-right: 6px;
}
.sort-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s;
}
.sort-btn:hover { border-color: var(--border-strong); color: var(--text); }
.sort-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- map (skinned via vars) ---------- */
.map-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.map { height: 460px; background: var(--bg-soft); z-index: 1; }
.leaflet-container { font-family: var(--font-body); background: var(--bg-soft); }
.leaflet-popup-content-wrapper {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 14px 16px; font-size: 0.85rem; line-height: 1.5; }
.leaflet-popup-content b { font-family: var(--font-display); font-weight: 550; font-size: 0.98rem; }
.leaflet-popup-content a { color: var(--accent); font-weight: 600; }
.leaflet-container .leaflet-control-attribution {
  background: var(--nav-bg);
  color: var(--faint);
  font-size: 0.62rem;
}
.leaflet-container .leaflet-control-attribution a { color: var(--muted); }
.leaflet-bar a {
  background: var(--surface);
  color: var(--text);
  border-bottom-color: var(--border);
}
.leaflet-bar a:hover { background: var(--bg-soft); color: var(--accent); }

.pk-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2.5px solid var(--dot-ring, rgba(16, 16, 20, 0.9));
  box-shadow: 0 0 0 3px var(--dot-halo, rgba(255, 255, 255, 0.12)), 0 3px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--ease);
}
.pk-dot:hover { transform: scale(1.35); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 52px 0 62px;
  margin-top: 60px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-inner .brand { font-size: 1.05rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--accent); }
.footer-note { width: 100%; color: var(--faint); font-size: 0.75rem; margin-top: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.7rem; letter-spacing: 0.03em; }
  section { padding: 60px 0; }
  .hero { padding-top: 120px; }
  .map { height: 380px; }
}
