
/* =========================================
   CYBERPULSE — PROJECT SHOWCASE
   Neo-Brutalist Design System
========================================= */

body.cyberpulse-page {
  --bg: #F4F4F0;
  --surface: #FFFFFF;
  --text: #111111;
  --muted: #555555;
  --accent: #FF5500;
  --border: #111111;

  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.65;
  transition: background .25s ease, color .25s ease;
}

body.cyberpulse-page *,
body.cyberpulse-page *::before,
body.cyberpulse-page *::after {
  box-sizing: border-box;
}

body.cyberpulse-page a {
  color: inherit;
  text-decoration: none;
}

body.cyberpulse-page button {
  font: inherit;
}

.cp-shell {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

/* Navigation */

.cp-nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid var(--border);
}

.cp-brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
}

.cp-nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.cp-nav-link {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  transition: color .2s;
}

.cp-nav-link:hover {
  color: var(--accent);
}

.cp-theme-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: 3px 3px 0 var(--border);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}

.cp-theme-toggle:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--border);
}

.cp-theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.cp-moon-icon {
  display: none;
}

/* Hero */

.cp-hero {
  padding: 65px 0 75px;
}

.cp-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
}

.cp-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 2px solid var(--border);
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--border);
}

.cp-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.cp-eyebrow {
  margin: 28px 0 12px;
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.cp-hero h1 {
  margin: 0;
  font-size: clamp(58px, 9vw, 110px);
  line-height: 1;
  letter-spacing: -6px;
  font-weight: 700;
}

.cp-hero h1 span {
  color: var(--accent);
}

.cp-description {
  max-width: 720px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 17px;
}

/* Dashboard Preview */

.cp-preview {
  margin-top: 48px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: #101114;
  color: #F4F4F0;
  box-shadow: 9px 9px 0 var(--border);
}

.cp-preview-top {
  min-height: 55px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #35363B;
  background: #191A1F;
}

.cp-window-controls {
  display: flex;
  gap: 7px;
}

.cp-window-controls span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FF5F57;
}

.cp-window-controls span:nth-child(2) {
  background: #FEBC2E;
}

.cp-window-controls span:nth-child(3) {
  background: #28C840;
}

.cp-preview-title,
.cp-preview-version {
  color: #A1A1AA;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 1px;
}

/* Dashboard Layout */

.cp-dashboard {
  min-height: 590px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.cp-sidebar {
  padding: 25px 15px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #35363B;
  background: #17181D;
}

.cp-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 38px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.5px;
}

.cp-sidebar-brand > span:last-child {
  color: #FF6A2B;
}

.cp-brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #FF6A2B;
  color: #FF6A2B;
  font-size: 21px;
}

.cp-sidebar-label {
  margin: 22px 0 11px;
  color: #85858D;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 1.3px;
}

.cp-sidebar-item {
  padding: 11px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #B8B8C0;
  font-size: 11px;
}

.cp-sidebar-item > span {
  width: 17px;
  color: #FF8B55;
  text-align: center;
}

.cp-sidebar-item.active {
  background: #303039;
  color: #FFFFFF;
}

.cp-sidebar-note {
  margin-top: auto;
  padding: 11px 8px;
  border: 1px solid #44454D;
  color: #A1A1AA;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .5px;
}

.cp-note-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: #FF8B55;
}

/* Dashboard Main */

.cp-dashboard-main {
  min-width: 0;
  padding: 28px;
  background: #101114;
}

.cp-dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.cp-dashboard-label,
.cp-panel-label {
  color: #90909A;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
}

.cp-dashboard-heading h3 {
  margin: 5px 0 0;
  font-size: 25px;
}

.cp-dashboard-heading p {
  margin: 4px 0 0;
  color: #92929B;
  font-size: 11px;
}

.cp-date {
  padding: 7px 9px;
  border: 1px solid #44454D;
  color: #A1A1AA;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  white-space: nowrap;
}

/* Statistics */

