/* ============================================
   DESK TOP — letter, then contact below
   ============================================ */

.desk-top {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-xl);
}

.desk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: var(--space-md);
}

.desk-date {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  font-weight: 400;
  font-synthesis: none;
  color: var(--ink-soft);
  transform: rotate(-2deg);
  margin: 0;
}

.intro-hi {
  font-family: var(--font-hand);
  font-size: clamp(2.15rem, 4.8vw, 2.95rem);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 1.15rem;
  width: fit-content;
  max-width: 100%;
  transform: rotate(-1.1deg);
  transform-origin: left center;
}

.mode-pill {
  display: flex;
  padding: 3px;
  border: 1px solid rgba(58, 46, 34, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.mode-pill button {
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  color: var(--ink-soft);
}

.mode-pill button[aria-selected="true"] {
  background: var(--ink);
  color: #f4efe3;
}

.intro-view {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.intro-view.is-on {
  opacity: 1;
}

.intro-view.is-leaving {
  opacity: 0;
}

.brief {
  font-family: var(--font-body);
  font-size: 1.092rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 58ch;
}

.brief p + p {
  margin-top: 0.9rem;
}

.brief-close {
  margin-top: 1.2rem;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .intro-view {
    transition: none;
  }
}

.letter {
  font-family: var(--font-hand);
  font-size: clamp(1.411rem, 2.258vw, 1.74rem);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.38;
  color: var(--ink);
}

.letter p + p {
  margin-top: 0.15rem;
}

.letter-close {
  margin-top: 0.85rem;
  text-align: right;
  position: relative;
}

.letter-signoff {
  display: inline-block;
  position: relative;
  margin: 0;
}

.sign-trips {
  position: relative;
  z-index: 1;
}

.letter-aka {
  display: block;
  margin-top: 0.1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink-soft);
}

.pen-slot {
  position: absolute;
  left: 100%;
  bottom: 0.05em;
  width: 0;
  height: 0;
  overflow: visible;
  z-index: 2;
}

.pen-slot img {
  position: absolute;
  left: -4px;
  bottom: 0;
  width: min(188px, 32vw);
  height: auto;
  max-width: none;
  display: block;
  pointer-events: none;
  transform-origin: 8% 88%;
  transform: rotate(-22deg);
  filter: drop-shadow(2px 6px 6px rgba(58, 46, 34, 0.22));
}

.tray {
  margin-top: var(--space-xl);
  margin-bottom: 2.4rem;
  max-width: 26rem;
  overflow: visible;
}

.napkin {
  position: relative;
  background: transparent;
  padding: 1.85rem 4.6rem 2.6rem 1.7rem;
  transform: rotate(-2deg);
}

.napkin-photo {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 104%;
  max-width: none;
  height: auto;
  display: block;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  filter: drop-shadow(2px 7px 8px rgba(58, 46, 34, 0.14));
}

.napkin-links {
  position: relative;
  z-index: 1;
  max-width: 18rem;
}

.napkin a {
  display: block;
  font-family: var(--font-caveat);
  font-size: clamp(1.28rem, 2.1vw, 1.62rem);
  font-weight: 500;
  font-synthesis: none;
  text-decoration: none;
  line-height: 1.42;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.napkin a:hover,
.napkin a:focus-visible {
  color: var(--rust);
}

.resume-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.download-icon {
  width: 0.78em;
  height: 0.78em;
  flex: 0 0 auto;
}

.png-slot:not(.pen-slot) {
  position: relative;
  margin: 0;
}

.png-slot:not(.pen-slot) img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.png-slot figcaption {
  display: none;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 0.4rem 0.5rem 0.6rem;
}

.png-slot.is-missing {
  border: 2px dashed rgba(139, 74, 60, 0.45);
  background: rgba(255, 255, 255, 0.28);
}

.png-slot.is-missing img {
  display: none;
}

.png-slot.is-missing figcaption {
  display: block;
}

.pen-slot.is-missing {
  width: 72px;
  min-height: 1.2em;
  vertical-align: middle;
}

.napkin .boba-slot {
  position: absolute;
  right: -0.35rem;
  bottom: -2.1rem;
  left: auto;
  width: min(118px, 30vw);
  margin: 0;
  z-index: 3;
  transform: rotate(16deg);
  transform-origin: 55% 80%;
  filter: drop-shadow(3px 10px 8px rgba(58, 46, 34, 0.28));
}

.boba-slot.is-missing {
  min-height: 160px;
  border-radius: 50% 50% 40% 40%;
}

@media (max-width: 640px) {
  .desk-topbar {
    flex-wrap: wrap;
  }

  .desk-top {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .napkin {
    padding-right: 3.8rem;
    padding-bottom: 2.5rem;
  }

  .napkin .boba-slot {
    right: -0.15rem;
    bottom: -1.8rem;
  }

  .pen-slot img {
    width: min(118px, 28vw);
  }
}
