:root {
  --bg: #0c0d0f;
  --bg-elevated: #14161a;
  --surface: #1a1d23;
  --text: #e8eaef;
  --text-muted: #9aa3b2;
  --accent: #c9a962;
  --accent-soft: rgba(201, 169, 98, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Author `display` on overlays must not beat the HTML `hidden` attribute */
[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: min(1120px, calc(100% - 3rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 15, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
  width: min(1120px, calc(100% - 3rem));
  margin-inline: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.logo__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.nav__list {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.nav__list a:hover {
  color: var(--text);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.mobile-nav {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem 1.25rem;
  background: var(--bg-elevated);
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav a {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}

.btn--primary:hover {
  filter: brightness(1.05);
  color: var(--bg);
}

.btn--outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--block {
  width: 100%;
}

.btn--small {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-btn:hover {
  background: var(--bg-elevated);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 900px);
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.hero__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  /* Visible when JS has not run yet (e.g. file://) — matches default in data/site.json */
  background-image: url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=2400&q=80");
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg) 0%,
    rgba(12, 13, 15, 0.75) 35%,
    rgba(12, 13, 15, 0.35) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.15;
  max-width: 14ch;
}

.hero__sub {
  margin: 0 0 1.75rem;
  max-width: 36ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
.section {
  padding: clamp(3.5rem, 10vw, 6rem) 0;
}

.section__head {
  margin-bottom: 2.5rem;
}

.section__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
}

.section__lede {
  margin: 0;
  color: var(--text-muted);
  max-width: 42ch;
}

.section--galleries {
  background: var(--bg);
}

.section--about {
  background: var(--bg);
}

.section--contact {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  text-align: center;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.gallery-card {
  position: relative;
  border: none;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  background: var(--surface);
  color: inherit;
  font: inherit;
  aspect-ratio: 4 / 5;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.gallery-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.gallery-card:hover .gallery-card__img {
  transform: scale(1.04);
}

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 13, 15, 0.92) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem 1.35rem;
}

.gallery-card__place {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.gallery-card__title {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.gallery-card__year {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 800px) {
  .about {
    grid-template-columns: 1fr;
  }
}

.about__figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.about__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Contact */
.contact__location {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
}

.contact__email {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.contact__social {
  display: inline-block;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.92);
  display: grid;
  place-items: center;
  padding: 3rem 4rem;
}

.lightbox__figure {
  margin: 0;
  max-width: min(1200px, 100%);
  max-height: 100%;
}

.lightbox__figure img {
  max-height: min(78vh, 900px);
  width: auto;
  margin-inline: auto;
  border-radius: var(--radius);
}

.lightbox figcaption {
  margin-top: 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
  left: 1rem;
}

.lightbox__nav--next {
  right: 1rem;
}

@media (max-width: 640px) {
  .lightbox {
    padding: 2.5rem 1rem;
  }

  .lightbox__nav--prev {
    left: 0.35rem;
  }

  .lightbox__nav--next {
    right: 0.35rem;
  }
}

/* Gallery modal */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.gallery-modal__content {
  position: relative;
  width: 100%;
  max-height: min(92vh, 960px);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: sheetUp 0.4s var(--ease);
}

@keyframes sheetUp {
  from {
    transform: translateY(100%);
    opacity: 0.8;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.gallery-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.gallery-modal__head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.gallery-modal__meta {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.gallery-modal__blurb {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 50ch;
}

.gallery-modal__strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
  padding: 1rem 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.gallery-thumb {
  position: relative;
  border: none;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: #000;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}

.gallery-thumb:hover img {
  transform: scale(1.05);
}

.gallery-thumb__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.4rem 0.5rem;
  font-size: 0.7rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: var(--text);
  text-align: left;
}

/* Opening index.html as file:// — explain why JSON does not load */
.file-protocol-banner {
  position: relative;
  z-index: 100;
  padding: 0.85rem 1.25rem;
  background: #3d2f1f;
  border-bottom: 1px solid var(--accent);
  color: #f5efe6;
  font-size: 0.875rem;
  line-height: 1.5;
}

.file-protocol-banner code {
  font-size: 0.8em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
}

.boot-fail {
  max-width: 52ch;
}

.boot-fail code {
  font-size: 0.85em;
}
