/* ==========================================================================
   STEM Sparks - Stylesheet
   Requirements:
   - Light blue background with subtle, non-distracting texture
   - Classic sleek underline tabs at the top
   - Professional banner and logo for 'STEM Sparks'
   - Professional photo presentation for the team
   - Fully responsive on desktop and mobile devices
   ========================================================================== */

:root {
  /* Soft Sky / Ice Blue Palette */
  --bg-color: #f0f6fc;
  --bg-card: #ffffff;
  --bg-banner: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #e8f4fd 100%);
  
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #38bdf8;
  --primary-subtle: #e0f2fe;

  --accent-spark: #f59e0b;

  --text-dark: #1e293b;
  --text-body: #334155;
  --text-muted: #64748b;

  --border-color: #dbeafe;
  --border-card: #e2e8f0;

  --shadow-sm: 0 2px 6px rgba(2, 132, 199, 0.05);
  --shadow-md: 0 6px 20px -2px rgba(2, 132, 199, 0.08);
  --shadow-hover: 0 12px 28px -4px rgba(2, 132, 199, 0.15);

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', var(--font-family);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  color: var(--text-body);
  background-color: var(--bg-color);
  /* Subtle, non-distracting light blue dot-texture and soft ambient mesh */
  background-image: 
    radial-gradient(var(--primary-light) 0.75px, transparent 0.75px),
    linear-gradient(180deg, #f0f7fc 0%, #eaf4fb 50%, #f0f8fd 100%);
  background-size: 26px 26px, 100% 100%;
  background-attachment: fixed;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Header & Sleek Underline Navigation Tabs
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 38px;
  height: 38px;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

/* Sleek Underline Tabs */
.tabs-list {
  display: flex;
  gap: 2.25rem;
}

.tab-btn {
  position: relative;
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 1.25rem 0.25rem;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  outline: none;
}

.tab-btn:hover {
  color: var(--primary-dark);
}

.tab-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.tab-btn.active {
  color: var(--primary-dark);
  font-weight: 700;
}

/* Classic Sleek Underline Indicator */
.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  opacity: 0;
  transform: scaleX(0.3);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.tab-btn.active .tab-indicator {
  opacity: 1;
  transform: scaleX(1);
}

.tab-btn:hover:not(.active) .tab-indicator {
  opacity: 0.4;
  transform: scaleX(0.7);
}

/* ==========================================================================
   Banner for 'STEM Sparks'
   ========================================================================== */
.banner-section {
  background: var(--bg-banner);
  border-bottom: 1px solid var(--border-color);
  padding: 3rem 0;
  text-align: center;
}

.banner-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.banner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.banner-logo {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 4px 8px rgba(2, 132, 199, 0.2));
}

.banner-heading {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
}

/* ==========================================================================
   Main Content Area & Tab Panels
   ========================================================================== */
.main-body {
  flex: 1;
  padding: 3rem 0 4.5rem;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-out forwards;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Tab 1: Home (Who we are & Our mission)
   ========================================================================== */
.info-section h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.info-section p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 1.25rem;
}

.info-section p:last-child {
  margin-bottom: 0;
}

.section-divider {
  border: none;
  height: 1px;
  background-color: var(--border-color);
  margin: 2.5rem 0;
}

/* ==========================================================================
   Tab 2: Our Team
   ========================================================================== */
.team-heading {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.team-member-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.team-member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(2, 132, 199, 0.35);
}

/* Professional Photo Cropping */
.member-photo-frame {
  width: 100%;
  height: 330px;
  background: var(--primary-subtle);
  overflow: hidden;
}

.member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.team-member-card:hover .member-photo {
  transform: scale(1.03);
}

/* Fine-tuned vertical alignment for portraits */
.photo-ruoshui {
  object-position: center 15%;
}

.photo-ricky {
  object-position: center 15%;
}

.photo-katie {
  object-position: center 20%;
}

.member-details {
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.member-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.member-title {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 1.75rem 0;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.footer-contact {
  font-size: 0.925rem;
  color: var(--text-muted);
}

.footer-contact a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ==========================================================================
   Responsive Design (Computers, Tablets & Smart Phones)
   ========================================================================== */
@media (max-width: 860px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .header-container {
    height: auto;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .tabs-list {
    gap: 1.5rem;
  }

  .tab-btn {
    font-size: 0.95rem;
    padding: 0.5rem 0.25rem;
  }

  .banner-section {
    padding: 2.25rem 0;
  }

  .banner-heading {
    font-size: 2.15rem;
  }

  .main-body {
    padding: 1.75rem 0 3rem;
  }

  .content-container {
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius-md);
  }

  .info-section h2 {
    font-size: 1.5rem;
  }

  .info-section p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .team-heading {
    font-size: 1.65rem;
    margin-bottom: 1.75rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }

  .member-photo-frame {
    height: 300px;
  }
}
