:root {
  --bg: #0b1220;
  --bg-2: #121a2b;
  --ink: #e7eef8;
  --muted: #8fa0b8;
  --line: rgba(231, 238, 248, 0.12);
  --accent: #2fd3a2;
  --accent-2: #3aa0ff;
  --danger: #ff6b7a;
  --radius: 14px;
  --font: "DM Sans", sans-serif;
  --display: "Syne", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47, 211, 162, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(58, 160, 255, 0.16), transparent 50%),
    var(--bg);
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  max-width: 1040px;
  margin: 0 auto;
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }
.topbar nav { display: flex; gap: 1rem; align-items: center; }
.topbar a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.topbar a.muted { color: var(--muted); }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.hero {
  padding: 4rem 0 3rem;
  animation: rise 0.7s ease both;
}
.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
h1 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 1rem;
}
.lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 38rem;
  line-height: 1.55;
}
.lede code, code {
  color: var(--ink);
  background: rgba(255,255,255,0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.92em;
}
.cta-row { display: flex; gap: 0.75rem; margin-top: 1.75rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.3rem;
  background: linear-gradient(135deg, var(--accent), #1fb48a);
  color: #042218;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(47, 211, 162, 0.25); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { box-shadow: none; border-color: rgba(255,255,255,0.28); }
.btn-danger {
  background: linear-gradient(135deg, var(--danger), #d9485a);
  color: #fff;
}

.steps {
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  animation: rise 0.8s 0.12s ease both;
}
.steps h2 {
  font-family: var(--display);
  margin: 0 0 1rem;
}
.steps ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.8;
}
.steps strong { color: var(--ink); }

.auth-panel, .panel {
  max-width: 460px;
  margin: 2rem auto;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 26, 43, 0.72);
  backdrop-filter: blur(8px);
  animation: rise 0.55s ease both;
}
.auth-panel.wide { max-width: 560px; }
.auth-panel h1 { font-size: 2rem; }
.form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.form input, .form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  color: var(--ink);
  padding: 0.75rem 0.9rem;
  font: inherit;
}
.form input:focus, .form textarea:focus {
  outline: 2px solid rgba(47, 211, 162, 0.45);
  border-color: transparent;
}
.foot { color: var(--muted); margin-top: 1.25rem; }
.foot a { color: var(--accent-2); }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  animation: rise 0.5s ease both;
}
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.project-list a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: rgba(18, 26, 43, 0.55);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-list a:hover {
  border-color: rgba(47, 211, 162, 0.45);
  transform: translateY(-2px);
}
.project-list span { color: var(--muted); font-size: 0.92rem; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
}
.empty .btn { margin-top: 1rem; }

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}
.panel { margin: 0; max-width: none; }
.panel h2 {
  font-family: var(--display);
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
}
.panel.danger { border-color: rgba(255, 107, 122, 0.35); }
.panel.danger p { color: var(--muted); margin: 0 0 1rem; }

.flash-stack { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
}
.flash-success { border-color: rgba(47, 211, 162, 0.4); color: #b9ffe8; }
.flash-error { border-color: rgba(255, 107, 122, 0.45); color: #ffd0d6; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .split { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
}
