/* One dark page. The palette is neutral with no accent colour, so the
   screenshots are the only colour on it. Each project sits on a band one
   shade lighter than the last, all shades of the canvas. The design's record
   is docs/mockups/portfolio-single-page.mockup.html. */

:root {
  --canvas: #0f0f0e;
  --surface: #181817;
  --hairline: #2c2c29;
  --text: #ecebe6;
  --muted: #97958d;

  --band-1: #161615;
  --band-2: #1d1d1b;
  --band-3: #242422;

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;

  /* The side margin: 5% of the window, growing past that once the content
     reaches 1296px, so text stops widening while the bands run edge to edge. */
  --gutter: max(5vw, calc(50vw - 648px));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { color: var(--muted); }

.label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

a.label { color: var(--text); }
a.label:hover { color: var(--muted); }

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 28px var(--gutter);
  font-size: 15px;
}

.topbar .name { font-family: var(--serif); font-size: 18px; }

.hero { padding: min(14vw, 180px) var(--gutter) min(9vw, 116px); }

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.project {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: min(5vw, 64px);
  align-items: end;
  padding: min(8vw, 104px) var(--gutter);
}

.project:nth-of-type(3n + 1) { background: var(--band-1); }
.project:nth-of-type(3n + 2) { background: var(--band-2); }
.project:nth-of-type(3n) { background: var(--band-3); }

.project:nth-of-type(even) { grid-template-columns: 2fr 3fr; }
.project:nth-of-type(even) .shot { order: 2; }

.shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface);
}

.project h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.project p { margin: 0 0 20px; }
.project p:last-child { margin-bottom: 0; }

.contact {
  padding: min(7vw, 90px) var(--gutter);
  text-align: center;
}

.contact .address { margin: 16px 0 0; }

.contact .address a {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 2px;
  background: var(--text);
  color: var(--canvas);
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
}

.contact .address a:hover {
  background: var(--muted);
  color: var(--canvas);
}

.footer {
  margin: 0 var(--gutter);
  padding: 28px 0 36px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--muted);
}

.footer p { margin: 0; }

@media (max-width: 900px) {
  body { font-size: 16px; }
  .topbar { padding: 20px var(--gutter); }

  .project,
  .project:nth-of-type(even) {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 12vw var(--gutter);
  }

  .project:nth-of-type(even) .shot { order: 0; }
}
