/* ===================== Base ===================== */

/* One design pixel of the 1920-wide FigCraft frames; everything on the page is sized in it. */
body {
  container-type: inline-size;
  margin: 0;
  background: #05040a;
  color: #2a1a35;
  font-family: "Builder Sans", system-ui, sans-serif;
}

.intro,
.top-bar,
.board-page {
  --unit: calc(100cqw / 1920);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

/* overlay scrollbar: a rounded thumb with no track; board.ts sets --thumb-height and --thumb-offset */
.scrollbar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  width: 14px;
}

.scrollbar-thumb {
  position: absolute;
  top: 0;
  right: 3px;
  width: 6px;
  height: var(--thumb-height, 0);
  translate: 0 var(--thumb-offset, 0);
  border-radius: 3px;
  background: #b9b3c2a6;
  touch-action: none;
  transition: width 0.15s ease, background-color 0.15s ease;
}

.scrollbar:hover .scrollbar-thumb,
.scrollbar-thumb.is-dragging {
  width: 8px;
  border-radius: 4px;
  background: #d6d0dccc;
}

.scrollbar.is-hidden {
  display: none;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* page furniture, not content: can't be selected or copied along with the text around it */
.business-card-front,
.contact-footnote,
.clipping-header,
.clipping-tag {
  -webkit-user-select: none;
  user-select: none;
}

:focus-visible {
  outline: calc(3 * var(--unit, 1px)) solid #bb8672;
  outline-offset: calc(4 * var(--unit, 1px));
}

/* ===================== Intro scene ===================== */

.scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* set by main.ts once every layer is decoded, so the stack never shows half-assembled */
.scene.ready {
  opacity: 1;
}

/* above the whole page, so the coin can fly from the intro into the top bar */
.coin-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.intro {
  position: relative;
  height: 100svh;
  min-height: calc(700 * var(--unit));
  overflow: hidden;
}

/* ===================== Paper ===================== */

.paper {
  --paper-color: #f1ecf3;
  position: absolute;
  left: calc(var(--x) * var(--unit));
  top: calc(var(--y) * var(--unit));
  rotate: var(--rotation, 0deg);
  box-sizing: border-box;
  border-radius: calc(3 * var(--unit));
  background-color: var(--paper-color);
  background-image: var(--paper-texture);
  background-size: 100% 100%;
  background-blend-mode: multiply;
  box-shadow: 0 calc(14 * var(--unit)) calc(28 * var(--unit)) #00000070;
}

.pin {
  position: absolute;
  top: calc(14 * var(--unit));
  left: 50%;
  translate: -50% 0;
  width: calc(26 * var(--unit));
  height: calc(26 * var(--unit));
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #e9c7b6 0 14%, #bb8672 16%);
  box-shadow:
    inset 0 0 0 calc(2 * var(--unit)) #a16250,
    calc(2 * var(--unit)) calc(5 * var(--unit)) calc(6 * var(--unit)) #00000066;
}

.tape {
  position: absolute;
  padding: calc(2 * var(--unit)) calc(18 * var(--unit)) calc(4 * var(--unit));
  background: #e8ddb8e6;
  color: #3a2a1c;
  font: 600 calc(36 * var(--unit)) / 1.2 "Caveat", cursive;
  text-align: center;
  box-shadow: 0 calc(2 * var(--unit)) calc(3 * var(--unit)) #0000002e;
}

/* ===================== Hello card ===================== */

.hello-card {
  --paper-texture: url(assets/papers/hello.webp);
  --rotation: -2deg;
  left: calc(967 * var(--unit));
  top: calc(328 / 1080 * 100%);
  width: calc(680 * var(--unit));
  min-height: calc(400 * var(--unit));
  padding: calc(64 * var(--unit)) calc(56 * var(--unit)) calc(48 * var(--unit));
  /* 85% of the FigCraft size, shrunk towards its left edge so the gap to the coin stays */
  scale: 0.85;
  transform-origin: left center;
  transform: translateX(110vw);
  transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.05);
}