.cp-stat-grid {
  margin-top: 25px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.cp-stat-card {
  min-height: 120px;
  padding: 15px;
  position: relative;
  border: 1px solid #3A3B43;
  background: #191A1F;
}

.cp-stat-label {
  display: block;
  color: #A0A0A9;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: .5px;
}

.cp-stat-card strong {
  display: block;
  margin-top: 8px;
  color: #FFFFFF;
  font-size: 28px;
  line-height: 1.2;
}

.cp-stat-card small {
  color: #8E8E97;
  font-size: 9px;
}

.cp-stat-icon {
  position: absolute;
  top: 12px;
  right: 13px;
  color: #FF7138;
  font-size: 19px;
}

/* Panels */

.cp-panel {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #3A3B43;
  background: #191A1F;
}

.cp-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cp-panel-heading h4 {
  margin: 5px 0 0;
  color: #FFFFFF;
  font-size: 14px;
}

.cp-demo-tag {
  padding: 5px 8px;
  border: 1px solid #60402F;
  color: #FF9B72;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  white-space: nowrap;
}

/* Chart */

.cp-chart {
  height: 190px;
  margin-top: 20px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
}

.cp-chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 20px;
  color: #898992;
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

.cp-chart-content {
  min-width: 0;
  position: relative;
  padding-bottom: 22px;
}

.cp-chart-grid {
  position: absolute;
  inset: 0 0 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cp-chart-grid span {
  border-top: 1px dashed #393A42;
}

.cp-chart-svg {
  position: absolute;
  inset: 0 0 22px;
  width: 100%;
  height: calc(100% - 22px);
  overflow: visible;
}

.cp-chart-x {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  color: #898992;
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

/* Event List */

.cp-events-panel {
  margin-top: 20px;
}

.cp-event-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #35363B;
}

.cp-event-row:last-child {
  border-bottom: 0;
}

.cp-event-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
}

.cp-event-indicator.warning {
  background: #F6B83F;
}

.cp-event-indicator.critical {
  background: #FF5757;
}

.cp-event-indicator.normal {
  background: #40C98A;
}

.cp-event-info {
  min-width: 0;
  flex: 1;
}

.cp-event-info strong {
  display: block;
  color: #EDEDF0;
  font-size: 10px;
}

.cp-event-info small {
  color: #92929B;
  font-size: 9px;
}

.cp-event-severity {
  font-family: "DM Mono", monospace;
  font-size: 8px;
  white-space: nowrap;
}

.warning-text {
  color: #F6B83F;
}

.critical-text {
  color: #FF7070;
}

.normal-text {
  color: #40C98A;
}

.cp-disclaimer {
  margin: 17px 0 0;
  color: #85858D;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: .7px;
}

/* Technology Stack */

.cp-stack {
  margin-top: 55px;
}

.cp-stack-label {
  display: block;
  margin-bottom: 16px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.cp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cp-tags span {
  padding: 10px 16px;
  border: 2px solid var(--border);
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--border);
  font-family: "DM Mono", monospace;
  font-size: 12px;
}

/* Buttons */

.cp-actions {
  margin-top: 35px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.cp-button {
  min-height: 50px;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 2px solid var(--border);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  transition: transform .2s, box-shadow .2s;
}

.cp-button:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--border);
}

.cp-button-light {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 4px 4px 0 var(--border);
}

.cp-button-dark {
  background: var(--text);
  color: var(--bg);
  box-shadow: 4px 4px 0 var(--border);
}

/* Overview and Features */

.cp-overview,
.cp-features-section {
  padding: 75px 0;
  border-top: 2px solid var(--border);
}

.cp-section-heading {
  margin-bottom: 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.cp-section-heading .cp-eyebrow {
  margin-top: 0;
}

.cp-section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 55px);
  line-height: 1.1;
  letter-spacing: -2px;
}

.cp-section-heading h2 span {
  color: var(--accent);
}

.cp-section-number {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  white-space: nowrap;
}

.cp-about-description {
  max-width: 850px;
  color: var(--muted);
  font-size: 17px;
}

/* Features Grid */

