:root{
  --bg: #0b0f1a;
  --bg-2: #0f172a;
  --card: #0e1320;
  --muted: #94a3b8;
  --ink: #e2e8f0;
  --brand: #6366f1; /* indigo-500 */
  --brand-2: #a855f7; /* purple-500 */
  --accent: #22d3ee; /* cyan-400 */
  --success: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --ring: rgba(99, 102, 241, .35);
}

/* Subtle app-wide background gradient + texture */
html, body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,.15), transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, rgba(168,85,247,.12), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2)) !important;
  color: var(--ink) !important;
}

/* Container polish */
main, .prose, article {
  color: var(--ink);
}

/* Navigation glassmorphism */
nav.sticky {
  background: rgba(15, 23, 42, 0.55) !important;
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid rgba(148,163,184,.2);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
nav a {
  color: #cbd5e1 !important;
}
nav a:hover {
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Buttons (generic) */
button, .btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: none;
  color: white !important;
  box-shadow: 0 8px 20px rgba(99,102,241,.35), inset 0 0 0 1px rgba(255,255,255,.05);
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
button:hover, .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(99,102,241,.45);
}
button:focus, .btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
}

/* Cards and articles */
article.bg-white, .card, .search-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(148,163,184,.15);
  box-shadow: 0 12px 40px rgba(2,6,23,.35);
}

/* Footer gradient border */
footer.bg-gray-900 {
  background: linear-gradient(180deg, #0b0f1a, #0f172a);
  border-top: 1px solid rgba(148,163,184,.15);
}
footer .underline { text-decoration-color: rgba(148,163,184,.5); }

/* Typography polish (prose) */
.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(34,211,238,.4);
  transition: color .15s ease, border-color .15s ease;
}
.prose a:hover {
  color: #67e8f9;
  border-bottom-color: rgba(103,232,249,.7);
}
.prose h1, .prose h2, .prose h3 {
  color: #f8fafc;
  letter-spacing: -0.02em;
}
.prose h1 { font-size: clamp(2rem, 3vw, 2.6rem); }
.prose h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); margin-top: 1.4em; }
.prose h3 { font-size: clamp(1.25rem, 1.6vw, 1.4rem); }
.prose p { color: #cbd5e1; line-height: 1.85 !important; }
.prose strong { color: #e2e8f0; }
.prose blockquote {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border-left: 4px solid var(--brand);
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: .5rem;
}

/* Callouts */
.callout {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(168,85,247,.12)) !important;
  border-left: 4px solid var(--brand) !important;
  color: #e5e7eb;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.15);
}

/* Badges / chips */
.badge, .px-2.py-0\.5.border.rounded-full {
  border-color: rgba(148,163,184,.35) !important;
  color: #cbd5e1 !important;
  background: rgba(255,255,255,.04);
}

/* Tables */
table {
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border: 1px solid rgba(148,163,184,.2);
  border-radius: .75rem;
  overflow: hidden;
}
th, td {
  border-bottom: 1px solid rgba(148,163,184,.15) !important;
  color: #dbeafe;
}
thead th {
  background: linear-gradient(180deg, rgba(99,102,241,.12), rgba(168,85,247,.12));
  color: #e2e8f0;
}

/* Breadcrumbs */
nav[aria-label="Breadcrumb"] ol {
  color: #94a3b8;
}
nav[aria-label="Breadcrumb"] a:hover {
  color: #e2e8f0 !important;
}

/* Forms */
input[type="search"], input[type="text"], input[type="email"], textarea {
  background: rgba(15,23,42,.6) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(148,163,184,.25) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
input:focus, textarea:focus {
  outline: none !important;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px var(--ring) !important;
}

/* Links hover underline style */
a {
  transition: color .15s ease, text-decoration-color .15s ease;
  text-decoration-thickness: .08em;
  text-underline-offset: 3px;
}

/* Images */
img {
  border-radius: .5rem;
}

/* Selection */
::selection {
  background: rgba(99,102,241,.35);
  color: #fff;
}

/* Scrollbar (modern) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,.35) transparent;
}
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(148,163,184,.35), rgba(148,163,184,.15));
  border-radius: 999px;
}

/* Search results */
.result:hover {
  background: rgba(99,102,241,.08) !important;
}

/* Footer small text */
footer p, footer li, footer a {
  color: #a8b1c1;
}

/* Accent underlines for headings */
.prose h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin-top: .5rem;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 2px;
  opacity: .6;
}

/* Utility: elevate panels that already have rounded/shadow */
.bg-white.rounded-2xl.shadow {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)) !important;
  border: 1px solid rgba(148,163,184,.15) !important;
}

/* Code blocks */
code, pre {
  background: rgba(2,6,23,.7);
  color: #e2e8f0;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: .5rem;
}
