:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #171717;
  --accent: #a50915;
  --muted: #777;
  --content-width: 42rem;
  --image-width: 44rem;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: 6rem; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.48;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  padding: 2.4rem var(--gutter) 1rem;
  text-align: center;
}
.site-title {
  color: inherit;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-decoration: none;
}

.bookmark-cord {
  position: fixed;
  z-index: 8;
  top: -12vh;
  right: clamp(1.25rem, 3vw, 3rem);
  width: min(22vh, 247px);
  height: 112vh;
  display: block;
  pointer-events: none;
}

.section-nav {
  --tab-width: 2.8rem;
  position: fixed;
  z-index: 10;
  top: 7rem;
  left: clamp(7rem, calc(24vw - 3rem), 22rem);
  display: grid;
  gap: .65rem;
}
.section-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tab-width);
  height: 5.4rem;
  padding: .1rem;
  border-radius: 0 2.8rem 2.8rem 0;
  background: var(--accent);
  color: white;
  font: 400 .8rem var(--serif);
  letter-spacing: .04em;
  text-decoration: none;
  transition: none;
}
.section-nav a span { transform: rotate(90deg); }
.section-nav a[aria-disabled="true"] { cursor: default; }
.section-nav a:focus-visible { outline: none; }
button:focus-visible,
a:focus-visible { outline: 2px solid #111; outline-offset: 3px; }

.page-content {
  width: min(var(--content-width), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 11.5rem 0 8rem;
}
.section-anchor { scroll-margin-top: 7rem; }
.about-page { position: relative; }
.about-intro { margin: 0 auto 1.5rem; }
.about-intro p { margin: 0 0 1.25rem; }
.work-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.work-page h2 {
  margin: 0 0 .35rem;
  font: 700 1.1rem var(--serif);
  letter-spacing: .24em;
}
.work-page p { margin: 0; }

.carousel-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  width: min(var(--image-width), 100%);
  margin: .65rem auto 0;
  font-size: 1rem;
}
.carousel-button {
  justify-self: start;
  padding: .15rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.carousel-button:last-child { justify-self: end; }
.carousel-button:hover { text-decoration: underline; text-underline-offset: .2em; }
.carousel-count { margin: 0; text-align: center; white-space: nowrap; }
.carousel-slide { margin: 0 auto; width: min(var(--image-width), 100%); }
.work-image,
.image-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
}
.work-image {
  object-fit: cover;
  object-position: center;
}
.work-image[hidden],
.image-placeholder[hidden],
.image-caption[hidden] { display: none; }
.image-placeholder {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .5rem;
  background: #f1f0ed;
  color: #777;
  font: .9rem var(--sans);
}
.image-placeholder span { color: #444; font-weight: 700; }
.image-placeholder small { font-size: .75rem; }
.image-caption { margin-top: .65rem; color: #555; font-size: .82rem; }

.side-note {
  position: absolute;
  top: 0;
  left: calc(100% + 2.5rem);
  width: 12rem;
  color: #555;
  font-size: .82rem;
  line-height: 1.4;
}
.side-note p { margin: .25rem 0; }
.side-note-label {
  color: var(--muted);
  font: .65rem var(--sans);
  letter-spacing: .12em;
}

@media (max-width: 1460px) {
  .section-nav { left: 0; }
  .page-content {
    width: min(var(--content-width), calc(100% - 14rem));
    margin-left: 5rem;
    margin-right: 9rem;
  }
  .side-note {
    position: static;
    width: auto;
    margin-top: 1.5rem;
    padding-left: .75rem;
    border-left: 1px solid #ccc;
  }
}

@media (max-width: 700px) {
  .site-header { padding-top: 1.4rem; }
  .page-content { padding-top: 7rem; }
  .section-nav { --tab-width: 2.35rem; top: 5rem; gap: .45rem; }
  .section-nav a { width: var(--tab-width); height: 4.4rem; padding: .35rem; font-size: .68rem; }
  .page-content { width: calc(100% - 8.8rem); margin-left: 4.8rem; margin-right: 4rem; }
  .bookmark-cord { right: 0; }
  .carousel-controls { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .bookmark-cord.is-moving { transition: none; }
}