/* main.ts sets coin-landed once the coin has slid in */
.coin-landed .hello-card {
  transform: none;
}

.hello-card-name {
  font: 700 calc(64 * var(--unit)) / 1.1 "Builder Extended", sans-serif;
}

.hello-card-pronouns {
  margin-top: calc(10 * var(--unit));
  color: #6b5a78;
  font-size: calc(24 * var(--unit));
  font-weight: 500;
}

.hello-card-blurb {
  margin-top: calc(24 * var(--unit));
  max-width: calc(564 * var(--unit));
  font-size: calc(26 * var(--unit));
  line-height: 1.3;
}

.hello-card-scribble {
  position: absolute;
  right: calc(70 * var(--unit));
  bottom: calc(20 * var(--unit));
  color: #8a5a48;
  font: 400 calc(30 * var(--unit)) "Caveat", cursive;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: calc(40 * var(--unit));
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #f1ecf3;
  font: 400 calc(32 * var(--unit)) "Caveat", cursive;
  text-decoration: none;
  opacity: 0;
  animation: scroll-hint-appear 0.6s ease 2s forwards, scroll-hint-bob 1.4s ease-in-out 2s infinite;
}

.scroll-hint svg {
  width: calc(48 * var(--unit));
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.has-scrolled .scroll-hint {
  animation: none;
  opacity: 0;
  transition: opacity 0.3s;
}

@keyframes scroll-hint-appear {
  to { opacity: 1; }
}

@keyframes scroll-hint-bob {
  50% { translate: -50% calc(10 * var(--unit)); }
}

/* ===================== Board page ===================== */

/* assets/wood.webp is the wood shader (wood.ts) at 1920 × 2160 with a mirrored copy below, so it repeats
   without a seam; its top fades into the intro scene. The padding leaves room between the fade and the papers. */
.board-page {
  position: relative;
  isolation: isolate;
  padding-top: calc(150 * var(--unit));
}

.board-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #2f1d3e url(assets/wood.webp) top / 100% auto repeat-y;
  mask-image: linear-gradient(transparent, #000 calc(360 * var(--unit)));
}

/* fixed to the top of the window; --intro-scroll-progress (set by main.ts) fades it in as the intro scrolls away */
.top-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: calc(150 * var(--unit));
  background: linear-gradient(#16131bf2 0%, #16131bb3 45%, #16131b00 100%);
  opacity: var(--intro-scroll-progress, 0);
  pointer-events: none;
}

/* about | coin | projects, with the coin slot held at the exact centre whatever the link widths */
.top-bar-links {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: calc(70 * var(--unit));
  padding-top: calc(28 * var(--unit));
}

.top-bar-links a:first-child {
  justify-self: end;
}

.top-bar-links a:last-child {
  justify-self: start;
}

.top-bar-is-visible .top-bar-links {
  pointer-events: auto;
}

.top-bar-links a {
  color: #f1ecf3;
  font-size: calc(30 * var(--unit));
  font-weight: 500;
  text-decoration: none;
  border-bottom: calc(3 * var(--unit)) solid transparent;
}

.top-bar-links a:hover {
  border-color: #bb8672;
}

/* empty slot the 3D coin settles into */
.top-bar-links .top-bar-coin {
  width: calc(80 * var(--unit));
  height: calc(90 * var(--unit));
  margin-top: calc(-16 * var(--unit));
  border: none;
}

.board {
  position: relative;
  height: calc(1080 * var(--unit));
}

/* ===================== About ===================== */

.about-paper {
  --paper-texture: url(assets/papers/about.webp);
  width: calc(540 * var(--unit));
  height: calc(560 * var(--unit));
  padding: calc(64 * var(--unit)) calc(52 * var(--unit));
  scroll-margin-top: calc(160 * var(--unit));
}

.about-paper h2 {
  margin-bottom: calc(20 * var(--unit));
  font: 700 calc(52 * var(--unit)) / 1.2 "Builder Extended", sans-serif;
}

.about-paper p {
  font-size: calc(26 * var(--unit));
  line-height: 1.28;
}

.about-paper p + p {
  margin-top: calc(20 * var(--unit));
}

/* ===================== Contact: phone book page ===================== */

.contact-paper {
  --paper-color: #ece6d3;
  --paper-texture: url(assets/papers/contact.webp);
  width: calc(480 * var(--unit));
  height: calc(620 * var(--unit));
  padding: calc(56 * var(--unit)) calc(40 * var(--unit)) 0;
  scroll-margin-top: calc(160 * var(--unit));
}

.contact-guide-words {
  display: flex;
  justify-content: space-between;
  padding-bottom: calc(6 * var(--unit));
  border-bottom: calc(3 * var(--unit)) solid #2a1a35;
  font: 700 calc(30 * var(--unit)) / 1.2 "Antonio", sans-serif;
  text-transform: uppercase;
}

.contact-guide-words h2 {
  font: inherit;
}

.contact-thumb-tab {
  position: absolute;
  right: 0;
  top: calc(150 * var(--unit));
  display: grid;
  place-items: center;
  width: calc(26 * var(--unit));
  height: calc(90 * var(--unit));
  border-radius: calc(4 * var(--unit)) 0 0 calc(4 * var(--unit));
  background: #2a1a35;
  color: #ece6d3;
  font: 700 calc(26 * var(--unit)) "Antonio", sans-serif;
}

.contact-listings {
  margin: calc(24 * var(--unit)) 0 calc(28 * var(--unit));
  padding: 0;
  list-style: none;
}

.contact-listings li + li {
  margin-top: calc(18 * var(--unit));
}

.contact-listings a,
.contact-listings button {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--unit));
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: 400 calc(20 * var(--unit)) / 1.4 "Builder Mono", monospace;
  text-decoration: none;
  cursor: pointer;
}

