:root {
  --bg: #f4f1ec;
  --surface: #e9e4dc;
  --ink: #1b1a17;
  --muted: #7a746b;
  --accent: #d2532c;
  --line: rgba(27, 26, 23, 0.12);
  --radius: 14px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --surface: #1d1b19;
    --ink: #efe9e1;
    --muted: #8f887e;
    --line: rgba(239, 233, 225, 0.12);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img, video {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(16px, 5vw, 64px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.logo span { color: var(--accent); }
nav { display: flex; gap: 28px; font-size: 14px; }
nav a { color: var(--muted); transition: color .2s; }
nav a:hover { color: var(--ink); }

main { padding: 0 clamp(16px, 5vw, 64px); }

/* Hero */
.hero { padding: clamp(64px, 14vh, 160px) 0 clamp(48px, 10vh, 120px); max-width: 1100px; }
.eyebrow {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 24px;
}
h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 9vw, 128px);
  line-height: .95;
  letter-spacing: -0.03em;
  margin: 0;
}
h1 em { font-style: italic; color: var(--accent); }
.lede { max-width: 440px; color: var(--muted); font-size: 18px; margin: 32px 0 0; }

/* Work */
.work-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  font: 500 13px var(--sans);
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all .2s;
}
.filter:hover { color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 300px;
  grid-auto-flow: dense;
  gap: 40px 24px;
  padding-bottom: 40px;
}
.tile {
  margin: 0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  outline: none;
  opacity: 0;
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) forwards;
}
.tile[hidden] { display: none; }
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; }

.frame {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.frame img, .frame video, .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.tile:hover .frame > :first-child,
.tile:focus-visible .frame > :first-child { transform: scale(1.04); }
.tile:focus-visible .frame { outline: 2px solid var(--accent); outline-offset: 4px; }

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .04em;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, var(--line) 14px 15px),
    var(--surface);
}
.ph-icon { font-size: 28px; color: var(--accent); }

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
}

figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 12px;
}
.title { font-family: var(--serif); font-size: 18px; }
.meta { font-size: 13px; color: var(--muted); text-align: right; }

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
  padding: clamp(64px, 12vh, 140px) 0;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.about { align-items: center; gap: clamp(24px, 5vw, 72px); }
.portrait {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.about-name { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: clamp(36px, 5vw, 64px); line-height: 1; margin: 16px 0 24px; }
.about-bio { font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.4; margin: 0; max-width: 640px; }

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 32px clamp(16px, 5vw, 64px);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.site-footer a { color: var(--ink); border-bottom: 1px solid var(--accent); }

/* Lightbox */
.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(1100px, 92vw);
  width: 100%;
  color: #efe9e1;
}
.lightbox::backdrop { background: rgba(10, 9, 8, .88); backdrop-filter: blur(6px); }
.lightbox-media > * {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  display: block;
}
.lightbox-media .placeholder { display: flex; aspect-ratio: 16 / 10; height: auto; }
.lightbox-caption { font-family: var(--serif); text-align: center; margin: 16px 0 0; }
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  font-size: 32px;
  line-height: 1;
  background: none;
  border: none;
  color: #efe9e1;
  cursor: pointer;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tile { animation: none; opacity: 1; }
  .frame > * { transition: none; }
}

@media (max-width: 640px) {
  nav { gap: 18px; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .frame { flex: none; }
  .frame img, .frame video { height: auto; }
  .frame .placeholder { aspect-ratio: 16 / 10; height: auto; }
  .tile.wide { grid-column: auto; }
  .tile.tall { grid-row: span 1; }
  .about { grid-template-columns: 1fr; }
}
