/* Theme skins — Claude / Kimi / Grok */
:root, [data-theme="grok"] {
  --bg: #070605;
  --ink: #f4f1ea;
  --muted: #9a8f82;
  --line: #2a221c;
  --accent: #ff6a2a;
  --accent2: #7df9ff;
  --paper: #110e0c;
  --display: "Instrument Serif", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 0;
  --btn-fg: #140800;
  --hero-weight: 400;
  --nav-bg: rgba(7,6,5,.88);
  --glow: 0 0 80px rgba(255,106,42,.18);
}

[data-theme="claude"] {
  --bg: #f4efe6;
  --ink: #1c1915;
  --muted: #6b645a;
  --line: #d9d0c3;
  --accent: #c96442;
  --accent2: #1c1915;
  --paper: #fffaf3;
  --display: "Instrument Serif", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 14px;
  --btn-fg: #fffaf3;
  --hero-weight: 400;
  --nav-bg: rgba(244,239,230,.92);
  --glow: none;
}

[data-theme="kimi"] {
  --bg: #07081a;
  --ink: #f2f4ff;
  --muted: #9aa0c8;
  --line: #232752;
  --accent: #8b7bff;
  --accent2: #4de3ff;
  --paper: rgba(21, 24, 54, 0.55);
  --display: "IBM Plex Sans", system-ui, sans-serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 999px;
  --btn-fg: #0b0c22;
  --hero-weight: 800;
  --nav-bg: rgba(7, 8, 26, 0.72);
  --glow: none;
}

