/* ─── TOKENS ────────────────────────────────────────────────────── */
:root {
  --bg:          #F0EFED;
  --ink:         #111110;
  --ink-muted:   #6B6B68;
  --ink-faint:   #A8A8A5;
  --gap:         clamp(5px, 0.6vw, 9px);
  --pad-x:       clamp(20px, 4vw, 64px);
  --pad-section: clamp(72px, 10vw, 140px);
  --rule:        1px solid rgba(17,17,16,.10);

  --font-cond:   'Barlow Condensed', sans-serif;
  --font-body:   'Barlow', sans-serif;
}

/* ─── RESET ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul { list-style: none; }

/* ─── SKIP LINK ─────────────────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 20px;
  font-family: var(--font-cond);
  font-size: 13px;
  letter-spacing: .08em;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 12px; outline: none; }

/* ─── SR-ONLY ────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── FOCUS STYLES ──────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* ─── NAV ───────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0;
  height: 52px;
  padding: 0 var(--pad-x);
}

.nav-name {
  font-family: var(--font-cond);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .10em;
  text-decoration: none;
  color: var(--ink);
  text-transform: uppercase;
  margin-right: auto;
}

.nav-toggle {
  font-family: var(--font-cond);
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  padding: 6px 16px;
  margin-right: 8px;
  transition: color .2s;
}
.nav-toggle:hover { color: var(--ink); }

.nav-contact {
  font-family: var(--font-cond);
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
  transition: color .2s;
}
.nav-contact:hover { color: var(--ink); }

/* Dropdown project list */
.nav-projects {
  position: absolute;
  top: 52px; right: var(--pad-x);
  background: var(--bg);
  border: var(--rule);
  padding: 8px 0;
  min-width: 240px;
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
}
.nav-projects[hidden] { display: none; }

.nav-projects li a {
  display: block;
  padding: 7px 20px;
  font-family: var(--font-cond);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
  transition: color .15s, background .15s;
}
.nav-projects li a:hover,
.nav-projects li a:focus-visible {
  color: var(--ink);
  background: rgba(0,0,0,.04);
}

/* ─── HERO ──────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  padding-top: 52px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr;
  overflow: hidden;
  position: relative;
}

.hero-meta {
  padding: clamp(28px, 4vw, 56px) var(--pad-x) 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-date {
  font-family: var(--font-cond);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--ink-muted);
  font-weight: 300;
}

.hero-title-wrap {
  padding: clamp(20px, 3vw, 40px) var(--pad-x) clamp(16px, 2vw, 28px);
}

.hero-heading {
  font-family: var(--font-cond);
  font-size: clamp(72px, 12vw, 180px);
  font-weight: 200;
  line-height: .9;
  letter-spacing: -.01em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}

.hero-last  { color: var(--ink); }
.hero-first {
  color: var(--ink-faint);
  font-style: italic;
  font-weight: 200;
}

.hero-role {
  margin-top: clamp(12px, 2vw, 20px);
  font-family: var(--font-cond);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 300;
}

/* Hero photos — 4-column collage at natural ratios */
.hero-photos {
  width: 100%;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  grid-template-rows: auto;
  gap: var(--gap);
  padding: 0 var(--pad-x) var(--gap);
  align-items: end;
}

.hero-photo { overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.hp1 { grid-row: 1; align-self: stretch; }
.hp2 { grid-row: 1; margin-top: clamp(30px, 6vw, 80px); }
.hp3 { grid-row: 1; }
.hp4 { grid-row: 1; margin-top: clamp(50px, 10vw, 120px); }

.hero-scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  color: var(--ink-faint);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ─── PROJECTS ──────────────────────────────────────────────────── */
#main { padding-top: clamp(40px, 6vw, 80px); }

.project {
  padding: var(--pad-section) var(--pad-x);
  border-top: var(--rule);
}

.project:last-child { border-bottom: var(--rule); }

/* Project header */
.project-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(24px, 4vw, 48px);
}

.project-title {
  font-family: var(--font-cond);
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 300;
  letter-spacing: -.01em;
  text-transform: uppercase;
  line-height: 1;
}

.project-sub {
  display: inline-block;
  margin-left: .4em;
  font-style: italic;
  font-weight: 200;
  color: var(--ink-muted);
  font-size: .7em;
  letter-spacing: 0;
  text-transform: none;
}

.project-index {
  font-family: var(--font-cond);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--ink-faint);
  font-weight: 300;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── MASONRY GRID ──────────────────────────────────────────────── */
.masonry {
  columns: 3;
  column-gap: var(--gap);
}

.m-item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  overflow: hidden;
  cursor: zoom-in;
}

.m-item img {
  width: 100%;
  display: block;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94),
              filter .4s ease;
  filter: saturate(.95);
}

.m-item:hover img {
  transform: scale(1.018);
  filter: saturate(1.05);
}

/* Focus ring on figures (keyboard users) */
.m-item:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ─── FOOTER ────────────────────────────────────────────────────── */
.site-footer {
  padding: var(--pad-section) var(--pad-x);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-name {
  font-family: var(--font-cond);
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 200;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.footer-nav a {
  font-family: var(--font-cond);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
  transition: color .2s;
}
.footer-nav a:hover { color: var(--ink); }

.footer-copy {
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: .05em;
}

/* ─── LIGHTBOX ──────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.lightbox[aria-hidden="false"] { pointer-events: auto; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, .96);
  opacity: 0;
  transition: opacity .3s ease;
}

.lightbox[aria-hidden="false"] .lightbox-backdrop { opacity: 1; }

.lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 94vw;
  max-height: 92svh;
  opacity: 0;
  transform: scale(.96);
  transition: opacity .3s ease, transform .3s ease;
}

.lightbox[aria-hidden="false"] .lightbox-content {
  opacity: 1;
  transform: scale(1);
}

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 88vw;
  max-height: 88svh;
}

#lb-img {
  max-width: 88vw;
  max-height: 84svh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lb-caption {
  font-family: var(--font-cond);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}

.lb-btn {
  position: fixed;
  background: none;
  border: none;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s;
  border-radius: 50%;
}
.lb-btn:hover,
.lb-btn:focus-visible { color: #fff; background: rgba(255,255,255,.08); }

.lb-close { top: 20px; right: 24px; }
.lb-prev  { left: 20px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 20px; top: 50%; transform: translateY(-50%); }

/* ─── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .masonry { columns: 3; }
}

@media (max-width: 760px) {
  .hero-photos {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .hp1 { grid-column: 1; grid-row: 1; }
  .hp2 { grid-column: 2; grid-row: 1; margin-top: 0; }
  .hp3 { grid-column: 1; grid-row: 2; }
  .hp4 { grid-column: 2; grid-row: 2; margin-top: 0; }

  .masonry { columns: 2; }

  .project-title { font-size: clamp(28px, 6vw, 48px); }
}

@media (max-width: 480px) {
  .masonry { columns: 1; }

  .nav-toggle { display: none; }

  .hero-heading { font-size: clamp(56px, 16vw, 80px); }
}

/* ─── REDUCED MOTION ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-scroll-hint { animation: none; }
}
