/* ---------- Tokens ---------- */
:root {
  --bg: #0f0f0e;
  --bg-alt: #151513;
  --ink: #ece7de;
  --muted: #8f8a7d;
  --accent: #b98a52;
  --line: #2b2a27;
  --serif: 'Fraunces', serif;
  --sans: 'Work Sans', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 5vw;
  transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(15, 15, 14, 0.92);
  backdrop-filter: blur(6px);
  padding: 16px 5vw;
  border-bottom-color: var(--line);
}

.nav-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 1px;
  background: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
}

.hero-text {
  position: absolute;
  left: 5vw;
  bottom: 4rem;
  max-width: 620px;
}

.hero-text h1 {
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  color: var(--ink);
}

.hero-tagline {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34ch;
}

.scroll-cue {
  position: absolute;
  right: 5vw;
  bottom: 3rem;
  color: var(--muted);
  font-size: 1.4rem;
  animation: float 2.4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---------- Work / Gallery ---------- */
.work {
  padding: 7rem 5vw 5rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.filters {
  display: flex;
  gap: 1.75rem;
}

.filter-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--ink);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.gallery-item {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-alt);
}

.gallery-item.hidden {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--ink);
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover figcaption {
  opacity: 1;
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  padding: 6rem 5vw;
  border-top: 1px solid var(--line);
  align-items: center;
}

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

.about-text h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--muted);
  max-width: 52ch;
}

.text-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.text-link:hover {
  border-color: var(--accent);
}

/* ---------- Contact ---------- */
.contact {
  padding: 6rem 5vw 7rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.contact h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
}

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

.contact-email {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  display: inline-block;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.social-links {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 5vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 9, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 5vw;
}

.lightbox.open {
  display: flex;
}

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

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 5vw;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 70vw;
    max-width: 280px;
    background: var(--bg-alt);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 2.5rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    border-left: 1px solid var(--line);
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
