/* The founder and contact side panels, as on the original azyl.ai.
   Everything is scoped to .profile, so the product pages' styles can't reshape them. */

.profile {
  --bg: #1A1917; --blue: #DCFF2E; --silver: #D6D2CA; --ghost: #F3F1EC; --rule: #282623;
  --dim: #4A4741; --muted: #6E6A63; --panel: #201F1C; --label: #8C877F;
  position: fixed;
  inset: 0 0 0 auto;
  width: min(580px, 100vw);
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ghost);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 100;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #45423C transparent;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: normal;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
/* start from the same blank slate the original page had */
.profile *, .profile *::before, .profile *::after { box-sizing: border-box; margin: 0; padding: 0; }
.profile h2, .profile h3, .profile p, .profile ul, .profile li, .profile label { line-height: inherit; text-wrap: wrap; font-weight: inherit; color: inherit; }
.profile svg { display: inline; max-width: none; }
.profile img { max-width: none; }

.profile[open] { animation: panelIn 0.6s cubic-bezier(0.16,1,0.3,1); }
.profile.closing { animation: panelOut 0.35s cubic-bezier(0.7,0,0.84,0) forwards; }
@keyframes panelIn  { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes panelOut { from { transform: translateX(0); } to { transform: translateX(100%); } }

.profile::backdrop {
  background: rgba(12,12,11,0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.6s ease;
}
.profile.closing::backdrop { animation: fadeOut 0.35s ease forwards; }
@keyframes fadeIn  { from { opacity: 0; } }
@keyframes fadeOut { to   { opacity: 0; } }

.profile .profile-inner {
  padding: 28px 52px 56px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.profile .profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  margin-bottom: 36px;
}
.profile .label {
  display: inline;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 400;
  line-height: inherit;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--label);
}
.profile .profile-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}
.profile .profile-close:hover { color: var(--ghost); border-color: var(--dim); }
.profile .profile-close:focus-visible,
.profile .profile-action:focus-visible { outline: 1px solid var(--blue); outline-offset: 6px; }

.profile .profile-top {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 28px;
  align-items: end;
}
.profile .portrait {
  width: 148px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  filter: grayscale(1) contrast(1.04) brightness(0.9);
  display: block;
}
.profile .profile-name {
  font-size: 30px;
  font-weight: 200;
  letter-spacing: 1px;
  line-height: 1.15;
  color: var(--ghost);
}
.profile .profile-role {
  margin-top: 12px;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
}
.profile .profile-loc {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 300;
  color: var(--label);
}

.profile .profile-bio {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--silver);
}
.profile .profile-bio p + p { margin-top: 14px; }

.profile .profile-section { margin-top: 32px; }
.profile .profile-section .label { display: block; margin-bottom: 14px; }

.profile .cred-list { list-style: none; }
.profile .cred-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  font-weight: 300;
  color: var(--ghost);
}
.profile .cred-list li:first-child { border-top: 1px solid var(--rule); }
.profile .cred-list .meta {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--label);
  white-space: nowrap;
}

.profile .tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.profile .tags li {
  font-size: 12px;
  font-weight: 300;
  color: var(--silver);
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.profile .profile-actions {
  margin-top: auto;
  padding-top: 44px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.profile .profile-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ghost);
  border: 1px solid var(--dim);
  border-radius: 2px;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.profile .profile-action:hover { border-color: var(--silver); }
.profile .profile-action.primary { background: var(--blue); border-color: var(--blue); color: var(--bg); }
.profile .profile-action.primary:hover { background: #E8FF6E; border-color: #E8FF6E; }

.profile .profile-quote {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font-size: 21px;
  font-weight: 200;
  line-height: 1.4;
  color: var(--ghost);
}
.profile .profile-quote em { font-style: normal; color: var(--blue); }
.profile .profile-quote + .profile-bio { margin-top: 20px; padding-top: 0; border-top: 0; }

.profile .event-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.profile .event-strip img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  filter: grayscale(1) brightness(0.85);
  transition: filter 0.5s;
}
.profile .event-strip img:hover { filter: none; }

.profile .talks { list-style: none; }
.profile .talks li {
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.profile .talks li:first-child { border-top: 1px solid var(--rule); }
.profile .talk-title {
  display: block;
  font-size: 14px;
  font-weight: 300;
  color: var(--ghost);
}
.profile .talk-meta {
  display: block;
  margin-top: 4px;
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--label);
}

.profile .services { display: grid; gap: 10px; }
.profile .service {
  display: grid;
  grid-template-columns: 34px 1fr;
  padding: 18px 20px 18px 16px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: rgba(255,255,255,0.012);
}
.profile .service-num {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--blue);
  padding-top: 3px;
}
.profile .service h3 {
  font-size: 16px;
  font-weight: 400;
  color: var(--ghost);
}
.profile .service p {
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--silver);
}

