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

:root {
  --bg: #080b0f;
  --surface: #0e1318;
  --surface2: #141a22;
  --border: #1e2a38;
  --accent: #00e5ff;
  --accent2: #7b61ff;
  --accent-glow: rgba(0,229,255,0.15);
  --text: #e2eaf4;
  --muted: #4a6078;
  --success: #00e096;
  --warn: #ffb547;
  --danger: #ff4f6d;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── GRID BACKGROUND ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 60px;
  background: rgba(8,11,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo span { color: var(--accent); }

.logo-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-size: 0.78rem;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--accent); }

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

/* ── BUTTONS ── */
.btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  box-shadow: 0 0 20px rgba(0,229,255,0.3);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0,229,255,0.5);
  transform: translateY(-1px);
}
.btn-lg { padding: 0.8rem 2rem; font-size: 0.85rem; }

/* ── HERO ── */
.hero {
  position: relative;
  z-index: 1;
  padding: 7rem 2.5rem 5rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  text-shadow: 0 0 40px rgba(0,229,255,0.4);
}

.hero p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── STATS STRIP ── */
.stats-strip {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
}

.stat {
  padding: 1.8rem 2.5rem;
  border-right: 1px solid var(--border);
  animation: fadeUp 0.6s ease both;
}
.stat:last-child { border-right: none; }

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}
.stat-value span { color: var(--accent); }

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ── MAIN LAYOUT ── */
.main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 60px);
}

/* ── SIDEBAR ── */
.sidebar {
  border-right: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--surface);
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-section { margin-bottom: 2rem; }

.sidebar-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  padding: 0 1.5rem;
  margin-bottom: 0.5rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.sidebar-item:hover {
  color: var(--text);
  background: rgba(0,229,255,0.04);
}
.sidebar-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(0,229,255,0.06);
}
.sidebar-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── DASHBOARD ── */
.dashboard { padding: 2.5rem 3rem; }

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}
.dash-header h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

/* ── PROJECT CARDS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  animation: fadeUp 0.5s ease both;
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0,229,255,0.08);
  transform: translateY(-2px);
}
.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.10s; }
.project-card:nth-child(3) { animation-delay: 0.15s; }
.project-card:nth-child(4) { animation-delay: 0.20s; }

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

.project-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.status-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-weight: 700;
}
.status-live    { background: rgba(0,224,150,0.12); color: var(--success); border: 1px solid rgba(0,224,150,0.25); }
.status-building{ background: rgba(255,181,71,0.12); color: var(--warn);    border: 1px solid rgba(255,181,71,0.25); }
.status-failed  { background: rgba(255,79,109,0.12); color: var(--danger);  border: 1px solid rgba(255,79,109,0.25); }

.project-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.project-url {
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── LOG PANEL ── */
.log-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.log-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.log-live {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--success);
}
.log-live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 1.5s infinite;
}

.log-body { padding: 1.25rem 1.5rem; font-size: 0.78rem; line-height: 2; }

.log-line { display: flex; gap: 1.5rem; }
.log-time  { color: var(--muted); flex-shrink: 0; width: 80px; }
.log-msg   { color: var(--text); }
.log-msg.ok   { color: var(--success); }
.log-msg.warn { color: var(--warn); }
.log-msg.info { color: var(--accent); }

/* ── DEPLOY ZONE ── */
.deploy-zone {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 3rem;
}
.deploy-zone:hover {
  border-color: var(--accent);
  background: rgba(0,229,255,0.03);
}
.deploy-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.deploy-zone h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.deploy-zone p {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,11,15,0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  width: 480px;
  max-width: 90vw;
  animation: fadeUp 0.25s ease;
}
.modal h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--accent); }

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .main { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .dashboard { padding: 1.5rem; }
  nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
}
