@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 400;
  font-display: swap;
}

:root {
  --bg: #dfe0e1;
  --ink: #000;
  --muted: #38383b;
  --gutter: 40px;
  --gap: 48px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-weight: 200;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px var(--gutter);
}
.logo img { width: 36px; height: 36px; }
.top nav { display: flex; gap: 18px; }
.top nav a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.top nav a:hover, .top nav a[aria-current] { border-bottom-color: currentColor; }

main { flex: 1; padding: 20px var(--gutter) 80px; }

/* home grid — masonry.js arranges tiles into columns; this grid is the no-JS fallback */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); align-items: start; }
.grid .col { display: flex; flex-direction: column; gap: var(--gap); }
.grid.masonry { display: flex; gap: var(--gap); }
.grid.masonry .col { flex: 1; min-width: 0; }
.tile { position: relative; display: block; overflow: hidden; background: #cfd0d1; }
.tile img { width: 100%; transition: opacity .3s; }
.tile span {
  position: absolute; inset: auto 0 0 0;
  padding: 10px 12px; color: #fff; font-weight: 300;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  opacity: 0; transition: opacity .3s;
}
.tile:hover span, .tile:focus-visible span { opacity: 1; }

/* project page */
.project { max-width: 900px; margin: 30px auto 0; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.meta { display: flex; justify-content: space-between; gap: 24px; margin-top: 18px; color: var(--muted); }
.meta p { margin: 0; }
.back { flex-shrink: 0; text-decoration: none; }
.back:hover { text-decoration: underline; }

/* about */
.about { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; align-items: center; max-width: 1100px; }
.about .text { padding-left: 0; }
.about p { margin: 0 0 1.2em; }

/* contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; max-width: 1100px; }
.contact h1 { font-weight: 200; font-size: 28px; margin: 0 0 24px; }
.contact img { max-width: 280px; justify-self: end; }

/* footer */
footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 40px var(--gutter) 32px;
}
footer p { margin: 0; }
footer .name, footer .h { font-size: 20px; margin-bottom: 14px; }
footer .small { font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  :root { --gutter: 24px; --gap: 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .about, .contact { grid-template-columns: 1fr; }
  .about img { max-width: 420px; }
  .contact img { justify-self: start; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; --gap: 20px; }
  .grid { grid-template-columns: 1fr; }
  .top nav { gap: 12px; }
  footer { flex-direction: column; align-items: flex-start; gap: 24px; }
  .meta { flex-direction: column; gap: 10px; }
}
