/* ============================================================
   WAR ROOM OVERRIDE — CloudGuard Portfolio
   Applies cinematic dark theme to all project pages
   ============================================================ */

:root {
  --wr-bg: #020b14;
  --wr-bg2: #061220;
  --wr-bg3: #0a1a2e;
  --wr-cyan: #00d4ff;
  --wr-orange: #ff9900;
  --wr-red: #ff3333;
  --wr-green: #00ff88;
  --wr-purple: #7c3aed;
  --wr-text: #e2e8f0;
  --wr-dim: #64748b;
  --wr-mono: 'Share Tech Mono', 'Courier New', monospace;
  --wr-sans: 'Inter', sans-serif;
  --wr-border: rgba(0,212,255,.15);
  --wr-glow: 0 0 20px rgba(0,212,255,.2);
}

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

/* ── GLOBAL RESET ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--wr-bg) !important;
  color: var(--wr-text) !important;
  font-family: var(--wr-sans) !important;
  margin: 0;
  padding: 0;
}

/* ── THREAT TICKER ── */
.wr-ticker {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 28px;
  background: rgba(255,51,51,.08);
  border-bottom: 1px solid rgba(255,51,51,.3);
  overflow: hidden;
  z-index: 9999;
  display: flex;
  align-items: center;
}
.wr-ticker-label {
  flex-shrink: 0;
  padding: 0 14px;
  font-family: var(--wr-mono);
  font-size: 10px;
  color: var(--wr-red);
  letter-spacing: .15em;
  border-right: 1px solid rgba(255,51,51,.3);
  white-space: nowrap;
}
.wr-ticker-track {
  display: flex;
  animation: tickerScroll 60s linear infinite;
  white-space: nowrap;
}
.wr-ticker-track span {
  font-family: var(--wr-mono);
  font-size: 10px;
  color: rgba(255,51,51,.8);
  padding: 0 32px;
  letter-spacing: .05em;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── NAVBAR ── */
.navbar, nav.navbar {
  position: fixed !important;
  top: 28px !important;
  left: 0; right: 0;
  height: 56px !important;
  background: rgba(2,11,20,.92) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid var(--wr-border) !important;
  z-index: 9990 !important;
  padding: 0 !important;
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo, .navbar .logo {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  font-family: var(--wr-mono) !important;
  font-size: 14px !important;
  color: var(--wr-cyan) !important;
  letter-spacing: .1em !important;
}
.logo img { height: 28px !important; width: auto !important; }

.nav-links a {
  font-family: var(--wr-mono) !important;
  font-size: 11px !important;
  letter-spacing: .12em !important;
  color: var(--wr-dim) !important;
  text-decoration: none !important;
  padding: 6px 10px !important;
  transition: color .2s !important;
  text-transform: uppercase !important;
}
.nav-links a:hover { color: var(--wr-cyan) !important; }

.nav-book-btn, .nav-links .nav-book-btn {
  background: transparent !important;
  border: 1px solid var(--wr-orange) !important;
  color: var(--wr-orange) !important;
  border-radius: 4px !important;
  padding: 6px 14px !important;
}
.nav-book-btn:hover { background: rgba(255,153,0,.1) !important; color: var(--wr-orange) !important; }

/* HQ return link */
.wr-hq-btn {
  font-family: var(--wr-mono) !important;
  font-size: 11px !important;
  color: var(--wr-green) !important;
  border: 1px solid rgba(0,255,136,.3) !important;
  border-radius: 4px !important;
  padding: 5px 12px !important;
  text-decoration: none !important;
  letter-spacing: .1em !important;
  transition: all .2s !important;
  white-space: nowrap;
}
.wr-hq-btn:hover { background: rgba(0,255,136,.08) !important; border-color: var(--wr-green) !important; }

/* ── MAIN CONTENT OFFSET ── */
body > *:not(.navbar):not(.wr-ticker):not(script):not(style) {
  padding-top: 0;
}
.project-hero, section:first-of-type, .hero-section {
  padding-top: 100px !important;
}

/* ── SECTION BACKGROUNDS ── */
section, .section {
  background: transparent !important;
}
section:nth-child(even) {
  background: rgba(6,18,32,.5) !important;
}

/* ── PROJECT HERO ── */
.project-hero {
  background: linear-gradient(135deg, var(--wr-bg) 0%, var(--wr-bg3) 100%) !important;
  border-bottom: 1px solid var(--wr-border) !important;
  position: relative;
  overflow: hidden;
}
.project-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(0,212,255,.04) 0%, transparent 60%),
                    radial-gradient(circle at 80% 20%, rgba(124,58,237,.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Mission ID badge */
.project-id-badge, .project-id {
  font-family: var(--wr-mono) !important;
  font-size: 11px !important;
  color: var(--wr-cyan) !important;
  letter-spacing: .2em !important;
  background: rgba(0,212,255,.08) !important;
  border: 1px solid rgba(0,212,255,.2) !important;
  border-radius: 4px !important;
  padding: 4px 10px !important;
  display: inline-block !important;
  margin-bottom: 12px !important;
}

/* Project title */
.project-title, h1.project-title {
  font-family: var(--wr-sans) !important;
  font-size: clamp(24px, 4vw, 42px) !important;
  font-weight: 700 !important;
  color: #fff !important;
  line-height: 1.2 !important;
  margin-bottom: 16px !important;
}

/* Certification badge */
.cert-badge, .project-cert {
  font-family: var(--wr-mono) !important;
  font-size: 11px !important;
  color: var(--wr-orange) !important;
  border: 1px solid rgba(255,153,0,.3) !important;
  border-radius: 4px !important;
  padding: 4px 10px !important;
  display: inline-block !important;
  margin-bottom: 16px !important;
}

/* Difficulty / level badge */
.difficulty-badge, .project-difficulty {
  font-family: var(--wr-mono) !important;
  font-size: 11px !important;
  background: rgba(124,58,237,.15) !important;
  border: 1px solid rgba(124,58,237,.3) !important;
  color: #a78bfa !important;
  border-radius: 4px !important;
  padding: 4px 10px !important;
}

/* Meta items */
.project-meta-item { border-color: var(--wr-border) !important; }
.project-meta-label {
  font-family: var(--wr-mono) !important;
  font-size: 10px !important;
  color: var(--wr-dim) !important;
  letter-spacing: .15em !important;
  text-transform: uppercase !important;
}
.project-meta-value {
  font-family: var(--wr-sans) !important;
  font-size: 14px !important;
  color: var(--wr-text) !important;
  font-weight: 500 !important;
}

/* Action buttons */
.btn-primary {
  background: var(--wr-cyan) !important;
  color: #000 !important;
  border: none !important;
  font-family: var(--wr-mono) !important;
  font-size: 12px !important;
  letter-spacing: .1em !important;
  border-radius: 4px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  transition: all .2s !important;
}
.btn-primary:hover { background: #00b8d9 !important; box-shadow: 0 0 20px rgba(0,212,255,.4) !important; }

.btn-secondary {
  background: transparent !important;
  border: 1px solid var(--wr-border) !important;
  color: var(--wr-text) !important;
  font-family: var(--wr-mono) !important;
  font-size: 12px !important;
  letter-spacing: .08em !important;
  border-radius: 4px !important;
  padding: 10px 20px !important;
  transition: all .2s !important;
}
.btn-secondary:hover { border-color: var(--wr-cyan) !important; color: var(--wr-cyan) !important; }

/* Cost card */
.cost-estimate-card {
  background: rgba(6,18,32,.8) !important;
  border: 1px solid var(--wr-border) !important;
  border-radius: 8px !important;
}
.cost-amount { color: var(--wr-green) !important; font-weight: 700 !important; }
.cost-item {
  background: rgba(0,212,255,.08) !important;
  border: 1px solid rgba(0,212,255,.15) !important;
  color: var(--wr-cyan) !important;
  font-family: var(--wr-mono) !important;
  font-size: 11px !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
}

/* ── SECTION TITLES ── */
.section-title, h2.section-title {
  font-family: var(--wr-sans) !important;
  font-size: clamp(20px, 3vw, 32px) !important;
  font-weight: 700 !important;
  color: #fff !important;
}
.section-title::before {
  content: '// ';
  color: var(--wr-cyan);
  font-family: var(--wr-mono);
  font-size: .8em;
}

/* ── BUSINESS CONTEXT ── */
.bc-accordion-header {
  background: rgba(6,18,32,.8) !important;
  border: 1px solid var(--wr-border) !important;
  border-radius: 8px !important;
  padding: 16px 20px !important;
  cursor: pointer !important;
  transition: border-color .2s !important;
}
.bc-accordion-header:hover { border-color: var(--wr-cyan) !important; }
.acc-title {
  font-family: var(--wr-mono) !important;
  color: var(--wr-cyan) !important;
  letter-spacing: .1em !important;
  font-size: 13px !important;
}
.bc-problem, .bc-solution, .bc-value, .bc-risk {
  background: rgba(6,18,32,.6) !important;
  border: 1px solid var(--wr-border) !important;
  border-radius: 8px !important;
  padding: 20px !important;
}
.bc-problem h3 { color: var(--wr-red) !important; font-family: var(--wr-mono) !important; font-size: 12px !important; letter-spacing: .15em !important; text-transform: uppercase !important; }
.bc-solution h3 { color: var(--wr-cyan) !important; font-family: var(--wr-mono) !important; font-size: 12px !important; letter-spacing: .15em !important; text-transform: uppercase !important; }
.bc-value h3 { color: var(--wr-green) !important; font-family: var(--wr-mono) !important; font-size: 12px !important; letter-spacing: .15em !important; text-transform: uppercase !important; }
.bc-risk h3 { color: var(--wr-orange) !important; font-family: var(--wr-mono) !important; font-size: 12px !important; letter-spacing: .15em !important; text-transform: uppercase !important; }

/* ── ARCHITECTURE SECTION ── */
.architecture-section, #architecture {
  background: var(--wr-bg2) !important;
}
.architecture-diagram img, .arch-diagram img {
  border: 1px solid var(--wr-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 0 40px rgba(0,212,255,.1) !important;
  max-width: 100% !important;
}

/* ── IMPLEMENTATION STEPS ── */
.step-card, .implementation-step {
  background: rgba(6,18,32,.8) !important;
  border: 1px solid var(--wr-border) !important;
  border-radius: 8px !important;
  padding: 20px !important;
  transition: border-color .2s, box-shadow .2s !important;
}
.step-card:hover, .implementation-step:hover {
  border-color: var(--wr-cyan) !important;
  box-shadow: var(--wr-glow) !important;
}
.step-number {
  font-family: var(--wr-mono) !important;
  color: var(--wr-cyan) !important;
  font-size: 11px !important;
  letter-spacing: .2em !important;
}

/* ── CODE BLOCKS ── */
pre, code {
  background: rgba(0,0,0,.6) !important;
  border: 1px solid rgba(0,212,255,.1) !important;
  border-radius: 6px !important;
  font-family: var(--wr-mono) !important;
  color: var(--wr-cyan) !important;
  font-size: 13px !important;
}

/* ── INFOBAR ── */
.project-compact-infobar {
  background: rgba(6,18,32,.8) !important;
  border: 1px solid var(--wr-border) !important;
  border-radius: 6px !important;
  padding: 10px 16px !important;
  font-family: var(--wr-mono) !important;
  font-size: 11px !important;
  color: var(--wr-dim) !important;
}
.infobar-item i { color: var(--wr-cyan) !important; }

/* ── TAGS ── */
.tag, .tech-tag, .project-tag {
  background: rgba(0,212,255,.08) !important;
  border: 1px solid rgba(0,212,255,.15) !important;
  color: var(--wr-cyan) !important;
  font-family: var(--wr-mono) !important;
  font-size: 11px !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
}

/* ── FOOTER / OPERATOR CARD ── */
footer, .site-footer {
  background: var(--wr-bg) !important;
  border-top: 1px solid var(--wr-border) !important;
  padding: 40px 24px !important;
}
.footer-brand {
  font-family: var(--wr-mono) !important;
  color: var(--wr-cyan) !important;
  font-size: 13px !important;
}
.footer-links a {
  font-family: var(--wr-mono) !important;
  font-size: 11px !important;
  color: var(--wr-dim) !important;
  text-decoration: none !important;
  letter-spacing: .1em !important;
}
.footer-links a:hover { color: var(--wr-cyan) !important; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--wr-bg); }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--wr-cyan); }

/* ── SELECTION ── */
::selection { background: rgba(0,212,255,.2); color: #fff; }

/* ── SCROLL PROGRESS BAR ── */
.wr-progress-bar {
  position: fixed;
  top: 28px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--wr-cyan), var(--wr-purple));
  z-index: 9995;
  transition: width .1s linear;
  box-shadow: 0 0 8px var(--wr-cyan);
}

/* ── BACK TO MISSION BOARD BUTTON ── */
.wr-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--wr-mono);
  font-size: 11px;
  color: var(--wr-dim);
  text-decoration: none;
  letter-spacing: .12em;
  padding: 6px 0;
  transition: color .2s;
  margin-bottom: 20px;
}
.wr-back-btn:hover { color: var(--wr-cyan); }
.wr-back-btn::before { content: '◀'; margin-right: 4px; }

/* ── MISSION STATUS BANNER ── */
.wr-mission-banner {
  background: rgba(0,255,136,.06);
  border: 1px solid rgba(0,255,136,.2);
  border-radius: 6px;
  padding: 10px 16px;
  font-family: var(--wr-mono);
  font-size: 11px;
  color: var(--wr-green);
  letter-spacing: .12em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.wr-mission-banner::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--wr-green);
  box-shadow: 0 0 6px var(--wr-green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: rgba(2,11,20,.98);
    border-bottom: 1px solid var(--wr-border);
    padding: 16px;
    gap: 8px;
  }
  .project-hero { padding-top: 90px !important; }
}
