/* Profile card, résumé window and the boot animation shown before the résumé. */
.dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(18, 28, 96, .38);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  touch-action: auto;
  transition: opacity .35s, visibility 0s .35s;
}

.dialog.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s;
}

.dialog__card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 30px 30px 24px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink-soft);
  box-shadow: 0 30px 80px rgba(10, 20, 80, .45);
  transform-origin: 50% -40px;
}

/* lanyard slot */
.dialog__card::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 12px;
  width: 64px;
  height: 9px;
  margin-left: -32px;
  border-radius: 9px;
  background: #e6e9f2;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .15);
}

.dialog__close {
  position: absolute;
  right: 14px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #4a5068;
  font-size: 22px;
  line-height: 1;
}

.dialog__close:hover {
  background: var(--surface-tint);
}

/* profile */
.profile__head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}

.profile__photo {
  flex: none;
  width: 96px;
  height: 112px;
  border-radius: 12px;
  background: #dfe5fa url('../assets/images/memoji.webp') 50% 28% / 122% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

.profile__name {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.5px;
}

.profile__role {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--blue-800);
}

.profile__facts {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  margin: 18px 0 0;
}

.profile__facts dt,
.profile__facts dd {
  margin: 0;
  padding: 9px 0 8px;
  border-bottom: 1.5px dotted var(--rule);
  font-size: 14px;
}

.profile__facts dt {
  padding-top: 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile__facts dd {
  font-weight: 600;
  text-align: right;
}

.profile__facts a {
  color: var(--blue-800);
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 63, 168, .3);
}

.profile__facts a:hover {
  border-bottom-color: var(--blue-800);
}

.profile__actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.profile__actions a {
  flex: 1;
  padding: 11px 10px;
  border-radius: 10px;
  background: var(--blue-800);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.profile__actions a + a {
  background: var(--surface-tint);
  color: var(--blue-800);
}

/* résumé window */
.dialog__card--resume {
  display: flex;
  flex-direction: column;
  width: min(900px, 100%);
  height: calc(100vh - 32px);
  max-height: none;
  padding: 0;
  overflow: hidden;
}

.dialog__card--resume::before {
  display: none;
}

.resume__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 22px;
  border-bottom: 1.5px dotted var(--rule);
}

.resume__title {
  flex: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--blue-800);
}

.resume__download {
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--blue-800);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
}

.resume__download:hover {
  background: var(--blue-900);
}

.resume__bar .dialog__close {
  position: static;
}

.resume__frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #e9ecf5;
}

/* boot animation ("opening a suspicious file") */
.boot {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  overflow: hidden;
  background: #03060a;
  color: #39ff88;
  font: 13px/1.55 ui-monospace, Menlo, Consolas, monospace;
  cursor: pointer;
}

.boot.is-active {
  display: block;
}

.boot::before,
.boot::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.boot::before {
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px);
}

.boot::after {
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .75) 100%);
}

.boot.is-flashing {
  animation: boot-flash .35s ease-out forwards;
}

@keyframes boot-flash {
  0% { background: #03060a; }
  20% { background: #fff; }
  100% { background: #fff; opacity: 0; }
}

.boot__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 5vw, 64px);
}

.boot.is-shaking .boot__inner {
  animation: boot-shake .18s linear;
}

@keyframes boot-shake {
  25% { transform: translate(4px, -2px); }
  50% { transform: translate(-5px, 2px) skewX(2deg); }
  75% { transform: translate(3px, 1px); }
}

.boot__warning {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ff3b6b;
  animation: blink .6s steps(2) infinite;
}

@keyframes blink {
  50% { opacity: .25; }
}

.boot__title {
  position: relative;
  margin: 0;
  font: 900 clamp(30px, 8vw, 84px) / 1 'Inter Tight', sans-serif;
  letter-spacing: -.02em;
  color: #eafff2;
  text-shadow: 0 0 18px rgba(57, 255, 136, .45);
}

.boot__title::before,
.boot__title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  mix-blend-mode: screen;
}

.boot__title::before {
  color: #ff2a6d;
  transform: translate(-3px, 0);
  clip-path: inset(0 0 60% 0);
  animation: glitch-top .9s steps(6) infinite;
}

.boot__title::after {
  color: #2af5ff;
  transform: translate(3px, 0);
  clip-path: inset(55% 0 0 0);
  animation: glitch-bottom .7s steps(5) infinite;
}

@keyframes glitch-top {
  0% { clip-path: inset(0 0 70% 0); }
  25% { clip-path: inset(30% 0 40% 0); transform: translate(-6px, 1px); }
  50% { clip-path: inset(60% 0 10% 0); }
  75% { clip-path: inset(10% 0 80% 0); transform: translate(4px, -1px); }
  100% { clip-path: inset(45% 0 30% 0); }
}

@keyframes glitch-bottom {
  0% { clip-path: inset(70% 0 0 0); }
  30% { clip-path: inset(20% 0 60% 0); transform: translate(6px, 0); }
  60% { clip-path: inset(50% 0 25% 0); transform: translate(-4px, 1px); }
  100% { clip-path: inset(80% 0 5% 0); }
}

.boot__log {
  flex: 1;
  margin: 0;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-all;
  text-shadow: 0 0 6px rgba(57, 255, 136, .5);
}

.boot__log .is-noise { color: rgba(57, 255, 136, .35); }
.boot__log .is-final { color: #eafff2; }

.boot__progress {
  display: flex;
  align-items: center;
  gap: 14px;
}

.boot__bar {
  flex: 1;
  height: 14px;
  padding: 2px;
  border: 1px solid rgba(57, 255, 136, .6);
}

.boot__bar i {
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, #39ff88 0 8px, #1c8f4c 8px 10px);
}

.boot__percent {
  min-width: 4ch;
  font-weight: 700;
  text-align: right;
  color: #eafff2;
}

.boot__skip {
  font-size: 11px;
  color: rgba(57, 255, 136, .55);
}
