:root {
  --black: #0a0a0a;
  --white: #f2f2f0;
  --dim: #8a8a86;
  --gap: 6px;
  font-family: "Archivo", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--black);
  color: var(--white);
  display: grid;
  grid-template-columns: minmax(300px, 26vw) 1fr;
  gap: var(--gap);
  padding: var(--gap);
  height: 100svh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.me {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
}
h1 {
  font-size: clamp(56px, 6.4vw, 112px);
  font-weight: 900;
  font-stretch: 62%;
  line-height: .86;
  text-transform: uppercase;
  letter-spacing: -.01em;
}
dl { margin-top: auto; font-size: 15px; line-height: 1.45; }
dt { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 4px; }
dd { margin: 0 0 2px; }
.mail { margin-top: 28px; font-size: 15px; border-bottom: 1px solid var(--dim); align-self: start; }
.mail:hover, .mail:focus-visible { border-color: var(--white); }
a:focus-visible { outline: 2px solid var(--white); outline-offset: -2px; }

.work {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: var(--gap);
  min-height: 0;
}
.tile {
  position: relative;
  overflow: hidden;
  background: #161616;
  min-height: 0;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(.85) brightness(.8);
  transition: filter .3s, transform .6s;
}
a.tile:is(:hover, :focus-visible) img { filter: none; transform: scale(1.03); }
a.tile:is(:hover, :focus-visible) { background: #1c1c1c; }
.label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 72px 18px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.7) 45%, rgba(0,0,0,.9));
  display: grid;
  gap: 2px;
}
.label b { font-size: 19px; font-weight: 700; font-stretch: 85%; }
.label i { font-style: normal; font-size: 14px; color: #c9c9c4; }

.atlas img { object-position: left top; }
.um img, .ditty img { object-position: center; }
.um .top { object-position: center 45%; transition: opacity .4s, filter .3s; }
.um:is(:hover, :focus-visible) .top { opacity: 0; }

.blowy { background: #111; display: grid; place-items: center; container-type: inline-size; }
.case {
  width: 74%;
  aspect-ratio: 1.6;
  margin-bottom: 56px;
  background: #1b1b1b;
  border: 2px solid #333;
  outline: 6px solid #0d0d0d;
  box-shadow: inset 0 0 0 10px #151515, inset 0 0 0 12px #2c2c2c;
  display: grid;
  place-items: center;
  position: relative;
  transition: transform .3s;
}
.blowy:is(:hover, :focus-visible) .case { transform: rotate(-1.5deg); }
.stencil {
  font-family: "Big Shoulders Stencil Display", sans-serif;
  font-weight: 800;
  font-size: 13cqi;
  line-height: .9;
  text-align: center;
  text-transform: uppercase;
  color: #e8e6df;
  letter-spacing: .03em;
}

.reps { display: grid; place-items: center; }
.count { display: grid; margin-bottom: 56px; }
.count span {
  grid-area: 1 / 1;
  text-align: center;
  font-size: clamp(44px, 5vw, 88px);
  font-weight: 900;
  font-stretch: 62%;
  text-transform: uppercase;
  opacity: 0;
  animation: rep 10s infinite;
}
.count span:nth-child(2) { animation-delay: 2s; }
.count span:nth-child(3) { animation-delay: 4s; }
.count span:nth-child(4) { animation-delay: 6s; }
.count span:nth-child(5) { animation-delay: 8s; }
@keyframes rep {
  0%, 18% { opacity: 1; }
  20%, 100% { opacity: 0; }
}

.ledger { display: flex; align-items: center; justify-content: center; }
.rows { width: 72%; display: grid; gap: 12px; margin-bottom: 56px; }
.rows span { height: 10px; background: #2a2a28; }
.rows span:nth-child(3n+1) { width: 92%; }
.rows span:nth-child(3n+2) { width: 64%; }
.rows span:nth-child(3n) { width: 80%; }

@media (prefers-reduced-motion: reduce) {
  .count span { animation: none; }
  .count span:first-child { opacity: 1; }
}

@media (max-width: 900px) {
  body { display: block; height: auto; }
  .me { padding: 32px 16px 40px; min-height: 0; }
  dl { margin-top: 40px; }
  .work { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 46vw; }
  .um, .ditty { order: 1; }
  .ledger { order: 2; }
}
@media (max-width: 560px) {
  .work { grid-template-columns: 1fr; grid-auto-rows: 64vw; }
  .um, .ditty, .ledger { order: 0; }
}
