:root {
  --ink: #000;
  --paper: #fafafa;
  --rail: 78px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.4;
}

a { color: inherit; }

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

.rail {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  width: var(--rail);
  height: 100vh;
  background: #000;
}

.rail a {
  position: absolute;
  left: 0;
  width: var(--rail);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fafafa;
  text-decoration: none;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

.rail a span {
  display: block;
  white-space: nowrap;
  transform: rotate(90deg);
}

.rail .about { top: 36px; height: 280px; }
.rail .works { top: 360px; height: 180px; }

.wordmark {
  position: fixed;
  z-index: 20;
  top: 46px;
  left: 61px;
  color: #000;
  text-decoration: none;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.4;
}

body.home .wordmark { display: none; }

body.home {
  background: #d8d8d8 url("../images/portrait.jpg") center top / cover no-repeat fixed;
}

.hero {
  min-height: 100vh;
  padding: 22vh 0 0 9vw;
}

.hero h1 {
  margin: 0;
  max-width: 10ch;
  color: #000;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 87px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.reveal { height: 180vh; }

.reveal-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.reveal-sticky img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.enter {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(980px, calc(100vw - 140px));
  height: 106px;
  background: #000;
  color: #fafafa;
  text-decoration: none;
  font-size: 25px;
  font-weight: 300;
  transition: background 0.2s ease, color 0.2s ease;
}

.enter:hover {
  background: #fafafa;
  color: #000;
  outline: 1px solid #000;
}

.page {
  padding: 140px 120px 80px 72px;
}

.page h1,
.section h2 {
  margin: 0 0 28px;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  max-width: 980px;
}

.bio {
  margin: 0 0 22px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
}

.contact-line { margin: 0 0 8px; font-size: 16px; }
.contact-line a { text-decoration: none; }
.contact-line a:hover { text-decoration: underline; text-underline-offset: 3px; }

form { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

input, textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #000;
  background: transparent;
  color: #000;
  font: inherit;
  font-size: 16px;
  padding: 8px 0;
  border-radius: 0;
}

textarea { min-height: 110px; resize: vertical; }

button {
  justify-self: start;
  margin-top: 8px;
  background: #000;
  color: #fafafa;
  border: 1px solid #000;
  padding: 12px 22px;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

button:hover { background: #fafafa; color: #000; }

.section { margin: 0 0 64px; }

.strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
}

.strip button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-transform: none;
  letter-spacing: 0;
  cursor: zoom-in;
}

.strip img {
  height: 68vh;
  width: auto;
  max-width: none;
  scroll-snap-align: start;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px 110px;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox .close {
  position: absolute;
  top: 18px;
  left: 24px;
  background: transparent;
  color: #fafafa;
  border-color: #fafafa;
}

.site-footer {
  padding: 28px 120px 36px 72px;
  color: #666;
  font-size: 14px;
}

@media (max-width: 800px) {
  .rail {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    padding-right: 16px;
  }

  .rail a {
    position: static;
    width: auto;
    height: auto;
    font-size: 14px;
  }

  .rail a span { transform: none; }

  .wordmark { top: 18px; left: 16px; font-size: 18px; }

  .hero { padding: 28vh 24px 0 20px; }
  .hero h1 { font-size: 42px; }
  .enter { width: calc(100vw - 36px); height: 72px; font-size: 18px; }
  .page, .site-footer { padding-left: 20px; padding-right: 20px; }
  .page { padding-bottom: 90px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .strip img { height: 46vh; }
  .lightbox { padding: 72px 16px; }
}
