/* ==========================================================================
   AIR Lab - Design System & Modern Academic Light/Dark Styling
   AI Innovation & Research Lab Official Styling (Clean & Minimal Navbar)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Light Mode Theme (Default - Academic & Decent White View)
   -------------------------------------------------------------------------- */
:root, [data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-surface: #f1f5f9;
  --bg-surface-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-card-alt: #f8fafc;
  --bg-nav: rgba(255, 255, 255, 0.92);
  --bg-footer: #f8fafc;
  --bg-terminal: #0f172a;
  --bg-code: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  --text-code: #0f172a;

  --accent-primary: #2563eb;       /* Royal Blue */
  --accent-primary-hover: #1d4ed8;
  --accent-primary-glow: rgba(37, 99, 235, 0.18);
  --accent-cyan: #0284c7;          /* Sky Blue */
  --accent-cyan-glow: rgba(2, 132, 199, 0.15);
  --accent-violet: #7c3aed;
  --accent-emerald: #059669;
  --accent-rose: #e11d48;
  --accent-amber: #d97706;

  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-strong: #94a3b8;
  --border-accent: rgba(37, 99, 235, 0.35);

  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);

  --body-bg-gradient: 
    radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(124, 58, 237, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(2, 132, 199, 0.03) 0%, transparent 50%);
}

/* --------------------------------------------------------------------------
   Dark Mode Theme
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg-primary: #060911;
  --bg-secondary: #0b1220;
  --bg-surface: #0f1a30;
  --bg-surface-elevated: #15223c;
  --bg-card: rgba(15, 26, 48, 0.75);
  --bg-card-hover: rgba(22, 38, 70, 0.85);
  --bg-card-alt: rgba(11, 18, 32, 0.9);
  --bg-nav: rgba(6, 9, 17, 0.9);
  --bg-footer: #03060c;
  --bg-terminal: #04060a;
  --bg-code: #04060a;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;
  --text-code: #a5f3fc;

  --accent-primary: #06b6d4;
  --accent-primary-hover: #0891b2;
  --accent-primary-glow: rgba(6, 182, 212, 0.35);
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(6, 182, 212, 0.3);
  --accent-violet: #a78bfa;
  --accent-emerald: #10b981;
  --accent-rose: #fb7185;
  --accent-amber: #fbbf24;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(255, 255, 255, 0.28);
  --border-accent: rgba(6, 182, 212, 0.4);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 48px -8px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.25);

  --body-bg-gradient: 
    radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
}

/* --------------------------------------------------------------------------
   Base Variables & Resets
   -------------------------------------------------------------------------- */
:root {
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --transition-fast: 0.16s ease;
  --transition-normal: 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: var(--body-bg-gradient);
  background-attachment: fixed;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ==========================================================================
   Header & Clean Academic Navbar
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.glass-nav {
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
}

/* Official Logo Image */
.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-medium);
  box-shadow: 0 0 10px var(--accent-primary-glow);
  transition: transform var(--transition-fast);
  background: #000;
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.06);
}

.footer-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-medium);
  box-shadow: 0 0 12px var(--accent-primary-glow);
  background: #000;
}

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

.nav-link {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition-fast);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Theme Switcher Toggle */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-medium);
  color: var(--accent-primary);
  transform: scale(1.05);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.4rem;
}

/* Mobile Drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem;
  flex-direction: column;
  gap: 1rem;
  z-index: 99;
  box-shadow: var(--shadow-lg);
}

.mobile-nav.open {
  display: flex;
}

/* Glass & Card Design */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal), background-color var(--transition-normal);
  position: relative;
}

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

.glass-panel {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

/* Gradient Text */
.gradient-text-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .gradient-text-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-cyan {
  background: rgba(2, 132, 199, 0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-violet {
  background: rgba(124, 58, 237, 0.08);
  color: var(--accent-violet);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.badge-emerald {
  background: rgba(5, 150, 105, 0.08);
  color: var(--accent-emerald);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-rose {
  background: rgba(225, 29, 72, 0.08);
  color: var(--accent-rose);
  border: 1px solid rgba(225, 29, 72, 0.25);
}

.badge-amber {
  background: rgba(217, 119, 6, 0.08);
  color: var(--accent-amber);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

/* Pulse animation for live status */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1.3rem;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--accent-primary-glow);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-primary-glow);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--border-medium);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.btn-sm {
  padding: 0.38rem 0.8rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: calc(90vh - 70px);
  display: flex;
  align-items: center;
  padding: 3.5rem 0 3rem;
  overflow: hidden;
}

#neural-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 0;
  opacity: 0.9;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  margin-top: 1rem;
  margin-bottom: 1.2rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 3rem;
}

/* Metrics Counter Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.8rem;
}

.metric-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.metric-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Marquee / Live Ticker */
.ticker-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 0;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.ticker-inner {
  display: inline-flex;
  gap: 3rem;
  animation: ticker-slide 32s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.ticker-item strong {
  color: var(--text-primary);
}

@keyframes ticker-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Section Common Structure */
.section {
  padding: 5rem 0;
  position: relative;
}

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

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  display: block;
}

.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin-bottom: 0.8rem;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Research Tracks Grid */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.track-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.track-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--accent-primary);
}

