:root {
  --bg: #f6f4f0;
  --fg: #14120f;
  --muted: #8c887f;
  --line: rgba(20, 18, 15, 0.1);
  --accent: #14120f;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --topbar-h: 76px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

body {
  opacity: 0;
}

body.is-loaded {
  opacity: 1;
  transition: opacity 0.6s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection {
  background: var(--fg);
  color: var(--bg);
}

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Custom cursor ---------- */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
  z-index: 1001;
  mix-blend-mode: difference;
  transform: translate3d(-100px, -100px, 0) scale(1);
  transition: transform 0.18s var(--ease), opacity 0.2s ease, width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease);
  opacity: 0;
}

.cursor-dot.is-visible { opacity: 1; }

.cursor-dot.is-hover {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  background: transparent;
  border: 1px solid var(--fg);
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot { display: none; }
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(246, 244, 240, 0.82);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

.brand {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  font-size: 10px;
  transform: translateY(-1px);
}

.menu {
  display: flex;
  gap: 48px;
}

.menu-item {
  position: relative;
  padding: 28px 0;
}

.menu-item > a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-item:hover > a,
.menu-item.is-active > a {
  border-color: var(--fg);
}

.submenu {
  position: absolute;
  top: 100%;
  left: -20px;
  min-width: 220px;
  margin: 0;
  padding: 14px 0;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(20, 18, 15, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}

.menu-item:hover .submenu,
.menu-item:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li a {
  display: block;
  padding: 9px 24px;
  font-family: var(--font-display);
  font-size: 15px;
  white-space: nowrap;
  transition: padding-left 0.25s var(--ease), color 0.25s ease;
}

.submenu li a:hover {
  padding-left: 30px;
  color: var(--muted);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 9px 16px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-ui);
}

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--topbar-h) + 140px) 40px 90px;
  max-width: 1100px;
}

.hero-eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 74px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 16ch;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}

/* ---------- Split section (People / Events) ---------- */
.split-section {
  display: flex;
  min-height: 86vh;
  border-top: 1px solid var(--line);
}

.split-names {
  width: 40%;
  padding: 64px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 36px;
}

.name-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: name-counter;
}

.name-list li {
  counter-increment: name-counter;
}

.name-link {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
  position: relative;
  transition: color 0.4s var(--ease), padding-left 0.4s var(--ease), gap 0.4s var(--ease);
}

.name-link::before {
  content: counter(name-counter, decimal-leading-zero);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.name-link:hover,
.name-link.is-active {
  color: var(--fg);
  padding-left: 6px;
}

.name-link:hover::before,
.name-link.is-active::before {
  opacity: 1;
  transform: translateX(0);
}

.split-visual {
  position: relative;
  width: 60%;
  overflow: hidden;
  background: #1c1a17;
}

.visual-image {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
  will-change: transform, opacity;
}

.visual-image.is-active {
  opacity: 1;
}

.visual-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 8s var(--ease);
}

.visual-image.is-active img {
  transform: scale(1.0);
}

.visual-caption {
  position: absolute;
  left: 32px;
  bottom: 28px;
  z-index: 2;
  color: #f6f4f0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  mix-blend-mode: exclusion;
}

.visual-caption.is-active {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Gallery page ---------- */
.gallery-header {
  padding: calc(var(--topbar-h) + 80px) 40px 30px;
  max-width: 900px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
  transition: color 0.25s ease, gap 0.25s ease;
}

.back-link:hover { color: var(--fg); gap: 12px; }

.gallery-header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 58px);
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.gallery-header .bio {
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.65;
  font-size: 15px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 6px;
  gap: 4px;
  padding: 30px 40px 100px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #1c1a17;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.045);
  filter: brightness(0.82);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(246, 244, 240, 0);
  transition: border-color 0.4s ease;
  pointer-events: none;
}

.gallery-item .index {
  position: absolute;
  top: 14px;
  left: 14px;
  color: #f6f4f0;
  font-size: 11px;
  letter-spacing: 0.08em;
  mix-blend-mode: exclusion;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.gallery-item:hover .index {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.gallery-item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 13, 11, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox[hidden] { display: none; }

.lightbox-image {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.lightbox-image.is-shown {
  opacity: 1;
  transform: scale(1);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #f6f4f0;
  font-size: 34px;
  font-family: var(--font-ui);
  cursor: pointer;
  padding: 14px 20px;
  line-height: 1;
  transition: opacity 0.25s ease;
  opacity: 0.65;
}

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

.lightbox-close { top: 20px; right: 20px; font-size: 24px; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Footer / empty state ---------- */
.site-footer {
  padding: 56px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.empty-state {
  padding: calc(var(--topbar-h) + 60px) 40px 80px;
  color: var(--muted);
  max-width: 60ch;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.6;
}

.empty-state code {
  font-family: var(--font-ui);
  font-size: 14px;
  background: var(--line);
  padding: 2px 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .menu { display: none; }
  .menu-toggle { display: inline-block; }
  .split-section { flex-direction: column; min-height: auto; }
  .split-names, .split-visual { width: 100%; }
  .split-names { padding: 48px 24px; }
  .split-visual { height: 62vh; }
  .hero { padding: calc(var(--topbar-h) + 60px) 24px 50px; }
  .gallery-header { padding: calc(var(--topbar-h) + 40px) 24px 20px; }
  .gallery-grid { padding: 20px 24px 70px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .topbar { padding: 0 24px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}
