:root {
  --bg: #fbfbfa;
  --fg: #1c1c1c;
  --muted: #6f6f6f;
  --line: #e6e6e3;
  --gap: clamp(20px, 2.6vw, 36px);
  --pad: clamp(20px, 5.5vw, 96px);
  --max: 1280px;
  font-family: "Futura", "Century Gothic", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.site-header, main, .site-footer {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding-left: var(--pad); padding-right: var(--pad);
}

/* Header: big uppercase name, small spaced-out menu */
.site-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  padding-top: 56px; padding-bottom: 56px;
}
.site-name {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; text-decoration: none;
}
.site-header nav { display: flex; gap: clamp(14px, 2.2vw, 30px); }
.site-header nav a {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .14em;
  text-decoration: none; color: var(--muted);
}
.site-header nav a:hover { color: var(--fg); }

/* Open project: images left, text right (sticky) */
.project {
  display: grid; grid-template-columns: 2.1fr 1fr; gap: calc(var(--gap) * 1.3);
  margin-bottom: 96px;
  animation: fade .4s ease;
}
.project[hidden] { display: none; }
.project-images { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.project-images img { width: 100%; background: var(--line); }
.project-text { position: sticky; top: 32px; align-self: start; }
.project-title {
  margin: 0 0 14px; font-size: 1.35rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: .06em; line-height: 1.3;
}
.project-meta { margin: 0 0 22px; font-size: .82rem; font-weight: 600; }
.project-description p { margin: 0 0 1.1em; font-size: .9rem; color: #4a4a4a; line-height: 1.85; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Project grid: square thumbnails, small uppercase centred captions */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: calc(var(--gap) * 1.2) var(--gap);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tile a { display: block; text-decoration: none; }
.tile a:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.tile .thumb { aspect-ratio: 1 / 1; overflow: hidden; background: var(--line); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.tile a:hover img { opacity: .85; }
.tile .title {
  display: block; margin-top: 14px; text-align: center;
  font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: #3a3a3a;
}

.about, .contact { max-width: 620px; margin-top: 140px; }
.about h2, .contact h2 {
  font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 14px;
}
.about p, .contact p { font-size: .92rem; color: #4a4a4a; }
.site-footer { padding-top: 96px; padding-bottom: 40px; color: var(--muted); font-size: .78rem; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project { grid-template-columns: 1fr; }
  .project-text { position: static; order: -1; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .site-header { padding-top: 32px; padding-bottom: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project { animation: none; }
}
