/* ========================================
   FLOQUET.CA — Quantum Energy Research Hub
   Design System: Dark Quantum Theme
   Deep Purple/Navy + Electric Blue + White
   Fonts: Inter (body) + Space Grotesk (headings)
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
  /* Core palette */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #151c2e;
  --bg-card-hover: #1a2340;
  --bg-accent: #0d1425;

  /* Text */
  --text-primary: #f0f2f8;
  --text-secondary: #9ba3b8;
  --text-muted: #6b7280;
  --text-accent: #3b82f6;

  /* Brand colors */
  --electric-blue: #3b82f6;
  --electric-blue-glow: rgba(59, 130, 246, 0.3);
  --deep-purple: #6d28d9;
  --purple-glow: rgba(109, 40, 217, 0.25);
  --cyan-accent: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.2);
  --teal: #14b8a6;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(59, 130, 246, 0.3);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0a0e1a 0%, #1a1040 50%, #0a0e1a 100%);
  --gradient-card: linear-gradient(145deg, #151c2e 0%, #111827 100%);
  --gradient-accent: linear-gradient(135deg, #3b82f6, #6d28d9);
  --gradient-glow: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);

  /* Spacing */
  --section-pad: 100px 0;
  --container-width: 1200px;
  --card-radius: 12px;
  --btn-radius: 8px;

  /* Transitions */
  --transition: all 0.3s ease;
}

/* ---------- Language Switcher ---------- */
.lang-switcher {
  display: flex;
  align-items: center;
  margin-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 16px;
}

.lang-btn {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(59, 130, 246, 0.3);
  color: rgba(255, 255, 255, 0.5);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: 0.5px;
}

.lang-btn:last-child {
  border-right: none;
}

.lang-btn:hover {
  color: var(--electric-blue);
}

.lang-btn.active {
  background: var(--electric-blue);
  color: #ffffff;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .lang-switcher {
    margin-left: 0;
    border-left: none;
    padding-left: 0;
    justify-content: center;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
  }
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 3.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p { color: var(--text-secondary); line-height: 1.8; }

a {
  color: var(--electric-blue);
  text-decoration: none;
  transition: var(--transition);
}
a:hover { color: var(--cyan-accent); }

img { max-width: 100%; height: auto; }

/* ---------- Container ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(10, 14, 26, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
}

.nav-logo .logo-dot {
  color: var(--electric-blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  transition: var(--transition);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  padding-top: 72px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: var(--gradient-glow);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 24px;
}

.hero-tagline {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--electric-blue);
  background: var(--electric-blue-glow);
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border-accent);
  margin-bottom: 32px;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #3b82f6 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 24px;
  letter-spacing: 0.08em;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--btn-radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 4px 20px var(--electric-blue-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--electric-blue-glow);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--electric-blue);
  background: rgba(59, 130, 246, 0.08);
  color: var(--electric-blue);
}

/* ---------- Section Common ---------- */
.section {
  padding: var(--section-pad);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--electric-blue);
  margin-bottom: 16px;
}

.section-header h2 {
  margin-bottom: 20px;
}

.section-header p {
  font-size: 1.1rem;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-divider {
  height: 1px;
  background: var(--border-subtle);
  max-width: var(--container-width);
  margin: 0 auto;
}

/* ---------- Cards ---------- */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 36px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--electric-blue-glow);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  font-size: 0.95rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 48px 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Feature Blocks ---------- */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0;
}

.feature-block.reverse {
  direction: rtl;
}

.feature-block.reverse > * {
  direction: ltr;
}

.feature-text h2 {
  margin-bottom: 20px;
}

.feature-text p {
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.feature-visual {
  position: relative;
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 48px;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.feature-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0.5;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--border-light);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 48px;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
  padding-right: calc(50% + 32px);
  text-align: right;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
  padding-left: calc(50% + 32px);
}

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gradient-accent);
  border: 3px solid var(--bg-primary);
  z-index: 1;
}

