:root {
  --bg: #f3f0ea;
  --surface: #e8e1d7;
  --ink: #1d1b1a;
  --ink-soft: #4f4942;
  --line: #d6cec2;
  --charcoal: #171514;
  --card-shadow: 0 26px 40px rgba(18, 16, 14, 0.12);
  --radius: 1.1rem;
  --container: min(1400px, 93vw);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: absolute;
  left: -100vw;
  top: 0.5rem;
  z-index: 100;
  background: var(--charcoal);
  color: #f6f2ec;
  padding: 0.65rem 1rem;
  border-radius: 0.6rem;
}

.skip-link:focus { left: 0.7rem; }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: var(--container);
  margin: 0.9rem auto 0;
  padding: 0.75rem 1rem;
  backdrop-filter: blur(8px);
  background: rgba(243, 240, 234, 0.72);
  border: 1px solid rgba(214, 206, 194, 0.8);
  border-radius: 999px;
}

.brand {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.08em;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  margin: 0;
  text-transform: uppercase;
}

.topbar nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.87rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.topbar a {
  color: var(--ink);
  text-decoration: none;
}

.topbar a:hover { color: var(--ink-soft); }
.topbar a[aria-current="page"] { color: #11100f; text-decoration: underline; text-underline-offset: 0.3rem; }
.brand-link { text-decoration: none; color: inherit; }

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: end start;
  overflow: hidden;
  background: #181614;
  color: #efe7dd;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.08);
  transition: transform 700ms ease-out;
  will-change: transform;
  filter: saturate(0.84) contrast(1.03);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 15, 14, 0.72), rgba(17, 15, 14, 0.25) 45%, rgba(17, 15, 14, 0.15));
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: var(--container);
  margin: 0 auto 8.5vh;
  max-width: 62rem;
}

.hero__eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.74rem;
  opacity: 0.84;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", serif;
  line-height: 1.06;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 6rem);
  max-width: 14ch;
  margin-bottom: 1rem;
}

.hero__lede {
  margin: 0;
  max-width: 47ch;
  color: rgba(246, 238, 227, 0.9);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

main { padding-bottom: 6rem; }

section {
  width: var(--container);
  margin: 0 auto;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin: 5.4rem auto 2.3rem;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 42ch;
}

.featured {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: clamp(1.2rem, 2vw, 2.2rem);
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #dfd8cc;
  box-shadow: var(--card-shadow);
  min-height: 17rem;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.2, 0.85, 0.22, 1);
}

.card:hover img { transform: scale(1.035); }

.card__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.15rem;
  background: linear-gradient(to top, rgba(14, 13, 11, 0.8), rgba(14, 13, 11, 0.07));
  color: #f5eee5;
}

.card__meta p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

.featured__list {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.featured__mini {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #f7f3ec;
  overflow: hidden;
  min-height: 7.6rem;
}

.featured__mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured__mini .text {
  padding: 0.8rem 0.9rem;
}

.featured__mini h3 {
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}

.featured__mini p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.gallery {
  columns: 3 18rem;
  column-gap: 1.4rem;
  margin-top: 2.1rem;
}

.tile {
  position: relative;
  break-inside: avoid;
  border-radius: 0.95rem;
  overflow: hidden;
  margin: 0 0 1.4rem;
  border: 1px solid var(--line);
  cursor: pointer;
  background: #d8d0c3;
  transform: translateZ(0);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(28, 24, 20, 0.16);
}

.tile img {
  width: 100%;
  min-height: 14rem;
  object-fit: cover;
  transition: transform 700ms ease;
}

.tile:hover img { transform: scale(1.04); }

.tile__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.95rem 1rem;
  color: #f8f2e8;
  background: linear-gradient(to top, rgba(15, 13, 12, 0.76), rgba(15, 13, 12, 0.12));
  opacity: 0.12;
  transition: opacity 350ms ease;
  font-size: 0.86rem;
}

.tile:hover .tile__overlay,
.tile:focus-within .tile__overlay { opacity: 1; }

.philosophy {
  margin-top: 5.5rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.philosophy p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 47ch;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  z-index: 60;
  background: rgba(12, 11, 10, 0.8);
  backdrop-filter: blur(8px);
}

.modal.is-open { display: flex; }

.modal__panel {
  width: min(1100px, 95vw);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid #615748;
  border-radius: 1rem;
  background: #12100f;
  color: #ede4d6;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.4);
}

.modal__figure {
  margin: 0;
  position: relative;
}

.modal__figure img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: #0d0c0b;
}

.modal__meta {
  padding: 1.2rem 1.3rem 1.45rem;
  border-top: 1px solid rgba(237, 228, 214, 0.18);
}

.modal__meta h3 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.35rem;
}

.modal__meta p { margin: 0.15rem 0; color: #cabfae; }

.modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  border: 1px solid rgba(237, 228, 214, 0.35);
  background: rgba(12, 11, 10, 0.72);
  color: #f4ebdd;
  border-radius: 999px;
  width: 2.1rem;
  height: 2.1rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.status {
  width: var(--container);
  margin: 1.5rem auto 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-height: 1.5rem;
}

.loading {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.loading::before {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #9f947f;
  animation: pulse 1.25s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.45; }
  50% { transform: scale(1.1); opacity: 1; }
}

@media (max-width: 1000px) {
  .featured,
  .philosophy { grid-template-columns: 1fr; }

  .topbar nav { display: none; }
}

@media (max-width: 640px) {
  .section-head { display: block; }
  .section-head p { margin-top: 0.8rem; }
  .gallery { columns: 2 9rem; }
  .hero__content { margin-bottom: 7.5vh; }
}

.section-link {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.section-link a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.12rem;
}

.section-link a:hover { color: var(--ink-soft); border-color: var(--ink-soft); }

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #f7f3ec;
  padding: 1rem 1.05rem;
  box-shadow: 0 14px 26px rgba(25, 21, 17, 0.07);
}

.content-card h3 {
  font-size: 1.45rem;
  margin-bottom: 0.45rem;
}

.content-card p { margin: 0; color: var(--ink-soft); }

.content-card ul {
  margin: 0.9rem 0 0;
  padding-left: 1rem;
  color: var(--ink-soft);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.timeline-grid article {
  border-left: 2px solid var(--line);
  padding: 0.3rem 0 0.3rem 0.9rem;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.timeline-grid h3 {
  margin: 0.2rem 0 0.25rem;
  font-size: 1.4rem;
}

.timeline-grid p {
  margin: 0;
  color: var(--ink-soft);
}

.essay {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0.95rem;
  padding: 1.4rem;
  box-shadow: 0 14px 28px rgba(24, 20, 16, 0.06);
}

.essay p {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  max-width: 72ch;
}

.essay p:last-child { margin-bottom: 0; }

.site-footer {
  width: var(--container);
  margin: 0 auto 2rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.site-footer p { margin: 0; }

.curatorial-note {
  margin-top: 1.3rem;
  border-left: 2px solid #b9ad9c;
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--ink-soft);
  max-width: 70ch;
}

@media (max-width: 1000px) {
  .content-grid,
  .timeline-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-footer {
    display: block;
  }

  .site-footer p:first-child {
    margin-bottom: 0.4rem;
  }
}
