:root {
  color-scheme: dark;
  --bg: #0d1117;
  --header: #0b0f14;
  --surface: #161b22;
  --surface-2: #0f141b;
  --border: #30363d;
  --border-strong: #484f58;
  --text: #ffffff;
  --soft: #c9d1d9;
  --muted: #8b949e;
  --link: #58a6ff;
  --link-hover: #79c0ff;
  --green: #3fb950;
  --yellow: #d29922;
  --max-width: 1200px;
  --font: Arial, Helvetica, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--mono);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 8%;
  background: var(--header);
  border-bottom: 1px solid #1f2937;
}

.site-brand {
  color: var(--text);
  font-size: 30px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  color: var(--text);
  font-weight: 600;
  transition: color 0.18s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--link);
}

.site-hero {
  padding: 96px 20px;
  background:
    linear-gradient(rgba(13, 17, 23, 0.76), rgba(13, 17, 23, 0.84)),
    url("https://images.unsplash.com/photo-1518770660439-4636190af475?q=80&w=1600");
  background-position: center;
  background-size: cover;
  text-align: center;
}

.site-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(46px, 7vw, 72px);
  line-height: 1;
}

.site-hero p {
  color: var(--soft);
  font-size: clamp(18px, 2.5vw, 26px);
}

.page-main {
  width: min(var(--max-width), 100%);
  flex: 1;
  margin: 0 auto;
  padding: 72px 20px 90px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--link);
}

.breadcrumbs a:hover {
  color: var(--link-hover);
}

.page-intro {
  max-width: 860px;
  margin-bottom: 44px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--link);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-title {
  margin-bottom: 18px;
  font-size: clamp(38px, 5vw, 54px);
  line-height: 1.1;
}

.page-lead {
  color: var(--soft);
  font-size: 18px;
  line-height: 1.75;
}

.page-lead code {
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(110, 118, 129, 0.22);
}

.section-block + .section-block {
  margin-top: 70px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 38px);
}

.section-heading p {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.7;
}

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

.category-card,
.library-card,
.repo-card {
  position: relative;
  display: flex;
  min-height: 280px;
  flex-direction: column;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.category-card:hover,
.library-card:hover,
.repo-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.card-index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(63, 185, 80, 0.35);
  border-radius: 999px;
  background: rgba(63, 185, 80, 0.1);
  color: #9be9a8;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.is-planned {
  border-color: rgba(210, 153, 34, 0.35);
  background: rgba(210, 153, 34, 0.1);
  color: #e3b341;
}

.category-card h3,
.library-card h3,
.repo-card h3 {
  margin-bottom: 14px;
  font-size: 25px;
}

.category-card > p,
.library-card > p,
.repo-card > p {
  color: var(--muted);
  line-height: 1.7;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  list-style: none;
}

.topic-list li {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--soft);
  font-size: 12px;
}

.card-action,
.repo-card > span {
  margin-top: auto;
  padding-top: 28px;
  color: var(--link);
  font-size: 14px;
  font-weight: 700;
}

.card-action.is-muted {
  color: var(--muted);
}

.library-card {
  min-height: 250px;
}

.library-card.is-planned {
  cursor: default;
}

.library-card.is-planned:hover {
  transform: none;
  box-shadow: none;
}

.status-box {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  line-height: 1.65;
}

.status-box[hidden] {
  display: none;
}

.status-box.is-error {
  border-color: rgba(248, 81, 73, 0.55);
  color: #ffb3ad;
}

.module-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.module-toolbar p {
  color: var(--muted);
}

.action-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #21262d;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.action-button:hover {
  border-color: var(--border-strong);
  background: #30363d;
}

.site-footer {
  padding: 30px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .category-grid,
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 20px;
  }

  .site-nav {
    width: 100%;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .site-hero {
    padding: 72px 18px;
  }

  .page-main {
    padding: 54px 16px 72px;
  }

  .category-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .category-card,
  .library-card,
  .repo-card {
    min-height: 240px;
  }
}