.timeline-content h4 {
  color: var(--electric-blue);
  margin-bottom: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.timeline-content h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.timeline-content p {
  font-size: 0.9rem;
}

/* ---------- Progress/News Cards ---------- */
.progress-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 32px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.progress-card .tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  width: fit-content;
}

.tag-paper { background: var(--purple-glow); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.3); }
.tag-experiment { background: var(--cyan-glow); color: var(--cyan-accent); border: 1px solid rgba(6, 182, 212, 0.3); }
.tag-news { background: var(--electric-blue-glow); color: var(--electric-blue); border: 1px solid var(--border-accent); }
.tag-milestone { background: rgba(20, 184, 166, 0.15); color: var(--teal); border: 1px solid rgba(20, 184, 166, 0.3); }

.progress-card h3 {
  font-size: 1.15rem;
  line-height: 1.4;
}

.progress-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.progress-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ---------- Team Grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.team-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 40px 32px;
  text-align: center;
  transition: var(--transition);
}

.team-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--gradient-accent);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.team-card h3 {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.team-card .role {
  color: var(--electric-blue);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.team-card p {
  font-size: 0.9rem;
}

/* ---------- Contact Form ---------- */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--btn-radius);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 3px var(--electric-blue-glow);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--electric-blue);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------- Page Header (inner pages) ---------- */
.page-header {
  padding: 160px 0 80px;
  text-align: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: var(--gradient-glow);
  border-radius: 50%;
  pointer-events: none;
}

.page-header .section-label {
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  position: relative;
}

.page-header p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* ---------- Content Blocks (article-style) ---------- */
.content-section {
  padding: 80px 0;
}

.content-block {
  max-width: 800px;
  margin: 0 auto;
}

.content-block h2 {
  margin: 48px 0 20px;
  font-size: 2rem;
}

.content-block h3 {
  margin: 36px 0 16px;
  color: var(--electric-blue);
}

.content-block p {
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.content-block ul, .content-block ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.content-block li {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Callout / highlight boxes */
.callout {
  background: var(--bg-card);
  border-left: 4px solid var(--electric-blue);
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
  padding: 24px 28px;
  margin: 32px 0;
}

.callout h4 {
  color: var(--electric-blue);
  margin-bottom: 8px;
}

.callout p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.highlight-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(109, 40, 217, 0.1));
  border: 1px solid var(--border-accent);
  border-radius: var(--card-radius);
  padding: 32px;
  margin: 32px 0;
  text-align: center;
}

.highlight-box .stat-number {
  font-size: 3.5rem;
  margin-bottom: 8px;
}

.highlight-box p {
  font-size: 1rem;
}

/* Equation / formula display */
.equation {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 24px;
  margin: 32px 0;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  color: var(--cyan-accent);
  letter-spacing: 0.05em;
}

/* ---------- Glow effects ---------- */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--electric-blue), transparent);
  margin: 0 auto;
  max-width: 400px;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.3;
}

.glow-orb-blue {
  background: var(--electric-blue);
}

.glow-orb-purple {
  background: var(--deep-purple);
}

/* ---------- Scroll Animations ---------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  h1 { font-size: 2.8rem; }
  .hero h1 { font-size: 3rem; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .feature-block { grid-template-columns: 1fr; gap: 40px; }
  .feature-block.reverse { direction: ltr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 768px) {
  :root { --section-pad: 64px 0; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  .hero h1 { font-size: 2.4rem; }
  .hero-subtitle { font-size: 1.2rem; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.98);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .cards-grid { grid-template-columns: 1fr; }
  .cards-grid-2 { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { padding: 120px 0 60px; }
  .page-header h1 { font-size: 2.2rem; }
  .timeline::before { left: 20px; }
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    flex-direction: row;
    padding-left: 52px;
    padding-right: 0;
    text-align: left;
  }
  .timeline-dot { left: 20px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .stat-number { font-size: 2rem; }
  .card { padding: 24px; }
  .container { padding: 0 16px; }
}

/* ========================================
   BLOG STYLES
   ======================================== */

