:root {
  --bg-primary: #050505;
  --bg-secondary: #080d1a;
  --bg-card: rgba(18, 26, 47, 0.72);
  --bg-card-hover: rgba(26, 38, 68, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --bg-elevated: rgba(30, 41, 69, 0.9);
  
  --border: rgba(148, 163, 184, 0.12);
  --border-focus: rgba(6, 182, 212, 0.45);
  --border-highlight: rgba(139, 92, 246, 0.35);

  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #00d9ff;
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-violet: #8b5cf6;
  --violet: #8b5cf6;
  --violet-glow: rgba(139, 92, 246, 0.25);
  --accent-emerald: #10b981;
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-orange: #ff6b35;
  --orange-glow: rgba(255, 107, 53, 0.25);

  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-display);
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.ge-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(6, 182, 212, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(139, 92, 246, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(16, 185, 129, 0.08), transparent),
    var(--bg-primary);
}

/* ============================================================
   STICKY TOPBAR NAVIGATION
   ============================================================ */
.ge-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-normal);
  padding: 0.85rem 1.5rem;
}

.ge-topbar.scrolled {
  background: rgba(8, 13, 26, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-bottom-color: rgba(6, 182, 212, 0.25);
  padding: 0.65rem 1.5rem;
}

.ge-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.ge-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  display: inline-block;
  animation: pulse-dot 2.5s infinite;
}

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

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

.ge-nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.ge-nav-links a:hover {
  color: var(--text);
}

.ge-btn-homelab {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid var(--border-focus);
  color: var(--accent-cyan) !important;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem !important;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.ge-btn-homelab:hover {
  background: var(--accent-cyan) !important;
  color: #050505 !important;
  box-shadow: 0 0 15px var(--cyan-glow);
}

.ge-btn-install {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: var(--accent-emerald);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ge-btn-install:hover {
  background: var(--accent-emerald);
  color: #050505;
  box-shadow: 0 0 15px var(--emerald-glow);
}

/* ============================================================
   CONTAINER & LAYOUT
   ============================================================ */
.ge-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* ============================================================
   HERO MASTERPIECE SECTION
   ============================================================ */
.ge-hero {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
}

.ge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  margin-bottom: 1rem;
  background: rgba(6, 182, 212, 0.08);
}

.ge-hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.85rem;
  background: linear-gradient(135deg, #f8fafc 0%, var(--cyan) 50%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ge-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 44rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Hero Banner */
.ge-hero-banner-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
}

.ge-hero-banner-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.ge-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,0) 50%, rgba(5,5,5,0.85) 100%);
  pointer-events: none;
}

.ge-hero-badge {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  background: rgba(8, 13, 26, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Metric Grid */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 1.25rem;
  backdrop-filter: blur(12px);
  text-align: left;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.metric-card:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.metric-icon {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.metric-device {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.metric-sub {
  font-size: 0.82rem;
  color: var(--cyan);
  font-family: var(--font-mono);
  margin: 0;
}

/* ============================================================
   SECTIONS & TITLES
   ============================================================ */
.ge-section {
  margin-bottom: 4rem;
}

.ge-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
}

.sec-icon {
  width: 1.4rem;
  height: 1.4rem;
  color: var(--cyan);
}

.ge-lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

/* ============================================================
   SCENARIOS SECTION
   ============================================================ */
.scenario-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.scenario-card {
  display: block;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

.scenario-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: var(--shadow-md);
}

.scenario-iot {
  border-left: 4px solid var(--emerald);
}

.scenario-ai {
  border-left: 4px solid var(--violet);
}

.scenario-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  display: block;
  margin-bottom: 0.4rem;
}

.scenario-card h3 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.25rem;
}

.scenario-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.scenario-cta {
  font-size: 0.88rem;
  color: var(--cyan);
  font-weight: 600;
}

/* ============================================================
   FILTERABLE MATRIX SECTION
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.15rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  align-items: center;
}

.filter-bar label {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 500;
}

.filter-bar select, .filter-bar input[type="text"] {
  background: rgba(8, 13, 26, 0.8);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.filter-bar select:focus, .filter-bar input[type="text"]:focus {
  border-color: var(--cyan);
}

.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

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

.matrix-table th {
  background: rgba(8, 13, 26, 0.9);
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.matrix-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.matrix-row {
  cursor: pointer;
  transition: background var(--transition-fast);
}

.matrix-row:hover {
  background: rgba(6, 182, 212, 0.08);
}

.matrix-row.active {
  background: rgba(6, 182, 212, 0.15);
  border-left: 3px solid var(--cyan);
}

.fine {
  font-size: 0.76rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ============================================================
   TOPOLOGY SECTION
   ============================================================ */
.topology-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.topology-layer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.topology-layer:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-sm);
}

.layer-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.35rem;
}

.topology-layer h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.layer-device {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--emerald);
  margin-bottom: 0.5rem;
}

.layer-summary {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

/* ============================================================
   DEVICE DETAILS SECTION
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

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

.detail-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.device-chip {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.device-chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.device-chip.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--cyan);
  font-weight: 600;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.detail-media-box {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: rgba(8, 13, 26, 0.6);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.detail-device-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.4rem;
}

.detail-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald);
  font-family: var(--font-mono);
}

.tops-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--cyan);
  white-space: nowrap;
}

.detail-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.detail-tab {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(8, 13, 26, 0.7);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.detail-tab:hover {
  color: var(--text);
}

.detail-tab.active {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  font-weight: 600;
}

.detail-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.detail-list li {
  margin-bottom: 0.4rem;
}

.detail-list.warn li {
  color: #fca5a5;
}

.detail-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.25rem;
  font-size: 0.88rem;
  margin-top: 1rem;
}

.detail-dl dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ============================================================
   ENERGY CALCULATOR SECTION (ENHANCED)
   ============================================================ */
.power-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.power-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  background: var(--bg-card);
}

.active-device-power-card {
  border: 1px solid rgba(6, 182, 212, 0.4);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.08));
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.active-dev-img-box {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.active-dev-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.power-formula {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cyan);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
}

.power-total-box {
  background: rgba(8, 13, 26, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
}

.power-total-val {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--emerald);
  font-family: var(--font-mono);
}

.power-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.breakdown-item {
  background: rgba(8, 13, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.breakdown-item .lbl {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
}

.breakdown-item .val {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* ============================================================
   BRANDED FOOTER
   ============================================================ */
.ge-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.ge-footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.ge-footer-brand {
  max-width: 380px;
}

.ge-footer-brand h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.ge-footer-brand p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.ge-footer-links {
  display: flex;
  gap: 2.5rem;
}

.ge-footer-col h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.ge-footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ge-footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.ge-footer-col a:hover {
  color: var(--text);
}

.ge-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ge-footer-bottom a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

/* Floating Elements */
.btn-goto-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-focus);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
  font-size: 1.2rem;
  font-weight: bold;
}

.btn-goto-top.visible {
  opacity: 1;
  visibility: visible;
}

.btn-goto-top:hover {
  background: var(--cyan);
  color: #050505;
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: translateY(-2px);
}

.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--emerald);
  color: #f8fafc;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

.toast-notification.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
