/* ============================================================
   REVIEWS & PEER ENDORSEMENTS SECTION
   Matches noir / matcha dossier aesthetic
   ============================================================ */

.reviews-section {
  width: 100%;
  margin-top: 4.5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--border-color);
  position: relative;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.reviews-title-wrap {
  flex: 1;
  min-width: 280px;
}

.reviews-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  margin-top: 0.35rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.5px;
}

.reviews-title span {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.reviews-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 620px;
}

.reviews-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  background: var(--gradient-btn);
  color: var(--text-on-accent);
  border: 1px solid var(--border-hover);
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: var(--shadow-glow), 0 4px 16px rgba(0,0,0,0.3);
  transition: all 0.25s cubic-bezier(.34,1.56,.64,1);
  flex-shrink: 0;
}
.reviews-action-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-glow), 0 8px 24px rgba(0,0,0,0.45);
}

/* ── REVIEWS GRID ──────────────────────────────────────────── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.6rem;
  width: 100%;
}

.review-card {
  background: #141210 !important;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: all 0.3s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  overflow: hidden;
}

[data-theme="matcha"] .review-card {
  background: #FFFFFF !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: rgba(59, 91, 71, 0.15);
}

[data-theme="spidey"] .review-card {
  background: #FFFFFF !important;
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.07);
  border-color: rgba(185, 28, 28, 0.14);
}

.review-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.review-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35), 0 0 25px var(--accent-glow);
  transform: translateY(-4px);
}

.review-card:hover::before {
  opacity: 1;
}

/* Review Top Header */
.review-card-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.review-avatar-container {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.review-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  display: block;
}

.review-avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-accent);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Official LinkedIn badge overlay on avatar */
.review-linkedin-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #0a66c2;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.2s ease;
  text-decoration: none;
}
.review-linkedin-badge:hover {
  transform: scale(1.2);
}
.review-linkedin-badge svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

/* GitHub badge overlay on avatar */
.review-github-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #181717;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.2s ease;
  text-decoration: none;
}
.review-github-badge:hover {
  transform: scale(1.2);
}
.review-github-badge svg {
  width: 10px;
  height: 10px;
}

.review-author-meta {
  flex: 1;
  min-width: 0;
}

.review-author-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.25;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease;
}
.review-author-name:hover {
  color: var(--accent-primary);
}

.review-author-role {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-stars {
  color: #eab308;
  font-size: 0.95rem;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
}

/* Review Body */
.review-card-body {
  flex: 1;
  margin-bottom: 1.2rem;
}

.review-quote-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-primary) !important;
  font-style: italic;
  position: relative;
}

[data-theme="noir"] .review-quote-text {
  color: #EAE6DF !important;
}

[data-theme="matcha"] .review-quote-text {
  color: #1A241E !important;
}

[data-theme="spidey"] .review-quote-text {
  color: #18181B !important;
}

/* Review Footer */
.review-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
}

[data-theme="matcha"] .review-card-footer {
  border-top: 1px solid rgba(59, 91, 71, 0.1);
}

[data-theme="spidey"] .review-card-footer {
  border-top: 1px solid rgba(185, 28, 28, 0.1);
}

.review-timestamp {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.review-linkedin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #0a66c2;
  text-decoration: none;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(10, 102, 194, 0.08);
  border: 1px solid rgba(10, 102, 194, 0.2);
}
.review-linkedin-btn:hover {
  background: rgba(10, 102, 194, 0.18);
  color: #38bdf8;
  border-color: rgba(10, 102, 194, 0.4);
  transform: translateX(2px);
}

.review-github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary);
  text-decoration: none;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}
.review-github-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-secondary);
  border-color: var(--border-hover);
  transform: translateX(2px);
}

#endorsements .reviews-section {
  margin-top: 1rem;
  padding-top: 0;
  border-top: none;
}


/* Empty state */
.reviews-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 18px;
  color: var(--text-muted);
}

/* ── REVIEW SUBMISSION MODAL ───────────────────────────────── */
.review-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(.34,1.56,.64,1);
}

.review-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.review-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.review-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: #141210 !important;
  border: 1px solid var(--border-hover) !important;
  border-radius: 22px;
  padding: 2.2rem 2.4rem;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.98), 0 0 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255,255,255,0.08) inset;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}

