:root {
  --paper: #f7f4e6;
  --lemon: #e8d86a;
  --ink: #1c1b14;
  --dim: #5c5848;
  --sans: ui-sans-serif, system-ui, sans-serif;
  --display: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", var(--sans);
  --step-note: 0.8125rem;
  --step-body: 0.9375rem;
  --step-link: 1.0625rem;
  --step-nick: clamp(2.15rem, 6vw, 2.85rem);
  --lead: 1.6rem;
  --mx: 0.42;
  --my: 0.22;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: var(--step-body)/1.5 var(--sans);
}

body {
  transition: background-color 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#lamp {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    36rem 28rem at calc(var(--mx) * 100%) calc(var(--my) * 100%),
    color-mix(in srgb, var(--lemon) 26%, transparent),
    transparent 72%
  );
  opacity: 0.7;
}

#pith {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.drop {
  position: absolute;
  width: 7px;
  height: 9px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: color-mix(in srgb, var(--lemon) 80%, #c4b24a);
  opacity: 0.85;
  will-change: transform, opacity;
}

.seed-dot {
  position: absolute;
  width: 6px;
  height: 8px;
  border-radius: 50%;
  background: #d4c45a;
  will-change: transform, opacity;
}

.sheet {
  position: relative;
  z-index: 1;
  max-width: 24.5rem;
  margin: 0 auto;
  padding: 6.5rem 1.5rem 9rem;
}

.lemon {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 40% 55%;
  will-change: transform;
}

.lemon svg {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
}

html:not(.motion) .lemon { transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1); }
html:not(.motion) .lemon:hover { transform: rotate(-6deg); }
html:not(.motion) .lemon:active { transform: scale(0.94) rotate(-8deg); }

.lemon.squeezed .flesh { transform-origin: 32px 34px; }

.nick {
  margin: 2.25rem 0 0.4rem;
  font-family: var(--display);
  font-size: var(--step-nick);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-wrap: balance;
}

.tag {
  max-width: 28ch;
  margin: 0 0 2.75rem;
  font-size: var(--step-note);
  line-height: 1.55;
  letter-spacing: 0.01em;
  text-wrap: pretty;
}

.tag, .foot, .egg, .projects .note {
  color: var(--dim);
}

.links {
  display: flex;
  gap: 1.6rem;
  margin: 0 0 3rem;
}

.links a {
  font-size: var(--step-link);
  font-weight: 550;
}

.projects,
.quiet {
  display: grid;
  gap: var(--lead);
  margin: 0;
  padding: 0;
  list-style: none;
}

.projects { margin: 0 0 2.75rem; }
.projects li { padding: 0; }

.projects a {
  font-size: var(--step-link);
  font-weight: 550;
}

.projects .note,
.quiet .note {
  display: block;
  margin-top: 0.28rem;
  font-size: var(--step-note);
  line-height: 1.4;
  letter-spacing: 0.012em;
}

.quiet-label {
  margin: 0 0 1rem;
  font-size: var(--step-note);
  letter-spacing: 0.04em;
  color: var(--dim);
}

.quiet { margin: 0 0 3.25rem; }

.quiet .what {
  font-size: var(--step-link);
  font-weight: 550;
}

a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(
    color-mix(in srgb, var(--lemon) 70%, var(--ink)),
    color-mix(in srgb, var(--lemon) 70%, var(--ink))
  );
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

a:hover { background-size: 100% 2px; }
a:active { transform: translateY(1px); }

a:focus-visible,
.lemon:focus-visible,
.year:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.foot {
  margin: 0;
  font-size: var(--step-note);
  letter-spacing: 0.02em;
}

.year {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  font-variant-numeric: oldstyle-nums;
  cursor: pointer;
  display: inline-block;
  transform-origin: 50% 80%;
}

.egg {
  margin-top: 1.75rem;
  min-height: 1.5em;
  font-size: var(--step-note);
}

html.motion .rise { opacity: 0; }

body.pithy {
  background: color-mix(in srgb, var(--paper) 82%, #d8c98a);
}

::selection {
  background: var(--lemon);
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html.motion .rise { opacity: 1; }
  .lemon, a, body { transition: none; }
  .lemon:hover, .lemon:active, a:active { transform: none; }
  #lamp, #pith, .drop, .seed-dot { display: none; }
}

@media print {
  body::before, #lamp, #pith, .lemon, .egg { display: none; }
  a {
    text-decoration: none;
    background: none;
    color: var(--ink);
  }
}
