/* ==========================================================================
   TechRepo — About & Contact Pages Stylesheet
   Professional glassmorphism design matching the main TechRepo design system.
   ========================================================================== */

/* Local colour token: .role-cofounder is a purple badge but was using the cyan token */
:root { --purple-accessible: #C084FC; }          /* 5.3:1 on the dark badge tint */
[data-theme="light"] { --purple-accessible: #7E22CE; }  /* 5.4:1 on the light badge tint */

/* ==========================================================================
   About Hero Section
   ========================================================================== */
/* The header is position:sticky (it already takes its own space in the flow), so the old
   6-9rem top padding stacked a ~100-140px empty band under it. */
.about-hero-section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem) 0;
  position: relative;
  text-align: center;
}

.about-hero-content {
  max-width: 760px;
  margin: 0 auto;
}

.about-hero-title {
  font-size: clamp(1.85rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}

.about-hero-description {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.about-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-top: 2rem;
}

.about-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 0.85rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 0;
  transition: var(--transition-normal);
}

.about-stat:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.about-stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.about-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   Our Story Section
   ========================================================================== */
.about-story-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.about-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.about-story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-normal);
}

.about-story-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.story-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: white;
}

.story-icon-badge i,
.story-icon-badge svg {
  width: 22px;
  height: 22px;
}

.about-story-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.about-story-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   Founder Section
   ========================================================================== */
.founder-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.founder-card-wrapper {
  max-width: 820px;
  margin: 2rem auto 0 auto;
}

.founder-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
  transition: var(--transition-normal);
}

.founder-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.founder-card-glow {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.founder-card-content {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: flex-start;
}

.founder-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.founder-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: var(--gradient-button); /* white text: 5.4-6.3:1 (gradient-primary's cyan end was 2.4:1) */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.05em;
}

.founder-online-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10B981;
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.founder-info {
  flex: 1;
  min-width: 0;
}

