:root {
  --bg: #0e0c0a;
  --bg-alt: #16130f;
  --ink: #f2ede4;
  --ink-dim: #b8b0a2;
  --accent: #d98c4a;
  --line: rgba(242, 237, 228, 0.12);
  --serif: "Lekton", monospace;
  --sans: "Lekton", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

a { color: inherit; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5vw;
  background: rgba(14, 12, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 6vw;
  }
  .nav-name { font-size: 0.9rem; }
  .nav-links {
    gap: 10px;
    font-size: 0.62rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }
}

.nav-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 3vw, 32px);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a {
  text-decoration: none;
  opacity: 0.85;
}
.nav-links a:hover { opacity: 1; }

/* ---------- Nav dropdown ---------- */
.nav-dropdown {
  position: relative;
}

/* invisible bridge so the mouse never leaves .nav-dropdown while
   crossing the visual gap between the toggle and the menu below */
.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 230px;
  height: 22px;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  opacity: 0.85;
}
.nav-dropdown-toggle:hover { opacity: 1; }

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  margin-top: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
  padding: 10px 0;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  padding: 9px 22px;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.75;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  opacity: 1;
  background: rgba(242, 237, 228, 0.05);
}

@media (max-width: 640px) {
  .nav-dropdown-menu {
    position: static;
    transform: none;
    margin-top: 8px;
    min-width: 0;
    max-height: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    overflow: hidden;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-dropdown.open .nav-dropdown-menu {
    transform: none;
    max-height: 400px;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-dropdown-menu a { padding: 7px 0; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 5vw;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('assets/img/cover/hero-bg.jpg') center/cover no-repeat;
  filter: grayscale(30%) saturate(65%) brightness(0.5) contrast(1.05);
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,12,10,0.55) 0%, rgba(14,12,10,0.8) 60%, var(--bg) 100%);
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5.4vw, 4.2rem);
  line-height: 1.15;
  margin: 0 0 28px;
  max-width: 26ch;
}

.hero p {
  max-width: 92ch;
  color: var(--ink-dim);
  font-size: 1rem;
  margin-bottom: 48px;
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------- Index list ---------- */
.index {
  padding: 6vw 5vw 10vw;
  border-top: 1px solid var(--line);
}

.index-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 4vw, 40px) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  position: relative;
}

.index-row:first-child { border-top: 1px solid var(--line); }

.index-num {
  font-size: 0.8rem;
  color: var(--ink-dim);
  width: 3em;
  flex-shrink: 0;
}

.index-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  flex: 1;
  transition: color 0.25s ease, transform 0.25s ease;
}

.index-row:hover .index-title {
  color: var(--accent);
  transform: translateX(6px);
}

.index-meta {
  text-align: right;
  font-size: 0.8rem;
  color: var(--ink-dim);
  flex-shrink: 0;
  max-width: 26ch;
}

.index-thumb {
  width: 0;
  height: 100px;
  flex-shrink: 0;
  object-fit: cover;
  opacity: 0;
  border-radius: 2px;
  transform: scale(0.92);
  transition: width 0.3s ease, opacity 0.25s ease, transform 0.25s ease, margin 0.3s ease;
}

.index-row:hover .index-thumb {
  width: 160px;
  margin: 0 24px;
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 720px) {
  .index-thumb { display: none; }
  .index-meta { max-width: 16ch; }
}

/* ---------- Project sections ---------- */
.project {
  padding: 9vw 5vw;
  border-top: 1px solid var(--line);
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 4vw;
  flex-wrap: wrap;
}

.project-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  margin: 0;
}

.project-location {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: block;
  margin-top: 10px;
}

