/* ==========================================================================
   DEVPULSE DASHBOARD COMPONENTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Header Navbar
   -------------------------------------------------------------------------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text .title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
}

.brand-text .sub-domain {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.3);
}

.nav-btn.highlight {
  color: var(--accent-violet);
  background: rgba(157, 78, 221, 0.12);
  border-color: rgba(157, 78, 221, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   2. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.hero-content {
  max-width: 680px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.25);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  margin-bottom: 1.25rem;
}

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

.hero-bio {
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.quick-stats-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-badge {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
}

.stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 220px;
}

/* --------------------------------------------------------------------------
   3. Section Header & Filters
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-box {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  gap: 0.6rem;
  width: 280px;
  color: var(--text-muted);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.9rem;
  width: 100%;
}

.clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
}

.view-toggle {
  display: flex;
  background: rgba(15, 20, 32, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 3px;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-btn.active {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
}

.category-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

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

.chip.active {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.35);
}

/* --------------------------------------------------------------------------
   4. Projects Grid & Cards
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
}

.projects-grid.list-mode {
  grid-template-columns: 1fr;
}

.project-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.project-title-group h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

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

.status-badge {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.status-badge.live {
  background: rgba(0, 245, 212, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(0, 245, 212, 0.3);
}

.status-badge.beta {
  background: rgba(255, 183, 3, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 183, 3, 0.3);
}

.status-badge.dev {
  background: rgba(157, 78, 221, 0.12);
  color: var(--accent-violet);
  border: 1px solid rgba(157, 78, 221, 0.3);
}

.project-description {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glass);
}

.project-links {
  display: flex;
  gap: 0.5rem;
}

/* List mode styling tweaks */
.projects-grid.list-mode .project-card {
  flex-direction: row;
  align-items: center;
}

.projects-grid.list-mode .project-description {
  margin-bottom: 0;
  -webkit-line-clamp: 1;
}

.projects-grid.list-mode .project-tech-stack {
  margin-bottom: 0;
}

.projects-grid.list-mode .project-footer {
  border-top: none;
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   5. Health Monitor Section
   -------------------------------------------------------------------------- */
.health-overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.health-summary-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.health-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.health-icon.green { background: rgba(0, 245, 212, 0.15); color: var(--accent-emerald); }
.health-icon.blue { background: rgba(79, 172, 254, 0.15); color: var(--accent-blue); }
.health-icon.purple { background: rgba(157, 78, 221, 0.15); color: var(--accent-violet); }

.health-info {
  display: flex;
  flex-direction: column;
}

.health-info .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.health-info .value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.health-table-container {
  padding: 1.5rem;
  overflow-x: auto;
}

.health-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.health-table th {
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-glass);
}

.health-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.95rem;
}

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

.endpoint-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.latency-badge {
  font-family: var(--font-mono);
  font-weight: 600;
}

.latency-badge.fast { color: var(--accent-emerald); }
.latency-badge.medium { color: var(--accent-gold); }

/* --------------------------------------------------------------------------
   6. Tech Matrix & GitHub Activity
   -------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-category-card {
  padding: 1.75rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.card-title .icon-cyan { color: var(--accent-cyan); }
.card-title .icon-violet { color: var(--accent-violet); }
.card-title .icon-emerald { color: var(--accent-emerald); }
.card-title .icon-gold { color: var(--accent-gold); }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.github-activity-box {
  padding: 1.75rem;
}

.contribution-heatmap {
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  gap: 4px;
  overflow-x: auto;
  padding-top: 1rem;
}

.heat-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.heat-cell.l1 { background: rgba(0, 245, 212, 0.25); }
.heat-cell.l2 { background: rgba(0, 245, 212, 0.5); }
.heat-cell.l3 { background: rgba(0, 245, 212, 0.75); }
.heat-cell.l4 { background: rgba(0, 245, 212, 1); box-shadow: 0 0 8px var(--accent-emerald); }

/* --------------------------------------------------------------------------
   7. DevTerminal (CLI Mode)
   -------------------------------------------------------------------------- */
.terminal-container {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 520px;
}

.terminal-header {
  background: rgba(10, 13, 20, 0.9);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.terminal-buttons {
  display: flex;
  gap: 6px;
}

.terminal-buttons .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-xs {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.terminal-body {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: #33ff99;
  background: rgba(5, 7, 12, 0.85);
}

.term-welcome {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.highlight-text {
  color: var(--accent-cyan);
  font-weight: 600;
}

.terminal-line {
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
}

.terminal-line.cmd { color: var(--text-main); font-weight: 600; }
.terminal-line.info { color: var(--accent-cyan); }
.terminal-line.error { color: var(--accent-rose); }
.terminal-line.success { color: var(--accent-emerald); }

.terminal-input-row {
  display: flex;
  align-items: center;
  background: rgba(5, 7, 12, 0.95);
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-glass);
}

.term-prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-right: 0.75rem;
  white-space: nowrap;
}

.terminal-input-row input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  width: 100%;
}

/* --------------------------------------------------------------------------
   8. VPS & Subdomain Configurator
   -------------------------------------------------------------------------- */
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.75rem;
}

.deploy-card {
  padding: 1.75rem;
}

.deploy-card.full-width {
  grid-column: 1 / -1;
}

.deploy-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

.code-block-wrapper {
  position: relative;
  margin-top: 1.25rem;
  background: rgba(5, 7, 12, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
}

.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-code-btn:hover {
  background: var(--accent-cyan);
  color: #000;
}

/* --------------------------------------------------------------------------
   9. Modal Backdrop & Content
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content {
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--accent-rose);
  color: #fff;
}

.modal-badge-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.modal-tagline {
  font-size: 1.1rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.modal-image-wrapper {
  width: 100%;
  height: 260px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: #111420;
}

.modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-details-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.feature-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

.modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Footer Section */
.footer {
  margin-top: 3rem;
  padding: 1.5rem 2rem;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition-fast);
}

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