.founder-name {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.founder-role-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.role-founder {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
  color: var(--primary-accessible);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.role-cofounder {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(139, 92, 246, 0.2));
  color: var(--purple-accessible);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.role-dev {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  color: var(--emerald-accessible);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.founder-bio {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.founder-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.founder-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.founder-meta-item a {
  color: var(--primary-accessible);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.founder-meta-item a:hover {
  color: var(--text-accent);
  text-decoration: underline;
}

.founder-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tech-pill {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Team Section
   ========================================================================== */
.team-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.team-portal-group {
  margin-bottom: 2.5rem;
}

.portal-group-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.portal-group-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.portal-group-icon i,
.portal-group-icon svg {
  width: 20px;
  height: 20px;
}

.portal-group-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.portal-group-header p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.team-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.team-member-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
}

.team-member-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.team-card-accent {
  height: 4px;
  background: var(--gradient-primary);
}

.team-card-body {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  text-align: center;
}

.team-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-button);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem auto;
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.05em;
}

.team-member-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.team-member-role {
  font-size: 0.78rem;
  color: var(--primary-accessible);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.team-member-details {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.team-member-bio {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   Card Share Button
   ========================================================================== */
.card-share-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  z-index: 5;
}

.card-share-btn:hover {
  color: var(--primary-500);
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  transform: scale(1.08);
}

/* ==========================================================================
   Card Highlight Animation (when navigated to via share link)
   ========================================================================== */
@keyframes cardHighlightPulse {
  0%   { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
  40%  { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0.15); }
  80%  { box-shadow: 0 0 0 18px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.card-highlight {
  animation: cardHighlightPulse 1.2s ease-out 2;
  border-color: var(--primary-500) !important;
  box-shadow: var(--shadow-glow); /* no !important: an !important author rule overrides animations */
}

/* ==========================================================================
   What We Offer Section
   ========================================================================== */
.about-offerings-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.offerings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.offering-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  text-align: center;
  transition: var(--transition-normal);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.offering-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.offering-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  color: white;
}

.offering-icon i,
.offering-icon svg {
  width: 24px;
  height: 24px;
}

.offering-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.offering-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Contact Cards Section
   ========================================================================== */
.contact-cards-section {
  padding: clamp(1rem, 3vw, 3rem) 0 clamp(3rem, 6vw, 5rem) 0;
}

.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.contact-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: white;
}

.contact-card-icon i,
.contact-card-icon svg {
  width: 24px;
  height: 24px;
}

.contact-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.contact-card-value {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--primary-accessible);
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.contact-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.contact-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-accessible);
  transition: color var(--transition-fast);
}

.contact-card:hover .contact-card-cta {
  color: var(--text-accent);
}

/* ==========================================================================
   Founder Quick Contact (Contact Page)
   ========================================================================== */
.contact-founder-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.contact-founder-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 3vw, 2rem);
  max-width: 780px;
  margin: 2rem auto 0 auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-founder-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.founder-avatar-sm {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-button);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.contact-founder-info h3 {
  font-size: 1rem;
  font-weight: 700;
}

.contact-founder-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-founder-right {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Contact FAQ Section
   ========================================================================== */
.contact-faq-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.contact-faq-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.contact-faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  transition: var(--transition-normal);
}

.contact-faq-card:hover {
  border-color: var(--border-glow);
}

.faq-q-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid var(--border-medium);
  border: 1px solid color-mix(in srgb, currentColor 40%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: var(--primary-accessible);
}

.faq-q-icon i,
.faq-q-icon svg {
  width: 18px;
  height: 18px;
}

.contact-faq-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.contact-faq-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

/* Tablets and below */
@media (max-width: 768px) {
  .founder-card-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .founder-meta-grid {
    justify-content: center;
  }

  .founder-tech-stack {
    justify-content: center;
  }

  .founder-role-badges {
    justify-content: center;
  }

  .about-stats-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .about-stat {
    min-width: 0;
    padding: 0.75rem 0.75rem;
    text-align: center;
  }

  .about-stat-number {
    font-size: 1.3rem;
  }

  .contact-founder-card {
    flex-direction: column;
    text-align: center;
  }

  .contact-founder-left {
    flex-direction: column;
  }

  .contact-founder-right {
    justify-content: center;
    width: 100%;
  }

  .contact-founder-right a {
    flex: 1 1 auto; /* was "flex: 1" (basis 0): .btn-primary has overflow:hidden, so it shrank below its text */
    justify-content: center;
    text-align: center;
  }

  .portal-group-header {
    flex-direction: column;
    text-align: center;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .team-cards-grid {
    grid-template-columns: 1fr;
  }

  .contact-cards-grid {
    grid-template-columns: 1fr;
  }

  .offerings-grid {
    grid-template-columns: 1fr;
  }

  .about-story-grid {
    grid-template-columns: 1fr;
  }

  .contact-faq-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer on these subpages inherits main.css */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   FIXES (audit) — appended so they win over earlier same-specificity rules
   ========================================================================== */

/* Avatar colour variants (replace the old inline gradients; all >= 5.4:1 with white) */
.team-avatar.avatar-violet  { background: linear-gradient(135deg, #7C3AED, #6D28D9); }
.team-avatar.avatar-cyan    { background: linear-gradient(135deg, #0E7490, #155E75); }
.team-avatar.avatar-emerald { background: linear-gradient(135deg, #047857, #065F46); }

/* A lone card (Agriculture portal) sat in the left third of an empty row — centre it */
.team-cards-grid--single {
  grid-template-columns: minmax(0, 380px);
  justify-content: center;
}

/* Responsive columns for the grids that used auto-fill (kept the 6- and 4-card sets balanced) */
@media (max-width: 1199px) {
  .contact-faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .offerings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .offerings-grid,
  .contact-faq-grid { grid-template-columns: 1fr; }
}

/* Header icons are inline SVG (no CDN dependency for the two controls needed to navigate / switch theme) */
.theme-icon,
.menu-icon { width: 20px; height: 20px; max-width: none; flex-shrink: 0; }
html[data-theme="light"] .theme-icon-sun,
html[data-theme="dark"] .theme-icon-moon { display: none; }
.menu-icon-close { display: none; }
.mobile-menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
.mobile-menu-toggle[aria-expanded="true"] .menu-icon-close { display: block; }

/* main.css collapses the navbar into a hamburger at <=1360px because the index page has 9 links plus
   Search/Upload/Login. These pages have 6 links + theme + Home, which fit from ~1080px, so keep the
   full nav on common laptop widths instead of a hamburger floating in an empty bar. */
@media (min-width: 1080px) and (max-width: 1360px) {
  .nav-menu,
  .nav-menu.mobile-open {
    display: flex;
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 0.9rem;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    animation: none;
  }
  .mobile-menu-toggle { display: none; }
}

/* Mobile menu: scrollable on short/landscape screens, ~44px tap targets */
@media (max-width: 1079px) {
  .nav-menu.mobile-open {
    max-height: calc(100vh - 5rem);
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    /* The panel sits inside .site-header, which already has backdrop-filter, so its own blur has nothing
       to blur: the hero text ghosted through the 88-90% glass. Make it solid. */
    background: var(--bg-secondary);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nav-menu .nav-link { padding: 0.7rem 0; }
}

/* Icons inside buttons must never flex-shrink to 0 (global svg{max-width:100%} + flex) */
.btn-primary svg,
.btn-secondary svg { flex-shrink: 0; max-width: none; }

/* Share button "copied" state */
.card-share-btn.is-copied { color: #047857; border-color: currentColor; }
[data-theme="dark"] .card-share-btn.is-copied { color: #34D399; }

/* Footer, tablet widths: main.css uses "2fr 1fr" which left About/Helpful links misaligned under a wide brand column */
@media (min-width: 769px) and (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand-col { grid-column: 1 / -1; }
}