.track-title {
  font-size: 1.28rem;
  margin-bottom: 0.35rem;
}

.track-tagline {
  font-size: 0.86rem;
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 0.9rem;
}

.track-description {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.4rem;
}

.track-focus-list {
  list-style: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.track-focus-item {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.track-focus-item::before {
  content: '▸';
  color: var(--accent-primary);
  font-size: 0.95rem;
}

.track-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.1rem;
  margin-top: auto;
}

.track-lead {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.track-lead strong {
  color: var(--text-secondary);
}

/* Interactive Demos Playground */
.demos-wrapper {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.demo-tabs {
  display: flex;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.demo-tab-btn {
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.demo-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.demo-tab-btn.active {
  color: var(--accent-primary);
  background: var(--bg-card);
  border-bottom: 2px solid var(--accent-primary);
}

.demo-panel {
  padding: 2rem;
  display: none;
}

.demo-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

/* Demo 1: Reasoning Agent Simulator */
.reasoner-container {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1.8rem;
}

@media (max-width: 900px) {
  .reasoner-container {
    grid-template-columns: 1fr;
  }
}

.prompt-presets {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}

.preset-btn {
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.86rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-btn:hover, .preset-btn.active {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.terminal-box {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 1.1rem;
  min-height: 360px;
  max-height: 460px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  color: #f8fafc;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.74rem;
  color: #94a3b8;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.terminal-step {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--accent-primary);
}

.terminal-step.thought {
  border-left-color: var(--accent-violet);
}

.terminal-step.tool {
  border-left-color: var(--accent-amber);
}

.terminal-step.result {
  border-left-color: var(--accent-emerald);
}

.step-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.step-content {
  color: #e2e8f0;
  line-height: 1.5;
}

/* Demo 2: Vision Inspector */
.vision-inspector-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.8rem;
  align-items: start;
}

@media (max-width: 900px) {
  .vision-inspector-grid {
    grid-template-columns: 1fr;
  }
}

.vision-stage {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #000;
}

.vision-stage img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.bbox {
  position: absolute;
  border: 2px solid var(--accent-primary);
  background: rgba(37, 99, 235, 0.18);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.bbox:hover {
  background: rgba(37, 99, 235, 0.38);
  box-shadow: 0 0 12px var(--accent-primary);
}

.bbox-label {
  position: absolute;
  top: -22px;
  left: -2px;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px 3px 0 0;
  white-space: nowrap;
}

/* Demo 3: Benchmark Explorer */
.benchmark-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.benchmark-table th {
  padding: 0.9rem 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-medium);
  background: var(--bg-surface);
  white-space: nowrap;
}

.benchmark-table td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.benchmark-table tr:hover td {
  background: var(--bg-surface);
}

.benchmark-table tr.highlight-row td {
  background: rgba(37, 99, 235, 0.05);
  font-weight: 600;
}

.bar-container {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.bar-fill {
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, #2563eb, #0284c7);
}

/* Publications Hub */
.publications-controls {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 2rem;
}

.search-input-wrapper {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.9rem 1.2rem 0.9rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.96rem;
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-pill:hover, .filter-pill.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.paper-card {
  padding: 1.8rem;
}

.paper-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}

.paper-venue {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.paper-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.paper-authors {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}

.paper-abstract {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.3rem;
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.1rem;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
}

.project-stats {
  display: flex;
  gap: 1.2rem;
  margin: 1rem 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.project-stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.3rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* Team Grid */
.team-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
}

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

.member-card {
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.member-avatar-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 1.1rem;
  position: relative;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-violet));
}

.member-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface);
}

.member-name {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.member-role {
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.member-bio {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.member-socials {
  display: flex;
  gap: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
}

.member-social-link {
  color: var(--text-muted);
}

.member-social-link:hover {
  color: var(--accent-primary);
}

/* News & Events Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.news-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
}

.news-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.news-title {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
  line-height: 1.4;
}

.news-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.3rem;
}

/* Join Lab & Application Form */
.join-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .join-container {
    grid-template-columns: 1fr;
  }
}

.positions-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.position-card {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.position-card h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.position-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
  background: var(--bg-card);
}

/* Modal Dialog */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.bibtex-code {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #a5f3fc;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 1.1rem 0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  animation: slideInUp 0.25s ease;
}

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

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-footer);
  color: var(--text-secondary);
  padding: 4.5rem 0 2rem;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h5 {
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-links a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

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

.footer-bottom a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-bottom a:hover {
  color: var(--accent-primary);
}

/* Responsive adjustments across devices */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
}

@media (max-width: 640px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .research-grid { grid-template-columns: 1fr; }
  .team-controls .filter-pills-row { justify-content: flex-start; overflow-x: auto; padding-bottom: 0.5rem; }
}
