@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg-space: #0B0C10;
  --bg-navy: #12141C;
  --bg-card: #181B26;
  --bg-card-hover: #222638;
  
  --text-primary: #FFFFFF;
  --text-secondary: #E0E6ED;
  --text-muted: #8A99AD;
  
  --accent-blue: #0056B3;
  --accent-blue-hover: #0070F3;
  --accent-blue-glow: rgba(0, 86, 179, 0.4);
  
  --accent-orange: #FF5722;
  --accent-orange-hover: #FF7043;
  --accent-orange-glow: rgba(255, 87, 34, 0.35);
  
  --border-color: #242838;
  --border-focus: #3A405A;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-technical: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Mono', monospace;
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px var(--accent-orange-glow);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-space);
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(0, 86, 179, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 87, 34, 0.05) 0%, transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 60px 60px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 80px; /* offset for fixed header */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-technical);
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: rgba(11, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.header-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-technical);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.logo-insignia {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-orange) 20%, var(--accent-blue) 80%);
  position: relative;
  box-shadow: 0 0 10px rgba(0, 86, 179, 0.6);
}

.logo-insignia::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -2px;
  right: -2px;
  height: 2px;
  background-color: var(--text-primary);
  transform: rotate(-25deg);
}

.logo span {
  color: var(--accent-orange);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  font-family: var(--font-technical);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-orange);
  transition: var(--transition);
}

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

/* Layout Elements */
main {
  flex: 1;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
}

/* Page Hero */
.hero-section {
  padding: 80px 0 60px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  background: radial-gradient(ellipse at center, rgba(18, 20, 28, 0.8) 0%, transparent 70%);
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 40px auto;
}

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

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 18px 24px 18px 50px;
  background-color: var(--bg-navy);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 15px rgba(255, 87, 34, 0.25);
}

.search-icon {
  position: absolute;
  left: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0,0,0,0.8);
  display: none;
  text-align: left;
}

.search-result-item {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: var(--bg-card-hover);
}

.search-result-name {
  font-family: var(--font-technical);
  font-weight: 600;
  color: var(--text-primary);
}

.search-result-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Timeline Component */
.timeline-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title-wrapper h2 {
  font-size: 2.2rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

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

.timeline-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
  overflow-x: auto;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.timeline-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  flex: 1;
  min-width: 120px;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-space);
  border: 3px solid var(--border-color);
  margin-bottom: 16px;
  transition: var(--transition);
}

.timeline-node:hover .timeline-dot,
.timeline-node.active .timeline-dot {
  border-color: var(--accent-orange);
  background-color: var(--accent-orange);
  box-shadow: 0 0 10px var(--accent-orange-glow);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-node:hover .timeline-year,
.timeline-node.active .timeline-year {
  color: var(--text-primary);
}

.timeline-label {
  font-family: var(--font-technical);
  font-size: 0.85rem;
  text-align: center;
  white-space: nowrap;
}

.timeline-node:hover .timeline-label,
.timeline-node.active .timeline-label {
  color: var(--text-primary);
}

/* Card Grids */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

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

/* Cards */
.card {
  background-color: var(--bg-navy);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent-blue);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  background-color: var(--bg-card);
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

.card:hover::before {
  background-color: var(--accent-orange);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent-orange);
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 1.4rem;
  line-height: 1.2;
}

.card-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  font-size: 0.85rem;
}

.card-link {
  color: var(--accent-orange);
  font-family: var(--font-technical);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-link::after {
  content: '→';
  transition: var(--transition);
}

.card-link:hover::after {
  transform: translateX(4px);
}

/* Detail Pages Layout */
.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
  align-items: start;
}

@media (max-width: 992px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Sections */
.detail-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-section h2 {
  font-size: 1.8rem;
  text-transform: uppercase;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

/* Tables (Telemetry) */
.telemetry-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-navy);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.telemetry-table tr {
  border-bottom: 1px solid var(--border-color);
}

.telemetry-table tr:last-child {
  border-bottom: none;
}

.telemetry-table td {
  padding: 16px 20px;
}

.telemetry-label {
  font-family: var(--font-technical);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  width: 40%;
}

.telemetry-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Media/Image Placeholders */
.image-placeholder-block {
  aspect-ratio: 16/9;
  background-color: var(--bg-card);
  border: 1px dashed var(--border-focus);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
}

.image-placeholder-icon {
  font-size: 2rem;
  color: var(--accent-orange);
}

.image-placeholder-alt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: var(--bg-space);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Grid Crew */
.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.crew-card {
  background-color: var(--bg-navy);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.crew-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 2px solid var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-technical);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.crew-card:hover .crew-avatar {
  border-color: var(--accent-orange);
}

.crew-name {
  font-family: var(--font-technical);
  font-weight: 600;
  font-size: 1rem;
}

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

/* Directory Filter Navigation */
.directory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  background-color: var(--bg-navy);
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.toolbar-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 10px 16px;
  background-color: var(--bg-space);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-technical);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--accent-orange);
}

/* Biography Profile Card */
.profile-card {
  background-color: var(--bg-navy);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  position: sticky;
  top: 110px;
  box-shadow: var(--shadow);
}

.profile-portrait-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 3px solid var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
  box-shadow: 0 0 20px rgba(0, 86, 179, 0.3);
}

.profile-card:hover .profile-portrait-placeholder {
  border-color: var(--accent-orange);
  box-shadow: 0 0 20px rgba(255, 87, 34, 0.3);
}

.profile-meta-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.profile-meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.profile-meta-lbl {
  color: var(--text-muted);
  font-family: var(--font-technical);
}

.profile-meta-val {
  color: var(--text-primary);
  font-weight: 500;
}

/* Footer */
.site-footer {
  background-color: var(--bg-space);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px 0;
  margin-top: 80px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-orange);
  padding-left: 4px;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Button & UI Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: var(--accent-blue);
  color: var(--text-primary);
  border: none;
  border-radius: 6px;
  font-family: var(--font-technical);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background-color: var(--accent-blue-hover);
  box-shadow: 0 0 10px var(--accent-blue-glow);
}

.btn-orange {
  background-color: var(--accent-orange);
}

.btn-orange:hover {
  background-color: var(--accent-orange-hover);
  box-shadow: var(--shadow-glow);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background-color: rgba(40, 167, 69, 0.15);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.badge-failure {
  background-color: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.badge-partial {
  background-color: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-space);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-focus);
}
