:root {
  --bg: #f7f6f2;
  --panel: #efede7;
  --line: #d6d1c6;
  --text: #141414;
  --muted: #55524b;
  --accent: #101010;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: radial-gradient(circle at top left, #fbfaf6 0%, #f5f3ed 48%, #f2f0e8 100%);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.01em;
}

button,
input {
  font: inherit;
}

.landing {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #f8f7f2;
}

.enter-site {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: clamp(2.4rem, 8vw, 6.2rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}

.enter-site:hover {
  opacity: 0.6;
  transform: translateY(-2px);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.topnav button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.42rem 0.86rem;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.topnav button:hover,
.topnav button.is-active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.02);
}

.view {
  max-width: 1500px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page-header {
  margin-bottom: 1.3rem;
}

.page-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-title {
  margin: 0.35rem 0 0;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.1;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
}

.page-subtitle {
  margin: 0.65rem 0 0;
  max-width: 70ch;
  color: var(--muted);
}

.carousel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.carousel-shell {
  position: relative;
  aspect-ratio: 16 / 10;
}

.carousel-trigger {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: #dfd9cc;
}

.carousel-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  color: #f4f4f4;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.58));
}

.carousel-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 500;
}

.carousel-label {
  margin: 0.22rem 0 0;
  font-size: 0.86rem;
  opacity: 0.9;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
}

.carousel-control.prev {
  left: 0.6rem;
}

.carousel-control.next {
  right: 0.6rem;
}

.archive-panel {
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: #f7f6f1;
  padding: 1rem;
}

.archive-panel p {
  margin: 0;
}

.archive-form {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-form input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fcfbf8;
  color: var(--text);
  padding: 0.62rem 0.7rem;
}

.archive-form button,
.archive-status button {
  border: 1px solid var(--text);
  background: var(--text);
  color: #f7f7f7;
  padding: 0.62rem 0.95rem;
  cursor: pointer;
}

.archive-form button:hover,
.archive-status button:hover {
  opacity: 0.85;
}

.archive-error {
  color: #8e1f1f;
  font-size: 0.9rem;
  min-height: 1.2rem;
}

.archive-status {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  color: var(--muted);
}

.grid-block {
  margin-top: 1.2rem;
}

.grid-header {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.grid-header h2 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(1.28rem, 3vw, 2rem);
}

.grid-count {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.work-card {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: zoom-in;
}

.work-thumb {
  position: relative;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #e2ddd2;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease, filter 300ms ease;
}

.work-card:hover .work-thumb img {
  transform: scale(1.03);
  filter: contrast(1.05);
}

.work-label {
  margin-top: 0.45rem;
  font-size: 0.84rem;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.empty-state {
  border: 1px dashed var(--line);
  background: #f8f6f0;
  padding: 1.1rem;
  color: var(--muted);
}

.about-wrap {
  max-width: 760px;
}

.about-copy {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.6;
}

.about-links {
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.about-links a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(2rem, 5vw) 1fr minmax(2rem, 5vw);
  gap: 1rem;
  background: rgba(10, 10, 10, 0.94);
  color: #f4f4f4;
  padding: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #f4f4f4;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #f4f4f4;
  width: 100%;
  height: 3rem;
  cursor: pointer;
}

.lightbox-figure {
  margin: 0;
  max-width: min(88vw, 1320px);
  margin-inline: auto;
}

.lightbox-figure img {
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  display: block;
  background: rgba(255, 255, 255, 0.06);
}

.lightbox-caption {
  margin-top: 0.85rem;
}

#lightbox-title {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.5rem;
}

#lightbox-meta,
#lightbox-description {
  margin: 0.35rem 0 0;
  color: #d8d8d8;
}

@media (max-width: 1200px) {
  .work-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .archive-form {
    grid-template-columns: 1fr;
  }

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

  .lightbox {
    grid-template-columns: 1fr;
  }

  .lightbox-nav {
    height: 2.8rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: auto;
    justify-self: center;
    padding-inline: 1.2rem;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0.85rem 0.8rem;
  }

  .view {
    padding: 1.35rem 0.8rem 2.2rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }
}
