:root {
  color-scheme: light;
  --paper: #f7f6f0;
  --ink: #252820;
  --muted: #555a4e;
  --accent: #525d37;
  --rule: #d2d3c6;
  --panel: #efefe6;
  --grid: #dedfd2;
  --stroke: #a9ad96;
  --wash: #e1e5d3;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "Courier New", monospace;
  --gutter: clamp(1.25rem, 6vw, 6.5rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --cycle: 12s;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

p, h1 { margin: 0; }

.page {
  width: min(100%, 100rem);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.masthead {
  padding-block: clamp(1.25rem, 4vh, 2.75rem);
  border-bottom: 1px solid var(--rule);
  animation: fade-in .55s var(--ease) both;
}

.identity { display: flex; align-items: center; gap: .875rem; }

.monogram {
  display: grid;
  place-items: center;
  width: 2.55rem;
  aspect-ratio: 1;
  border: 1px solid var(--ink);
}

.monogram::before {
  content: "";
  width: .95rem;
  aspect-ratio: 1;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}

.name { font-size: 1.0625rem; font-weight: 650; }
.discipline { margin-top: .2rem; color: var(--muted); font-size: .875rem; }

.hero {
  display: grid;
  align-items: center;
  align-content: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(2.25rem, 8vh, 6.5rem);
}

.eyebrow {
  color: var(--accent);
  font: 600 .8125rem/1.5 var(--mono);
  letter-spacing: .085em;
  text-transform: uppercase;
  animation: fade-in .5s .1s var(--ease) both;
}

.eyebrow span { margin-inline: .18em; }

h1 {
  margin-top: clamp(.85rem, 2.5vh, 1.5rem);
  font-size: clamp(2.05rem, 9vw, 5rem);
  font-weight: 500;
  line-height: 1.01;
  letter-spacing: -.073em;
  animation: rise-in .72s .17s var(--ease) both;
}

h1 em {
  display: block;
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.08em;
}

.description {
  max-width: 34ch;
  margin-top: clamp(1rem, 3.4vh, 2rem);
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  line-height: 1.6;
  animation: fade-in .65s .32s var(--ease) both;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: clamp(1.1rem, 4vh, 2.25rem);
  padding: .45rem .7rem;
  border: 1px solid var(--rule);
  color: var(--accent);
  font-size: .875rem;
  line-height: 1.25;
  animation: fade-in .6s .42s var(--ease) both;
}

.status::before {
  content: "";
  width: .42rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
}

.visual {
  position: relative;
  width: 100%;
  max-width: 37rem;
  animation: fade-in .75s .5s var(--ease) both;
}

.canvas {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.22;
  border: 1px solid var(--rule);
  background-color: var(--panel);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 8% 10%;
  background-position: center;
}

.axes { position: absolute; inset: 12%; border: 1px dashed var(--stroke); }

.registration { position: absolute; width: 13px; height: 13px; }
.registration::before, .registration::after {
  content: "";
  position: absolute;
  background: var(--accent);
}
.registration::before { inset: 6px 0; }
.registration::after { inset: 0 6px; }
.top-left { top: 12%; left: 12%; translate: -50% -50%; }
.top-right { top: 12%; right: 12%; translate: 50% -50%; }
.bottom-left { bottom: 12%; left: 12%; translate: -50% 50%; }
.bottom-right { bottom: 12%; right: 12%; translate: 50% 50%; }

.wireframe {
  position: relative;
  display: grid;
  grid-template-rows: 15% 1fr;
  width: 65%;
  height: 61%;
  border: 1px solid var(--accent);
  background: var(--paper);
  box-shadow: .55rem .55rem 0 var(--wash);
}

.wire-header {
  display: flex;
  align-items: center;
  gap: 3%;
  padding-inline: 6%;
  border-bottom: 1px solid var(--stroke);
}

.wire-header i { width: 2%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); }
.wire-header b { margin-left: auto; width: 16%; height: 1px; background: var(--stroke); }

.wire-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 2fr 1fr;
  gap: 16% 10%;
  padding: 7%;
}

.wire-copy { display: grid; align-content: center; gap: .28rem; }
.wire-copy i {
  height: 1px;
  background: var(--stroke);
  transform-origin: left;
  animation: draw var(--cycle) calc(.8s + var(--offset, 0s)) ease-in-out infinite;
}

.wire-copy i:first-child { height: clamp(3px, .6vw, 6px); width: 90%; background: var(--accent); }
.wire-copy i:nth-child(2) { width: 70%; height: clamp(3px, .6vw, 6px); background: var(--accent); --offset: .2s; }
.wire-copy i:nth-child(3) { margin-top: .24rem; --offset: .4s; }
.wire-copy i:nth-child(4) { width: 76%; --offset: .55s; }
.wire-copy b { width: 30%; height: .37rem; margin-top: .12rem; background: var(--wash); border: 1px solid var(--stroke); }

.wire-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: var(--wash);
}

.wire-image i {
  height: 70%;
  aspect-ratio: 1;
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 .35rem var(--wash), 0 0 0 calc(.35rem + 1px) var(--stroke);
  transform: rotate(45deg);
  animation: align-image var(--cycle) .8s ease-in-out infinite;
}

.wire-cards { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5%; }
.wire-cards i {
  border: 1px solid var(--stroke);
  background: var(--panel);
  animation: align-card var(--cycle) calc(.8s + var(--offset, 0s)) ease-in-out infinite;
}
.wire-cards i:nth-child(2) { --offset: .25s; }
.wire-cards i:nth-child(3) { --offset: .5s; }

.marker {
  position: absolute;
  inset: 0;
  animation: trace var(--cycle) .8s ease-in-out infinite;
}

.marker::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: .48rem;
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 1px solid var(--paper);
  background: var(--accent);
}

.motion-toggle {
  position: absolute;
  right: .25rem;
  bottom: .25rem;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.motion-toggle:not([hidden]) { display: grid; }
.motion-toggle:hover { background: var(--wash); }
.motion-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.motion-toggle span { width: .55rem; height: .65rem; border-inline: 2px solid currentColor; }
.is-paused .motion-toggle span { width: 0; height: 0; border: .34rem solid transparent; border-right: 0; border-left: .52rem solid currentColor; }
.is-paused .canvas * { animation-play-state: paused; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .45rem 1.5rem;
  padding-block: clamp(1rem, 3.5vh, 2rem);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  h1 { font-size: clamp(2rem, 4.65vw, 4.5rem); }
}

@media (min-width: 1200px) {
  h1 { font-size: clamp(3.5rem, 5.45vw, 6.15rem); }
  .visual { justify-self: end; }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(.65rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes draw {
  0%, 100% { transform: scaleX(.35); opacity: .55; }
  30%, 77% { transform: scaleX(1); opacity: 1; }
}
@keyframes align-image {
  0%, 100% { transform: translate(-8%, 6%) rotate(37deg) scale(.86); }
  36%, 76% { transform: translate(0) rotate(45deg) scale(1); }
}
@keyframes align-card {
  0%, 100% { transform: translateY(.22rem); opacity: .55; }
  42%, 80% { transform: translateY(0); opacity: 1; }
}
@keyframes trace {
  0%, 100% { transform: translate(0, 0); }
  21%, 27% { transform: translate(100%, 0); }
  46%, 54% { transform: translate(100%, 100%); }
  73%, 79% { transform: translate(0, 100%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .motion-toggle:not([hidden]) { display: none; }
}
