@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap");

:root {
  --paper: #f3eee4;
  --ink: #2a2622;
  --mute: #6b645c;
  --rule: #d9d1c4;
  --accent: #c9a227;
  --focus: #2a2622;
  --max: 68rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 112.5%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-optical-sizing: auto;
  line-height: 1.55;
}

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

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

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--paper);
  padding: 0.4rem 0.7rem;
  z-index: 20;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(var(--max), calc(100% - 3rem));
  margin-inline: auto;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

.masthead a {
  text-decoration: none;
}

.masthead a:hover {
  color: var(--ink);
}

.masthead .github {
  display: inline-flex;
}

.masthead .github svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

body.home {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

body.home main {
  min-height: 0;
  display: flex;
}

body.home .hero {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 1.4rem 0 1.2rem;
  gap: 4rem;
}

body.home .poster {
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
}

body.home .poster img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

@keyframes stagger-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.home .masthead,
body.home .poster,
body.home .identity > * {
  animation: stagger-in 0.5s ease backwards;
  animation-delay: calc(var(--stagger, 0) * 50ms);
}

body.home .poster {
  --stagger: 1;
}

body.home .identity > :nth-child(1) {
  --stagger: 2;
}

body.home .identity > :nth-child(2) {
  --stagger: 3;
}

body.home .identity > :nth-child(3) {
  --stagger: 4;
}

body.home .identity > :nth-child(4) {
  --stagger: 5;
}

body.home .identity > :nth-child(5) {
  --stagger: 6;
}

body.home .identity > :nth-child(n + 6) {
  --stagger: 7;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  gap: 4.5rem;
  align-items: center;
  padding: 3.2rem 0 3.6rem;
}

.poster {
  margin: 0;
}

.poster img {
  width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.identity h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.rule {
  display: block;
  width: 3.4rem;
  height: 2px;
  background: var(--accent);
  border: 0;
  margin: 0 0 1.15rem;
}

.role {
  margin: 0 0 1.4rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--mute);
}

.lede {
  margin: 0 0 0.35rem;
  max-width: 28ch;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
}

.links li:not(:last-child)::after {
  content: "·";
  margin: 0 0.65rem;
  color: var(--mute);
}

.links a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.links a:hover,
.links a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.page {
  padding: 3.4rem 0 4.5rem;
  max-width: 38rem;
}

.page h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.page p {
  margin: 0 0 1rem;
  max-width: 62ch;
  font-size: 1.05rem;
}

.page .muted {
  color: var(--mute);
}

.page .role {
  max-width: none;
  font-size: 0.78rem;
}

.work-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.work-list li {
  padding: 0.95rem 0;
  border-top: 1px solid var(--rule);
}

.work-list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.work-list a {
  text-decoration: none;
  font-size: 1.15rem;
}

.work-list small {
  display: block;
  margin-top: 0.25rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3.2rem;
  row-gap: 4.6rem;
  align-items: start;
  padding: 1.6rem 0 7rem;
}

.gallery figure {
  margin: 0;
}

.gallery figure:nth-child(2) {
  margin-top: 3.8rem;
}

.gallery figure:nth-child(4) {
  margin-top: 2.2rem;
}

.gallery figure:nth-child(5) {
  grid-column: 1 / -1;
  width: min(22rem, 46%);
  justify-self: center;
  margin-top: 0.4rem;
}

.gallery img {
  width: 100%;
  height: auto;
}

.gallery figcaption {
  margin-top: 0.45rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

@media (max-width: 800px) {
  html {
    font-size: 100%;
  }

  .wrap {
    width: min(var(--max), calc(100% - 2rem));
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0 2.4rem;
  }

  body.home {
    height: auto;
    overflow: auto;
    display: block;
  }

  body.home .hero {
    padding: 2rem 0 2.4rem;
  }

  body.home .poster,
  body.home .poster img {
    height: auto;
    width: 100%;
  }

  .gallery {
    grid-template-columns: 1fr;
    row-gap: 2.8rem;
  }

  .gallery figure:nth-child(2),
  .gallery figure:nth-child(4) {
    margin-top: 0;
  }

  .gallery figure:nth-child(5) {
    width: min(20rem, 78%);
    justify-self: end;
  }
}

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

  body.home .masthead,
  body.home .poster,
  body.home .identity > * {
    animation: none;
  }
}
