/* =========================
   Gallery Index — Portfolio UI
   ========================= */

:root {
  --ink: #111111;
  --muted: #6f6a62;
  --paper: #f4efe7;
  --card: #fffaf2;
  --line: rgba(17, 17, 17, 0.12);
  --dark: #0d0d0d;
  --cream: #fff7ea;
  --accent: #b9824b;
  --accent-dark: #6b4423;
  --shadow: 0 30px 80px rgba(18, 18, 18, 0.16);
  --radius: 26px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(185, 130, 75, 0.15), transparent 30rem),
    linear-gradient(180deg, #f9f3ea 0%, var(--paper) 44%, #ebe3d7 100%);
  line-height: 1.55;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* ===== Shared ===== */

.nav,
.hero,
.metrics,
.section,
.footer,
.project-intro {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}

.kicker {
  margin: 0;
  color: rgba(255,255,255,0.64);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 900;
}

.kicker.dark,
.kicker.dark-on-light {
  color: var(--accent-dark);
}

h1,
h2,
h3 {
  letter-spacing: -0.055em;
}

h1,
h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}

.btn,
.reset-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover,
.reset-button:hover {
  transform: translateY(-2px);
}

.btn-light {
  background: var(--cream);
  color: var(--ink);
}

.btn-outline {
  border-color: rgba(255,255,255,0.24);
  color: #fff;
  background: rgba(255,255,255,0.07);
}

.btn-dark,
.reset-button {
  background: var(--dark);
  color: var(--cream);
}

/* ===== Header ===== */

.site-header {
  min-height: 900px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(13,13,13,0.92), rgba(13,13,13,0.58)),
    radial-gradient(circle at 75% 20%, rgba(185,130,75,0.45), transparent 28rem),
    #111;
  overflow: hidden;
  position: relative;
}

.site-header::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -170px;
  height: 300px;
  background: var(--paper);
  border-radius: 50% 50% 0 0;
}

.nav {
  position: relative;
  z-index: 5;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: 21px;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow:
    0 0 0 8px rgba(185,130,75,0.18),
    0 0 0 16px rgba(185,130,75,0.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgba(255,255,255,0.70);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 900;
}

.nav-links a:hover {
  color: #fff;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 999px;
  padding: 9px 14px;
}

/* ===== Home hero ===== */

.hero {
  position: relative;
  z-index: 2;
  min-height: 760px;
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 60px;
  align-items: center;
  padding: 44px 0 160px;
}

.hero h1 {
  font-size: clamp(58px, 8vw, 118px);
  line-height: 0.82;
  margin: 18px 0 30px;
  max-width: 820px;
}

.hero-text {
  max-width: 610px;
  color: rgba(255,255,255,0.70);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 120px;
  gap: 14px;
  transform: rotate(-1.2deg);
}

.hero-tile {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #222;
  box-shadow: 0 25px 90px rgba(0,0,0,0.36);
}

.hero-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
  transform: scale(1.02);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.hero-tile:hover img {
  transform: scale(1.08);
  opacity: 1;
}

.hero-tile span {
  position: absolute;
  left: 16px;
  bottom: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(13,13,13,0.58);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tile-1 {
  grid-column: 1 / span 3;
  grid-row: 1 / span 3;
}

.tile-2 {
  grid-column: 4 / span 3;
  grid-row: 1 / span 2;
}

.tile-3 {
  grid-column: 4 / span 2;
  grid-row: 3 / span 2;
}

.tile-4 {
  grid-column: 6 / span 1;
  grid-row: 3 / span 2;
}

.tile-5 {
  grid-column: 1 / span 2;
  grid-row: 4 / span 2;
}

.tile-6 {
  grid-column: 3 / span 4;
  grid-row: 5 / span 2;
}

/* ===== Metrics ===== */

.metrics {
  position: relative;
  z-index: 4;
  margin-top: -105px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255,250,242,0.82);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.metrics div {
  padding: 28px;
  border-right: 1px solid var(--line);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong {
  display: block;
  font-size: 42px;
  letter-spacing: -0.08em;
  line-height: 1;
}

.metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ===== Sections ===== */

.section {
  padding: 74px 0;
}

.intro-section,
.project-statement {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 72px;
  align-items: start;
}

.intro-section h2,
.section-header h2,
.project-statement h2 {
  font-size: clamp(44px, 6vw, 78px);
  line-height: 0.9;
  margin: 12px 0 0;
}

.intro-section > p,
.section-header > p,
.section-header.split > p,
.project-statement p {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}

.section-header {
  margin-bottom: 28px;
}

.section-header.split {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
}

.section-header.split > p {
  max-width: 420px;
}

/* ===== Featured ===== */

.featured-layout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 245px;
  gap: 16px;
}

.feature-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #151515;
  box-shadow: 0 18px 50px rgba(18,18,18,0.12);
}

.feature-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.feature-panel:hover img {
  transform: scale(1.05);
  opacity: 0.95;
}

.feature-panel div {
  position: absolute;
  inset: auto 22px 22px 22px;
  color: #fff;
}

.feature-panel span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 900;
  color: rgba(255,255,255,0.68);
}

.feature-panel h3 {
  font-size: 34px;
  line-height: 0.94;
  margin: 8px 0;
}

.feature-panel p {
  margin: 0;
  color: rgba(255,255,255,0.72);
  font-weight: 700;
}

