/* =====================================================
   Detail modal + footer styles — Anette light theme
   ===================================================== */

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(33, 45, 53, 0.55);
  backdrop-filter: blur(4px) saturate(110%);
  display: grid; place-items: center;
  padding: 32px;
  animation: fadeIn 0.22s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal {
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 0;
  width: 100%; max-width: 920px; max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(33, 45, 53, 0.24);
  animation: slideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.modal-close {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px; border-radius: 0;
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--ink-1); display: grid; place-items: center;
  font-size: 18px; transition: all 0.18s;
  z-index: 4;
}
.modal-close:hover { background: var(--ink-0); color: var(--bg-0); border-color: var(--ink-0); }

/* modal hero */
.modal-hero {
  padding: 40px 44px 32px;
  border-bottom: 1px solid var(--line);
  position: relative;
  background: var(--bg-2);
}
.modal-hero::before {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 64px; height: 3px;
  background: var(--accent);
}
.modal-id-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 26px;
  font-family: var(--font-en); font-size: 10.5px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.modal-id-row .id-num { color: var(--accent); }
.modal-id-row .sep { color: var(--ink-4); }

.modal-hero-grid {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 28px;
  align-items: center;
}

.modal-avatar {
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--color-main);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 40px;
  color: var(--bg-0);
  border: 1px solid var(--line-strong);
  position: relative; overflow: hidden;
}
.modal-avatar.has-photo { background: var(--bg-3); }
.modal-avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}
.modal-avatar .gloss { display: none; }
.modal-avatar.zoomable { cursor: zoom-in; transition: transform 0.2s; }
.modal-avatar.zoomable:hover { transform: scale(1.04); }
.modal-avatar-zoom-hint {
  position: absolute;
  bottom: 0; right: 0;
  width: 26px; height: 26px;
  background: rgba(33, 45, 53, 0.85);
  color: var(--bg-0);
  display: grid; place-items: center;
  border-radius: 99px;
  font-size: 13px;
  border: 2px solid var(--bg-0);
  opacity: 0;
  transition: opacity 0.18s;
  z-index: 3;
}
.modal-avatar.zoomable:hover .modal-avatar-zoom-hint { opacity: 1; }

/* photo zoom overlay */
.photo-zoom-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 28, 34, 0.92);
  backdrop-filter: blur(16px) saturate(120%);
  display: grid; place-items: center;
  padding: 40px;
  cursor: zoom-out;
  animation: photoZoomIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes photoZoomIn { from { opacity: 0; } to { opacity: 1; } }
.photo-zoom-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 99px;
  background: rgba(236, 232, 233, 0.1);
  border: 1px solid rgba(236, 232, 233, 0.3);
  color: var(--bg-0);
  font-size: 22px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.18s;
  z-index: 3;
}
.photo-zoom-close:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.photo-zoom-content {
  position: relative;
  max-width: min(900px, 90vw);
  max-height: 86vh;
  display: flex; flex-direction: column;
  gap: 18px;
  cursor: default;
  animation: photoSlideIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes photoSlideIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.photo-zoom-content img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  background: var(--bg-2);
}
.photo-zoom-caption {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 0 4px;
  color: var(--bg-0);
}
.photo-zoom-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.photo-zoom-company {
  font-size: 13px;
  color: rgba(236, 232, 233, 0.7);
  font-weight: 500;
}

.modal-name-block { display: flex; flex-direction: column; gap: 6px; }
.modal-name {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-0); line-height: 1.1;
}
.modal-name-line {
  font-family: var(--font-en); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 500;
}
.modal-company {
  font-size: 15px; color: var(--ink-0); font-weight: 500;
  margin-top: 8px;
}
.modal-title-text {
  font-size: 12px; color: var(--ink-2);
  margin-top: 2px; letter-spacing: 0.02em;
}

.modal-skill-block {
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}
.modal-skill-label {
  font-family: var(--font-en); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.modal-skill-num {
  font-family: var(--font-en); font-size: 48px;
  font-weight: 600; letter-spacing: -0.05em;
  color: var(--ink-0); line-height: 1;
}
.modal-skill-num .denom { font-size: 20px; color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.modal-skill-stars { display: flex; gap: 3px; }
.modal-skill-stars span { width: 10px; height: 2px; border-radius: 0; background: var(--ink-4); }
.modal-skill-stars span.on { background: var(--accent); box-shadow: none; }

/* modal body */
.modal-body {
  padding: 32px 44px 44px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 32px;
  background: var(--bg-0);
}

.detail-section { display: flex; flex-direction: column; gap: 12px; }
.detail-label {
  font-family: var(--font-en); font-size: 10.5px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; gap: 10px;
  font-weight: 600;
}
.detail-label::before {
  content: ""; width: 18px; height: 1px; background: var(--accent);
}

.detail-content {
  font-size: 14.5px; line-height: 1.85; color: var(--ink-0);
  text-wrap: pretty;
}
.detail-content.quote {
  background: var(--bg-2);
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  font-size: 15px; color: var(--ink-0);
  font-weight: 500;
  position: relative;
}

/* metrics grid */
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background: var(--line);
  border: 1px solid var(--line);
}
.detail-metric {
  background: var(--bg-2);
  padding: 18px 22px;
  display: flex; flex-direction: column; gap: 6px;
  outline: 1px solid var(--line);
  outline-offset: -1px;
}
.detail-metric .ml {
  font-family: var(--font-en); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.detail-metric .mv {
  font-size: 14px; color: var(--ink-0); font-weight: 500;
}

/* tool badges */
.tool-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-badge {
  padding: 5px 12px; border-radius: 0;
  background: transparent; border: 1px solid var(--ink-0);
  color: var(--ink-0); font-size: 11.5px;
  font-family: var(--font-en); letter-spacing: 0.04em; font-weight: 500;
}
.tool-badge.unknown {
  background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-3);
}

/* barriers */
.barrier-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.barrier-badge {
  padding: 6px 12px; border-radius: 0;
  background: rgba(180, 70, 79, 0.08);
  border: 1px solid var(--accent);
  color: var(--accent-deep);
  font-size: 12px; line-height: 1.3;
  font-weight: 500;
}

/* AI conversation starter */
.ai-block {
  margin-top: 4px;
  border: 1px solid var(--ink-0);
  background: var(--ink-0);
  border-radius: 0;
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
  color: var(--bg-0);
}
.ai-block::before {
  content: ""; position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 24px 24px 0;
  border-color: transparent var(--accent) transparent transparent;
}
.ai-block-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(236, 232, 233, 0.18);
}
.ai-block-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; color: var(--bg-0);
  letter-spacing: 0.04em;
}
.ai-spark {
  width: 24px; height: 24px; border-radius: 0;
  background: var(--accent);
  display: grid; place-items: center; color: var(--bg-0);
  font-weight: 700; font-size: 10px; flex-shrink: 0;
  font-family: var(--font-en); letter-spacing: 0.04em;
}
.ai-block-meta {
  font-family: var(--font-en); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(236, 232, 233, 0.6); font-weight: 600;
}
.ai-generate-btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 0;
  background: var(--accent);
  color: var(--bg-0);
  font-weight: 600; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: none; cursor: pointer;
  transition: all 0.18s;
  font-family: var(--font-en);
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
}
.ai-generate-btn:hover:not(:disabled) { background: var(--accent-deep); }
.ai-generate-btn:disabled {
  opacity: 0.85;
  cursor: not-allowed;
  background: var(--accent-deep);
}

