/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 13px; }

/* ── TOKENS ── */
:root {
  --off-white: #ffffff;
  --ink: #0a0a0a;
  --mid: #888880;
  --rule: rgba(10,10,10,0.1);
  --serif: 'Libre Baskerville', Baskerville, 'Book Antiqua', Georgia, serif;
  --display: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --nav-h: 52px;
  --filter-h: 40px;
}

body {
  background: var(--off-white);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  cursor: none;
}

/* ── CUSTOM CURSOR ── */
.cursor {
  position: fixed;
  width: 7px;
  height: 7px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
  mix-blend-mode: multiply;
}
.cursor.expanded {
  width: 36px;
  height: 36px;
  opacity: 0.1;
}

/* ── NAV ── */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
  background: var(--off-white);
  border-bottom: 1px solid var(--rule);
}

.nav-name {
  font-family: var(--display);
  font-style: normal;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  grid-column: 1;
}

.nav-context {
  grid-column: 2;
  font-family: var(--display);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  font-weight: 300;
}

.nav-links {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.current { color: var(--ink); }

/* ── FILTER BAR ── */
.filter-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 99;
  height: var(--filter-h);
  background: var(--off-white);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  padding: 0 28px;
}

.filter-btn {
  background: none;
  border: none;
  cursor: none;
  font-family: var(--display);
  font-style: normal;
  font-weight: 300;
  font-size: 0.62rem;
  color: var(--mid);
  padding: 0 22px 0 0;
  height: 100%;
  position: relative;
  transition: color 0.25s;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.filter-btn:first-child { padding-left: 0; }

.filter-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 22px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:first-child::after { right: 22px; }
.filter-btn.active { color: var(--ink); }
.filter-btn.active::after { transform: scaleX(1); }
.filter-btn:hover { color: var(--ink); }

/* ── MAIN ── */
.site-main {
  margin-top: calc(var(--nav-h) + var(--filter-h));
  padding: 0;
}

.site-main.no-filter {
  margin-top: var(--nav-h);
}

/* ── COUNT LINE ── */
.count-line {
  padding: 12px 28px;
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ── ARCHIVE GRID ── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
  padding: 0 2px 2px;
}

/* ── GRID ITEMS ── */
.work-item {
  position: relative;
  overflow: hidden;
  cursor: none;
  animation: fadeUp 0.6s ease backwards;
}

.work-item a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

/* Column spans */
.w3  { grid-column: span 3; }
.w4  { grid-column: span 4; }
.w5  { grid-column: span 5; }
.w6  { grid-column: span 6; }
.w7  { grid-column: span 7; }
.w8  { grid-column: span 8; }
.w12 { grid-column: span 12; }

/* Aspect ratios */
.ar-portrait-std { aspect-ratio: 4/5; }
.ar-landscape-std { aspect-ratio: 5/4; }
.ar-tall      { aspect-ratio: 3/4; }
.ar-portrait  { aspect-ratio: 2/3; }
.ar-square    { aspect-ratio: 1/1; }
.ar-wide      { aspect-ratio: 16/9; }
.ar-cinema    { aspect-ratio: 21/9; }

.work-item img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-item:hover img { transform: scale(1.03); }

/* Cover placeholder when no image */
.work-item .cover-placeholder {
  width: 100%; height: 100%;
  min-height: 200px;
  background: #e8e6e2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(10,10,10,0.25);
}

.work-item[data-cat="film"] .cover-placeholder { background: #1c1b19; color: rgba(255,255,255,0.2); }
.work-item[data-cat="beauty"] .cover-placeholder { background: #e0dbd4; }
.work-item[data-cat="still-life"] .cover-placeholder { background: #e5e2dc; }

/* Caption overlay */
.work-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  opacity: 0;
  background: linear-gradient(transparent, rgba(10,10,10,0.3));
  transition: opacity 0.3s ease;
}

.work-item:hover .work-caption { opacity: 1; }

.caption-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.95);
}

.caption-cat {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}

/* Hidden state */
.work-item.is-hidden { display: none; }

.work-item.is-fading {
  opacity: 0;
  transform: scale(0.99);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ── SINGLE PROJECT ── */
.project-header {
  padding: 48px 28px 32px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: end;
}

.project-title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 2.6rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.project-meta-item {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
}

.project-gallery {
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.project-gallery-image {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 40px;
}

.project-gallery-image img {
  display: block;
  max-height: 85vh;
  width: auto;
  max-width: 100%;
  height: auto;
}

.project-nav {
  padding: 32px 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-nav a {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}

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

.back-to-archive {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}

.back-to-archive:hover { color: var(--ink); }

/* ── INFORMATION PAGE ── */
.info-page {
  padding: 64px 28px;
  max-width: 680px;
}

.info-page h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 40px;
}

.info-block {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}

.info-block:last-child { border-bottom: none; }

.info-block h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 12px;
}

.info-block p,
.info-block address {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.8;
  font-style: normal;
  color: var(--ink);
}

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

/* ── FOOTER ── */
.site-footer {
  margin-top: 80px;
  padding: 24px 28px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 24px;
}

.footer-name {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-mid {
  text-align: center;
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
}

.footer-right {
  text-align: right;
}

.footer-right a {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-right a:hover { color: var(--ink); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.work-item:nth-child(1)  { animation-delay: 0.04s; }
.work-item:nth-child(2)  { animation-delay: 0.08s; }
.work-item:nth-child(3)  { animation-delay: 0.12s; }
.work-item:nth-child(4)  { animation-delay: 0.16s; }
.work-item:nth-child(5)  { animation-delay: 0.20s; }
.work-item:nth-child(6)  { animation-delay: 0.24s; }
.work-item:nth-child(7)  { animation-delay: 0.28s; }
.work-item:nth-child(8)  { animation-delay: 0.32s; }
.work-item:nth-child(9)  { animation-delay: 0.36s; }
.work-item:nth-child(10) { animation-delay: 0.40s; }
.work-item:nth-child(11) { animation-delay: 0.44s; }
.work-item:nth-child(12) { animation-delay: 0.48s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .w3, .w4 { grid-column: span 6; }
  .w5, .w6, .w7, .w8 { grid-column: span 12; }
  .project-header { grid-template-columns: 1fr; }
  .project-meta { align-items: flex-start; }
}

@media (max-width: 600px) {
  [class*="w"] { grid-column: span 12 !important; }
  nav.site-nav { grid-template-columns: 1fr auto; }
  .nav-context { display: none; }
  .nav-links { gap: 16px; }
  .site-footer { grid-template-columns: 1fr; gap: 12px; }
  .footer-mid, .footer-right { text-align: left; }
}

/* ── ARCHIVE INDEX PAGE ── */
.archive-project {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-top: 1px solid var(--rule);
  min-height: 200px;
}

.archive-project-info {
  padding: 28px 28px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--rule);
  position: sticky;
  top: calc(var(--nav-h) + 2px);
  align-self: start;
}

.archive-project-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
  transition: opacity 0.2s;
}

.archive-project-title:hover { opacity: 0.6; }

.archive-project-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.archive-project-meta span {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
}

.archive-view-link {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  margin-top: auto;
  padding-top: 16px;
  transition: color 0.2s;
}

.archive-view-link:hover { color: var(--ink); }

/* Horizontal scroll gallery */
.archive-gallery-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 16px 16px 16px 16px;
  cursor: grab;
}

.archive-gallery-scroll:active { cursor: grabbing; }
.archive-gallery-scroll::-webkit-scrollbar { display: none; }

.archive-gallery-track {
  display: flex;
  gap: 2px;
  height: 240px;
  align-items: stretch;
}

.archive-img {
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  height: 100%;
}

.archive-img.portrait  { width: calc(240px * 4/5); }
.archive-img.landscape { width: calc(240px * 5/4); }

.archive-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.archive-img:hover img { opacity: 0.85; }

/* Last project no bottom border needed */
.archive-project:last-child {
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 700px) {
  .archive-project {
    grid-template-columns: 1fr;
  }
  .archive-project-info {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    position: static;
    padding: 20px 20px 16px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
  }
  .archive-view-link { margin-top: 0; padding-top: 0; }
  .archive-gallery-track { height: 180px; }
  .archive-img.portrait  { width: calc(180px * 4/5); }
  .archive-img.landscape { width: calc(180px * 5/4); }
}

/* ── ARCHIVE PAGE FILTERS ── */
.archive-filter-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 98;
  background: var(--off-white);
  border-bottom: 1px solid var(--rule);
  height: var(--filter-h);
  display: flex;
  align-items: center;
  padding: 0 28px;
  margin-bottom: 0;
}

.archive-project.is-hidden {
  display: none;
}

.archive-project.is-fading {
  opacity: 0;
  transition: opacity 0.4s ease;
}
