@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/bricolage-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Silkscreen";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/silkscreen-400.woff2") format("woff2");
}
@font-face {
  font-family: "Silkscreen";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/silkscreen-700.woff2") format("woff2");
}

:root {
  --bg: #fffaf0;
  --ink: #1c1a17;
  --muted: #6f6a60;
  --rule: #ece4d3;
  --link: #c93a17;
  --trex: #535353;

  --tomato: #f2542d;
  --mustard: #f5b700;
  --leaf: #2fa36b;
  --sky: #3a86ff;
  --grape: #a07aff;

  --pixel: "Silkscreen", "Courier New", monospace;

  color: var(--ink);
  background: var(--bg);
  color-scheme: light dark;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12110e;
    --ink: #f5efe3;
    --muted: #a39d90;
    --rule: #2e2a23;
    --link: #ff7a59;
    --trex: #acacac;
  }
}
* { box-sizing: border-box; }
::selection { background: var(--mustard); color: #1c1a17; }
html { font-size: 17px; }
@media (min-width: 90rem) { html { font-size: 19px; } }
@media (min-width: 120rem) { html { font-size: 20px; } }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); }
svg { image-rendering: pixelated; }

main,
.footer { width: min(100% - 3rem, 36rem); margin: 0 auto; }
main { padding: 4rem 0 2rem; line-height: 1.55; }

/* Intro */
.intro { margin-bottom: 2.5rem; }
.intro h1 { margin: 0; font: 700 1.75rem/1.15 var(--pixel); cursor: default; }
.intro p { margin: 0.35rem 0 0; color: var(--muted); }

/* Text */
h1, h2, p { margin: 0 0 1.25rem; font-size: 1rem; font-weight: 400; }
.lead { font-size: 1.25rem; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; }
h2 {
  margin: 3rem 0 1.1rem;
  padding-bottom: 0.3rem;
  border-bottom: 3px solid var(--mustard);
  font: 700 0.85rem/1.2 var(--pixel);
}
h2::before { content: "– "; }
a { color: var(--link); text-decoration-color: currentColor; text-underline-offset: 0.15em; text-decoration-thickness: 2px; }
a:hover { background: var(--link); color: var(--bg); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.muted { color: var(--muted); }

.hl { padding: 0 0.15em; color: #1c1a17; }
.hl.mustard { background: var(--mustard); }
.hl.leaf { background: var(--leaf); }
.hl.sky { background: var(--sky); }

/* Work: every project gets its own little pixel icon. */
.work { margin: 0 0 1.25rem; padding: 0; list-style: none; }
.work li { position: relative; margin: 0 0 1.2rem; padding-left: 2.1rem; }
.work .icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--ink);
  transition: transform 0.3s steps(3) calc(var(--i, 0) * 90ms);
}
/* Icons pop in when the list scrolls into view, and hop on hover. */
.js .work .icon { transform: scale(0); }
.js .work.in .icon { transform: none; }
.work li:hover .icon,
.js .work.in li:hover .icon { transform: translateY(-3px); transition: transform 0.15s steps(2); }
.work b { font: 700 0.8rem/1 var(--pixel); }
.work small { margin-left: 0.35rem; color: var(--muted); font-size: 0.8rem; }
.work span { display: block; color: var(--muted); }

/* How */
.loop { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font: 700 0.75rem/1 var(--pixel); }
.loop span { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); white-space: nowrap; }
.loop b { padding: 0.35rem 0.55rem; background: var(--rule); color: var(--ink); white-space: nowrap; }
.loop .tomato { background: var(--tomato); color: #1c1a17; }
.loop .mustard { background: var(--mustard); color: #1c1a17; }
.loop .leaf { background: var(--leaf); color: #1c1a17; }
.loop .sky { background: var(--sky); color: #1c1a17; }
.loop .grape { background: var(--grape); color: #1c1a17; }

/* Footer */
.footer {
  margin-bottom: 3rem;
  padding-top: 1rem;
  background: repeating-linear-gradient(90deg, var(--rule) 0 6px, transparent 6px 12px) top / 100% 3px no-repeat;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer p { margin: 0 0 0.3rem; }
.footer a { color: var(--ink); }

@media (max-width: 34rem) {
  main, .footer { width: min(100% - 2rem, 36rem); }
  main { padding-top: 2.5rem; }
  .intro h1 { font-size: 1.35rem; }
}

/* 404 */
.lost { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 3rem 0; }
.lost h1 { margin-bottom: 0.75rem; font: 700 1.6rem/1.15 var(--pixel); }
.fossil {
  width: 7rem;
  color: var(--trex);
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}
.fossil svg { display: block; width: 100%; }
.fossil .frame-b { display: none; }

/* Cursor trail */
.trail { position: fixed; inset: 0; z-index: 10; pointer-events: none; }

/* Dino: Chrome's T-Rex, running left to right on its two frames. */
.dino {
  position: fixed;
  bottom: 0;
  left: -120px;
  z-index: 20;
  width: 100px;
  color: var(--trex);
  pointer-events: none;
  animation: dino-walk 9s steps(90) forwards;
}
.dino svg { display: block; width: 100%; animation: dino-bob 0.4s steps(1) infinite; }
.dino .frame-a { animation: frame-a 0.4s steps(1) infinite; }
.dino .frame-b { opacity: 0; animation: frame-b 0.4s steps(1) infinite; }
.dino .say {
  position: absolute;
  top: -1.9rem;
  right: -1.5rem;
  padding: 0.2rem 0.5rem;
  background: var(--ink);
  color: var(--bg);
  font: 700 0.75rem/1.2 var(--pixel);
  opacity: 0;
  animation: dino-say 9s steps(1) forwards;
}
@keyframes dino-walk { to { left: 100vw; } }
@keyframes dino-bob { 50% { transform: translateY(-4px); } }
@keyframes frame-a { 50% { opacity: 0; } }
@keyframes frame-b { 50% { opacity: 1; } }
@keyframes dino-say { 0%, 30% { opacity: 0; } 34%, 60% { opacity: 1; } 64%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .dino { left: 1rem; animation: none; }
  .dino svg, .dino .frame-a, .dino .frame-b, .fossil svg { animation: none; }
  .work .icon { transition: none; }
  .js .work .icon { transform: none; }
  .dino .say { opacity: 1; animation: none; }
}
