/* AI Vision Portrait — scoped styles. The normal photo remains visible until a model succeeds. */
.ai-portrait {
  --vision-gold: #c2c2c2;
  --vision-charcoal: #1b1b1b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto 18px;
}
.ai-portrait-frame {
  position: relative;
  width: min(308px, 62vw);
  aspect-ratio: 1;
  overflow: hidden;
  border: 8px solid white;
  border-radius: 50%;
  background: #101010;
  isolation: isolate;
  box-shadow: 0 18px 45px rgba(44, 44, 44, 0.17);
}
.ai-portrait-frame .profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
}
.ai-portrait-frame canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease;
}
/* An inset ring follows the circular frame without covering the portrait. */
.ai-portrait-loading-ring {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 4px solid rgba(194, 194, 194, .22);
  border-top-color: #b49752;
  border-right-color: #8b7035;
  border-radius: 50%;
  pointer-events: none;
  display: none;
}
.ai-portrait-frame.is-loading .ai-portrait-loading-ring {
  display: block;
  animation: ai-loading-spin 1s linear infinite;
}
@keyframes ai-loading-spin { to { transform: rotate(360deg); } }
/* Keep status announcements available to screen readers without visible captions. */
.ai-portrait-status {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ai-portrait-frame.is-active canvas { opacity: 1; }
.ai-portrait-frame.is-active { border-color: #fcfcfc; box-shadow: 0 0 0 2px rgba(135, 135, 135, .28), 0 18px 45px rgba(43, 43, 43, .24), 0 0 32px rgba(172, 172, 172, .19); }
.ai-vision-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #666666;
  text-transform: uppercase;
  font: 700 11px/1.3 Arial, sans-serif;
  letter-spacing: .16em;
}
.ai-vision-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #959595;
  box-shadow: 0 0 0 3px rgba(149, 149, 149, .12);
}
.ai-portrait-modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.ai-portrait button {
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  color: #4b4b4b;
  background: #fbfbfb;
  font: 700 12px/1.2 Arial, sans-serif;
  cursor: pointer;
  transition: background 140ms, transform 140ms, box-shadow 140ms;
}
.ai-portrait button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #f5f5f5;
}
.ai-portrait button:focus-visible {
  outline: 3px solid #5e5e5e;
  outline-offset: 3px;
}
.ai-portrait button:disabled { opacity: .65; cursor: wait; }
.ai-portrait .ai-portrait-modes button[aria-pressed="true"] {
  background: #f5f0e5;
  border-color: #a08038;
  color: #292929;
}
.ai-portrait [hidden] { display: none !important; }
.ai-hero-title { max-width: 900px; margin: 12px auto 7px; font-size: clamp(28px, 3.1vw, 42px); line-height: 1.16; font-weight: 600; letter-spacing: -.03em; }
.ai-hero-role { margin: 0 auto; color: #6b6b6b; font: 600 clamp(13px, 1.35vw, 17px)/1.5 Arial, sans-serif; }
.hero .intro.ai-short-intro {
  max-width: 750px;
  margin: 15px auto 0;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.5;
}
.hero:has(.ai-portrait) { min-height: auto; padding-top: 36px; padding-bottom: 52px; }
.hero .ai-portrait + .social-links { margin: 14px 0 13px; gap: 12px; }
.hero .ai-portrait + .social-links a { width: 38px; height: 38px; font-size: 22px; }
@media (max-width: 640px) {
  .ai-portrait-frame { width: min(265px, 67vw); border-width: 6px; }
  .ai-portrait { gap: 10px; }
  .hero:has(.ai-portrait) { padding-top: 26px; padding-bottom: 40px; }
  .hero .intro.ai-short-intro { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-portrait-frame, .ai-portrait-frame canvas, .ai-portrait button { transition: none; }
  .ai-portrait-frame.is-loading .ai-portrait-loading-ring { animation: none; }
}
.ai-portrait-frame[role="button"] { cursor: pointer; }
.ai-portrait-frame[aria-disabled="true"] { cursor: progress; }
.ai-portrait-frame:focus-visible { outline: 3px solid #a08038; outline-offset: 4px; }
