:root {
  color-scheme: dark;
  --bg: #141414;
  --ink: #f3f1ea;
  --muted: #b7b3a8;
  --zero: #7d796f;
  --gold: #e4d2ae;
  --line: rgba(243, 241, 234, 0.14);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.5;
}

a { color: inherit; }

a:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

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

.corner {
  position: fixed;
  z-index: 2;
  top: 1.25rem;
  right: 1.4rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
}

.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5.5rem 1.25rem 5rem;
  text-align: center;
}

.bits-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.bits {
  display: flex;
  margin: 0;
  font-size: clamp(2.75rem, 9vw, 8.5rem);
  line-height: 1;
  font-weight: 400;
}

.bit,
.zero {
  flex: 0 0 0.68em;
  width: 0.68em;
  text-align: center;
}

.glyph {
  position: relative;
  z-index: 1;
  display: block;
  height: 1em;
  overflow: hidden;
}

.reel {
  display: block;
  height: 1em;
  overflow: hidden;
}

.strip,
.cell {
  display: block;
  height: 1em;
  line-height: 1;
}

html.js:not(.is-settled) .glyph:not(.locked) .reel {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
}

.bit {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  transition: color 160ms ease;
}

.zero { color: var(--zero); }

.bit:hover,
.bit:focus-visible { color: var(--gold); }

.bit.locked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(228, 210, 174, 0.5) 0%, rgba(228, 210, 174, 0.16) 36%, transparent 68%);
  transform: translate(-50%, -50%) scale(0.4);
  animation: bloom 1.05s ease-out both;
}

.bit.locked .cell.is-one {
  animation: digitglow 1.05s ease-out both;
}

@keyframes bloom {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.35); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

@keyframes digitglow {
  0% { text-shadow: 0 0 0 rgba(228, 210, 174, 0); }
  28% { text-shadow: 0 0 12px rgba(228, 210, 174, 0.75); }
  100% { text-shadow: 0 0 0 rgba(228, 210, 174, 0); }
}

.sheen {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  pointer-events: none;
  background: var(--gold);
  box-shadow:
    0 0 12px 2px rgba(228, 210, 174, 0.85),
    0 0 36px 10px rgba(228, 210, 174, 0.28);
  animation: pass 2.4s cubic-bezier(0.45, 0, 0.2, 1) 0.3s both;
}

@keyframes pass {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  86% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.line {
  max-width: 22rem;
  margin: 1.6rem 0 0;
  color: var(--muted);
  font-size: 1.2rem;
  animation: rise 0.9s ease 1.65s both;
}

.labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1.15rem;
  max-width: 24rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  animation: rise 0.9s ease 1.8s both;
}

.label { transition: color 160ms ease, opacity 160ms ease; }

.cover:has(.bit:hover) .label,
.cover:has(.bit:focus-visible) .label { opacity: 0.38; }

.cover:has(.bit[data-key="handshake"]:is(:hover, :focus-visible)) .label[data-key="handshake"],
.cover:has(.bit[data-key="bin"]:is(:hover, :focus-visible)) .label[data-key="bin"],
.cover:has(.bit[data-key="workflow"]:is(:hover, :focus-visible)) .label[data-key="workflow"],
.cover:has(.bit[data-key="cv"]:is(:hover, :focus-visible)) .label[data-key="cv"] {
  opacity: 1;
  color: var(--gold);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.more {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.4rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  animation: rise 0.9s ease 1.95s both;
}

.more:hover,
.more:focus-visible { color: var(--gold); }

html.js .sheen {
  animation: none;
  opacity: 0;
}

html.js.is-settled .sheen {
  animation: pass 2.4s cubic-bezier(0.45, 0, 0.2, 1) 0.25s both;
}

html.js .line,
html.js .labels,
html.js .more {
  animation: none;
  opacity: 0;
}

html.js.is-settled .line { animation: rise 0.9s ease 0.4s both; }
html.js.is-settled .labels { animation: rise 0.9s ease 0.58s both; }
html.js.is-settled .more { animation: rise 0.9s ease 0.74s both; }

html.js .cell { color: var(--zero); }
html.js .cell.is-one { color: var(--ink); }
html.js.is-settled .cell { color: inherit; }

.work {
  width: min(40rem, calc(100% - 3rem));
  margin: 0 auto 5rem;
}

.section-label {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.piece {
  display: block;
  padding: 1.45rem 0 1.35rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.work .piece:last-child { border-bottom: 1px solid var(--line); }

.piece h3 {
  margin: 0 0 0.3rem;
  font-size: 1.7rem;
  font-weight: 400;
  transition: color 160ms ease;
}

.piece p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
}

.host {
  display: inline-block;
  margin-top: 0.65rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--gold);
}

.piece:hover h3,
.piece:focus-visible h3 { color: var(--gold); }

.colophon {
  margin: 0;
  padding: 0 1rem 2.4rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--zero);
}

.miss {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.miss h1 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  font-weight: 400;
}

.miss p { margin: 0; color: var(--muted); }

.miss a { color: var(--gold); }

.sheet {
  width: min(40rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 5.5rem 0 4rem;
}

.home {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--gold);
}

.sheet h1 {
  margin: 1.4rem 0 0.2rem;
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  font-weight: 400;
  line-height: 1;
}

.role {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 1.2rem;
}

.lede {
  margin: 1.5rem 0 2.4rem;
  max-width: 36rem;
  font-size: 1.15rem;
}

.sheet section { margin: 0 0 2.2rem; }

.sheet section h2 { margin: 0 0 0.7rem; }

.entry {
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}

.sheet section .entry:last-child { border-bottom: 1px solid var(--line); }

.entry h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 400;
}

.entry p { margin: 0.2rem 0 0; color: var(--muted); }

.entry a { color: var(--gold); text-decoration: none; }

.entry a:hover,
.entry a:focus-visible { text-decoration: underline; }

.practice {
  margin: 0.4rem 0 0;
  max-width: 36rem;
  color: var(--muted);
}

@media (max-width: 380px) {
  .labels { letter-spacing: 0.1em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheen { display: none; }
  .line,
  .labels,
  .more,
  html.js .line,
  html.js .labels,
  html.js .more,
  .bit.locked::after,
  .bit.locked .cell.is-one {
    animation: none;
    opacity: 1;
  }
  .bit.locked::after { display: none; }
}

@media print {
  .corner,
  .sheen,
  .more { display: none; }

  body.page-cv {
    background: #fff;
    color: #161616;
  }

  body.page-cv .role,
  body.page-cv .lede,
  body.page-cv .entry p,
  body.page-cv .practice,
  body.page-cv .section-label { color: #333; }

  body.page-cv a,
  body.page-cv .home { color: #161616; }

  body.page-cv .entry a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: var(--sans);
    font-size: 0.82rem;
  }
}