/* --- Blog Card Grid --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.blog-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.15) 50%, rgba(109, 40, 217, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--electric-blue);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.blog-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0.4;
}

.blog-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-card-meta .tag {
  font-size: 0.7rem;
}

.blog-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.blog-card h3 a:hover {
  color: var(--electric-blue);
}

.blog-card p {
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 16px;
}

.blog-card .read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--electric-blue);
}

.blog-card .read-more:hover {
  color: var(--cyan-accent);
}

/* --- Article Page --- */
.article-header {
  padding: 160px 0 48px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.article-header::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: var(--gradient-glow);
  border-radius: 50%;
  pointer-events: none;
}

.article-header-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.article-header .tag {
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: 2.6rem;
  margin-bottom: 16px;
  line-height: 1.25;
}

.article-header .article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.article-header .article-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 24px;
}

.article-body h2 {
  font-size: 1.8rem;
  margin: 48px 0 20px;
  color: var(--text-primary);
}

.article-body h3 {
  font-size: 1.3rem;
  margin: 36px 0 16px;
  color: var(--electric-blue);
}

.article-body p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 20px;
}

.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article-body li {
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-body blockquote {
  border-left: 4px solid var(--electric-blue);
  background: var(--bg-card);
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
  padding: 24px 28px;
  margin: 32px 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.article-body .stat-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(109, 40, 217, 0.1));
  border: 1px solid var(--border-accent);
  border-radius: var(--card-radius);
  padding: 32px;
  margin: 32px 0;
  text-align: center;
}

.article-body .stat-box .stat-number {
  font-size: 3rem;
  margin-bottom: 8px;
}

.article-cta {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 40px;
  text-align: center;
  margin: 48px 0 0;
}

.article-cta h3 {
  color: var(--text-primary) !important;
  margin-bottom: 12px;
}

.article-cta p {
  margin-bottom: 24px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--electric-blue);
  margin-bottom: 24px;
}

.article-back:hover {
  color: var(--cyan-accent);
}

/* --- Blog Responsive --- */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 2rem; }
  .article-header { padding: 120px 0 40px; }
  .article-body { padding: 40px 16px; }
}

@media (max-width: 480px) {
  .article-header h1 { font-size: 1.6rem; }
}

/* ---------- RTL Support (Arabic, Farsi) ---------- */
body.rtl {
  direction: rtl;
  text-align: right;
}

body.rtl .nav-inner {
  flex-direction: row-reverse;
}

body.rtl .nav-links {
  flex-direction: row-reverse;
}

body.rtl .lang-switcher {
  margin-left: 0;
  margin-right: 12px;
  border-left: none;
  border-right: 1px solid rgba(59, 130, 246, 0.2);
  padding-left: 0;
  padding-right: 8px;
}

body.rtl .hero-text,
body.rtl .section-header {
  text-align: right;
}

body.rtl .hero-grid,
body.rtl .footer-grid,
body.rtl .research-grid,
body.rtl .team-grid {
  direction: rtl;
}

body.rtl .stat-item,
body.rtl .card,
body.rtl .research-card,
body.rtl .team-card {
  text-align: right;
}

body.rtl ul, body.rtl ol {
  padding-left: 0;
  padding-right: 1.5em;
}

/* ---------- CJK Font Support ---------- */
[lang="zh"] body,
[lang="zh"] h1, [lang="zh"] h2, [lang="zh"] h3 {
  font-family: 'Space Grotesk', 'Noto Sans SC', 'PingFang SC', sans-serif;
}

[lang="ja"] body,
[lang="ja"] h1, [lang="ja"] h2, [lang="ja"] h3 {
  font-family: 'Space Grotesk', 'Noto Sans JP', 'Hiragino Sans', sans-serif;
}

[lang="ar"] body, [lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3,
[lang="fa"] body, [lang="fa"] h1, [lang="fa"] h2, [lang="fa"] h3 {
  font-family: 'Noto Sans Arabic', 'Tahoma', 'Arial', sans-serif;
}
