:root {
  --bg: #0d0d0d;
  --fg: #f2f2f2;
  --muted: #8f8f8f;
  --line: #262626;
  --maxw: 1320px;
  --pad: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Work Sans", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--pad);
}

.wordmark {
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.35em;
}

.site-header nav {
  display: flex;
  gap: 32px;
}

.site-header nav a {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

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

/* homepage */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) 80px;
}

.intro {
  padding: 40px 0 56px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

.intro h1 {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.1;
}

.intro p {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #161616;
  aspect-ratio: 16 / 10;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.4s ease;
}

.card:hover img {
  transform: scale(1.04);
  opacity: 0.35;
}

.card-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card:hover .card-meta {
  opacity: 1;
  transform: translateY(0);
}

.card-meta h2 {
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 4px;
  line-height: 1.25;
}

.card-role {
  color: #c9c9c9;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin: 0;
}

/* touch devices: keep meta visible */
@media (hover: none) {
  .card img { opacity: 0.75; }
  .card-meta { opacity: 1; transform: none; }
}

/* cards without a thumbnail image */
.card.no-thumb {
  background: linear-gradient(135deg, #1c1c1c, #101010);
  border: 1px solid var(--line);
}

.card.no-thumb .card-meta {
  opacity: 1;
  transform: none;
  inset: auto 0 0 0;
}

video.still {
  width: 100%;
  margin: 0 0 24px;
  border-radius: 6px;
  background: #161616;
}

/* project pages */
.project { max-width: 980px; }

.project h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 32px 0 8px;
}

.project .role {
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 36px;
}

.project .copy {
  max-width: 680px;
  margin-bottom: 44px;
}

.project .copy p {
  margin: 0 0 1em;
  font-size: 17px;
  color: #d9d9d9;
}

.project .video {
  position: relative;
  padding-top: 56.25%;
  margin: 0 0 24px;
  background: #161616;
  border-radius: 6px;
  overflow: hidden;
}

.project .video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project .still {
  width: 100%;
  margin: 0 0 24px;
  border-radius: 6px;
}

.project h2 {
  font-size: 24px;
  font-weight: 500;
  margin: 48px 0 4px;
}

.backlink { margin-top: 56px; }

.backlink a {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* footer */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px var(--pad);
  border-top: 1px solid var(--line);
}

.site-footer p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card img, .card-meta { transition: none; }
}
