/* ── Reset & Tokens (shared with camillalombardi.com) ─────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d0d0d;
  --surface:  #141414;
  --surface2: #1c1c1c;
  --gold:     #c9a96e;
  --gold-lt:  #e2c99a;
  --white:    #f5f3ef;
  --muted:    #7a7672;
  --line:     rgba(201,169,110,.15);
  --radius:   4px;
  --ease:     cubic-bezier(.22,.68,0,1.2);
  --font:     'Georgia', 'Times New Roman', serif;
  --sans:     'Helvetica Neue', Arial, sans-serif;
  --nav-h:    64px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  line-height: 1.7;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.container { width: min(1100px, 92vw); margin-inline: auto; }

.section-label {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: .01em;
}

/* ── Fade-in ─────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ── Navbar ─────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background .4s, backdrop-filter .4s;
}
#navbar.scrolled {
  background: rgba(13,13,13,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(1200px, 94vw);
  margin-inline: auto;
}
.nav-logo {
  font-family: var(--sans);
  font-size: .85rem;
  letter-spacing: .18em;
  color: var(--gold);
  font-weight: 600;
}
.nav-links { display: flex; gap: 2.4rem; list-style: none; }
.nav-links a {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .75;
  transition: opacity .25s, color .25s;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--gold); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(13,13,13,.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--sans);
  font-size: 1.1rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-close {
  position: absolute;
  top: 1.2rem; right: 1.4rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ── Hero (shorter than the main site) ──────────────────────── */
#hero {
  position: relative;
  min-height: min(52svh, 520px);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-h) + 3rem) 0 3.5rem;
  background: linear-gradient(160deg, #0d0d0d 40%, #1a1208 100%);
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 75% 20%, rgba(201,169,110,.09) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 15% 90%, rgba(201,169,110,.05) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  width: min(1100px, 92vw);
  margin-inline: auto;
}
.hero-eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
#hero h1 {
  font-size: clamp(3.5rem, 11vw, 8rem);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 1rem;
}
.hero-sub {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .16em;
  color: var(--muted);
}

/* ── Works ──────────────────────────────────────────────────── */
#works { padding: 4rem 0 7rem; }

/* Featured */
#featured:empty { display: none; }
#featured { margin-bottom: 5rem; }
.feature {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface2);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .3s;
}
.feature:hover { border-color: rgba(201,169,110,.45); }
.feature .card-cover { position: relative; aspect-ratio: auto; min-height: 340px; border-bottom: none; border-right: 1px solid var(--line); }
.feature .card-cover img { position: absolute; inset: 0; }
.feature-body {
  padding: 2.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-body h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 400; line-height: 1.2; margin-bottom: 1rem; }
.feature-body p { color: rgba(245,243,239,.72); margin-bottom: 1.6rem; }
.read-more {
  align-self: flex-start;
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(201,169,110,.4);
  padding-bottom: .2rem;
}

/* Feed header + filters */
.feed-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .4rem 1rem;
  border: 1px solid rgba(201,169,110,.3);
  border-radius: var(--radius);
  background: none;
  color: var(--gold-lt);
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--gold); }
.chip[aria-selected="true"] { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.chip small { opacity: .6; margin-left: .35rem; }

/* Cards */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(201,169,110,.12);
  border-radius: var(--radius);
  background: var(--surface2);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: border-color .3s, transform .3s;
}
.card:hover, .card:focus-visible { border-color: rgba(201,169,110,.45); transform: translateY(-4px); outline: none; }
.card-cover {
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  filter: saturate(.85);
  transition: transform .6s ease, filter .4s;
}
.card:hover .card-cover img, .feature:hover .card-cover img { transform: scale(1.04); filter: saturate(1); }
.card-cover.placeholder {
  display: grid;
  place-items: center;
  font-size: 3rem;
  color: rgba(201,169,110,.35);
  background: linear-gradient(160deg, #161616, #1d160c);
}
.card-body { padding: 1.6rem 1.7rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.card-meta {
  display: flex;
  gap: .8rem;
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .7rem;
}
.card-meta .dot { color: var(--muted); }
.card h3 { font-size: 1.15rem; font-weight: 400; line-height: 1.3; margin-bottom: .6rem; }
.card p { font-size: .88rem; color: rgba(245,243,239,.65); }
.card-tags { margin-top: auto; padding-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.card-tags span {
  font-family: var(--sans);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-tags span + span::before { content: '·'; margin-right: .4rem; }

.empty { color: var(--muted); font-family: var(--sans); font-size: .85rem; padding: 3rem 0; text-align: center; }

/* ── Viewer ─────────────────────────────────────────────────── */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8,8,8,.88);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2vh 2vw;
  animation: fade .25s ease;
}
.viewer[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.viewer-panel {
  width: min(860px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.4rem 1.8rem;
  border-bottom: 1px solid var(--line);
}
.viewer-meta {
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .2rem;
}
.viewer-head h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1.25; }
.viewer-close {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  width: 2.4rem; height: 2.4rem;
  flex-shrink: 0;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.viewer-close:hover { color: var(--gold); border-color: var(--gold); }
.viewer-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.viewer-text { padding: 1.6rem 1.8rem 0; max-width: 760px; }
.viewer-text p { color: rgba(245,243,239,.8); margin-bottom: 1rem; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: .7rem; padding: 1.2rem 1.8rem 1.6rem; }
.btn {
  display: inline-block;
  padding: .7rem 1.8rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background .25s, color .25s;
}
.btn:hover, .btn.solid { background: var(--gold); color: var(--bg); }
.btn.solid:hover { background: var(--gold-lt); }
.viewer-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 0 1.8rem 1.8rem;
}
.viewer-gallery img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

/* ── Footer ─────────────────────────────────────────────────── */
#footer { padding: 1.8rem 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-logo { font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; color: var(--gold); }
.footer-copy { font-family: var(--sans); font-size: .68rem; color: var(--muted); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .feed-grid { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; }
  .feature .card-cover { min-height: 0; aspect-ratio: 16 / 9; border-right: none; border-bottom: 1px solid var(--line); }
  .feature-body { padding: 2rem; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  /* PDFs don't embed reliably on phones — show the open button instead */
  @media (max-width: 600px) {
  .feed-grid { grid-template-columns: 1fr; }
  .viewer { padding: 0; align-items: stretch; }
  .viewer-panel { border: none; border-radius: 0; }
  .viewer-head, .viewer-text, .viewer-actions { padding-left: 1.2rem; padding-right: 1.2rem; }
  .viewer-gallery { padding: 0 1.2rem 1.2rem; }
}
