/* ---------- Reset & base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #1a1613;
  --bg-alt: #231e19;
  --text: #f2ede4;
  --text-muted: #a89f8f;
  --border: #352e27;
  --accent: #c17a4a;
  --font-heading: "Fraunces", Georgia, serif;
  --sidebar-width: 260px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2rem;
  overflow-y: auto;
  z-index: 200;
}

.logo-mark {
  fill: currentColor;
  display: block;
}

.sidebar-logo {
  color: var(--text);
  margin-bottom: 3rem;
  display: block;
  transition: color 0.2s ease;
}

.sidebar-logo:hover {
  color: var(--accent);
}

.sidebar-logo .logo-mark {
  width: 150px;
  height: auto;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-group-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.nav-group-label:first-child {
  margin-top: 0;
}

.sidebar-nav a {
  padding: 0.5rem 0;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.sidebar-nav a.sub-link {
  padding-left: 0.75rem;
  font-size: 0.9rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.current {
  color: var(--accent);
}

.sidebar-footer {
  margin-top: 2rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-social {
  display: flex;
  gap: 1rem;
}

.sidebar-social a {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.sidebar-social a:hover {
  color: var(--accent);
}

.sidebar-copyright {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.mobile-topbar {
  display: none;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-logo {
  color: var(--text);
  display: flex;
  align-items: center;
}

.mobile-logo .logo-mark {
  width: 76px;
  height: auto;
}

/* ---------- Page content ---------- */
.page-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.home-content {
  justify-content: center;
}

/* ---------- Homepage slider ---------- */
.hero-slider {
  position: relative;
  height: 72vh;
  margin: 0 4rem;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  opacity: 0;
  cursor: pointer;
  transition: opacity 1.2s ease;
}

.slide.active {
  opacity: 1;
}

@media (min-width: 781px) {
  .slide.portrait-photo {
    background-size: contain;
    background-repeat: no-repeat;
  }
}

.slide-dots {
  position: absolute;
  right: 3rem;
  bottom: 3rem;
  z-index: 2;
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
}

.slide-dot.active {
  background: var(--accent);
}

/* ---------- Gallery pages ---------- */
.gallery-page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 0;
}

.gallery-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}

.gallery {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.gallery-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-alt);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* ---------- About page ---------- */
.about-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 6rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.about-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 46ch;
}

/* ---------- Contact page ---------- */
.contact-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}

.contact-section p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-email {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  border-bottom: 1px solid var(--text-muted);
  padding-bottom: 2px;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.social-links a {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--accent);
}

/* ---------- Footer ---------- */
.page-footer {
  position: fixed;
  left: var(--sidebar-width);
  right: 0;
  bottom: 0;
  z-index: 150;
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 0.85rem 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 88vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
  padding: 0.75rem;
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-section {
    grid-template-columns: 1fr;
  }

  .about-image {
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 780px) {
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 210;
    background: var(--bg);
  }

  .nav-toggle {
    display: flex;
  }

  .sidebar {
    position: static;
    width: 100%;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
  }

  .sidebar.open {
    max-height: 500px;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .sidebar-logo {
    display: none;
  }

  .page-content {
    margin-left: 0;
  }

  .page-footer {
    left: 0;
  }

  .hero-slider {
    margin: 0 1.5rem;
  }

  .slide.landscape-photo {
    background-size: contain;
    background-repeat: no-repeat;
  }

  .slide-dots {
    right: 1.5rem;
    bottom: 2rem;
  }
}

@media (max-width: 640px) {
  .gallery,
  .gallery-column {
    gap: 0.5rem;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 1.25rem;
  }

  .gallery-page-header,
  .intro-section {
    padding-top: 5rem;
  }
}