[data-theme="matcha"] .review-modal-card {
  background: #FFFFFF !important;
  border-color: rgba(59, 91, 71, 0.25) !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="spidey"] .review-modal-card {
  background: #FFFFFF !important;
  border-color: rgba(185, 28, 28, 0.25) !important;
  box-shadow: 0 25px 70px rgba(185, 28, 28, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Modal Form Inputs — completely solid & non-transparent */
.review-modal .form-input,
.review-modal .form-textarea {
  background: #1e1b17 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
}

.review-modal .form-input:focus,
.review-modal .form-textarea:focus {
  background: #25221c !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

[data-theme="matcha"] .review-modal .form-input,
[data-theme="matcha"] .review-modal .form-textarea {
  background: #F4F3EE !important;
  border: 1.5px solid rgba(59, 91, 71, 0.2) !important;
  color: #1A241E !important;
}

[data-theme="spidey"] .review-modal .form-input,
[data-theme="spidey"] .review-modal .form-textarea {
  background: #FFFDF8 !important;
  border: 1.5px solid rgba(185, 28, 28, 0.2) !important;
  color: #18181B !important;
}

[data-theme="matcha"] .review-modal .form-input:focus,
[data-theme="matcha"] .review-modal .form-textarea:focus {
  background: #FFFFFF !important;
  border-color: var(--accent-primary) !important;
}

[data-theme="spidey"] .review-modal .form-input:focus,
[data-theme="spidey"] .review-modal .form-textarea:focus {
  background: #FFFFFF !important;
  border-color: var(--accent-primary) !important;
}

.review-modal.active .review-modal-card {
  transform: translateY(0) scale(1);
}

.review-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.review-modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.review-modal-close-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: rotate(90deg);
}

.photo-tab-btn {
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: #1c1916;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.photo-tab-btn.active {
  background: var(--accent-primary);
  color: var(--text-on-accent);
  border-color: var(--accent-primary);
}

.review-modal .btn-outline {
  background: #1c1916;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}
.review-modal .btn-outline:hover {
  background: #25221c;
  border-color: var(--border-hover);
}

[data-theme="matcha"] .photo-tab-btn {
  background: #F4F3EE;
  color: var(--text-primary);
}
[data-theme="matcha"] .review-modal .btn-outline {
  background: #F4F3EE;
  border-color: rgba(59, 91, 71, 0.25);
  color: var(--accent-primary);
}

[data-theme="spidey"] .photo-tab-btn {
  background: #F6F1C6;
  color: var(--text-primary);
}
[data-theme="spidey"] .review-modal .btn-outline {
  background: #FFFDF8;
  border-color: rgba(185, 28, 28, 0.25);
  color: var(--accent-primary);
}

.star-rating-select .star {
  transition: transform 0.15s ease, color 0.15s ease;
  user-select: none;
}
.star-rating-select .star:hover,
.star-rating-select .star.hovered {
  transform: scale(1.2);
  color: #facc15;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .reviews-title {
    font-size: 1.9rem;
  }
  .reviews-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .review-modal-card {
    padding: 1.5rem;
  }
  .reviews-action-btn {
    width: 100%;
    justify-content: center;
  }
  .reviews-subtitle {
    font-size: 0.88rem;
  }
  .reviews-section {
    margin-top: 3rem;
    padding-top: 2.5rem;
  }
  .review-card {
    padding: 1.4rem;
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  .reviews-title {
    font-size: 1.6rem;
  }
  .reviews-subtitle {
    font-size: 0.82rem;
  }
  .reviews-action-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 10px;
  }
  .review-card {
    padding: 1.2rem;
    border-radius: 12px;
  }
  .review-quote-text {
    font-size: 0.85rem;
    line-height: 1.6;
  }
  .review-author-name {
    font-size: 0.95rem;
  }
  .review-author-role {
    font-size: 0.72rem;
  }
  .review-card-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .review-avatar-img,
  .review-avatar-fallback {
    width: 42px;
    height: 42px;
  }
  .review-modal-card {
    padding: 1.25rem;
    border-radius: 16px;
  }
  .review-modal-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }
  .reviews-section {
    margin-top: 2rem;
    padding-top: 2rem;
  }
  .reviews-grid {
    gap: 1.25rem;
  }
}
