/* css/promo.css — right-edge promo column. Owned by Dev 4 (Promo Column).
   Rendered into #promo-root (positioned by css/main.css: fixed, right edge,
   click-through). .tb-promo re-enables pointer events. All classes tb-
   prefixed, everything scoped under #promo-root. */

/* ---------- column container ---------- */

#promo-root .tb-promo {
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
}

/* ---------- shared card chrome ---------- */

/* shared macOS-widget chrome for every promo card: dark frosted glass,
   identical to the left-side widgets (radius 20px, whisper border) */
#promo-root .tb-promo-card {
  box-sizing: border-box;
  width: 100%;
  border-radius: 20px;
  color: #fff;
  background: rgba(28, 28, 30, 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

/* ---------- 1. personal profile and project list ---------- */

#promo-root .tb-profile {
  --profile-text: #fff;
  --profile-secondary: rgba(255, 255, 255, .88);
  --profile-muted: rgba(255, 255, 255, .72);
  --profile-rule: rgba(255, 255, 255, .18);
  padding: 20px;
  color: var(--profile-text);
}

#promo-root .tb-profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

#promo-root .tb-profile-avatar {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 0;
}

/* The outer footprint stays fixed; only the articulated bones move. */
#promo-root .tb-avatar-frame {
  position: relative;
  display: block;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  isolation: isolate;
  overflow: visible;
}
#promo-root .tb-vader-rig {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
#promo-root .tb-vader-rig image { image-rendering: pixelated; }
#promo-root .tb-avatar-rigged .tb-profile-avatar { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  #promo-root .tb-vader-rig { visibility: hidden; }
  #promo-root .tb-avatar-rigged .tb-profile-avatar { visibility: visible; }
}
html[data-glass-motion="off"] #promo-root .tb-vader-rig { visibility: hidden; }
html[data-glass-motion="off"] #promo-root .tb-avatar-rigged .tb-profile-avatar { visibility: visible; }

#promo-root .tb-profile-identity { min-width: 0; }
#promo-root .tb-profile-about {
  display: inline-block;
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-shadow: inherit;
  cursor: pointer;
  text-align: left;
  transition: opacity 160ms ease, transform 160ms ease;
}
#promo-root .tb-profile-about::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
#promo-root .tb-profile-about:hover { transform: translateY(-1px); }
#promo-root .tb-profile-about:hover::after,
#promo-root .tb-profile-about:focus-visible::after { transform: scaleX(1); }
#promo-root .tb-profile-about:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
@media (prefers-reduced-motion: reduce) {
  #promo-root .tb-profile-about,
  #promo-root .tb-profile-about::after { transition: none; transform: none; }
}
#promo-root .tb-profile-name {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.6px;
}

#promo-root .tb-profile-website {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin-top: 4px;
  color: var(--profile-secondary);
  font-size: 12px;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .3);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  border-radius: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
#promo-root .tb-profile-website:hover {
  color: var(--profile-text);
  text-decoration-color: currentColor;
}
#promo-root .tb-profile-website:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

#promo-root .tb-profile-projects {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--profile-rule);
}
#promo-root .tb-profile-eyebrow {
  margin: 0 0 4px;
  color: var(--profile-muted);
  font-size: 10px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: none;
}
#promo-root .tb-project-list { margin: 0; padding: 0; list-style: none; }
#promo-root .tb-project {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
}
#promo-root .tb-project + .tb-project { border-top: 1px solid var(--profile-rule); }
#promo-root .tb-project:last-child { padding-bottom: 0; }
#promo-root .tb-project-link {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 18px;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
}
#promo-root .tb-project-arrow {
  align-self: start;
  margin-top: 1px;
  color: var(--profile-secondary);
  transition: color 160ms ease, transform 160ms ease;
}
#promo-root .tb-project-arrow svg { display: block; width: 18px; height: 18px; }
#promo-root .tb-project-link:hover .tb-project-name {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
#promo-root .tb-project-link:hover .tb-project-arrow {
  color: var(--profile-text);
  transform: translate(1px, -1px);
}
#promo-root .tb-project-link:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
@media (prefers-reduced-motion: reduce) {
  #promo-root .tb-project-arrow { transition: none; }
}
#promo-root .tb-project-number {
  padding-top: 2px;
  color: var(--profile-muted);
  font-size: 10px;
  line-height: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
#promo-root .tb-project-name {
  margin: 0;
  font-size: 15px;
  line-height: 20px;
  font-weight: 650;
  letter-spacing: -.2px;
}
#promo-root .tb-project-description {
  margin: 2px 0 0;
  color: var(--profile-secondary);
  font-size: 12px;
  line-height: 16px;
  overflow-wrap: break-word;
}

@media (max-width: 768px) {
  #promo-root .tb-profile-website { min-height: 44px; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #promo-root .tb-profile-website { transition: none; }
}

/* ---------- 2. macOS Stickies-inspired credit note ---------- */
/* Native CSS interpretation of Apple's paper note, not an Apple component.
   Taste settings: variance 2, motion 2, density 4 for this existing desktop.
   The entire note stays a link and retains its existing drag behavior. */
#promo-root .tb-promo-card--sticky {
  position: relative;
  display: block;
  min-height: 96px;
  padding: 0;
  overflow: hidden;
  border-radius: 3px;
  background: #fff7b3;
  border: 1px solid rgba(117, 103, 39, .28);
  box-shadow: 0 1px 2px rgba(55, 47, 12, .16),
              0 7px 20px rgba(55, 47, 12, .16),
              inset 0 0 0 1px rgba(255, 255, 255, .22);
  color: #302e25;
  font-family: var(--tb-font);
  text-shadow: none;
  text-decoration: none;
  transform: none;
  transition: box-shadow 160ms cubic-bezier(.2, .7, .3, 1),
              border-color 160ms cubic-bezier(.2, .7, .3, 1);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#promo-root .tb-promo-sticky-header {
  display: block;
  height: 12px;
  background: #f4e895;
  border-bottom: 1px solid rgba(131, 112, 30, .14);
  box-shadow: inset 0 1px rgba(255, 255, 255, .38);
  pointer-events: none;
}

#promo-root .tb-promo-sticky-text { padding: 15px 17px 17px; }

#promo-root .tb-promo-sticky-line {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -.1px;
  color: #302e25;
}

.tb-credit-heart {
  display: inline-block;
  transform-origin: center;
  animation: tb-credit-heartbeat 1.8s ease-in-out infinite;
}
@keyframes tb-credit-heartbeat {
  0%, 40%, 100% { transform: scale(1); }
  12% { transform: scale(1.18); }
  22% { transform: scale(1.02); }
  30% { transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .tb-credit-heart { animation: none; }
}

#promo-root .tb-promo-sticky-url {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #0057ad;
  text-decoration: underline;
  text-decoration-color: rgba(0, 87, 173, .38);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

#promo-root .tb-promo-card--sticky:hover {
  transform: none;
  border-color: rgba(117, 103, 39, .4);
  box-shadow: 0 1px 2px rgba(55, 47, 12, .16),
              0 9px 24px rgba(55, 47, 12, .2),
              inset 0 0 0 1px rgba(255, 255, 255, .22);
}

#promo-root .tb-promo-card--sticky:hover .tb-promo-sticky-url { text-decoration-color: currentColor; }
#promo-root .tb-promo-card--sticky:active { background: #faf0a6; }
#promo-root .tb-promo-card--sticky:focus-visible {
  outline: 3px solid #007aff;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  #promo-root .tb-promo-card--sticky {
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  #promo-root .tb-promo-card--sticky { transition: none; }
}
