:root {
  --bg: #fbfcfd;
  --panel: #ffffff;
  --ink: #171b23;
  --muted: #626977;
  --soft: #f6f8fa;
  --line: #dde3ea;
  --teal: #008f86;
  --teal-dark: #007d77;
  --teal-soft: #e8f6f5;
  --blue: #1268d6;
  --blue-soft: #e8f1ff;
  --violet: #5841a7;
  --violet-soft: #f0ecff;
  --amber: #c46b00;
  --amber-soft: #fff4dd;
  --shadow: 0 10px 35px rgba(25, 33, 45, 0.06);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f3f5f7;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

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

button,
input {
  font: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  min-height: 100dvh;
  overflow: hidden;
  border: 1px solid #cfd6de;
  border-radius: 10px;
  background: var(--bg);
}

.topbar {
  height: 88px;
  display: grid;
  grid-template-columns: 315px minmax(360px, 570px) 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 20px 0 31px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  font-size: 26px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 32px;
}

.brand-mark span {
  position: absolute;
  bottom: 0;
  width: 17px;
  height: 29px;
  border: 2px solid #17a59c;
  background: linear-gradient(180deg, #eefdfb 0%, #ffffff 100%);
  box-shadow: inset 3px 0 0 #009b91;
}

.brand-mark span:first-child {
  left: 1px;
  border-radius: 3px 3px 8px 3px;
  transform: skewY(12deg);
}

.brand-mark span:last-child {
  right: 1px;
  border-radius: 3px 3px 3px 8px;
  transform: skewY(-12deg);
}

.search-wrap {
  height: 56px;
  display: grid;
  grid-template-columns: 22px 1fr 50px;
  align-items: center;
  gap: 14px;
  padding: 0 16px 0 18px;
  border: 1px solid #d3d9e2;
  border-radius: 12px;
  background: #fff;
  color: #818898;
  box-shadow: 0 1px 1px rgba(22, 28, 36, 0.03);
}

.search-wrap svg {
  width: 22px;
  height: 22px;
}

.search-wrap input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 16px;
  background: transparent;
}

.search-wrap input::placeholder {
  color: #8a91a0;
}

kbd {
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9dee6;
  border-radius: 7px;
  background: #fff;
  color: #6b7280;
  font-size: 15px;
  font-family: inherit;
  box-shadow: 0 1px 1px rgba(22, 28, 36, 0.04);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}

.browse-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #2c313a;
  font-size: 16px;
}

.browse-link svg {
  width: 24px;
  height: 24px;
}

.submit-button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  background: linear-gradient(180deg, #009b91 0%, #00877f 100%);
  color: white;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 5px rgba(0, 128, 121, 0.18);
}

.submit-button {
  height: 53px;
  padding: 0 20px;
  border-radius: 9px;
  font-size: 16px;
}

.submit-button svg,
.download-button svg {
  width: 20px;
  height: 20px;
}

.main-layout {
  min-height: calc(100dvh - 88px);
}

.chevron {
  width: 10px;
  height: 10px;
  border-right: 1.7px solid #6d7582;
  border-bottom: 1.7px solid #6d7582;
  transform: rotate(45deg) translateY(-2px);
}

.content {
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 35px 24px;
  background: var(--bg);
}

.content-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 0 4px 29px 7px;
}