.ai-btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(236, 232, 233, 0.3);
  border-top-color: var(--bg-0);
  border-radius: 99px;
  animation: ai-spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

.ai-loading-progress {
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(236, 232, 233, 0.06);
  border: 1px solid rgba(236, 232, 233, 0.16);
  border-radius: 8px;
  display: flex; flex-direction: column; gap: 12px;
}
.ai-loading-bar {
  height: 3px;
  background: rgba(236, 232, 233, 0.1);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.ai-loading-bar::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 99px;
  animation: ai-bar-slide 1.4s ease-in-out infinite;
}
@keyframes ai-bar-slide {
  0% { left: -35%; }
  100% { left: 100%; }
}
.ai-loading-text {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px;
  color: rgba(236, 232, 233, 0.85);
  font-family: var(--font-sans);
}
.ai-loading-text .dots { display: inline-flex; gap: 4px; }
.ai-loading-text .dots span {
  width: 5px; height: 5px;
  border-radius: 99px;
  background: var(--accent);
  animation: dot-bounce 1.2s ease-in-out infinite;
}
.ai-loading-text .dots span:nth-child(2) { animation-delay: 0.15s; }
.ai-loading-text .dots span:nth-child(3) { animation-delay: 0.3s; }

.ai-error {
  font-size: 13px;
  color: var(--bg-0);
  background: rgba(180, 70, 79, 0.18);
  border: 1px solid var(--accent);
  padding: 14px 16px;
  border-radius: 8px;
}

.ai-result {
  font-size: 13.5px; line-height: 1.8;
  color: var(--bg-0); text-wrap: pretty; white-space: pre-wrap;
}
.ai-result h4 {
  font-size: 10.5px; font-weight: 600; color: var(--accent);
  margin: 0 0 6px; letter-spacing: 0.22em; text-transform: uppercase;
  font-family: var(--font-en);
}
.ai-loading {
  display: flex; align-items: center; gap: 10px;
  color: rgba(236, 232, 233, 0.85);
  font-size: 13px;
}
.ai-loading .dots { display: inline-flex; gap: 4px; }
.ai-loading .dots span {
  width: 5px; height: 5px; border-radius: 99px;
  background: var(--accent);
  animation: dot-bounce 1.2s ease-in-out infinite;
}
.ai-loading .dots span:nth-child(2) { animation-delay: 0.15s; }
.ai-loading .dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot-bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }

/* ===== FOOTER ===== */
.footer {
  margin-top: 120px;
  padding-top: 40px;
  border-top: 1px solid var(--ink-0);
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
}
.footer::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 64px; height: 3px;
  background: var(--accent);
}
.footer-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  font-family: var(--font-en); font-size: 10.5px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 500;
}
.footer-row .right { display: flex; align-items: center; gap: 14px; }
.footer-statement {
  font-size: 12px; color: var(--ink-2);
  font-family: var(--font-sans); line-height: 1.8;
  max-width: 760px; text-transform: none; letter-spacing: normal;
  font-weight: 400;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 12px 18px 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  align-self: flex-start;
  width: fit-content;
  box-shadow: 0 4px 14px rgba(33, 45, 53, 0.05);
}
.footer-credit-label {
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}
.footer-credit-logo {
  height: 24px;
  width: auto;
  display: block;
  opacity: 0.88;
}

/* ===== responsive ===== */
@media (max-width: 720px) {
  .modal-overlay { padding: 12px; }
  .modal-hero { padding: 28px 24px; }
  .modal-hero-grid { grid-template-columns: 72px 1fr; gap: 18px; }
  .modal-avatar { width: 72px; height: 72px; font-size: 28px; }
  .modal-name { font-size: 26px; }
  .modal-skill-block { grid-column: 1 / -1; padding-left: 0; border-left: none; border-top: 1px solid var(--line); padding-top: 16px; flex-direction: row; align-items: center; justify-content: space-between; }
  .modal-body { padding: 24px 24px 32px; }
  .detail-metrics { grid-template-columns: 1fr; }
}