.cp-feature-grid {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cp-feature {
  min-height: 235px;
  padding: 25px;
  position: relative;
  border: 2px solid var(--border);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--border);
  transition: transform .2s;
}

.cp-feature:hover {
  transform: translateY(-5px);
}

.cp-feature-number {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.cp-feature-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--accent);
  font-size: 23px;
}

.cp-feature h3 {
  margin: 25px 0 9px;
  font-size: 18px;
}

.cp-feature p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Closing */

.cp-closing {
  margin: 35px 0 70px;
  padding: 55px 45px;
  border: 2px solid var(--border);
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 8px 8px 0 var(--border);
}

.cp-closing .cp-eyebrow {
  margin-top: 0;
  color: #FFFFFF;
}

.cp-closing h2 {
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -3px;
}

.cp-closing h2 span {
  color: #111111;
}

.cp-closing > p:not(.cp-eyebrow) {
  max-width: 600px;
  margin-top: 18px;
  font-size: 15px;
}

.cp-closing .cp-button {
  border-color: #111111;
}

.cp-closing .cp-button-dark {
  background: #111111;
  color: #FFFFFF;
  box-shadow: 4px 4px 0 #111111;
}

/* Footer */

.cp-footer {
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 2px solid var(--border);
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.cp-footer a:hover {
  color: var(--accent);
}

/* =========================================
   DARK THEME
========================================= */

body.cyberpulse-page[data-theme="dark"] {
  --bg: #111111;
  --surface: #1B1B1B;
  --text: #F4F4F0;
  --muted: #BBBBBB;
  --border: #F4F4F0;
}

body.cyberpulse-page[data-theme="dark"] .cp-theme-toggle .cp-sun-icon {
  display: none;
}

body.cyberpulse-page[data-theme="dark"] .cp-theme-toggle .cp-moon-icon {
  display: block;
}

body.cyberpulse-page[data-theme="dark"] .cp-feature,
body.cyberpulse-page[data-theme="dark"] .cp-tags span {
  background: var(--surface);
  color: var(--text);
}

body.cyberpulse-page[data-theme="dark"] .cp-feature-icon {
  background: #242424;
  color: var(--accent);
}

body.cyberpulse-page[data-theme="dark"] .cp-button-dark {
  background: #F4F4F0;
  color: #111111;
}

body.cyberpulse-page[data-theme="dark"] .cp-closing {
  color: #FFFFFF;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 900px) {
  .cp-dashboard {
    grid-template-columns: 185px minmax(0, 1fr);
  }

  .cp-dashboard-main {
    padding: 20px;
  }

  .cp-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .cp-shell {
    width: calc(100% - 30px);
  }

  .cp-nav {
    align-items: flex-start;
    padding: 18px 0;
  }

  .cp-nav-actions {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .cp-nav-link {
    font-size: 10px;
  }

  .cp-hero {
    padding: 45px 0;
  }

  .cp-hero h1 {
    font-size: 65px;
    letter-spacing: -4px;
  }

  .cp-description {
    font-size: 15px;
  }

  .cp-preview {
    margin-top: 35px;
  }

  .cp-preview-top {
    padding: 0 12px;
  }

  .cp-preview-title,
  .cp-preview-version {
    font-size: 8px;
  }

  .cp-dashboard {
    display: block;
  }

  .cp-sidebar {
    display: none;
  }

  .cp-dashboard-main {
    padding: 15px;
  }

  .cp-dashboard-heading {
    flex-direction: column;
  }

  .cp-stat-grid {
    grid-template-columns: 1fr;
  }

  .cp-stat-card {
    min-height: 100px;
  }

  .cp-chart {
    height: 165px;
  }

  .cp-panel {
    padding: 13px;
  }

  .cp-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .cp-overview,
  .cp-features-section {
    padding: 50px 0;
  }

  .cp-about-description {
    font-size: 15px;
  }

  .cp-feature-grid {
    grid-template-columns: 1fr;
  }

  .cp-feature {
    min-height: 190px;
  }

  .cp-closing {
    padding: 35px 22px;
  }

  .cp-footer {
    flex-direction: column;
  }
}
