/* Dialogs: about me, testimonial, work history, talks page, password gate and the Figma prototype viewer. */

/* ---- Dialogs: about, testimonial, work history, password and prototype ---- */
.px-overlay {
  z-index: 98;
  padding: clamp(10px, 2.5vw, 28px);
}
.px-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1280px, 100%);
  height: min(860px, 100%);
  background: #14121c;
  color: #eeebf6;
  overflow: hidden;
  box-shadow: 0 30px 80px rgb(0 0 0/0.4);
  transform: scale(0.96) translateY(10px);
  transition: transform 0.34s var(--ease-smooth);
  border-radius: var(--r-lg);
}
.px-overlay.open .px-box {
  transform: none;
}
.px-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 22px;
  border-bottom: 1px solid rgb(255 255 255/0.08);
}
.px-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 15px;
}
.px-title span {
  font-size: 13px;
  opacity: 0.6;
}
.px-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.px-open {
  color: #eeebf6;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255/0.18);
  transition: background 0.2s;
}
.px-open:hover {
  background: rgb(255 255 255/0.1);
}
.px-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #0d0c12;
}
.px-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.px-loading,
.px-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 14px;
  color: rgb(238 235 246/0.7);
  text-align: center;
  padding: 20px;
}
.px-fallback {
  background: #0d0c12;
  z-index: 2;
}
.px-fallback a {
  text-decoration: none;
}
.px-fallback[hidden] {
  display: none;
}
.px-loading span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255/0.15);
  border-top-color: #a08cf0;
  animation: pxspin 0.8s linear infinite;
}
@media (max-width: 640px) {
  .px-title span {
    display: none;
  }
  .px-open {
    padding: 8px 12px;
    font-size: 13px;
  }
}
.tm-quote,
.tm-full {
  font-family: var(--display-sans);
}
/* password dialog: calmer layout, full-width field, paired actions */
.pw-box {
  max-width: 400px;
  padding: 34px 30px 28px;
  background: var(--card);
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 60px rgb(30 27 43/0.22);
  transform: scale(0.94) translateY(8px);
  transition: transform 0.32s var(--ease-smooth);
  position: relative;
  border-radius: var(--r-lg);
}
.pw-box h2 {
  font-size: 22px;
  line-height: 1.25;
  font-family: var(--display);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
}
.pw-sub {
  margin: 8px auto 0;
  max-width: 36ch;
  text-wrap: balance;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
#pwForm {
  flex-direction: column;
  margin-top: 22px;
  text-align: left;
  display: flex;
  gap: 8px;
}
.pw-field {
  position: relative;
  display: block;
}
#pwInput {
  width: 100%;
  font: 400 15px/1 var(--body);
  letter-spacing: 0.02em;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
  height: 56px;
  border-radius: 999px;
  padding: 0 160px 0 22px;
  padding-right: 118px;
  flex: 1 1 auto;
  min-width: 0;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
