/*
 * radar.karti.ai — a continuation of karti.ai's look, not a new one.
 *
 * karti.ai itself (globals.css) builds this palette out of Tailwind v4
 * `@theme`/`@utility` layers on top of a WebGL ocean shader background. This
 * site has neither Tailwind nor a shader — it is meant to load instantly with
 * zero framework runtime — so the same HSL values and the same "near-black
 * glass" identity are hand-copied here as plain CSS custom properties, and
 * the background is the shader's own `.ocean-fallback` gradient (a still
 * frame of it), not an animated canvas.
 */

:root {
  --bg: #030304;
  --bg-gradient: radial-gradient(120% 90% at 50% 0%, #0b1018 0%, #05080c 55%, #020304 100%);
  --fg: rgba(245, 245, 245, 0.96);
  --fg-70: rgba(245, 245, 245, 0.7);
  --fg-60: rgba(245, 245, 245, 0.6);
  --fg-45: rgba(245, 245, 245, 0.45);
  --fg-40: rgba(245, 245, 245, 0.4);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --card-bg: rgba(10, 10, 10, 0.6);
  --accent: #34d399; /* emerald-400, the region/tag accent on karti.ai's own radar page */
  --accent-strong: #6ee7b7;
  --radius-lg: 1rem;
  --radius-full: 999px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef3f7;
    --bg-gradient: linear-gradient(to bottom, #ffffff 0%, #f4f8fb 44%, #c3d6e6 64%, #aac3d9 100%);
    --fg: rgba(20, 28, 38, 0.96);
    --fg-70: rgba(20, 28, 38, 0.72);
    --fg-60: rgba(20, 28, 38, 0.62);
    --fg-45: rgba(20, 28, 38, 0.48);
    --fg-40: rgba(20, 28, 38, 0.42);
    --border: rgba(20, 28, 38, 0.12);
    --border-strong: rgba(20, 28, 38, 0.22);
    --card-bg: rgba(255, 255, 255, 0.55);
    --accent: #0d9668;
    --accent-strong: #0a7d58;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-gradient);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.rd-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 6rem 1.25rem 8rem;
}

.rd-header {
  margin-bottom: 3rem;
}

.rd-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--fg-70);
  margin: 0 0 1rem;
}

.rd-title {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.15);
}

.rd-sub {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--fg-70);
  max-width: 44rem;
  margin: 0 0 1rem;
}

.rd-updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-45);
  margin: 0;
}

.rd-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.rd-search {
  max-width: 22rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font-size: 0.9rem;
  font-family: var(--font-sans);
}

.rd-search::placeholder {
  color: var(--fg-40);
}

.rd-search:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rd-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rd-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-60);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.rd-pill:hover {
  color: var(--fg);
  border-color: var(--border-strong);
}

.rd-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rd-pill--active {
  color: var(--accent-strong);
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.15);
}

.rd-no-match {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--fg-45);
  text-align: center;
  padding: 3rem 0;
}

.rd-empty-state {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--fg-60);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
}

.rd-region {
  margin-bottom: 3rem;
}

.rd-region-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.rd-count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--fg-40);
}

.rd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .rd-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.rd-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1rem 1.1rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.rd-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

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

.rd-card-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
}

.rd-jobs {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-40);
  text-decoration: none;
  white-space: nowrap;
}

.rd-jobs:hover {
  color: var(--fg);
}

.rd-card-what {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--fg-70);
  margin: 0 0 0.65rem;
}

.rd-card-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-45);
  margin: 0 0 0.65rem;
}

.rd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.rd-tag {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--fg-60);
  white-space: nowrap;
}

.rd-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--fg-45);
}

.rd-footer a {
  color: var(--fg-70);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

.rd-footer a:hover {
  color: var(--fg);
}

/* Progressive enhancement: every card is already in the markup server-side
   (build-time, really), so a visitor with JS disabled sees the complete,
   unfiltered list rather than an empty page waiting for a script that never
   runs. `hidden` is only ever toggled by app.js. */
[hidden] {
  display: none !important;
}