.project-tag {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.project-meta {
  max-width: 40ch;
  color: var(--ink-dim);
  font-size: 0.95rem;
}

.project-meta strong {
  color: var(--ink);
  font-weight: 500;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-top: 3vw;
}

.gallery figure {
  margin: 0;
  overflow: hidden;
  background: var(--bg-alt);
  cursor: zoom-in;
  position: relative;
}

.gallery figure::after {
  content: "Click to enlarge";
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(14, 12, 10, 0.55);
  backdrop-filter: blur(4px);
  padding: 6px 11px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 2;
}

.gallery figure:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1), opacity 0.5s ease;
}

.gallery figure:hover img {
  transform: scale(1.045);
}

/* span helpers for varied layout */
.gallery .w6 { grid-column: span 6; aspect-ratio: 4/5; }
.gallery .w4 { grid-column: span 4; aspect-ratio: 3/4; }
.gallery .w8 { grid-column: span 8; aspect-ratio: 16/9; }
.gallery .w12 { grid-column: span 12; aspect-ratio: 21/9; }

@media (max-width: 780px) {
  .gallery .w6, .gallery .w4, .gallery .w8, .gallery .w12 {
    grid-column: span 12;
    aspect-ratio: 4/5;
  }
}

/* uncropped: preserves each photo's native aspect ratio instead of forcing a fixed box */
.gallery figure.natural {
  aspect-ratio: auto;
  display: flex;
}
.gallery figure.natural img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
@media (max-width: 780px) {
  .gallery figure.natural { grid-column: span 12; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 7, 6, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 4vw;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 5vw;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ink);
  font-size: 2rem;
  cursor: pointer;
  padding: 12px 18px;
  opacity: 0.7;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 2vw; }
.lightbox-next { right: 2vw; }

/* ---------- Footer ---------- */
.footer {
  padding: 8vw 5vw 6vw;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.footer h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0;
  max-width: 14ch;
}

.footer-meta {
  font-size: 0.85rem;
  color: var(--ink-dim);
  text-align: right;
}

.footer-meta a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Wheatpaste sub-projects ---------- */
.subproject {
  margin-bottom: 6vw;
  padding-bottom: 6vw;
  border-bottom: 1px solid var(--line);
}
.subproject:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.subproject-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  margin: 0 0 12px;
}

.subproject-copy {
  max-width: 60ch;
  color: var(--ink-dim);
  font-size: 0.95rem;
  margin: 0 0 16px;
}

.subproject-link {
  display: inline-block;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 22px;
}
.subproject-link:hover { text-decoration: underline; }

.subproject .gallery { margin-top: 0; }

/* ---------- Video embed ---------- */
.project-video {
  width: 100%;
  max-width: 720px;
  display: block;
  margin-top: 3vw;
  background: var(--bg-alt);
}

/* ---------- Simple sub-pages (Artist / Contact) ---------- */
.page {
  padding: 14vw 5vw 9vw;
  max-width: 1100px;
  margin: 0 auto;
}

.page-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  margin: 0 0 6vw;
}

.artist-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 6vw;
  align-items: start;
}

@media (max-width: 780px) {
  .artist-layout { grid-template-columns: 1fr; }
}

.artist-portrait {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--bg-alt);
}

.artist-copy p {
  color: var(--ink-dim);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 56ch;
}

.artist-links {
  display: flex;
  gap: 20px;
  margin-top: 24px;
}
.artist-links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 6vw;
}

@media (max-width: 780px) {
  .contact-layout { grid-template-columns: 1fr; gap: 10vw; }
}

.contact-details a {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-details .contact-label {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 22px 0 4px;
}
.contact-details .contact-label:first-child { margin-top: 0; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.contact-form input,
.contact-form textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 10px 2px;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.contact-form button {
  align-self: flex-start;
  margin-top: 10px;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.contact-form button:hover {
  background: var(--ink);
  color: var(--bg);
}
.contact-form button:disabled {
  opacity: 0.5;
  cursor: default;
}

.form-status {
  font-size: 0.82rem;
  color: var(--ink-dim);
  min-height: 1.2em;
}
.form-status.success { color: var(--accent); }
.form-status.error { color: #d9634a; }

/* fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
