/* ============= VARIABLES ============= */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #0f172a;
  --light: #f8fafc;
  --gray: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  --radius: 8px;
  --container: 1200px;
}

/* ============= RESET ============= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background-color: #fff;
}

a {
  text-decoration: none;
  color: var(--primary);
}

img, svg {
  max-width: 100%;
  height: auto;
}

/* ============= UTILITIES ============= */
.container {
  width: min(95%, var(--container));
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: var(--secondary);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-size: 1rem;
}

.btn.primary {
  background-color: var(--primary);
  color: white;
}

.btn.primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn.secondary {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn.secondary:hover {
  background-color: rgba(37, 99, 235, 0.05);
}

/* ============= LANGUAGE TOGGLE ============= */
.lang-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  gap: 8px;
}

.lang-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 4px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--primary);
  color: white;
}

/* ============= HEADER ============= */
.header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 99;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--secondary);
}

.logo span {
  color: var(--primary);
}

nav a {
  margin-left: 24px;
  font-weight: 500;
  color: var(--secondary);
}

nav a:hover, nav a.active {
  color: var(--primary);
}

/* ============= HERO ============= */
.hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  padding: 80px 0;
  text-align: center;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--secondary);
}

.hero-desc {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 32px;
  color: #334155;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 32px 0;
  font-size: 0.95rem;
}

.hero-highlights span {
  background: white;
  padding: 8px 16px;
  border-radius: 50px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============= CARDS ============= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: white;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card h3 {
  color: var(--secondary);
  margin-bottom: 16px;
}

/* ============= SERVICES ============= */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.service-item {
  background: white;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.service-item h4 {
  color: var(--primary);
  margin-bottom: 12px;
}

/* ============= PARTNERS ============= */
.partners {
  background-color: #f1f5f9;
}

.partners .container {
  text-align: center;
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
}

.logo-item {
  background: white;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  min-width: 100px;
}

/* ============= CTA ============= */
.cta {
  background: linear-gradient(to right, var(--primary), #1d4ed8);
  color: white;
  text-align: center;
}

.cta .container {
  max-width: 800px;
}

.cta h2 {
  font-size: 2.2rem;
  margin-bottom: 24px;
}

.cta-list {
  text-align: left;
  max-width: 600px;
  margin: 0 auto 32px;
  font-size: 1.1rem;
}

.cta-list li {
  margin-bottom: 12px;
}

.cta-list li::before {
  content: "✓";
  color: var(--success);
  margin-right: 8px;
  font-weight: bold;
}

.contact-info {
  margin-top: 20px;
  color: rgba(255,255,255,0.9);
}

/* ============= FOOTER ============= */
.footer {
  background: var(--secondary);
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer a {
  display: block;
  margin-bottom: 10px;
  color: #cbd5e1;
}

.footer a:hover {
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #334155;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* ============= PAGE CONTENT ============= */
.page-content {
  padding: 40px 0;
}

.page-content h1 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
}

.why-open {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.service-detail {
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px dashed var(--border);
}

.service-detail:last-child {
  border-bottom: none;
}

/* ============= CASE STUDIES ============= */
.case-study {
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border);
}

.case-study:last-child {
  border-bottom: none;
}

.case-study h2 {
  color: var(--primary);
  margin-bottom: 8px;
}

.mermaid {
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  margin: 24px 0;
  overflow: auto;
  text-align: left;
}

/* ============= CONTACT ============= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
}

/* ============= BLOG ============= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.blog-post h2 a {
  color: var(--secondary);
  text-decoration: none;
}

.blog-post h2 a:hover {
  color: var(--primary);
}

.blog-post time {
  display: block;
  color: var(--gray);
  margin-bottom: 8px;
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
}

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 1.1rem;
  }

  .header .container {
    flex-direction: column;
  }

  nav {
    margin-top: 16px;
  }

  nav a {
    margin: 0 10px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .contact-info {
    font-size: 0.9rem;
  }
}

/* ============= Founders Grid — Enlarged Avatars ============= */
.founders-section {
  background-color: #f9fafb;
  padding: 80px 0;
}

.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 56px;
  max-width: 1200px;
  margin: 0 auto;
}

.founder-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  text-align: center;
}

.founder-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 30px -10px rgba(0,0,0,0.12);
}

/* ============= Founders Grid — Ultra Large Avatars (420px) ============= */
.founders-section {
  background: linear-gradient(135deg, #f0f8ff 0%, #f8fafc 100%);
  padding: 90px 0;
}

.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
  gap: 64px;
  max-width: 1300px;
  margin: 0 auto;
}

/* 在 .founder-avatar::before 中追加 */
.founder-card:nth-child(2) .founder-avatar::before {
  background: radial-gradient(circle, rgba(147, 51, 234, 0.12) 0%, transparent 70%);
}

.founder-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
  transition: all 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
}

.founder-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.15);
}

/* ✅ ULTRA LARGE AVATAR: 420×420px with 30px padding */
.founder-avatar {
  /* Container: 480px high = 420px image + 30px top + 30px bottom padding */
  height: 480px;
  background: linear-gradient(145deg, #e0f2fe 0%, #dbeafe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

/* Subtle glow effect */
.founder-avatar::before {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  z-index: 0;
}

.founder-avatar img {
  /* ✅ Final display size: 420×420px */
  width: 420px;
  height: 420px;
  object-fit: cover;
  border-radius: 50%;
  border: 8px solid white;
  box-shadow: 
    0 16px 32px rgba(0, 0, 0, 0.12),
    0 0 0 4px rgba(255, 255, 255, 0.8),
    0 0 0 8px rgba(37, 99, 235, 0.08);
  position: relative;
  z-index: 1;
  background-color: #e0f2fe; /* fallback */
  /* ✅ 30px breathing space from container edge */
  margin: 30px;
}

.founder-content {
  padding: 0 40px 40px;
}

.founder-content h3 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.founder-role {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 24px;
  font-size: 1.25rem;
  letter-spacing: 0.3px;
}

.founder-bio p {
  margin-bottom: 18px;
  line-height: 1.75;
  color: #334155;
  font-size: 1.08rem;
}

.founder-credentials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
}

.founder-credentials span {
  background: #f0f9ff;
  color: var(--primary-dark);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.05);
}

/* ===== Responsive ===== */
/* Tablet */
@media (max-width: 768px) {
  .founders-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .founder-avatar {
    height: 420px;
  }

  .founder-avatar img {
    width: 360px;
    height: 360px;
    margin: 30px 30px;
    border-width: 6px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .founder-avatar {
    height: 380px;
  }

  .founder-avatar img {
    width: 300px;
    height: 300px;
    margin: 40px 20px; /* more top/bottom space on small screens */
    border-width: 6px;
  }

  .founder-content h3 {
    font-size: 1.8rem;
  }

  .founder-role {
    font-size: 1.15rem;
  }

  .founder-bio p {
    font-size: 1.02rem;
    padding: 0 10px;
  }
}