/* ── CONTACT PANEL ── */
/* opened over the founder panel, it skips a second dimmed backdrop */
.profile.stacked::backdrop { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

.profile .contact-intro {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--silver);
}
.profile .contact-form {
  margin-top: 32px;
  display: grid;
  gap: 22px;
  color-scheme: dark;
}
.profile .contact-form[hidden] { display: none; }
.profile .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile .field { display: grid; gap: 8px; }
.profile .field .opt { color: var(--dim); letter-spacing: 1.5px; margin-left: 6px; }
.profile .field input, .profile .field select, .profile .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  color: var(--ghost);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 12px 14px;
  transition: border-color 0.3s;
}
.profile .field input:hover, .profile .field select:hover, .profile .field textarea:hover { border-color: var(--dim); }
.profile .field input:focus, .profile .field select:focus, .profile .field textarea:focus { outline: none; border-color: var(--blue); }
.profile .field textarea { min-height: 140px; line-height: 1.6; resize: vertical; }
.profile .field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238C877F' stroke-width='1.2'/%3E%3C/svg%3E");
  background-color: #24231F;
  background-repeat: no-repeat;
  background-position: right 14px center;
}
/* some browsers draw the open list with the OS theme; keep it dark to match */
.profile .field select option { background-color: #24231F; color: var(--ghost); }
.profile .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.profile .contact-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.profile button.profile-action { font-family: inherit; cursor: pointer; }
.profile button.profile-action:disabled { opacity: 0.55; cursor: default; }
.profile .contact-alt { font-size: 12px; font-weight: 300; color: var(--label); }
.profile .contact-alt a { color: var(--silver); text-decoration: none; border-bottom: 1px solid var(--dim); }
.profile .contact-alt a:hover { color: var(--ghost); }
.profile .contact-status { min-height: 1.2em; font-size: 13px; font-weight: 300; color: var(--label); }
.profile .contact-status.error { color: #FF9C8A; }
.profile .contact-status a { color: inherit; }
.profile .contact-done .profile-quote { border-top: 0; padding-top: 0; }
/* only ever shown on a preview copy of the site */
.profile .preview-note { margin-top: 20px; padding: 10px 14px; border: 1px dashed var(--dim); border-radius: 3px; font-size: 12px; font-weight: 300; color: var(--label); }

@media (prefers-reduced-motion: reduce) {
  .profile, .profile::backdrop {
    animation-duration: 0.01s !important;
    animation-delay: 0s !important;
  }
}

@media (max-width: 600px) {
  .profile { border-left: 0; }
  .profile .profile-inner { padding: 20px 24px 40px; }
  .profile .profile-top { grid-template-columns: 104px 1fr; gap: 20px; }
  .profile .portrait { width: 104px; }
  .profile .profile-name { font-size: 24px; }
  .profile .profile-role { font-size: 10px; letter-spacing: 1px; }
  .profile .profile-quote { font-size: 19px; }
  .profile .field-row { grid-template-columns: 1fr; gap: 22px; }
  .profile .event-strip { grid-template-columns: repeat(2, 1fr); }
  /* 16px keeps iOS from zooming into fields on focus */
  .profile .field input, .profile .field select, .profile .field textarea { font-size: 16px; }
}
