:root {
  color-scheme: light;
  --paper: #fdf5e6;
  --ink: #171815;
  --muted: #66685f;
  --pale: #9a9c93;
  --rule: #b8b9b1;
  --accent: #965c25;
  --rail-width: 176px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}
html {
  scrollbar-color: var(--muted) var(--paper);
}

html::-webkit-scrollbar {
  width: 12px;
}

html::-webkit-scrollbar-track {
  background: var(--paper);
}

html::-webkit-scrollbar-thumb {
  background: var(--muted);
  border: 3px solid var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 15px/1.55 "Instrument Sans", sans-serif;
}

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

a:hover,
button:hover {
  color: var(--accent);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  color: var(--paper);
  background: var(--ink);
}

.rail {
  position: fixed;
  z-index: 10;
  inset: 0 auto 0 0;
  width: max-content;
  padding: 34px 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px dashed var(--muted);
  background: var(--paper);
  backdrop-filter: blur(10px);
}

.logo {
  align-self: flex-start;
  user-select: none;
  -webkit-user-select: none;
  font-size: 30px;
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 500;
}

.descriptor {
  margin-top: 12px;
  color: var(--muted);
  font: 11px "DM Mono", monospace;
}

.rail nav {
  margin-top: 70px;
  display: grid;
  gap: 9px;
  font: 11px "DM Mono", monospace;
}

.rail nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: var(--muted);
  transition: color 150ms ease;
}

.rail nav a::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transition: width 150ms ease, height 150ms ease, border-radius 150ms ease;
}

.rail nav a:hover {
  color: var(--accent);
}

.rail nav a.is-active {
  color: var(--ink);
}

.rail nav a.is-active::before {
  width: 14px;
  height: 4px;
  border-radius: 2px;
}


.rail-bottom {
  margin-top: auto;
}

.rail-links {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font: 9px "DM Mono", monospace;
  line-height: 1.8;
}

main {
  margin-left: var(--rail-width);
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 55px clamp(45px, 6vw, 100px);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
}

.hero-index {
  color: var(--accent);
  font: 10px "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero h1 {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin: 26px 0 0;
  user-select: none;
  -webkit-user-select: none;
  font-size: clamp(52px, 7vw, 110px);
  line-height: 0.88;
  letter-spacing: -0.075em;
  font-weight: 500;
}

.hero h1:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 8px;
}

.hero h1 span {
  color: var(--pale);
}

.motion {
  position: absolute;
  left: 8%;
  right: 6%;
  top: 13%;
  bottom: 6%;
  contain: layout size;
  pointer-events: none;
}

.motion canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto;
  touch-action: pan-y;
  opacity: 1;
  transition: opacity 1.2s ease;
}

.motion canvas.scene-incoming {
  pointer-events: none;
  opacity: 0;
}

.motion canvas.is-transitioning-out {
  pointer-events: none;
  opacity: 0;
}

.motion canvas.is-transitioning-in {
  opacity: 1;
}

.hero-copy {
  position: absolute;
  z-index: 3;
  right: clamp(42px, 6vw, 90px);
  bottom: 70px;
  width: min(390px, 34%);
  padding-top: 15px;
  border-top: 1px solid var(--ink);
}

.hero-copy p {
  margin: 0;
}

.hero-copy p + p {
  margin-top: 13px;
}

.hero-copy strong {
  font-weight: 600;
}

.figure-label {
  position: absolute;
  left: clamp(45px, 6vw, 100px);
  bottom: 44px;
  color: var(--pale);
  font: 9px "DM Mono", monospace;
  text-transform: uppercase;
}

.figure-label {
  transition: opacity 1.2s ease;
}

.figure-label.is-transitioning {
  opacity: 0;
}

.section {
  padding: 70px clamp(45px, 6vw, 100px) 95px;
  border-bottom: 1px solid var(--ink);
  scroll-margin-top: 20px;
}

.section-head {
  margin-bottom: 58px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: baseline;
  gap: 25px;
}

.section-head .num {
  color: var(--accent);
  font: 10px "DM Mono", monospace;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.065em;
  font-weight: 500;
}

.section-head span:last-child {
  color: var(--pale);
  font: 9px "DM Mono", monospace;
  text-transform: uppercase;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  gap: clamp(50px, 9vw, 150px);
}

