/* ==========================================================================
   AgentNexus — Core Design System & Hub Architecture
   Aesthetics: Deep Space Obsidian, Dynamic Ambient Mesh, Refined Glassmorphism
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, monospace;

  /* Color Palette: Dark Obsidian Core */
  --bg-core: #07090e;
  --bg-surface: rgba(18, 22, 32, 0.7);
  --bg-surface-elevated: rgba(28, 34, 48, 0.85);
  --bg-card: rgba(18, 24, 38, 0.6);
  --bg-card-hover: rgba(26, 34, 52, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.18);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  /* Quadrant Brand Accents */
  --tennis-accent: #ccff00;
  --tennis-glow: rgba(204, 255, 0, 0.22);
  --tennis-gradient: linear-gradient(135deg, rgba(204, 255, 0, 0.15) 0%, rgba(13, 40, 24, 0.4) 100%);

  --career-accent: #00f0ff;
  --career-glow: rgba(0, 240, 255, 0.22);
  --career-gradient: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(15, 23, 42, 0.4) 100%);

  --edu-accent: #a855f7;
  --edu-glow: rgba(168, 85, 247, 0.22);
  --edu-gradient: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(30, 16, 53, 0.4) 100%);

  --personal-accent: #f59e0b;
  --personal-glow: rgba(245, 158, 11, 0.22);
  --personal-gradient: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(41, 29, 13, 0.4) 100%);

  --finance-accent: #22D3EE;
  --finance-accent-soft: #06B6D4;
  --finance-glow: rgba(34, 211, 238, 0.22);
  --finance-bg-glow: rgba(34, 211, 238, 0.15);
  --finance-gradient: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(10, 30, 45, 0.4) 100%);

  --business-accent: #F43F5E;
  --business-accent-soft: #FB7185;
  --business-glow: rgba(244, 63, 94, 0.22);
  --business-bg-glow: rgba(244, 63, 94, 0.15);
  --business-gradient: linear-gradient(135deg, rgba(244, 63, 94, 0.15) 0%, rgba(45, 10, 20, 0.4) 100%);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-core);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Background Atmosphere Mesh */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 20% 15%, rgba(0, 240, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 25%, rgba(168, 85, 247, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 30% 80%, rgba(204, 255, 0, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 75% 75%, rgba(245, 158, 11, 0.07) 0%, transparent 40%),
    linear-gradient(to bottom, #07090e 0%, #0a0d14 100%);
}

.ambient-grid {
  position: fixed;
  inset: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Dynamic Cursor Glow Follower */
#cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.4s ease;
  will-change: left, top;
}

/* Page Wrapper */
.layout-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 24px 64px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header */
.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  margin-bottom: 40px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00f0ff 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
}

.brand-logo svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.header-status-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Header Launcher Button */
.header-launcher-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12) 0%, rgba(99, 102, 241, 0.15) 100%);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 9999px;
  font-size: 0.78rem;
  color: #f1f5f9;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.18);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-launcher-pill:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(99, 102, 241, 0.28) 100%);
  border-color: #00f0ff;
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.4);
}

.launcher-pulse-icon {
  font-size: 0.9rem;
}

.launcher-pill-badge {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 240, 255, 0.2);
  color: #00f0ff;
}

.system-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #34d399;
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.live-clock {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 48px auto;
}

/* Hero Tag Bar */
.hero-tag-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-tag-bar .hero-tag {
  margin-bottom: 0;
}

