:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0c111d;
  color: #edf2ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(97, 218, 251, 0.2), transparent 28rem),
    linear-gradient(135deg, #0c111d 0%, #111827 45%, #14121f 100%);
}

button, input, textarea { font: inherit; }

button {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  background: #7c3aed;
  color: white;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

button:hover:not(:disabled) { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: 0.5; }
button.secondary { background: rgba(255, 255, 255, 0.08); color: #dbeafe; }
button.danger { background: #be123c; }
button.brand { background: transparent; padding: 0; font-size: 1.1rem; }

code {
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.12);
  padding: 0.1rem 0.35rem;
  border-radius: 0.4rem;
}

pre {
  overflow: auto;
  max-height: 40rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #080c15;
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  white-space: pre-wrap;
}

input, textarea {
  width: 100%;
  margin-top: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  color: #edf2ff;
  outline: none;
}

textarea { resize: vertical; line-height: 1.6; }
label { display: block; color: #e2e8f0; font-weight: 700; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.auth-card, .panel, .empty-card, .skill-card, .hero {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.auth-card {
  width: min(100%, 28rem);
  border-radius: 2rem;
  padding: 2rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(12, 17, 29, 0.86);
  backdrop-filter: blur(14px);
}

.site-header nav, .button-row, .card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  border-radius: 2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}

.hero h1, .panel h1, .auth-card h1 {
  margin: 0.2rem 0 0.8rem;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.panel h1, .auth-card h1 { font-size: clamp(2rem, 4vw, 3rem); }

.eyebrow {
  margin: 0 0 0.5rem;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 900;
}

.muted, .hint { color: #94a3b8; }
.hint { display: block; margin-top: 0.45rem; font-size: 0.9rem; font-weight: 500; }
.error { color: #fecdd3; background: rgba(190, 18, 60, 0.18); padding: 0.8rem 1rem; border-radius: 1rem; }
.stack { display: grid; gap: 1rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.skill-card, .empty-card, .panel {
  border-radius: 1.5rem;
  padding: 1.25rem;
}

.skill-card {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  justify-content: space-between;
}

.skill-card h2, .panel h2 { margin: 0.2rem 0 0.6rem; }
.skill-card p { color: #cbd5e1; }

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.preview-panel { position: sticky; top: 5.5rem; }
.copy-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.8);
}
.copy-box code { overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .editor-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .site-header { align-items: flex-start; flex-direction: column; }
  .copy-box { grid-template-columns: 1fr; }
}