#pwInput::placeholder {
  color: var(--muted);
  letter-spacing: 0;
}
#pwInput:hover {
  border-color: var(--accent-soft);
}
#pwInput:focus-visible,
#pwInput:focus {
  outline: none;
  border-color: var(--accent) !important;
  background: var(--card);
  box-shadow: 0 0 0 4px rgb(106 75 216/0.22);
}
.pw-field.bad #pwInput {
  border-color: #e36a6a !important;
  box-shadow: 0 0 0 4px rgb(227 106 106/0.16);
  animation: pwShake 0.35s ease;
}
.pw-error {
  color: #c24a4a;
  text-align: left;
  margin: 10px 22px 0;
  font-size: 13px;
}
:root[data-theme="dark"] .pw-error {
  color: #ff9b9b;
}
@media (prefers-reduced-motion: reduce) {
  .pw-field.bad #pwInput {
    animation: none;
  }
}
/* round style: pill field with the unlock button inside it */
.pw-field .pw-submit svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease-spring);
}
.pw-field .pw-submit:hover {
  transform: none;
}
.pw-field .pw-submit:hover svg {
  transform: translateX(3px);
}
.pw-icon {
  width: 92px;
  height: 92px;
  margin: 4px auto 14px;
  background: none;
  border-radius: 0;
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pw-icon svg {
  width: 92px;
  height: 92px;
}
/* about dialog: one centred column, round portrait on top */
.modal:not(.tm-box) {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: clamp(28px, 4vw, 40px) clamp(22px, 4vw, 44px) clamp(24px, 3.5vw, 34px);
  overflow-y: auto;
  align-items: stretch;
  text-align: left;
  width: min(600px, 100%);
}
.modal:not(.tm-box) .ab-av {
  max-width: none;
  aspect-ratio: 1;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 5px var(--bg2);
}
.modal:not(.tm-box) .ab-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: stretch;
}
@media (max-width: 640px) {
  .modal:not(.tm-box) .ab-av {
    width: 88px;
    height: 88px;
    display: block;
  }
}
/* about dialog: left-aligned reading column */
.modal:not(.tm-box) .ab-body p {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.modal:not(.tm-box) .ab-body p strong {
  color: var(--ink);
  font-weight: 600;
}
.modal:not(.tm-box) .ab-body > p:not(.ab-lede) {
  font-size: 14px;
  line-height: 1.6;
  margin-top: 10px;
}
.modal:not(.tm-box) .ab-av {
  width: 88px;
  height: 88px;
  margin-bottom: 12px;
  margin: 0 auto 12px;
  align-self: center;
}
/* centred header and actions, left-aligned reading text */
.modal:not(.tm-box) .modal-kicker,
.modal:not(.tm-box) #abTitle {
  align-self: center;
  text-align: center;
}
.modal:not(.tm-box) .modal-actions {
  justify-content: center;
}
/* work-history dialog */
.modal.tm-box.wh-box {
  overscroll-behavior: contain;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
  padding: 96px 24px 90px;
  overflow-y: auto;
}
.wh-title {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(30px, 4.6vw, 46px);
  padding-right: 0;
}
.wh-lede {
  margin: 10px 0 0;
  line-height: 1.6;
  color: var(--muted);
  font-size: 17px;
}
.wh-list {
  list-style: none;
  margin: 26px 0 0;
  padding: 0 0 0 22px;
  border-left: 2px solid var(--line);
  margin-top: 40px;
}
.wh-item {
  position: relative;
  padding: 0 0 22px;
  padding-bottom: 30px;
}
.wh-dot {
  position: absolute;
  left: -29px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--accent-soft);
}
.wh-now .wh-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(106 75 216/0.18);
}
.wh-date {
  margin: 0;
  font: 500 11px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.wh-item h3 {
  margin: 6px 0 0;
  font: 600 16px/1.35 var(--body);
  color: var(--ink);
  font-size: 18px;
}
.wh-item h3 span {
  font-weight: 500;
  color: var(--muted);
}
.wh-kind {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.wh-tag {
  vertical-align: middle;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--bg2);
  color: var(--accent-strong);
  font: 500 11px/1.3 var(--mono);
  text-transform: uppercase;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  font-size: 11.5px;
  line-height: 1;
  letter-spacing: 0.09em;
}
:root[data-theme="dark"] .wh-tag {
  background: #3a3060;
  color: #e4dcfb;
}
.wh-item ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.wh-item ul li {
  position: relative;
  padding-left: 16px;
  margin: 4px 0;
  line-height: 1.55;
  color: var(--muted);
  font-size: 15px;
}
.wh-item ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent2);
}
.wh-extra {
  display: grid;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 30px;
}
.wh-extra h4 {
  margin: 0 0 4px;
  font: 500 11px/1.3 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent2-text);
}
.wh-extra p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.wh-extra b,
.wh-extra strong {
  color: var(--ink);
  font-weight: 600;
}
.wh-actions {
  justify-content: center;
  margin-top: 20px;
}
/* slim, quiet scrollbars (page, case view, dialogs) */
html,
#caseView,
.modal,
.wh-box,
.tm-box {
  scrollbar-width: thin;
  scrollbar-color: rgb(30 27 43/0.22) transparent;
}
:root[data-theme="dark"],
:root[data-theme="dark"] #caseView,
:root[data-theme="dark"] .modal {
  scrollbar-color: rgb(238 235 246/0.22) transparent;
}
.wh-box > *:not(.modal-close) {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.wh-box > .modal-kicker {
  display: block;
}
@media (max-width: 700px) {
  .wh-extra {
    grid-template-columns: 1fr;
  }
}
.tm-box .tm-head {
  margin-top: 4px;
}
.tm-full {
  margin: 22px 0 0;
  font-weight: 400;
  font-size: clamp(18px, 2.3vw, 22px);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}
.tm-full em {
  font-style: normal;
  color: var(--accent-text);
}
.tm-box .tm-who b {
  font-size: 15px;
}
@media (min-width: 641px) {
  .modal:not(.tm-box) {
    --abp: clamp(22px, 3.4vw, 40px);
  }
}
/* desktop: the photo runs the full height of the dialog, flush to its left edge */
.modal-kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.ab-body h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 6px 0 0;
  color: var(--ink);
}
.ab-body h2 > span:first-child {
  color: var(--accent-text);
}
.ab-body p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.ab-body .ab-lede {
  font-size: 15px;
  color: var(--ink);
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
@media (max-width: 640px) {
  .modal-actions {
    margin-top: 14px;
  }
}
@media (max-width: 640px) and (max-height: 900px) {
  .ab-body > p:not(.ab-lede) {
    display: none;
  }
}
@media (max-width: 640px) and (max-height: 620px) {
  .ab-av {
    display: none;
  }
}
@media (max-height: 560px) {
  .ab-body > p:not(.ab-lede) {
    display: none;
  }
}
.pw-submit:hover {
  transform: translateY(-1px);
}
.pw-submit {
  font: 500 14px/1 var(--body);
  margin: 0;
  transition:
    transform 0.2s ease,
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 0;
  background: var(--accent);
  color: #ffffff;
}
.pw-field .pw-submit {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  height: auto;
  border-radius: 999px;
  padding: 0 16px 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pw-box .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}
.wh-box .modal-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
}
@media (max-width: 640px) {
  .ab-body h2 {
    font-size: 20px;
  }
  .ab-body .ab-lede {
    font-size: 15px;
  }
}
@media (max-width: 700px) {
  .modal.tm-box.wh-box {
    padding: 76px 18px 70px;
  }
}
.tm-box .tm-mark {
  font-size: 72px;
}
.tm-box .tm-by {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-overlay.open .modal {
  transform: none;
}
.pw-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.pw-overlay.open .pw-box {
  transform: scale(1) translateY(0);
}
#pwInput:focus-visible {
  outline: none;
  border-color: var(--accent-text);
}
/* work history: full-screen reading view */
.modal-overlay.wh-overlay {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  background: var(--bg);
  backdrop-filter: none;
}
.modal.tm-box {
  display: block;
  width: min(680px, 100%);
  padding: clamp(28px, 4.5vw, 52px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* about-me dialog: compact, centred, never scrolls */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 97;
  background: rgb(16 14 24/0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  width: min(820px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  background: var(--card);
  border-radius: 32px;
  padding: clamp(22px, 3.4vw, 40px);
  box-shadow: 0 30px 70px rgb(30 27 43/0.24);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.34s var(--ease-smooth);
}
.ab-av {
  aspect-ratio: 1158/1544;
  width: 100%;
  max-height: calc(100dvh - 120px);
  max-width: 100%;
  margin: 0 auto;
  border-radius: 20px;
  background: var(--avatar-img) center/cover no-repeat;
}
@media (min-width: 641px) {
  .ab-av {
    align-self: stretch;
    aspect-ratio: auto;
    max-height: none;
    height: auto;
    min-height: 100%;
    width: auto;
    margin: 0;
    border-radius: 20px;
    background-position: center 30%;
  }
}
@media (max-width: 640px) {
  .modal {
    grid-template-columns: 1fr;
    gap: 6px;
    border-radius: 26px;
    padding: 22px 20px;
  }
  .ab-av {
    width: min(112px, 30vw);
    margin: 0 auto;
  }
}
/* password gate: shown instead of the case view for protected tiles */
.pw-overlay {
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgb(16 14 24/0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.px-close {
  position: static;
  background: #ffffff;
  color: #1e1b2b;
}
.modal-close {
  top: 14px;
  right: 14px;
}
/* buttons: primary + secondary, 40px, 14px text */
.pw-submit,
.pw-submit:hover {
  box-shadow: none;
}
.px-open {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
}
/* icon buttons: one surface, 40px */
/* pills: badge 28px, small tag 22px */
.px-close:hover {
  background: #eee9fc;
}
/* shadows: rest, hover, dialog */
.modal:not(.wh-box),
.pw-box {
  box-shadow: var(--shadow-dialog);
}
.pw-ask a:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}
/* pixel microphone above the logo; its sound waves pulse in two steps, like the work-tile character */
.px-talk {
  display: block;
  width: clamp(56px, 30%, 76px);
  height: auto;
  margin-bottom: 6px;
}
.px-talk .px-waves {
  animation: pxWaves 1.6s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .px-talk .px-waves {
    animation: none;
  }
}
/* dark mode: the dark outline turns light so the drawing stays visible */
:root[data-theme="dark"] .px-talk rect[fill="#2A2438"] {
  fill: #d6ccfa;
}
/* highlighted part of the talks page intro: the conferences and the companies */
.sp-lede strong {
  color: var(--accent-text);
  font-weight: 600;
}
.sp-title {
  margin: 10px 0 12px;
  font: 400 clamp(28px, 4vw, 36px) / 1.1 var(--display);
  letter-spacing: -0.01em;
}
.sp-lede {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.sp-lede a,
.sp-link {
  color: var(--accent-text);
  font-weight: 500;
  text-underline-offset: 3px;
}
.sp-lede a:hover,
.sp-link:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}
.sp-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.sp-list li {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.sp-list h3 {
  margin: 6px 0 2px;
  font: 400 22px/1.2 var(--display);
  color: var(--ink);
}
.sp-list p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
.sp-list .sp-meta,
.sp-list .sp-event {
  margin: 0;
  font: 500 11.5px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.sp-list .sp-event {
  margin-bottom: 10px;
  color: var(--accent-text);
}
.sp-list .sp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0;
}
.sp-watch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sp-watch svg {
  width: 16px;
  height: 16px;
}
.sp-lang {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(106 75 216/0.1);
  border: 1px solid rgb(106 75 216/0.22);
  color: var(--accent-text);
  font: 500 10.5px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 4px;
  white-space: nowrap;
}
.sp-actions {
  margin-top: 8px;
  display: flex;
}
/* ---- talks page: a full-screen page (like work history) with the UXplore logo and photos ---- */
.sp-box {
  --ux-a: #656eff;
  --ux-b: #0a047a;
}
:root[data-theme="dark"] .sp-box {
  --ux-a: #8a91ff;
  --ux-b: #ffffff;
}
.sp-logo .ux-logo {
  width: clamp(170px, 34vw, 280px);
  margin-bottom: clamp(22px, 4vw, 34px);
}
.sp-box .sp-title {
  font-size: clamp(30px, 4.6vw, 46px);
  margin-top: 8px;
}
.sp-box .sp-lede {
  font-size: 17px;
}
.sp-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 12px;
  margin: 14px 0 0;
}
.sp-gallery figure {
  margin: 0;
}
.sp-gallery .cs-shot {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background-position: center 30%;
  background-size: cover;
}
.sp-gallery figcaption {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.sp-box .sp-sub {
  margin-top: 44px;
  margin-bottom: 0;
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.sp-box .sp-list {
  margin-top: 14px;
}
@media (max-width: 640px) {
  .sp-gallery {
    grid-template-columns: 1fr 1fr;
  }
}
