:root {
  --ink: #1A1917;
  --muted: #6B675F;
  --soft: #8A857C;
  --text2: #4A4740;
  --line: #CFCAC1;
  --tile1: #D9D5CD;
  --tile2: #CFCAC1;
  --tile3: #E2DED7;
  --g0: #FDFCFA;
  --g1: #F4F2EE;
  --g2: #E7E3DC;
  --pad: 4%;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--g2); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  background: linear-gradient(165deg, var(--g0) 0%, var(--g1) 50%, var(--g2) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; transition: color .2s; }
a:hover { color: var(--muted); }

.muted { color: var(--muted); }

.label,
.top,
.caption,
.sector,
figcaption,
.more,
.meta {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* Header */
.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 32px var(--pad);
}
.brand { font-weight: 500; }
.top nav { display: flex; flex-wrap: wrap; gap: 40px; }

/* Hero */
.hero { padding: 24px var(--pad) 0; }
.frame {
  position: relative;
  height: min(760px, 75vh);
  background: var(--tile1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 0 24px;
}
.caption {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* Manifesto */
.manifesto {
  padding: 160px var(--pad) 140px;
  display: flex;
  justify-content: center;
}
.manifesto p {
  margin: 0;
  max-width: 760px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.35;
}

/* Index */
.index {
  padding: 0 var(--pad) 160px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.index h2 { margin: 0; flex: 0 0 220px; font-weight: 500; }
.projects {
  flex: 999 1 640px;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.projects a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--soft);
}
.projects li:last-child a { border-bottom: 1px solid var(--line); }
.projects sup {
  width: 32px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  align-self: flex-start;
  padding-top: 10px;
}
.projects .name {
  flex: 1 1 320px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  transition: color .25s;
}
.projects .preview {
  width: 180px;
  height: 0;
  opacity: 0;
  overflow: hidden;
  background: var(--tile2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text2);
  transition: height .35s ease, opacity .35s ease;
}
.projects .sector { width: 200px; text-align: right; color: var(--muted); }
.projects a:hover .name,
.projects a:focus-visible .name { color: var(--ink); }
.projects a:hover .preview,
.projects a:focus-visible .preview { height: 110px; opacity: 1; }

/* Mosaic */
.mosaic {
  padding: 0 var(--pad) 180px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 64px;
  gap: 24px;
}
.mosaic figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mosaic figcaption { color: var(--muted); font-size: 10px; letter-spacing: 0.28em; }
.tile { flex: 1; position: relative; overflow: hidden; min-height: 0; }

/* Images fill their frames */
.frame img,
.tile img,
.preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.frame { overflow: hidden; }
.tile img { transition: transform .8s ease; }
.mosaic figure:hover .tile img { transform: scale(1.03); }
.preview { position: relative; }
.caption { z-index: 1; color: #F3F1EC; text-shadow: 0 1px 12px rgba(0,0,0,.45); }
.t1 { background: var(--tile1); }
.t2 { background: var(--tile2); }
.t3 { background: var(--tile3); }
.m1 { grid-column: 1 / span 5; grid-row: 1 / span 8; }
.m2 { grid-column: 7 / span 4; grid-row: 3 / span 5; }
.m3 { grid-column: 11 / span 2; grid-row: 1 / span 3; }
.m4 { grid-column: 3 / span 3; grid-row: 10 / span 4; }
.m5 { grid-column: 7 / span 6; grid-row: 9 / span 6; }

/* Crafts */
.crafts {
  padding: 0 var(--pad) 160px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 64px;
}
.crafts div { display: flex; flex-direction: column; gap: 18px; }
.crafts h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 40px; }
.crafts p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text2); }
.more { border-bottom: 1px solid var(--ink); align-self: flex-start; padding-bottom: 4px; }

/* Footer */
.bottom {
  padding: 80px var(--pad) 48px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.mail {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 6vw, 5.5rem);
  line-height: 1;
  overflow-wrap: anywhere;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}
.meta a { color: var(--muted); }
.meta a:hover { color: var(--ink); }
.social { display: flex; gap: 32px; }

/* Tablet */
@media (max-width: 900px) {
  .mosaic { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 56px; gap: 16px; }
  .m1 { grid-column: 1 / span 4; grid-row: 1 / span 6; }
  .m2 { grid-column: 3 / span 4; grid-row: 7 / span 5; }
  .m3 { grid-column: 5 / span 2; grid-row: 1 / span 3; }
  .m4 { grid-column: 1 / span 2; grid-row: 12 / span 3; }
  .m5 { grid-column: 3 / span 4; grid-row: 13 / span 4; }
  .crafts { grid-template-columns: 1fr; gap: 48px; }
}

/* Phone */
@media (max-width: 600px) {
  :root { --pad: 16px; }
  .top { padding-top: 24px; padding-bottom: 24px; }
  .top nav { gap: 20px; width: 100%; order: 3; }
  .frame { height: 60vh; }
  .caption { left: 16px; right: 16px; bottom: 16px; font-size: 10px; letter-spacing: 0.2em; }
  .manifesto { padding: 96px var(--pad) 88px; }
  .index { gap: 24px; padding-bottom: 96px; }
  .index h2 { flex-basis: 100%; }
  .projects a { gap: 12px; }
  .projects .name { flex-basis: auto; flex: 1; }
  .projects .sector { width: 100%; text-align: left; padding-left: 44px; }
  .projects .preview { display: none; }
  .mosaic { display: flex; flex-direction: column; padding-bottom: 96px; }
  .mosaic .tile { flex: none; aspect-ratio: 16 / 9; }
  .m1 .tile { aspect-ratio: 4 / 5; }
  .crafts { padding-bottom: 96px; }
  .bottom { padding-top: 48px; gap: 40px; }
  .meta { flex-direction: column; }
}
