/* My Moonshots: an easter egg behind the lightbulb badge on the hero portrait. */
/* Breadcrumb 1: one flicker per visit. */
.portrait-badge.ms-flick { animation: ms-nudge 1.1s ease-in-out 1; }
.portrait-badge.ms-flick svg { animation: ms-flick 1.1s ease-in-out 1; }
.portrait-badge.ms-flick svg path:last-child { transform-origin: 32px 22px; animation: ms-rays 1.1s ease-out 1; }
@keyframes ms-flick { 0%, 100% { color: var(--ink); } 12%, 22% { color: var(--orange); } 17% { color: var(--ink); } 34%, 70% { color: var(--orange); } }
@keyframes ms-rays { 0%, 30% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .2; } 70%, 100% { transform: scale(1); opacity: 1; } }
@keyframes ms-nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } 40% { box-shadow: 0 0 0 10px rgba(255, 255, 255, .55); } }
/* Breadcrumb 2: the clue, beside the bulb. */
.ms-tip { position: absolute; right: 8px; bottom: 128px; z-index: 3; font: 400 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: #fff8f1; padding: 8px 10px 7px; white-space: nowrap; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.ms-tip::after { content: ''; position: absolute; right: 36px; top: 100%; border: 6px solid transparent; border-top-color: var(--ink); }
.ms-tip i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); margin-right: 7px; vertical-align: 1px; }
.portrait-badge.ms-trigger:hover ~ .ms-tip, .portrait-badge.ms-trigger:focus-visible ~ .ms-tip { opacity: 1; transform: none; }
@media (max-width: 800px) { .ms-tip { right: 0; bottom: 88px; font-size: 9px; } .ms-tip::after { right: 26px; } }
@media (max-width: 600px) { .ms-tip { bottom: 92px; } }
@media (prefers-reduced-motion: reduce) { .portrait-badge.ms-flick, .portrait-badge.ms-flick svg, .portrait-badge.ms-flick svg path:last-child { animation: none; } .ms-tip { transition: none; } }
.portrait-badge.ms-trigger { cursor: pointer; transition: transform .25s cubic-bezier(.3, .7, .3, 1.6), box-shadow .25s; }
.portrait-badge.ms-trigger:hover { transform: rotate(-6deg) scale(1.08); box-shadow: 0 0 0 6px rgba(255, 255, 255, .45); }
.portrait-badge.ms-trigger:active { transform: rotate(-6deg) scale(.96); }
.portrait-badge.ms-trigger svg { transition: color .2s; }
.portrait-badge.ms-trigger:hover svg { color: var(--orange); }