.content-head h1 {
  margin: 0 0 8px;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.content-head p {
  margin: 0 0 29px;
  color: #4f5665;
  font-size: 16px;
}

.content-head span {
  color: #4f5665;
  font-size: 14px;
}

.sort-button {
  height: 43px;
  min-width: 191px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px 0 17px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #fff;
  color: #2f3540;
  font-size: 15px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 18px;
}

.skill-card {
  min-height: 316px;
  display: grid;
  grid-template-rows: 1fr 38px 50px;
  overflow: hidden;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.card-main {
  padding: 19px 17px 12px;
}

.card-title-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.logo {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border: 1px solid #d9e0e8;
  border-radius: 7px;
  background: #fff;
  color: #fff;
}

.logo svg {
  width: 37px;
  height: 37px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
}

.logo-openai { background: linear-gradient(135deg, #1fa77e, #068f7f); }
.logo-postgres { background: linear-gradient(135deg, #4c91e4, #2869c2); }
.logo-github { background: radial-gradient(circle at 30% 20%, #4c4f55, #17191d 70%); }
.logo-calendar { background: linear-gradient(135deg, #f06d5e, #ce3d66); }
.logo-prompt { background: linear-gradient(135deg, #1fa77e, #087d8d); }
.logo-data { background: linear-gradient(135deg, #4c91e4, #2869c2); }
.logo-particles { background: linear-gradient(135deg, #f6a531, #d455a0); }
.logo-docs { background: linear-gradient(135deg, #4e5969, #17191d); }

.card-title-row h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.star-count {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: #586172;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.star-count svg {
  width: 16px;
  height: 16px;
  color: #e2a900;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.4;
}

.card-main p {
  min-height: 52px;
  margin: 0 0 15px;
  color: #3f4654;
  font-size: 16px;
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 12px;
  border-radius: 5px;
  font-size: 13px;
  white-space: nowrap;
}

.pill.ai { color: #00706a; background: var(--teal-soft); }
.pill.data { color: var(--blue); background: var(--blue-soft); }
.pill.dev { color: var(--violet); background: var(--violet-soft); }
.pill.prod { color: var(--amber); background: var(--amber-soft); }
.pill.design { color: #b4236f; background: #fdeaf3; }

.card-meta,
.card-actions {
  border-top: 1px solid #e5e9ef;
}

.card-meta {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  color: #4d5564;
  font-size: 13px;
}

.card-meta span {
  padding-left: 17px;
}

.card-meta span + span {
  border-left: 1px solid #dfe5ec;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 16px;
  padding: 8px 10px;
}

.download-button,
.details-button {
  height: 34px;
  border-radius: 5px;
  cursor: pointer;
}

.download-button {
  font-size: 14px;
}

.details-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #d9dfe7;
  background: #fff;
  color: #303640;
  font-size: 14px;
}

.details-button svg {
  width: 16px;
  height: 16px;
}

.slack-shape,
.ga-shape,
.notion-shape,
.cloud-shape,
.sheet-shape {
  position: relative;
  display: block;
}

.slack-shape {
  width: 34px;
  height: 34px;
}

.slack-shape i {
  position: absolute;
  width: 9px;
  height: 23px;
  border-radius: 9px;
}

.slack-shape i:nth-child(1) { left: 5px; top: 2px; background: #36c5f0; transform: rotate(90deg); }
.slack-shape i:nth-child(2) { right: 5px; top: 2px; background: #2eb67d; }
.slack-shape i:nth-child(3) { left: 5px; bottom: 2px; background: #ecb22e; }
.slack-shape i:nth-child(4) { right: 5px; bottom: 2px; background: #e01e5a; transform: rotate(90deg); }

.ga-shape {
  width: 34px;
  height: 36px;
}

.ga-shape i {
  position: absolute;
  bottom: 2px;
  width: 8px;
  border-radius: 6px;
  background: #f9ab00;
}

.ga-shape i:nth-child(1) { left: 4px; height: 9px; background: #f29900; }
.ga-shape i:nth-child(2) { left: 15px; height: 22px; }
.ga-shape i:nth-child(3) { left: 26px; height: 33px; background: #e37400; }

.notion-shape {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 4px solid #000;
  color: #000;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-6deg);
}

.cloud-shape {
  width: 34px;
  height: 22px;
  border-radius: 20px;
  background: #0b8de3;
}

.cloud-shape::before,
.cloud-shape::after {
  content: "";
  position: absolute;
  bottom: 7px;
  border-radius: 50%;
  background: #0b8de3;
}

.cloud-shape::before {
  left: 7px;
  width: 16px;
  height: 16px;
}

.cloud-shape::after {
  right: 6px;
  width: 12px;
  height: 12px;
}

.sheet-shape {
  width: 27px;
  height: 34px;
  border-radius: 2px;
  background: #24a65a;
}

.sheet-shape::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  border-left: 9px solid transparent;
  border-bottom: 9px solid rgba(255,255,255,0.55);
}

.sheet-shape::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 13px;
  width: 13px;
  height: 12px;
  border: 2px solid #fff;
  box-shadow: inset 0 4px 0 transparent, inset 4px 0 0 transparent;
}

.pager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 0 5px;
}

.pager-row p {
  margin: 0;
  color: #5f6676;
  font-size: 15px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 280px 1fr;
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    display: none;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    border-radius: 0;
  }

  .topbar {
    height: auto;
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .content {
    padding: 24px 18px;
  }

  .content-head,
  .pager-row {
    align-items: stretch;
    flex-direction: column;
  }

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