:root {
  --paper: #fff;
  --ink: #000;
  --rule: 1px solid var(--ink);
  --sans: "Geist", Arial, sans-serif;
  --mono: "Geist Mono", monospace;
  font-family: var(--sans);
  font-weight: 350;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { text-underline-offset: .25em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.case-study-toolbar {
  display: flex;
  align-items: center;
  min-height: 4.25rem;
  padding: .75rem clamp(1rem, 4vw, 3rem);
}
.case-study-back {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  min-height: 2.75rem;
  font: 400 .8125rem/1.2 var(--mono);
  text-decoration: none;
}
.case-study-back:hover { text-decoration: underline; }
.frame {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 3rem);
  margin: 1.5rem;
  border: var(--rule);
}
.site-header {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: var(--rule);
  padding: 1rem 1.5rem;
}
.site-name { font-size: 1rem; font-weight: 200; text-decoration: none; }
.label, .site-nav, .text-button {
  font-family: var(--mono);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.5;
}
.label { margin: 0; }
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav form { margin: 0; }
.text-button { padding: 0; border: 0; color: inherit; background: none; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }
.sheet { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 4fr); flex: 1; }
.sheet-label { padding: 2rem 1.5rem; border-right: var(--rule); }
.sheet-body { padding: clamp(2rem, 5vw, 5rem); align-self: center; }
.bio { max-width: 40rem; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 2rem; font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 450; letter-spacing: -.045em; line-height: 1.12; }
.bio p, .case-copy { font-size: 1rem; line-height: 1.65; margin-bottom: 1.25rem; }
.bio .signoff { margin-top: 2rem; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: .75rem 1.5rem;
  border: var(--rule);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.bio .button { margin-top: .75rem; }
.button:focus-visible { outline-offset: 4px; }
.project-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  min-height: calc(100svh - 7rem - 2px);
  gap: 1px;
  background: var(--ink);
}
.project-grid[data-grid="true"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(20rem, 1fr); }
.project-grid[data-grid="true"] > .project-tile:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.project-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  min-width: 0;
  min-height: 22rem;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  padding: clamp(1.5rem, 3vw, 3rem);
  text-decoration: none;
  background: var(--paper);
  color: var(--ink);
}
.project-title { margin: 0; font-size: clamp(2rem, 4.5vw, 5rem); font-weight: 450; line-height: 1.05; letter-spacing: -.055em; overflow-wrap: anywhere; }
.project-tile:focus-visible { outline-offset: -6px; }
.project-bottom { display: flex; flex-direction: column; gap: 1.5rem; }
.case-copy { max-width: 40rem; }
@media (hover: hover) {
  .project-tile:hover::before { transform: translateY(0); }
  .button:hover { color: var(--ink); background: var(--paper); }
}
@media (max-width: 700px) {
  .frame { margin: .75rem; min-height: calc(100svh - 1.5rem); }
  .site-header { padding: 1rem; }
  .site-nav { gap: 1rem; }
  .sheet { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .sheet-label { padding: 1rem; border-right: 0; border-bottom: var(--rule); }
  .sheet-body { padding: 2rem 1.25rem; }
  .project-grid, .project-grid[data-grid="true"] {
    grid-template-columns: minmax(0, 1fr);
    min-height: calc(100svh - 5.5rem - 2px);
    grid-auto-rows: minmax(16rem, 1fr);
  }
  .project-tile { min-height: 16rem; padding: 1.5rem; gap: 2rem; }
  .project-title { font-size: clamp(2.5rem, 10vw, 4rem); }
}
@media (prefers-reduced-motion: no-preference) {
  .button { transition: color 120ms ease, background-color 120ms ease; }
  .project-tile::before { transition: transform 650ms cubic-bezier(.22, .68, .15, 1); }
}

/* The homepage is floating type, independent of the framed work pages. */
.floating-frame { min-height: 100svh; }
.intro-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 100svh;
}
.intro-hello, .intro-copy { padding: clamp(2rem, 5vw, 5rem); }
.intro-hello { display: flex; align-items: center; justify-content: center; }
.intro-hello h1 {
  margin: 0;
  font-family: "Geist Pixel Triangle", var(--mono);
  font-weight: 400;
  font-size: clamp(5.3333rem, 13.3333vw, 14.6667rem);
  line-height: 1;
  letter-spacing: -.075em;
}
.intro-copy { align-self: center; max-width: 45rem; }
.intro-copy h2 { font-size: 1.125rem; font-weight: 350; line-height: 1.6; margin-bottom: 1.5rem; }
.intro-copy p { font-weight: 200; }
.intro-work { display: inline-block; margin-top: .75rem; padding: .5rem 0; font-size: 1rem; font-weight: 200; }
/* A simple wave wipe remains available until the interactive canvas loads. */
.project-tile::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -32px 0 0;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 32' preserveAspectRatio='none'%3E%3Cpath d='M0 16 Q12.5 0 25 16 T50 16 T75 16 T100 16 V32 H0Z' fill='black'/%3E%3C/svg%3E") 0 0 / 100% 32px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 32px / 100% calc(100% - 32px) no-repeat;
  transform: translateY(100%);
}
.project-tile > :not(.project-waves) { position: relative; z-index: 1; color: var(--ink); }
.project-category, .project-bottom { width: fit-content; max-width: 100%; padding: .25rem .5rem; background: var(--paper); }
.work-home { display: block; width: fit-content; padding: 1.25rem 1.5rem; font-size: 1rem; font-weight: 200; line-height: 1.5; text-decoration: none; }
.project-tile:focus-visible::before { transform: translateY(0); }
.project-tile.has-waves::before { display: none; }
.project-tile > .project-waves {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
@media (max-width: 700px) {
  .intro-layout { grid-template-columns: minmax(0, 1fr); min-height: 100svh; }
  .intro-hello { justify-content: flex-start; padding: 3.5rem 1.5rem 2rem; }
  .intro-hello h1 { font-size: clamp(6rem, 25.3333vw, 10.6667rem); }
  .intro-copy { padding: 1rem 1.5rem 3rem; }
}

@media (max-width: 700px) { .work-home { padding: 1.25rem 1rem; } }

.project-grid.project-grid--standalone { min-height: calc(100svh - 3rem - 2px); }
@media (max-width: 700px) {
  .project-grid.project-grid--standalone { min-height: calc(100svh - 1.5rem - 2px); }
}

.work-index { display: flex; flex-direction: column; min-height: 100svh; padding: 1.5rem; }
.work-index-home { align-self: flex-start; margin: 0 0 1.5rem; font-size: 1rem; font-weight: 200; line-height: 1.5; text-decoration: none; }
.work-index .project-grid--standalone { flex: 1; min-height: calc(100svh - 6rem - 2px); border: var(--rule); }
@media (max-width: 700px) {
  .work-index { padding: .75rem; }
  .work-index-home { margin-bottom: 1rem; }
  .work-index .project-grid--standalone { min-height: calc(100svh - 4rem - 2px); }
}

.project-category { font-family: "Geist Pixel Grid", var(--mono); font-weight: 400; }

a.label { font-weight: 200; }

.passcode-modal { width: min(calc(100% - 2.5rem), 25rem); max-height: calc(100svh - 2.5rem); overflow: auto; padding: 1.5rem; border: 1px solid #000; border-radius: 0; color: #000; background: #fff; font-family: var(--sans); font-weight: 200; }
.passcode-modal::backdrop { background: rgb(255 255 255 / .88); }
.passcode-modal h2 { margin: 1rem 0 .75rem; font-size: 1.5rem; font-weight: 350; line-height: 1.2; }
.passcode-modal p { font-size: 1rem; line-height: 1.5; }
.passcode-close { display: block; width: fit-content; min-height: 2.75rem; margin: -.5rem -.25rem 0 auto; padding: .25rem; border: 0; background: none; color: #000; font-weight: 200; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.passcode-form label { display: block; margin: 2rem 0 1rem; font-size: .875rem; font-weight: 350; }
.passcode-form input { display: block; width: 100%; min-height: 3rem; padding: .75rem; border: 1px solid #000; border-radius: 0; background: #fff; color: #000; }
.passcode-submit { min-height: 2.75rem; margin-top: 1.5rem; padding: .5rem 1.25rem; border: 1px solid #000; border-radius: 0; color: #fff; background: #000; font-weight: 350; cursor: pointer; }
.passcode-submit:disabled { cursor: wait; }
.passcode-error { margin: .75rem 0 0; }

::selection { background: #ffeb00; color: #000; }
