/* ==========================================================================
   DarkGhost AI Research Lab — Stylesheet
   Pure OLED Pitch-Black (#000000) & Display P3 Gamut
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-oled, #000000);
  color: var(--text-primary, #ffffff);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg-oled, #000000);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: var(--text-primary, #ffffff);
  line-height: 1.6;
}

/* OLED Canvas for ambient neural field */
#neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Site Header & Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand-orange-subtle);
  border: 1px solid var(--brand-orange-border);
  color: var(--brand-orange);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-link:hover .brand-glyph {
  transform: scale(1.05);
  box-shadow: 0 0 16px var(--brand-orange-glow);
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--brand-orange);
  border: 1px solid var(--brand-orange-border);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-item:hover {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9999px;
  background: var(--brand-orange-subtle);
  color: var(--brand-orange);
  border: 1px solid var(--brand-orange-border);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cta-pill:hover {
  background: var(--brand-orange);
  color: #000000;
  box-shadow: 0 0 20px var(--brand-orange-glow);
  transform: translateY(-1px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding-top: 170px;
  padding-bottom: 90px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green-glow);
  animation: pulse 2.4s infinite;
}

.status-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  max-width: 900px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--accent-amber) 60%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: var(--text-secondary);
  max-width: 720px;
  margin-bottom: 38px;
  line-height: 1.6;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-primary {
  background: var(--brand-orange);
  color: #000000;
  box-shadow: 0 0 24px var(--brand-orange-glow);
  border: 1px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px var(--brand-orange-glow);
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Metric Badges */
.hero-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 18px 32px;
  background: rgba(16, 18, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  margin-top: 10px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-orange);
}

.metric-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.metric-divider {
  width: 1px;
  height: 32px;
  background: var(--border-subtle);
}

/* ==========================================================================
   Sections Common
   ========================================================================== */
.section {
  padding: 110px 0;
  position: relative;
  z-index: 1;
}

.section-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand-orange);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 18px;
  max-width: 760px;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 680px;
  margin-bottom: 48px;
}

/* ==========================================================================
   The Thesis Section
   ========================================================================== */
.thesis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.thesis-card {
  position: relative;
  background: #080a09;
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 36px 30px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.thesis-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-orange-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 30px var(--brand-orange-subtle);
}

.card-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-orange-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.15;
  transition: opacity 0.3s ease;
}

.thesis-card:hover .card-glow {
  opacity: 0.45;
}

.thesis-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-olive);
  margin-bottom: 20px;
}

.thesis-heading {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.thesis-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   Research Programs Section
   ========================================================================== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.research-card {
  background: #0c0e0d;
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.research-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #111412;
  transform: translateY(-3px);
}

.research-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-sage);
  margin-bottom: 16px;
}

.research-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.research-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 22px;
}

.research-points {
  list-style: none;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.research-points li {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.research-points li::before {
  content: "→";
  color: var(--brand-orange);
  font-weight: bold;
}

/* ==========================================================================
   Agent Spotlight Section
   ========================================================================== */
.spotlight-card {
  background: radial-gradient(circle at 80% 20%, rgba(255, 96, 0, 0.08) 0%, #080908 60%);
  border: 1px solid var(--brand-orange-border);
  border-radius: 28px;
  padding: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px var(--brand-orange-subtle);
}

.spotlight-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand-orange);
  margin-bottom: 24px;
}

.spotlight-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.spotlight-title {
  font-size: clamp(2rem, 3.5vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.spotlight-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.spotlight-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 30px;
}

.spotlight-actions {
  display: flex;
  gap: 14px;
}

/* Device Mockup Inside Spotlight */
.device-mockup {
  background: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 24px rgba(255, 96, 0, 0.15);
}

.device-header {
  padding: 12px 16px;
  background: #0d0f0e;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-orange { background: var(--brand-orange); }
.dot-olive { background: var(--brand-olive); }
.dot-green { background: var(--accent-green); }

.device-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 6px;
}

.device-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.msg-bubble {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.msg-bubble.incoming {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.bubble-sender {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--brand-orange);
  margin-bottom: 4px;
}

.telemetry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #080908;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pip.green { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green-glow); }
.pip.orange { background: var(--brand-orange); }

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-card {
  width: 100%;
  max-width: 680px;
  background: #0c0d0c;
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 32px;
}

.contact-details {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.contact-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--brand-orange);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.contact-value:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.contact-divider {
  width: 1px;
  height: 48px;
  background: var(--border-subtle);
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #000000;
  padding: 36px 0;
  position: relative;
  z-index: 10;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

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

.footer-brand {
  font-weight: 700;
  font-size: 1rem;
}

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

.p3-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
}

.p3-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-orange);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-right a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-right a:hover {
  color: var(--text-primary);
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
  .spotlight-content {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    display: none;
  }

  .hero-metrics {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .metric-divider {
    width: 100%;
    height: 1px;
  }

  .contact-details {
    flex-direction: column;
    gap: 18px;
  }

  .contact-divider {
    width: 100%;
    height: 1px;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-left, .footer-right {
    align-items: center;
  }
}