.ms { position: fixed; inset: 0; z-index: 200; overflow: hidden; color: var(--ink); font-family: var(--sans);
  background:
    radial-gradient(ellipse 55% 60% at 50% 52%, #ffb070 0%, rgba(255, 150, 60, .55) 38%, rgba(255, 118, 0, 0) 70%),
    linear-gradient(180deg, #ff8a1f 0%, #ff7600 45%, #e86a00 78%, #c95700 100%); }
.ms[hidden] { display: none; }
.ms * { box-sizing: border-box; }
.ms-stage { position: absolute; inset: 0; }
.ms-el { position: absolute; left: 0; top: 0; will-change: transform; }
.ms-dust { border-radius: 50%; background: #fff8f1; pointer-events: none; }
.ms-tile { border-radius: 16px; background: rgba(255, 248, 241, .14); border: 1px solid rgba(255, 248, 241, .2); pointer-events: none; }
.ms-head { pointer-events: none; filter: drop-shadow(0 40px 50px rgba(90, 30, 0, .45)); }
.ms-head img { display: block; width: 100%; height: auto; }
.ms svg.ms-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }

.ms-card { padding: 0; border: 0; background: #fff; border-radius: 14px; overflow: hidden; cursor: pointer; transform-origin: 50% 50%;
  box-shadow: 0 30px 60px -20px rgba(60, 20, 0, .55), 0 0 0 3px rgba(255, 255, 255, .9); transition: box-shadow .2s; }
.ms-card img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ms-card:hover, .ms-card:focus-visible { box-shadow: 0 34px 70px -18px rgba(60, 20, 0, .65), 0 0 0 4px #111; outline: none; }
.ms-chip { position: absolute; left: 10px; bottom: 10px; font: 400 11px/1 var(--mono); letter-spacing: .08em; color: #fff8f1; background: #111; padding: 6px 9px 5px; border-radius: 5px; text-transform: uppercase; white-space: nowrap; }
.ms-chip i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); margin-right: 6px; vertical-align: 1px; }

.ms-title { position: absolute; left: clamp(20px, 4vw, 56px); top: clamp(18px, 4vh, 44px); z-index: 400; pointer-events: none; }
.ms-title p { font: 400 10px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.ms-title h2 { font: 700 clamp(44px, 6vw, 92px)/.86 var(--display); letter-spacing: -.02em; margin: 10px 0 0; }
.ms-title h2 span { color: #fff; }
.ms-hint { position: absolute; left: 0; right: 0; bottom: clamp(16px, 3vh, 30px); text-align: center; z-index: 400; font: 400 10px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; margin: 0; pointer-events: none; }
.ms-close { position: absolute; right: clamp(16px, 3vw, 40px); top: clamp(16px, 3vh, 36px); z-index: 500; width: 52px; height: 52px; border-radius: 50%; border: 2px solid #111; background: #fff; color: #111; display: grid; place-items: center; font: 400 26px/1 var(--sans); }
.ms-close:hover { background: #111; color: #fff; }

/* A file: the project's card, opened. */
.ms-file { position: absolute; z-index: 450; right: clamp(16px, 3vw, 40px); top: 50%; transform: translateY(-50%); width: min(420px, calc(100% - 32px)); background: #fff; border: 2px solid #111; padding: 0 0 22px; box-shadow: 12px 12px 0 #111; }
.ms-file[hidden] { display: none; }
.ms-file img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 2px solid #111; }
.ms-file-body { padding: 18px 22px 0; }
.ms-file .ms-kicker { font: 400 10px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #b34b00; margin: 0; }
.ms-file h3 { font: 700 44px/.95 var(--display); margin: 8px 0 12px; }
.ms-file p.ms-line { font-size: 13px; line-height: 1.7; color: #444; margin: 0 0 18px; }
.ms-links { display: flex; flex-wrap: wrap; gap: 10px; }
.ms-links a { display: inline-flex; align-items: center; gap: 14px; background: var(--orange); color: #111; font: 600 16px/1 var(--display); letter-spacing: .02em; padding: 12px 14px; text-transform: uppercase; }
.ms-links a.ghost { background: transparent; border: 2px solid #111; padding: 10px 12px; }
.ms-links a:hover { background: #111; color: #fff; }
.ms-links a span { font-size: 11px; }
.ms-soon { display: inline-flex; align-items: center; font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #606060; border: 1.5px dashed #999; padding: 11px 13px; }
.ms-back { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 2px solid #111; background: #fff; font: 400 20px/1 var(--sans); display: grid; place-items: center; }
.ms-back:hover { background: #111; color: #fff; }

@media (max-width: 700px) {
  .ms-title h2 { font-size: 48px; }
  .ms-chip { font-size: 7px; line-height: 1.35; padding: 3px 6px; left: 5px; bottom: 5px; right: 5px; width: max-content; max-width: calc(100% - 10px); white-space: normal; }
  .ms-file { top: auto; bottom: 0; right: 0; left: 0; transform: none; width: 100%; box-shadow: none; border-width: 2px 0 0; max-height: 78%; overflow: auto; }
  .ms-file h3 { font-size: 38px; }
  .ms-close { width: 44px; height: 44px; font-size: 22px; }
}
