.tabletop {
  position: relative;
  container-type: inline-size;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1.46;
  border-radius: 4px;
  background-color: #a82e21;
  background-image:
    radial-gradient(ellipse at 24% 15%, #ffa77738, transparent 65%),
    linear-gradient(100deg, transparent 48%, #52150917 100%),
    repeating-linear-gradient(90deg, #661b192d 0 19px, transparent 19px 38px),
    repeating-linear-gradient(0deg, #65191c37 0 19px, transparent 19px 38px);
  box-shadow: inset 0 0 0 1px #77291a24;
  perspective: 900px;
  touch-action: pan-y;
}
.plate-position {
  position: absolute;
  width: 63%;
  aspect-ratio: 1;
  top: 49%;
  left: 50%;
  transform: translate(-50%,-50%);
  perspective: 850px;
}
.plate {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #e2ddc8 0 60%, #c9bea6 63%, #fcf6dd 66%, #e3ddc5 67%, #fff9e7 68% 69%, #d2c9b7 70%);
  box-shadow: 1px 3px 0 #baad91, 2px 5px 0 #98896d, 6px 14px 15px #4e160f66, 6px 26px 30px #48120d55;
  transform: rotateX(calc(17deg + var(--pitch, 0deg))) rotateY(var(--yaw, 0deg)) rotateZ(-8deg);
  transform-style: preserve-3d;
  transition: transform .3s ease-out;
}
.plate::before { content: ""; position: absolute; inset: 2.7%; border: 1.5px solid #4c6854; border-radius: 50%; box-shadow: inset 0 0 0 2px #f2edd6, inset 0 0 0 3px #71846d; }
.pizza-photo { position: absolute; inset: 7.5%; transform: translateZ(5px); transform-style: preserve-3d; }
.slice {
  --x: -2%;
  --y: -2%;
  --turn: -1deg;
  border-top-left-radius: 100%;
  transform: translate3d(var(--x),var(--y),0);
  transition: transform .38s cubic-bezier(.23,.8,.27,1.1), filter .3s;
}
.slice.available { cursor: pointer; }
.slice[data-piece="skills"] { --x: 2%; --turn: 3deg; border-radius: 0 100% 0 0; }
.slice[data-piece="education"] { --y: 2%; --turn: -3deg; border-radius: 0 0 0 100%; }
.slice[data-piece="projects"] { --x: 2%; --y: 2%; --turn: 4deg; border-radius: 0 0 100% 0; }
.slice.lifted {
  transform: translate3d(calc(var(--x) * 6),calc(var(--y) * 6),15px) rotate(var(--turn));
  filter: saturate(1.08) brightness(1.055);
}
.tabletop.enter .plate-position { animation: set-down .78s cubic-bezier(.16,.85,.28,1) both; }
@keyframes set-down {
  from { transform: translate(-49%,-55%) rotate(-4deg); }
  to { transform: translate(-50%,-50%) rotate(0); }
}
.hotspots { position: absolute; inset: 0; pointer-events: none; }
.tag {
  --angle: -4deg;
  position: absolute;
  z-index: 2;
  display: inline-grid; place-items: center;
  min-height: 44px; min-width: 44px;
  border: 0; padding: 0;
  background: none;
  pointer-events: auto;
  touch-action: manipulation;
}
.tag span {
  display: flex; align-items: center; gap: .42em;
  background: var(--flavor-paper); color: var(--flavor-ink);
  padding: .42em .72em .43em;
  border-radius: 2px;
  font-size: clamp(.73rem, 2.7cqw, .95rem);
  font-weight: 700; line-height: 1.15;
  box-shadow: 1px 3px 3px #53171040;
  transform: rotate(var(--angle)); transition: transform .2s ease, background .2s;
}
.tag span::before { content: ""; width: .42em; height: .42em; border-radius: 50%; background: var(--flavor-ink); }
.tag::after {
  content: ""; position: absolute; top: 53%; left: 96%; width: clamp(9px,4.5cqw,28px); height: 2px;
  transform: rotate(13deg); transform-origin: left; background: #eadab0; z-index: -1; box-shadow: 0 1px 2px #53171077;
}
.tag[data-part="experience"] { left: 6%; top: 23%; }
.tag[data-part="skills"] { right: 5%; top: 20%; --angle: 5deg; }
.tag[data-part="education"] { left: 6%; bottom: 19%; --angle: 4deg; }
.tag[data-part="projects"] { right: 6%; bottom: 20%; --angle: -5deg; }
.tag[data-part="skills"]::after,.tag[data-part="projects"]::after { left: auto; right: 96%; transform-origin: right; transform: rotate(-18deg); }
.tag[data-part="education"]::after { transform: rotate(-18deg); }
.tag[data-part="projects"]::after { transform: rotate(18deg); }
.tag:focus-visible { outline: 0; }
.tag:focus-visible span { outline: 3px solid #1946ab; outline-offset: 2px; }
.tag.active span { transform: rotate(0) translateY(-2px); outline: 1px solid var(--flavor-ink); }
@media (max-width: 735px) {
  .tabletop { aspect-ratio: 1.55; }
  .plate-position { width: 61%; }
  .tag[data-part="experience"],.tag[data-part="education"] { left: 4%; }
  .tag[data-part="skills"],.tag[data-part="projects"] { right: 4%; }
}
