:root {
  --bg: #081420;
  --bg-soft: #13263a;
  --panel: #0e1e2f;
  --panel-border: #2c4864;
  --text: #f3f7fa;
  --muted: #9eb2c4;
  --accent: #53e3c2;
  --accent-2: #ffc857;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 20%, #164667 0%, transparent 36%),
    radial-gradient(circle at 80% 10%, #3d2c5f 0%, transparent 30%),
    radial-gradient(circle at 30% 90%, #1b4d45 0%, transparent 32%),
    linear-gradient(145deg, #07111b 0%, #0f2235 55%, #091523 100%);
}

.hero {
  max-width: 1400px;
  margin: 0 auto;
  padding: 26px 20px 16px;
}

.hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin: 0;
  max-width: 900px;
  line-height: 1.1;
  font-size: clamp(1.45rem, 3.2vw, 2.15rem);
}

.brand-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.hero-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.github-icon-link {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(67 101 131 / 78%);
  border-radius: 10px;
  background: rgb(15 33 49 / 72%);
  color: #b7c8d8;
  text-decoration: none;
  transition: background 130ms ease, border-color 130ms ease, color 130ms ease, transform 130ms ease;
}

.github-icon-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.github-icon-link:hover,
.github-icon-link:focus-visible {
  background: rgb(25 50 73 / 82%);
  border-color: rgb(98 132 166 / 88%);
  color: #dbe9f7;
  transform: translateY(-1px);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.stat-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgb(7 19 31 / 75%);
  font-size: 0.86rem;
  color: var(--muted);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px 44px;
}

.controls {
  margin-bottom: 18px;
  border: 1px solid var(--panel-border);
  background: rgb(11 24 37 / 92%);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 16px;
}

@media (min-width: 1025px) {
  .controls {
    position: sticky;
    top: 0;
    z-index: 20;
  }
}

@media (hover: none) and (pointer: coarse) {
  .controls {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
  }
}

.search-label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
}

.search-label input {
  margin-top: 7px;
  width: 100%;
}

input,
select {
  border: 1px solid var(--panel-border);
  border-radius: 11px;
  background: #0a1726;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.filters {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.toggle {
  flex-direction: row !important;
  align-items: center;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 9px 10px;
  min-height: 44px;
}

.toggle input {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  accent-color: var(--accent);
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.hint code {
  color: var(--accent-2);
}

.inline-guide-link {
  color: #9de5ff;
  text-decoration: none;
}

.inline-guide-link:hover,
.inline-guide-link:focus {
  text-decoration: underline;
}

.page-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #41729f;
  border-radius: 10px;
  background: #1a3551;
  color: #e9f4ff;
  text-decoration: none;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 600;
}

.page-link:hover,
.page-link:focus {
  background: #23466a;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.chart-section {
  margin-bottom: 20px;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.domain-panel {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: linear-gradient(170deg, rgb(12 29 45 / 90%), rgb(10 21 33 / 94%));
  padding: 12px;
}

.domain-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.domain-panel-header h3 {
  margin: 0;
  font-size: 1rem;
}

.domain-panel-header span {
  font-size: 0.82rem;
  color: var(--muted);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 4px 8px;
}

.domain-panel-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.subarea-column {
  border: 1px solid rgb(44 72 100 / 70%);
  border-radius: 12px;
  padding: 10px;
  background: rgb(9 21 34 / 80%);
}

.subarea-column h4 {
  margin: 0 0 8px;
  font-size: 0.87rem;
  color: var(--accent-2);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: flex-start;
  min-height: 28px;
}

.cert-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1px solid #37679a;
  background: #22456d;
  color: #ecf4fa;
  text-decoration: none;
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 0.78rem;
  line-height: 1;
}

.cert-chip.level-expert {
  border-color: #8f3d37;
  background: #a74c45;
}

.cert-chip.level-advanced {
  border-color: #3f588f;
  background: #2f4f80;
}

.cert-chip.level-intermediate {
  border-color: #2f7c63;
  background: #266753;
}

.cert-chip.level-foundational {
  border-color: #706023;
  background: #6d5921;
}

.cert-chip.ai {
  box-shadow: 0 0 0 1px #2ec7a4 inset;
}

.cert-chip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  min-width: 220px;
  max-width: 320px;
  border: 1px solid #5f7ca0;
  border-radius: 10px;
  background: #1e3d63;
  color: #f5fbff;
  padding: 8px 10px;
  line-height: 1.25;
  white-space: pre-line;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 50;
}

.cert-chip:hover::after,
.cert-chip:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: linear-gradient(170deg, rgb(12 29 45 / 90%), rgb(10 21 33 / 94%));
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 220px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.provider {
  margin: 0;
  font-size: 0.82rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.level {
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.74rem;
  color: var(--muted);
}

.name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.summary {
  margin: 0;
  color: #c9d7e4;
  font-size: 0.91rem;
  flex-grow: 1;
}

.meta,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  border-radius: 999px;
  font-size: 0.74rem;
  padding: 4px 8px;
  border: 1px solid var(--panel-border);
  color: #d2e4f3;
}

.badge.ai {
  border-color: #2f7a66;
  color: var(--accent);
}

.badge.sub {
  border-color: #5f608f;
  color: #ccd0ff;
}

.badge.skill {
  border-color: #437c77;
  color: #91efdf;
}

.badge.role-group {
  border-color: #7d648e;
  color: #e3cfff;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}

.details-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.details-link:hover,
.details-link:focus {
  text-decoration: underline;
}

.price {
  color: #ffd691;
  text-align: right;
}

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.empty {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: rgb(8 18 29 / 78%);
  color: var(--muted);
}

@media (max-width: 1200px) {
  .filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .domain-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .controls {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
  }

  .hero-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 540px) {
  .filters {
    grid-template-columns: 1fr;
  }
}