.panel-1 {
  grid-column: span 2;
  grid-row: span 2;
}

.panel-2 {
  grid-column: span 2;
}

.panel-3,
.panel-4,
.panel-5 {
  grid-column: span 1;
}

/* ===== Filters ===== */

.filters {
  display: grid;
  grid-template-columns: 1.7fr repeat(4, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  background: rgba(255,250,242,0.78);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.field label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fffdf8;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: 3px solid rgba(185,130,75,0.20);
  border-color: var(--accent);
}

/* ===== Work cards ===== */

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

.work-card {
  background: rgba(255,250,242,0.82);
  border: 1px solid rgba(255,255,255,0.68);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(18,18,18,0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 80px rgba(18,18,18,0.17);
}

.work-image {
  height: 330px;
  display: block;
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.work-card:hover .work-image img {
  transform: scale(1.045);
}

.badge {
  position: absolute;
  left: 16px;
  top: 16px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.work-body {
  padding: 22px;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.work-body h3 {
  font-size: 34px;
  line-height: 0.95;
  margin: 0 0 12px;
}

.artist {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-weight: 800;
}

.summary {
  margin: 0 0 18px;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17,17,17,0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-weight: 900;
}

.project-link small {
  color: var(--muted);
}

.no-results {
  display: none;
  margin-top: 24px;
  padding: 34px;
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
  box-shadow: var(--shadow);
}

.no-results h3 {
  margin: 0 0 8px;
  font-size: 34px;
}

/* ===== Project page ===== */

.project-page {
  background: #f9f3ea;
}

.project-header {
  background: var(--cream);
  min-height: 100vh;
}

.project-header .nav {
  color: var(--ink);
}

.project-header .nav-links {
  color: var(--muted);
}

.project-header .nav-links a:hover {
  color: var(--ink);
}

.project-intro {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 54px;
  align-items: center;
  padding: 42px 0 86px;
}

.return-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--muted);
  font-weight: 900;
}

.project-copy h1 {
  font-size: clamp(64px, 9vw, 132px);
  line-height: 0.82;
  margin: 18px 0 28px;
}

.project-copy > p {
  color: var(--muted);
  font-size: 19px;
  max-width: 680px;
}

.project-cover {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111;
}

.project-cover img {
  width: 100%;
  height: min(72vh, 680px);
  object-fit: cover;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 34px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}

.project-facts div {
  padding: 18px;
  background: #fffdf8;
}

.project-facts dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
}

.project-facts dd {
  margin: 5px 0 0;
  font-weight: 900;
}

.project-statement {
  border-bottom: 1px solid var(--line);
}

.statement-tags {
  margin-top: 24px;
}

.photo-masonry {
  columns: 3 300px;
  column-gap: 18px;
}

.photo-item {
  width: 100%;
  padding: 0;
  border: 0;
  margin: 0 0 18px;
  background: transparent;
  break-inside: avoid;
  cursor: zoom-in;
}

.photo-item img {
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 16px 45px rgba(18,18,18,0.13);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-item:hover img {
  transform: translateY(-4px);
  box-shadow: 0 24px 65px rgba(18,18,18,0.18);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8,8,8,0.92);
  padding: 30px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(1180px, 92vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
}

.lightbox-close {
  position: absolute;
  right: 24px;
  top: 24px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.not-found-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.not-found {
  width: min(600px, calc(100% - 40px));
  padding: 48px;
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.not-found h1 {
  font-size: 70px;
  margin: 10px 0;
}

/* ===== Footer ===== */

.footer {
  padding: 45px 0 60px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.footer p {
  margin: 6px 0 0;
}

.footer a {
  font-weight: 900;
  color: var(--accent-dark);
}

/* ===== Responsive ===== */

@media (max-width: 1080px) {
  .site-header {
    min-height: auto;
  }

  .hero,
  .project-intro,
  .intro-section,
  .project-statement {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-bottom: 170px;
  }

  .hero-grid {
    grid-auto-rows: 95px;
  }

  .metrics,
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-layout {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel-1,
  .panel-2,
  .panel-3,
  .panel-4,
  .panel-5 {
    grid-column: span 1;
    grid-row: span 1;
  }

  .project-cover img {
    height: 520px;
  }
}

@media (max-width: 720px) {
  .nav,
  .hero,
  .metrics,
  .section,
  .footer,
  .project-intro {
    width: min(100% - 28px, 1240px);
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero h1,
  .project-copy h1 {
    font-size: 62px;
  }

  .hero-grid {
    display: none;
  }

  .hero {
    min-height: 650px;
    padding-bottom: 140px;
  }

  .metrics,
  .work-grid,
  .filters,
  .featured-layout,
  .project-facts {
    grid-template-columns: 1fr;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics div:last-child {
    border-bottom: 0;
  }

  .section-header.split,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .work-image {
    height: 270px;
  }

  .project-cover img {
    height: 360px;
  }
}
@media (max-width: 720px) {
  .nav {
    position: relative;
  }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 18px;
    border-radius: 22px;
    background: rgba(13, 13, 13, 0.94);
    color: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  }

  .project-header .nav-links.open {
    background: #111;
    color: #fff;
  }

  .nav-links.open a {
    width: 100%;
    padding: 12px 0;
  }
}