.contact-icon {
  flex: none;
  width: calc(20 * var(--unit));
  height: calc(20 * var(--unit));
  background: currentColor;
  mask: var(--icon) center / contain no-repeat;
}

/* inlined, so the icons cost no requests of their own */
.contact-icon--bluesky { --icon: url("data:image/svg+xml,%3Csvg role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3EBluesky%3C/title%3E%3Cpath d='M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026'/%3E%3C/svg%3E"); }
.contact-icon--discord { --icon: url("data:image/svg+xml,%3Csvg role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3EDiscord%3C/title%3E%3Cpath d='M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z'/%3E%3C/svg%3E"); }
.contact-icon--github { --icon: url("data:image/svg+xml,%3Csvg role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3EGitHub%3C/title%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"); }
.contact-icon--mail { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h16q.825 0 1.413.588T22 6v12q0 .825-.587 1.413T20 20zm8-7l8-5V6l-8 5l-8-5v2z'/%3E%3C/svg%3E"); }
.contact-icon--roblox { --icon: url("data:image/svg+xml,%3Csvg role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3ERoblox%3C/title%3E%3Cpath d='M18.926 23.998 0 18.892 5.075.002 24 5.108ZM15.348 10.09l-5.282-1.453-1.414 5.273 5.282 1.453z'/%3E%3C/svg%3E"); }
.contact-icon--steam { --icon: url("data:image/svg+xml,%3Csvg role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3ESteam%3C/title%3E%3Cpath d='M11.979 0C5.678 0 .511 4.86.022 11.037l6.432 2.658c.545-.371 1.203-.59 1.912-.59.063 0 .125.004.188.006l2.861-4.142V8.91c0-2.495 2.028-4.524 4.524-4.524 2.494 0 4.524 2.031 4.524 4.527s-2.03 4.525-4.524 4.525h-.105l-4.076 2.911c0 .052.004.105.004.159 0 1.875-1.515 3.396-3.39 3.396-1.635 0-3.016-1.173-3.331-2.727L.436 15.27C1.862 20.307 6.486 24 11.979 24c6.627 0 11.999-5.373 11.999-12S18.605 0 11.979 0zM7.54 18.21l-1.473-.61c.262.543.714.999 1.314 1.25 1.297.539 2.793-.076 3.332-1.375.263-.63.264-1.319.005-1.949s-.75-1.121-1.377-1.383c-.624-.26-1.29-.249-1.878-.03l1.523.63c.956.4 1.409 1.5 1.009 2.455-.397.957-1.497 1.41-2.454 1.012H7.54zm11.415-9.303c0-1.662-1.353-3.015-3.015-3.015-1.665 0-3.015 1.353-3.015 3.015 0 1.665 1.35 3.015 3.015 3.015 1.663 0 3.015-1.35 3.015-3.015zm-5.273-.005c0-1.252 1.013-2.266 2.265-2.266 1.249 0 2.266 1.014 2.266 2.266 0 1.251-1.017 2.265-2.266 2.265-1.253 0-2.265-1.014-2.265-2.265z'/%3E%3C/svg%3E"); }
.contact-icon--tumblr { --icon: url("data:image/svg+xml,%3Csvg role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3ETumblr%3C/title%3E%3Cpath d='M14.563 24c-5.093 0-7.031-3.756-7.031-6.411V9.747H5.116V6.648c3.63-1.313 4.512-4.596 4.71-6.469C9.84.051 9.941 0 9.999 0h3.517v6.114h4.801v3.633h-4.82v7.47c.016 1.001.375 2.371 2.207 2.371h.09c.631-.02 1.486-.205 1.936-.419l1.156 3.425c-.436.636-2.4 1.374-4.156 1.404h-.178l.011.002z'/%3E%3C/svg%3E"); }
.contact-icon--twitch { --icon: url("data:image/svg+xml,%3Csvg role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3ETwitch%3C/title%3E%3Cpath d='M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z'/%3E%3C/svg%3E"); }
.contact-icon--twitter { --icon: url("data:image/svg+xml,%3Csvg role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3ETwitter%3C/title%3E%3Cpath d='M21.543 7.104c.015.211.015.423.015.636 0 6.507-4.954 14.01-14.01 14.01v-.003A13.94 13.94 0 0 1 0 19.539a9.88 9.88 0 0 0 7.287-2.041 4.93 4.93 0 0 1-4.6-3.42 4.916 4.916 0 0 0 2.223-.084A4.926 4.926 0 0 1 .96 9.167v-.062a4.887 4.887 0 0 0 2.235.616A4.928 4.928 0 0 1 1.67 3.148 13.98 13.98 0 0 0 11.82 8.292a4.929 4.929 0 0 1 8.39-4.49 9.868 9.868 0 0 0 3.128-1.196 4.941 4.941 0 0 1-2.165 2.724A9.828 9.828 0 0 0 24 4.555a10.019 10.019 0 0 1-2.457 2.549z'/%3E%3C/svg%3E"); }

.contact-label {
  font-weight: 700;
}

.contact-leader {
  flex: 1;
  align-self: flex-end;
  height: calc(2 * var(--unit));
  margin: 0 calc(4 * var(--unit)) calc(7 * var(--unit));
  background: repeating-linear-gradient(90deg, #8e8473 0 calc(2 * var(--unit)), transparent 0 calc(8 * var(--unit)));
}

.contact-listings a:hover .contact-handle,
.contact-listings button:hover .contact-handle {
  text-decoration: underline;
}

.contact-listings button.is-copied .contact-handle::after {
  content: " copied!";
  color: #8a5a48;
}

.contact-footnote {
  padding-top: calc(12 * var(--unit));
  border-top: calc(1 * var(--unit)) solid #8e8473;
  color: #6b5a78;
  font: 300 calc(14 * var(--unit)) "Builder Mono", monospace;
}

/* ===================== Work: business cards ===================== */

.work-stack {
  position: absolute;
  left: calc(var(--x) * var(--unit));
  top: calc(var(--y) * var(--unit));
  width: calc(500 * var(--unit));
  height: calc(560 * var(--unit));
  perspective: calc(1600 * var(--unit));
  scroll-margin-top: calc(160 * var(--unit));
}

.work-stack-tape {
  z-index: 5;
  left: calc(313 * var(--unit));
  top: calc(12 * var(--unit));
  width: calc(165 * var(--unit));
  box-sizing: border-box;
  font-size: calc(31 * var(--unit));
  rotate: 5deg;
}

/* Cards are laid out in their own 460 × 262 design, shown at 87% on the board. */
.business-card {
  --card-unit: calc(var(--unit) * 0.87);
  position: absolute;
  left: calc(var(--x) * var(--unit));
  top: calc(var(--y) * var(--unit));
  width: calc(460 * var(--card-unit));
  height: calc(262 * var(--card-unit));
  rotate: var(--rotation);
  transform-style: preserve-3d;
  transition: translate 0.25s ease, rotate 0.25s ease, transform 0.6s ease;
  cursor: pointer;
}

.business-card:hover,
.business-card:focus-visible {
  z-index: 4;
  translate: 0 calc(-18 * var(--unit));
  rotate: 0deg;
}

.business-card.is-flipped {
  z-index: 4;
  rotate: 0deg;
  transform: rotateY(180deg);
}

.business-card-face {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: calc(10 * var(--card-unit));
  background: var(--card-background);
  color: var(--card-text-color);
  font-family: var(--card-font);
  line-height: normal;
  backface-visibility: hidden;
  box-shadow:
    inset 0 0 calc(4 * var(--card-unit)) #0000004d,
    0 calc(12 * var(--card-unit)) calc(22 * var(--card-unit)) #00000073;
}

/* Front: every element sits where the FigCraft card component puts it (x, y on the 460 × 262 card). */
.business-card-front > *,
.business-card-header > * {
  position: absolute;
  white-space: nowrap;
}

.business-card-header {
  display: contents;
}

.business-card-logo {
  left: calc(var(--card-logo-x) * var(--card-unit));
  top: calc(var(--card-logo-y) * var(--card-unit));
  width: calc(var(--card-logo-width) * var(--card-unit));
  height: calc(var(--card-logo-height) * var(--card-unit));
}

.business-card-name {
  left: calc(var(--card-name-x) * var(--card-unit));
  top: calc(var(--card-name-y) * var(--card-unit));
  font-size: calc(var(--card-name-size) * var(--card-unit));
  font-weight: var(--card-name-weight);
}

.business-card-person {
  left: calc(28 * var(--card-unit));
  top: calc(var(--card-person-y, 160) * var(--card-unit));
  font-size: calc(var(--card-person-size, 26) * var(--card-unit));
  font-weight: var(--card-person-weight);
}

.business-card-role {
  left: calc(28 * var(--card-unit));
  top: calc(var(--card-role-y, 196) * var(--card-unit));
  color: var(--card-muted-color);
  font-size: calc(var(--card-role-size, 18) * var(--card-unit));
  font-weight: var(--card-role-weight, 400);
}

.business-card-note {
  right: calc(28 * var(--card-unit));
  top: calc(222 * var(--card-unit));
  color: var(--card-accent-color);
  font-size: calc(var(--card-note-size, 14) * var(--card-unit));
  font-weight: var(--card-note-weight, 600);
}

.business-card-back {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(16 * var(--card-unit));
  padding: calc(22 * var(--card-unit)) calc(28 * var(--card-unit));
  transform: rotateY(180deg);
  font-size: calc(var(--card-back-size, 19) * var(--card-unit));
  line-height: 1.35;
}

.business-card-back a {
  color: var(--card-accent-color);
  font-weight: 600;
}

.business-card--cofi {
  --card-background: linear-gradient(#ffc6de, #fff0d8);
  --card-text-color: #333333;
  --card-muted-color: #555555;
  --card-accent-color: #a879f5;
  --card-font: "Fira Sans", sans-serif;
  --card-logo-x: 26.5; --card-logo-y: 28.7; --card-logo-width: 75; --card-logo-height: 53.9;
  --card-name-x: 112; --card-name-y: 32; --card-name-size: 36; --card-name-weight: 600;
  --card-person-weight: 600;
  --card-note-size: 15; --card-note-weight: 500;
}

.business-card--secretverse {
  --card-background: linear-gradient(#11131a, #08090d);
  --card-text-color: #ffffff;
  --card-muted-color: #9aa0ad;
  --card-accent-color: #2e9bff;
  --card-font: "Inter", sans-serif;
  --card-logo-x: 20; --card-logo-y: 24; --card-logo-width: 78; --card-logo-height: 61;
  --card-name-x: 108; --card-name-y: 30; --card-name-size: 36; --card-name-weight: 700;
  --card-person-y: 156; --card-person-size: 30; --card-person-weight: 700;
  --card-role-y: 198; --card-role-size: 17;
  --card-note-size: 13; --card-note-weight: 500;
}

.business-card--secretverse .business-card-name,
.business-card--secretverse .business-card-person {
  font-family: "Antonio", sans-serif;
}

.business-card-name small {
  margin-left: calc(10 * var(--card-unit));
  color: #626877;
  font: 500 calc(11 * var(--card-unit)) "Inter", sans-serif;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.business-card-label {
  left: calc(28 * var(--card-unit));
  top: calc(130 * var(--card-unit));
  display: flex;
  align-items: center;
  gap: calc(8 * var(--card-unit));
  color: #626877;
  font-size: calc(10 * var(--card-unit));
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.business-card-label::before {
  content: "";
  width: calc(20 * var(--card-unit));
  height: calc(1.5 * var(--card-unit));
  background: #2e9bff;
}

.business-card--void-mov {
  --card-background: linear-gradient(#202227, #11131b);
  --card-text-color: #ffffff;
  --card-muted-color: #ffffffb3;
  --card-accent-color: #6a6f81;
  --card-font: "Montserrat", sans-serif;
  --card-logo-x: 24; --card-logo-y: 20; --card-logo-width: 72; --card-logo-height: 72;
  --card-name-x: 112; --card-name-y: 34; --card-name-size: 32; --card-name-weight: 800;
  --card-person-weight: 700;
  --card-role-weight: 500;
}

.business-card--void-mov .business-card-back a {
  color: #8fb8ff;
}

.business-card--reimplemented {
  --card-background: #32243f;
  --card-text-color: #ffffff;
  --card-muted-color: #ffffffb3;
  --card-accent-color: #f4ee73;
  --card-font: "Tamrin", sans-serif;
  --card-logo-x: 18; --card-logo-y: 8; --card-logo-width: 94; --card-logo-height: 94;
  --card-name-x: 114; --card-name-y: 43; --card-name-size: 20; --card-name-weight: 400;
  --card-person-weight: 400;
  --card-back-size: 14;
}

.business-card--reimplemented .business-card-face::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: calc(10 * var(--card-unit));
  background: linear-gradient(90deg, #f4ee73, #ffffff, #2a2fd6);
}

/* ===================== Favorite games: disc fan ===================== */

.disc-fan {
  position: absolute;
  left: calc(var(--x) * var(--unit));
  top: calc(var(--y) * var(--unit));
  width: calc(1084 * var(--unit));
  height: calc(356 * var(--unit));
  scroll-margin-top: calc(300 * var(--unit));
}

.disc-fan ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.disc-fan li {
  position: absolute;
  left: calc(var(--x) * var(--unit));
  top: calc(var(--y) * var(--unit));
  width: calc(236 * var(--unit));
  height: calc(236 * var(--unit));
  rotate: var(--rotation);
  filter: drop-shadow(0 calc(8 * var(--unit)) calc(14 * var(--unit)) #00000070);
  transition: translate 0.25s ease, rotate 0.25s ease;
  pointer-events: none;
}

.disc-fan li:hover {
  z-index: 2;
  translate: 0 calc(-16 * var(--unit));
  rotate: 0deg;
}

/* only the round disc takes the pointer, not the transparent corners of its square image */
.disc-fan img {
  display: block;
  width: 100%;
  height: 100%;
  clip-path: circle(50%);
  pointer-events: auto;
}

/* light sheen over the disc, with the centre hole left clear */
.disc-fan li::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#fff0, #fff3, #fff0 15%, #fff0 50%, #fff2, #fff0 65%, #fff0 75%, #fff3, #fff0);
  mask: radial-gradient(circle, transparent 12.5%, #000 13%);
  pointer-events: none;
}

.disc-fan-tape {
  left: calc(455 * var(--unit));
  top: calc(280 * var(--unit));
  width: calc(190 * var(--unit));
  box-sizing: border-box;
  rotate: 3deg;
}

/* ===================== Post-it ===================== */

.post-it {
  --paper-color: #f4e07a;
  --paper-texture: url(assets/papers/postit.webp);
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: calc(320 * var(--unit));
  height: calc(300 * var(--unit));
  padding: calc(64 * var(--unit)) calc(34 * var(--unit)) 0;
  color: #3a2a1c;
  font: 600 calc(44 * var(--unit)) / 1.05 "Caveat", cursive;
  text-decoration: none;
  transition: rotate 0.25s ease;
}

.post-it:hover {
  rotate: 1deg;
}

.post-it svg {
  align-self: center;
  width: calc(80 * var(--unit));
  margin-top: calc(6 * var(--unit));
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
}

/* ===================== Projects: magazine clippings ===================== */

.projects {
  position: relative;
  height: calc(1080 * var(--unit));
}

.projects-heading {
  position: absolute;
  left: calc(160 * var(--unit));
  top: calc(200 * var(--unit));
  color: #f1ecf3;
  font: 700 calc(64 * var(--unit)) "Builder Extended", sans-serif;
}

.clipping {
  position: absolute;
  left: calc(var(--x) * var(--unit));
  top: calc(var(--y) * var(--unit));
  width: calc(480 * var(--unit));
  height: calc(560 * var(--unit));
  rotate: var(--rotation);
  filter: drop-shadow(0 calc(10 * var(--unit)) calc(18 * var(--unit)) #00000066);
}

.clipping--paper-1 {
  --clipping-cut: polygon(0.34% 0.13%, 19.48% -0.21%, 35.88% 0.05%, 62.96% -0.20%, 76.79% 0.19%, 99.32% 0.08%, 99.42% 34.04%, 99.74% 71.22%, 99.33% 99.67%, 68.33% 99.94%, 36.95% 99.80%, 0.07% 99.64%, 0.21% 77.94%, 0.09% 48.50%, -0.13% 24.53%);
  --clipping-paper-color: #f8f7f3;
  --clipping-paper-texture: url(assets/papers/proj-1.webp);
  --clipping-headline-background: #ffffff;
}

.clipping--paper-2 {
  --clipping-cut: polygon(0.17% 0.62%, 30.61% 0.19%, 65.00% 0.62%, 99.34% 0.51%, 99.67% 23.17%, 99.90% 37.38%, 99.37% 64.70%, 99.56% 83.24%, 99.73% 99.29%, 81.67% 99.36%, 64.03% 99.06%, 41.80% 99.76%, 17.62% 99.87%, 1.01% 99.63%, 0.78% 67.09%, 0.45% 35.18%);
  --clipping-paper-color: #f7f3ea;
  --clipping-paper-texture: url(assets/papers/proj-2.webp);
  --clipping-headline-background: #f4d23c;
}

.clipping--paper-3 {
  --clipping-cut: polygon(0.59% 0.56%, 34.60% 0.47%, 70.89% 0.40%, 99.15% 0.30%, 99.04% 29.41%, 99.34% 47.79%, 99.59% 74.44%, 99.19% 99.20%, 64.19% 99.50%, 30.42% 99.33%, 1.14% 99.87%, 0.64% 73.24%, 1.33% 54.62%, 0.48% 27.53%);
  --clipping-paper-color: #f5f6f8;
  --clipping-paper-texture: url(assets/papers/proj-3.webp);
  --clipping-headline-background: #ffffff;
}

.clipping-page {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  padding: calc(64 * var(--unit)) calc(22 * var(--unit)) 0;
  overflow: hidden;
  clip-path: var(--clipping-cut);
  background-color: var(--clipping-paper-color);
  background-image: var(--clipping-paper-texture);
  background-size: 100% 100%;
  background-blend-mode: multiply;
  color: #23202a;
  font-family: "Nunito Sans", sans-serif;
}

.clipping-header {
  position: absolute;
  inset: calc(14 * var(--unit)) 0 auto calc(22 * var(--unit));
  display: flex;
  align-items: baseline;
  gap: calc(6 * var(--unit));
}

.clipping-page-number {
  font-size: calc(17 * var(--unit));
  font-weight: 600;
}

.clipping-folio {
  font-size: calc(11 * var(--unit));
}

.clipping-tag {
  position: absolute;
  left: calc(22 * var(--unit));
  top: calc(48 * var(--unit));
  padding: 0 calc(3 * var(--unit));
  background: #b9b6be;
  color: #ffffff;
  font-size: calc(8 * var(--unit));
  font-weight: 700;
  line-height: calc(11 * var(--unit));
}

.clipping-photo {
  display: block;
  width: 100%;
  height: calc(270 * var(--unit));
  object-fit: cover;
}

.clipping-headline {
  width: fit-content;
  max-width: 90%;
  margin: calc(-24 * var(--unit)) auto 0;
  padding: calc(4 * var(--unit)) calc(14 * var(--unit)) calc(6 * var(--unit));
  position: relative;
  background: var(--clipping-headline-background);
  font-size: calc(28 * var(--unit));
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.clipping-headline a {
  text-decoration: none;
}

.clipping-headline a:hover {
  text-decoration: underline;
}

.clipping-body {
  margin-top: calc(16 * var(--unit));
  font-size: calc(13.5 * var(--unit));
  line-height: calc(19 * var(--unit));
}

.clipping-body p + p {
  margin-top: calc(7 * var(--unit));
}

.clipping-body p:first-child::first-letter {
  float: left;
  margin: calc(3 * var(--unit)) calc(8 * var(--unit)) 0 0;
  font-size: calc(46 * var(--unit));
  font-weight: 900;
  line-height: 0.8;
}

.clipping-callout {
  font-weight: 700;
}

/* ===================== Phone ===================== */

@media (max-width: 760px) {
  .intro,
  .top-bar,
  .board-page {
    --unit: calc(100cqw / 560);
  }

  .intro {
    min-height: calc(1100 * var(--unit));
  }

  /* about 70% of the screen wide, just below the resting coin (main.ts sets --coin-resting-bottom) */
  .hello-card {
    left: 50%;
    top: calc(var(--coin-resting-bottom, 35%) + 24 * var(--unit));
    translate: -50% 0;
    width: calc(392 * var(--unit));
    min-height: 0;
    scale: none;
    padding: calc(44 * var(--unit)) calc(32 * var(--unit)) calc(38 * var(--unit));
  }

  .hello-card-name {
    font-size: calc(39 * var(--unit));
  }

  .hello-card-pronouns {
    font-size: calc(19 * var(--unit));
  }

  .hello-card-blurb {
    margin-top: calc(18 * var(--unit));
    font-size: calc(20 * var(--unit));
  }

  .hello-card-scribble {
    right: calc(40 * var(--unit));
    bottom: calc(14 * var(--unit));
    font-size: calc(24 * var(--unit));
  }

  .top-bar-links {
    gap: calc(22 * var(--unit));
  }

  .top-bar-links a {
    font-size: calc(25 * var(--unit));
    white-space: nowrap;
  }

  .board,
  .projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(80 * var(--unit));
    height: auto;
    padding: calc(60 * var(--unit)) 0 calc(120 * var(--unit));
  }

  .board > *,
  .projects > * {
    position: relative;
    left: auto;
    top: auto;
  }

  .about-paper {
    order: 1;
    height: auto;
    padding-bottom: calc(60 * var(--unit));
  }

  .work-stack {
    order: 2;
  }

  .contact-paper {
    order: 3;
  }

  .disc-fan {
    --unit: calc(100cqw / 1180);
    order: 4;
  }

  .post-it {
    display: none;
  }

  .projects {
    padding-top: calc(40 * var(--unit));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .scroll-hint {
    opacity: 1;
  }
}