.hero-launcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.hero-launcher-btn:hover {
  background: rgba(0, 240, 255, 0.16);
  border-color: #00f0ff;
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
  transform: translateY(-1px);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Quick Filter / Search Bar */
.search-container {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 14px 44px 14px 42px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 8px 30px rgba(0, 0, 0, 0.5);
}

.search-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search-shortcut-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* ==========================================
   Four Pillars: Master Bento Grid
   ========================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.pillar-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

/* Individual Card Accents */
.pillar-card.tennis-card {
  border-top: 2px solid rgba(204, 255, 0, 0.4);
}
.pillar-card.tennis-card:hover {
  border-color: rgba(204, 255, 0, 0.8);
  box-shadow: 0 20px 40px -15px var(--tennis-glow);
}
.pillar-card.tennis-card .card-glow-layer {
  background: var(--tennis-gradient);
}

.pillar-card.career-card {
  border-top: 2px solid rgba(0, 240, 255, 0.4);
}
.pillar-card.career-card:hover {
  border-color: rgba(0, 240, 255, 0.8);
  box-shadow: 0 20px 40px -15px var(--career-glow);
}
.pillar-card.career-card .card-glow-layer {
  background: var(--career-gradient);
}

.pillar-card.edu-card {
  border-top: 2px solid rgba(168, 85, 247, 0.4);
}
.pillar-card.edu-card:hover {
  border-color: rgba(168, 85, 247, 0.8);
  box-shadow: 0 20px 40px -15px var(--edu-glow);
}
.pillar-card.edu-card .card-glow-layer {
  background: var(--edu-gradient);
}

.pillar-card.personal-card {
  border-top: 2px solid rgba(245, 158, 11, 0.4);
}
.pillar-card.personal-card:hover {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 20px 40px -15px var(--personal-glow);
}
.pillar-card.personal-card .card-glow-layer {
  background: var(--personal-gradient);
}

.pillar-card.finance-card {
  border-top: 2px solid rgba(34, 211, 238, 0.4);
}
.pillar-card.finance-card:hover {
  border-color: #67E8F9;
  box-shadow: 0 20px 40px -15px var(--finance-glow);
}
.pillar-card.finance-card .card-glow-layer {
  background: var(--finance-gradient);
}
.pillar-card.finance-card .card-key-shortcut {
  color: var(--finance-accent);
  border-color: rgba(34, 211, 238, 0.4);
}
.pillar-card.finance-card:hover .enter-btn {
  background: var(--finance-accent);
  color: #0a0e14;
}

.pillar-card.business-card {
  border-top: 2px solid rgba(244, 63, 94, 0.4);
}
.pillar-card.business-card:hover {
  border-color: #FDA4AF;
  box-shadow: 0 20px 40px -15px var(--business-glow);
}
.pillar-card.business-card .card-glow-layer {
  background: var(--business-gradient);
}
.pillar-card.business-card .card-key-shortcut {
  color: var(--business-accent);
  border-color: rgba(244, 63, 94, 0.4);
}
.pillar-card.business-card:hover .enter-btn {
  background: var(--business-accent);
  color: #ffffff;
}

/* Background Ambient Glow inside card */
.card-glow-layer {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 180px;
  opacity: 0.15;
  transition: opacity 0.3s ease;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent);
}

.pillar-card:hover .card-glow-layer {
  opacity: 0.35;
}

/* Card Header */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-icon-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.card-heading h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.card-heading .card-subtext {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card-key-shortcut {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-faint);
}

/* Card Summary & Description */
.card-desc {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 24px;
}

/* Quick Metrics Strip */
.card-metrics {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.metric-pill {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  flex: 1;
  min-width: 100px;
}

.metric-pill .label {
  font-size: 0.7rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.metric-pill .value {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

/* Quick Sub-Links within Card */
.card-sublinks {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sublink-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sublink-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-subtle);
  color: #ffffff;
  transform: translateX(3px);
}

.sublink-item span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Card CTA Button */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.pillar-card:hover .enter-btn {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.pillar-card.tennis-card:hover .enter-btn {
  background: var(--tennis-accent);
  color: #000000;
  box-shadow: 0 4px 20px var(--tennis-glow);
}

.pillar-card.career-card:hover .enter-btn {
  background: var(--career-accent);
  color: #000000;
  box-shadow: 0 4px 20px var(--career-glow);
}

.pillar-card.edu-card:hover .enter-btn {
  background: var(--edu-accent);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--edu-glow);
}

.pillar-card.personal-card:hover .enter-btn {
  background: var(--personal-accent);
  color: #000000;
  box-shadow: 0 4px 20px var(--personal-glow);
}

.status-tag {
  font-size: 0.75rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* ==========================================
   Architecture Principles Strip
   ========================================== */
.architecture-strip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.arch-feature {
  display: flex;
  gap: 14px;
}

.arch-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.arch-text h4 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-main);
}

.arch-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Footer */
.hub-footer {
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.hub-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.hub-footer a:hover {
  color: var(--text-main);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .pillars-grid {
    grid-template-columns: 1fr;
  }
  .architecture-strip {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hero-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 640px) {
  .hub-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .header-status-area {
    width: 100%;
    justify-content: space-between;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .pillar-card {
    padding: 24px;
  }
  .hub-footer {
    flex-direction: column;
    gap: 12px;
  }
}
