:root {
  --bg: #0a0a09;
  --surface: #121210;
  --surface-2: #191815;
  --text: #f2efe9;
  --muted: #9a958b;
  --accent: #cdb998;
  --border: rgba(242, 239, 233, 0.11);
  --border-strong: rgba(242, 239, 233, 0.24);
  --header-bg: rgba(10, 10, 9, 0.78);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] {
  --bg: #f6f3ec;
  --surface: #ede9df;
  --surface-2: #e4dfd2;
  --text: #161513;
  --muted: #666158;
  --accent: #7a5c38;
  --border: rgba(22, 21, 19, 0.11);
  --border-strong: rgba(22, 21, 19, 0.25);
  --header-bg: rgba(246, 243, 236, 0.82);
  --shadow: 0 20px 50px rgba(22, 21, 19, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); color: var(--text); }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
.mono { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3.5rem);
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.site-header:not(.scrolled) { color: #f2efe9; }

.brand { display: flex; align-items: baseline; gap: 0.75rem; }
.brand-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.brand-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.68;
}

.site-nav { display: flex; align-items: center; gap: 1.8rem; font-size: 0.85rem; letter-spacing: 0.04em; }
.site-nav a { opacity: 0.82; transition: opacity 0.2s ease; }
.site-nav a:hover { opacity: 1; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.78;
  transition: opacity 0.2s ease;
}
.icon-btn:hover { opacity: 1; }
.theme-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Hero */
.hero {
  position: relative;
  height: 100svh;
  min-height: 580px;
  max-height: 1020px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.25rem, 4vw, 3.5rem);
  background: #0a0a09;
  color: #f2efe9;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.5s ease, transform 7s ease;
}
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 9, 0.55) 0%, rgba(10, 10, 9, 0.12) 40%, rgba(10, 10, 9, 0.84) 100%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 780px; }
.hero-kicker { color: rgba(242, 239, 233, 0.75); margin: 0 0 1rem; }
.hero-title {
  margin: 0 0 1.8rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.6rem, 6.2vw, 5.1rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
}
.hero-title em { font-style: italic; color: #e2d4bc; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.78rem 1.55rem;
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  border-radius: 2px;
  transition: all 0.25s ease;
}
.btn-primary { background: #f2efe9; color: #0a0a09; font-weight: 500; }
.btn-primary:hover { background: #e2d4bc; }
[data-theme="light"] .contact-form .btn-primary { background: #161513; color: #f6f3ec; }
[data-theme="light"] .contact-form .btn-primary:hover { background: #33302b; }

.btn-ghost { border: 1px solid rgba(242, 239, 233, 0.45); color: #f2efe9; }
.btn-ghost:hover { border-color: #f2efe9; background: rgba(242, 239, 233, 0.08); }
.work-section .btn-ghost { border-color: var(--border-strong); color: var(--text); }
.work-section .btn-ghost:hover { background: var(--surface); }

.hero-meta {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3.5rem);
  bottom: clamp(2.5rem, 6vw, 5.5rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: rgba(242, 239, 233, 0.72);
}
.hero-divider { width: 28px; height: 1px; background: rgba(242, 239, 233, 0.4); }

/* Sections */
.section {
  padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1.25rem, 4vw, 3.5rem);
  max-width: 1640px;
  margin: 0 auto;
}

/* Work Toolbar */
.work-toolbar {
  position: sticky;
  top: 64px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  margin-bottom: 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.35s ease;
}

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-btn {
  padding: 0.48rem 0.95rem;
  border-radius: 2px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
}
.filter-btn .count {
  margin-left: 0.45rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  opacity: 0.65;
}

.view-controls { display: flex; gap: 0.35rem; }
.view-btn {
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all 0.2s ease;
}
.view-btn.active, .view-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface); }

/* Gallery Masonry (balanced flex columns — zero Chrome multi-column clipping) */
.gallery.masonry {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.gallery.masonry .masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Film Contact Sheet Mode */
.gallery.sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.4rem 1.1rem;
}
.gallery.sheet .photo-frame {
  aspect-ratio: 3 / 2;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  border: 1px solid var(--border);
}
.gallery.sheet .photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-card {
  position: relative;
  cursor: pointer;
  opacity: 1;
  transition: transform 0.25s ease;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}
.photo-frame img {
  width: 100%;
  height: auto;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}
.photo-card:hover .photo-frame img { transform: scale(1.025); }

.photo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.45rem;
  color: var(--muted);
  opacity: 0.72;
  transition: opacity 0.2s ease;
}
.photo-card:hover .photo-meta { opacity: 1; color: var(--text); }

.load-more-wrap { display: flex; justify-content: center; margin-top: 3rem; }

/* About */
.about-section { border-top: 1px solid var(--border); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.about-frame { background: var(--surface); overflow: hidden; }
.about-frame img { width: 100%; height: auto; }
.caption { margin-top: 0.8rem; color: var(--muted); }
.eyebrow { color: var(--accent); margin: 0 0 1rem; }
.section-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 1.4rem;
}
.about-copy-col .lead { font-size: 1.08rem; color: var(--text); margin: 0 0 1.1rem; }
.about-copy-col p { color: var(--muted); margin: 0 0 1.4rem; }

.services-block { margin-top: 2.2rem; }
.subhead { color: var(--muted); margin: 0 0 0.9rem; }
.services-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.services-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.services-list li .mono { color: var(--muted); }

.about-links { display: flex; gap: 1.8rem; margin-top: 2rem; }
.text-link {
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 0.2rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.text-link:hover { border-color: var(--accent); color: var(--accent); }

/* Contact */
.contact-section { border-top: 1px solid var(--border); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
}
.contact-info p { color: var(--muted); max-width: 44ch; }
.contact-meta {
  margin-top: 2.2rem;
  display: grid;
  gap: 0.9rem;
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
}
.contact-meta div { display: flex; justify-content: space-between; gap: 1rem; }

.contact-form { display: grid; gap: 1.1rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.45rem; }
.field .mono { color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 2px;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-footer { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.form-status { margin: 0; color: var(--accent); }

/* Footer */
.site-footer {
  max-width: 1640px;
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 3.5rem) 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 7, 6, 0.96);
  color: #f2efe9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 3.5rem 2.5rem;
}
.lightbox[hidden] { display: none; }

.lb-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 1.8rem;
  color: rgba(242, 239, 233, 0.8);
}
.lb-left, .lb-right { display: flex; align-items: center; gap: 0.7rem; }
.lb-sep { opacity: 0.4; }
.lb-close {
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(242, 239, 233, 0.25);
  border-radius: 2px;
  margin-left: 0.8rem;
}
.lb-close:hover { background: rgba(242, 239, 233, 0.12); }

.lb-stage {
  max-width: 92vw;
  max-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-stage img {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  box-shadow: var(--shadow);
  transition: opacity 0.2s ease;
}

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 72px;
  font-size: 2.2rem;
  color: rgba(242, 239, 233, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
}
.lb-arrow:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.lb-prev { left: 0.75rem; }
.lb-next { right: 0.75rem; }

@media (max-width: 860px) {
  .about-grid, .contact-grid, .field-row { grid-template-columns: 1fr; }
  .brand-sub, .hero-meta { display: none; }
  .site-nav { gap: 1rem; }
  .lightbox { padding: 4rem 0.75rem 2rem; }
  .lb-arrow { width: 40px; height: 56px; font-size: 1.8rem; }
}