.about-grid .large {
  margin: 0;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.about-grid .detail {
  color: var(--muted);
}

.about-grid .detail p {
  margin: 0;
}

.about-grid .detail p + p {
  margin-top: 18px;
}

.timeline {
  border-top: 1px solid var(--rule);
}

.timeline-row {
  border-bottom: 1px solid var(--rule);
}

.timeline-entry {
  padding: 28px 0;
  display: grid;
  grid-template-columns: minmax(105px, 0.55fr) minmax(0, 0.9fr) minmax(0, 1.45fr) auto;
  align-items: start;
  gap: clamp(18px, 2.5vw, 38px);
  transition: background-color 160ms ease, color 160ms ease;
}

.timeline-entry > * {
  min-width: 0;
}

.timeline-entry:hover,
.timeline-entry:focus-visible {
  color: var(--paper);
  background: var(--ink);
}

.timeline-entry:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.timeline-affiliation,
.timeline-action {
  font: 10px/1.35 "DM Mono", monospace;
  text-transform: uppercase;
}

.timeline-affiliation {
  color: var(--pale);
}

.timeline-entry:hover .timeline-affiliation,
.timeline-entry:focus-visible .timeline-affiliation {
  color: #c7c8bf;
}

.timeline-entry h3 {
  margin: 0;
  font-size: clamp(19px, 1.75vw, 25px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.timeline-summary {
  max-width: 39ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.timeline-entry:hover .timeline-summary,
.timeline-entry:focus-visible .timeline-summary {
  color: #d4d5cd;
}

.timeline-action {
  padding-top: 3px;
  white-space: nowrap;
}

.timeline-detail {
  display: grid;
  grid-template-rows: 0fr;
  color: var(--ink);
  background: transparent;
  transition: grid-template-rows 280ms ease;
}

.timeline-row.is-selected .timeline-detail {
  grid-template-rows: 1fr;
}

.timeline-detail-inner {
  min-height: 0;
  overflow: hidden;
}

.history-detail-copy {
  max-width: 64ch;
  padding: 22px 0 28px;
  color: var(--muted);
}

.history-detail-copy p {
  margin: 0;
}

.history-detail-copy p + p {
  margin-top: 16px;
}

 


@media (max-width: 1120px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }
}

.project-action {
  display: inline-block;
  margin-top: 18px;
  border-bottom: 1px solid var(--ink);
  font: 9px "DM Mono", monospace;
  text-transform: uppercase;
}


.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px 28px;
}

.project {
  margin: 0;
}

.project-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #deddd6;
  border: 1px solid var(--rule);
}

.project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project figcaption {
  padding-top: 18px;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
}

.project .index {
  color: var(--accent);
  font: 9px "DM Mono", monospace;
}

.project h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.project-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.project-copy p {
  margin: 0;
}

.project-copy p + p {
  margin-top: 12px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

footer {
  margin-left: var(--rail-width);
  min-height: 110px;
  padding: 35px clamp(45px, 6vw, 100px);
  display: flex;
  justify-content: space-between;
  color: var(--pale);
  font: 9px "DM Mono", monospace;
  text-transform: uppercase;
}

footer .links {
  display: flex;
  gap: 24px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .rail {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 12px 18px;
    border-right: 0;
    border-bottom: 1px dashed var(--ink);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 14px;
  }

  .logo {
    font-size: 19px;
  }

  .descriptor {
    margin-top: 0;
  }

  .rail nav {
    flex-basis: 100%;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 9px;
  }

  .rail nav a.is-active::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }

  .section {
    scroll-margin-top: calc(var(--rail-height, 90px) - 2px);
  }

  .rail-bottom {
    display: none;
  }

  main,
  footer {
    margin-left: 0;
  }

  .hero {
    min-height: auto;
    padding: 38px 18px 28px;
  }

  .hero h1 {
    margin-top: 20px;
    font-size: clamp(52px, 17vw, 76px);
  }

  .motion {
    left: -18%;
    right: -18%;
    top: 70px;
    bottom: auto;
    height: 520px;
  }

  .hero-copy {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin-top: 22px;
  }

  .figure-label {
    position: static;
    display: block;
    margin-top: 392px;
  }

  .section {
    padding: 52px 18px 68px;
  }

  .section-head {
    grid-template-columns: 28px 1fr;
    gap: 12px;
    margin-bottom: 36px;
  }

  .section-head span:last-child {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .timeline-entry {
    padding: 22px 0;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 14px;
  }

  .timeline-entry h3 {
    font-size: 22px;
  }

  .timeline-summary,
  .timeline-action {
    grid-column: 2;
  }

  .timeline-action {
    margin-top: 4px;
  }


  .project-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .project figcaption {
    grid-template-columns: 24px 1fr;
    gap: 10px;
    padding-top: 14px;
  }

  footer {
    padding: 28px 18px;
    gap: 16px;
  }
}

@media (min-width: 680px) and (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 54px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .project-image img {
    transition: none;
  }
}