/* ===== KIMI skin — "Moonshot" ===== */
[data-theme="kimi"] body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(139,123,255,.28), transparent 60%),
    radial-gradient(900px 480px at -10% 30%, rgba(77,227,255,.14), transparent 55%),
    radial-gradient(700px 700px at 50% 120%, rgba(255,77,154,.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
[data-theme="kimi"] .nav {
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(139,123,255,.5), rgba(77,227,255,.5), transparent) 1;
  backdrop-filter: blur(18px) saturate(1.4);
}
[data-theme="kimi"] .logo { font-weight: 800; letter-spacing: -0.04em; }
[data-theme="kimi"] .logo span {
  background: linear-gradient(90deg, #8b7bff, #4de3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800;
}
[data-theme="kimi"] .eyebrow {
  background: linear-gradient(90deg, #8b7bff, #4de3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 600;
}
[data-theme="kimi"] h1 {
  letter-spacing: -0.045em; line-height: 0.98;
  text-shadow: 0 0 60px rgba(139,123,255,.35);
}
[data-theme="kimi"] h1 em {
  background: linear-gradient(92deg, #8b7bff 10%, #4de3ff 55%, #ff4d9a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: normal;
}
[data-theme="kimi"] .lede { color: var(--muted); }
[data-theme="kimi"] .btn {
  background: linear-gradient(92deg, #8b7bff, #6a5cff);
  color: #fff; font-weight: 700; border: 0;
  box-shadow: 0 8px 30px rgba(139,123,255,.35), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .15s ease, box-shadow .15s ease;
}
[data-theme="kimi"] .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(139,123,255,.5), inset 0 1px 0 rgba(255,255,255,.3);
}
[data-theme="kimi"] .btn.ghost {
  background: rgba(139,123,255,.08); color: var(--ink);
  border: 1px solid rgba(139,123,255,.4); box-shadow: none;
  backdrop-filter: blur(8px);
}
[data-theme="kimi"] .card, [data-theme="kimi"] .grid3 article {
  background: var(--paper);
  border: 1px solid rgba(139,123,255,.22);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(3,4,18,.5);
}
[data-theme="kimi"] .stats > div {
  border-left: 2px solid; border-image: linear-gradient(180deg, #8b7bff, #4de3ff) 1;
  padding-left: .9rem;
}
[data-theme="kimi"] .stats dt { color: var(--muted); }
[data-theme="kimi"] .stats dd { color: var(--ink); font-weight: 700; }
[data-theme="kimi"] .n, [data-theme="kimi"] .good { color: #4de3ff; }
[data-theme="kimi"] .theme-dd summary {
  border-radius: 999px; border-color: rgba(139,123,255,.4);
  background: rgba(139,123,255,.08);
}
[data-theme="kimi"] .theme-dd .menu {
  border-radius: 16px; border-color: rgba(139,123,255,.3);
  background: rgba(15,17,40,.95); backdrop-filter: blur(16px);
  overflow: hidden;
}
[data-theme="kimi"] .brand-lockup img {
  border-radius: 50%; border: 1px solid rgba(139,123,255,.5);
  box-shadow: 0 0 24px rgba(139,123,255,.45);
  background: radial-gradient(circle at 35% 30%, #1b1f4d, #07081a);
}
[data-theme="kimi"] ::selection { background: rgba(139,123,255,.4); }

html, body { background: var(--bg); color: var(--ink); font-family: var(--sans); }
h1 { font-family: var(--display); font-weight: var(--hero-weight); }
h1 em { color: var(--accent); }
.eyebrow { color: var(--accent); }
.btn { background: var(--accent); color: var(--btn-fg); border-radius: var(--radius); }
.btn.ghost { border-radius: var(--radius); }
.logo span { color: var(--accent); }
.n, .good { color: var(--accent); }
.nav { background: var(--nav-bg); backdrop-filter: blur(12px); }
.card, .grid3 article { background: var(--paper); }
.hero { box-shadow: var(--glow); }

.brand-lockup { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand-lockup img { width: 36px; height: 36px; object-fit: cover; border: 1px solid var(--line); background: #000; }
[data-theme="claude"] .brand-lockup img { border-radius: 10px; }
[data-theme="kimi"] .brand-lockup img { border-radius: 50%; }
[data-theme="grok"] .brand-lockup img { border-radius: 0; }

.theme-dd { position: relative; }
.theme-dd summary {
  list-style: none; cursor: pointer; border: 1px solid var(--line);
  padding: .4rem .7rem; font-size: .78rem; font-family: var(--mono);
  letter-spacing: .04em; text-transform: uppercase;
}
.theme-dd summary::-webkit-details-marker { display: none; }
.theme-dd .menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 168px;
  background: var(--paper); border: 1px solid var(--line); z-index: 40;
  display: flex; flex-direction: column;
}
.theme-dd button {
  background: none; border: 0; color: inherit; text-align: left;
  padding: .7rem .85rem; cursor: pointer; font: inherit;
}
.theme-dd button:hover, .theme-dd button[aria-current="true"] { background: var(--bg); color: var(--accent); }

.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; width: 100%; }
.nav-right { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }

@media (max-width: 800px) {
  .nav { flex-direction: column; align-items: stretch; }
  .nav-wrap { flex-direction: column; align-items: stretch; }
  .nav-right { justify-content: space-between; }
  .nav nav { flex-wrap: wrap; }
  .btn-sm { width: 100%; text-align: center; }
}

/* Kimi moon mark before the wordmark */
[data-theme="kimi"] .logo::before {
  content: ""; display: inline-block; width: .85em; height: .85em;
  margin-right: .45em; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #c9c2ff 0%, #8b7bff 45%, #3d3490 100%);
  box-shadow: 0 0 18px rgba(139,123,255,.75), inset -3px -4px 8px rgba(7,8,26,.55);
  vertical-align: -0.08em;
}

/* Mobile: keep the Skin dropdown readable & inside viewport */
@media (max-width: 800px) {
  .theme-dd { position: static; }
  .theme-dd .menu {
    position: fixed; left: 5vw; right: 5vw; top: auto; min-width: 0;
    width: auto; z-index: 99;
  }
  .theme-dd button { padding: 1rem; font-size: 1rem; }
}