:root {
  --bg: #ffffff;
  --bg-elev: #fafafa;
  --fg: #0a0a0a;
  --fg-muted: #525252;
  --fg-subtle: #8a8a8a;
  --accent: #0a0a0a;
  --border: #ececec;
  --placeholder-1: #f4f4f4;
  --placeholder-2: #e8e8e8;
  --max-width: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  font-weight: 400;
}

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

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 13px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.brand img {
  height: 53px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 500;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--fg);
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }
}

/* ---------- HERO ---------- */
.hero {
  padding: clamp(40px, 7vw, 90px) var(--gutter) clamp(30px, 5vw, 70px);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.hero-sub {
  margin-left: auto;
  margin-right: auto;
}

.hero-meta {
  justify-content: center;
}

.hero-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  margin-bottom: 28px;
}

.hero-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(48px, 9vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

.hero-sub {
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--fg-muted);
  max-width: 640px;
  margin-bottom: 40px;
}

.hero-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ---------- PROJECT SECTIONS ---------- */
.project {
  padding: clamp(40px, 6vw, 80px) var(--gutter);
  border-bottom: 1px solid var(--border);
}

.project-header {
  max-width: 720px;
  margin: 0 auto clamp(24px, 3vw, 40px);
  text-align: center;
}

.project-index {
  display: none;
}

.project-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.project-link {
  display: inline-block;
  font-size: 13px;
  color: var(--fg-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: var(--fg);
}

.project-description {
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--fg-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ---------- PHOTO GRID ---------- */
.photo-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  column-count: 3;
  column-gap: clamp(12px, 1.4vw, 20px);
}

.photo {
  background: linear-gradient(135deg, var(--placeholder-1) 0%, var(--placeholder-2) 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  margin: 0 0 clamp(12px, 1.4vw, 20px);
  break-inside: avoid;
  transition: transform 0.4s ease, border-color 0.3s ease;
}

.photo::before {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 500;
  z-index: 2;
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 14px,
      rgba(0, 0, 0, 0.025) 14px,
      rgba(0, 0, 0, 0.025) 28px
    );
  pointer-events: none;
}

.photo:hover {
  border-color: #c4c4c4;
  transform: translateY(-2px);
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
}

.photo:has(img)::before,
.photo:has(img)::after {
  display: none;
}

/* Forced-ratio crop variants: used to break up uniform portrait sections */
.photo.tall,
.photo.square,
.photo.wide-crop,
.photo.landscape-crop {
  /* container gets a fixed aspect ratio; image fills via object-fit cover */
}

.photo.tall img,
.photo.square img,
.photo.wide-crop img,
.photo.landscape-crop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo.square img {
  object-position: center 15%;
}

.photo.tall { aspect-ratio: 3 / 5; }
.photo.square { aspect-ratio: 1 / 1; }
.photo.wide-crop { aspect-ratio: 5 / 4; }
.photo.landscape-crop { aspect-ratio: 4 / 3; }

/* Legacy placeholder aspect ratios (only when no image is present) */
.photo:not(:has(img)).portrait { aspect-ratio: 4 / 5; }
.photo:not(:has(img)).portrait.tall { aspect-ratio: 3 / 5; }
.photo:not(:has(img)).landscape { aspect-ratio: 3 / 2; }
.photo:not(:has(img)).landscape.wide { aspect-ratio: 16 / 9; }

@media (max-width: 900px) {
  .photo-grid { column-count: 2; }
}

@media (max-width: 520px) {
  .photo-grid { column-count: 1; }
}

/* Varied grid: true size variation within a consistent aspect ratio */
.photo-grid.varied {
  column-count: auto;
  column-gap: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
  gap: clamp(12px, 1.4vw, 20px);
}

.photo-grid.varied .photo {
  grid-column: span 4;
  margin: 0;
  aspect-ratio: 4 / 5;
}

.photo-grid.varied .photo.big { grid-column: span 6; }
.photo-grid.varied .photo.small { grid-column: span 3; }

.photo-grid.varied .photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .photo-grid.varied { grid-template-columns: repeat(6, 1fr); }
  .photo-grid.varied .photo { grid-column: span 3; }
  .photo-grid.varied .photo.big { grid-column: span 6; }
  .photo-grid.varied .photo.small { grid-column: span 3; }
}

@media (max-width: 520px) {
  .photo-grid.varied { grid-template-columns: 1fr; }
  .photo-grid.varied .photo,
  .photo-grid.varied .photo.big,
  .photo-grid.varied .photo.small { grid-column: span 1; }
}

/* ---------- CONTACT ---------- */
.contact {
  padding: clamp(100px, 14vw, 180px) var(--gutter);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.contact-inner {
  max-width: 720px;
  margin: 0 auto;
}

.contact h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.contact p {
  color: var(--fg-muted);
  font-size: clamp(16px, 1.4vw, 19px);
  margin-bottom: 40px;
}

.contact-cta {
  display: inline-block;
  padding: 18px 40px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 0.25s ease, color 0.25s ease;
}

.contact-cta:hover {
  background: var(--fg);
  color: var(--bg);
}

/* ---------- FOOTER ---------- */
.site-footer {
  padding: 32px var(--gutter);
  text-align: center;
  font-size: 12px;
  color: var(--fg-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-ig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-subtle);
  margin-bottom: 14px;
  transition: color 0.2s ease;
}

.footer-ig:hover {
  color: var(--fg);
}
