:root {
  color-scheme: dark;
  --bg: #07101c;
  --surface: rgba(15, 27, 45, 0.74);
  --surface-strong: #111e31;
  --surface-hover: #152842;
  --text: #f4f7fb;
  --muted: #9eacc0;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #4de4c1;
  --accent-two: #55a7ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f8fc;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --surface-hover: #f0f6fc;
  --text: #101827;
  --muted: #657187;
  --line: rgba(71, 85, 105, 0.16);
  --accent: #008d77;
  --accent-two: #1676dc;
  --shadow: 0 24px 70px rgba(42, 62, 90, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  transition: background 0.25s ease, color 0.25s ease;
}

button,
input {
  font: inherit;
}

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

.ambient {
  position: fixed;
  z-index: -1;
  width: 40rem;
  height: 40rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.13;
  pointer-events: none;
}

.ambient-one {
  top: -18rem;
  left: -12rem;
  background: var(--accent-two);
}

.ambient-two {
  right: -18rem;
  top: 24rem;
  background: var(--accent);
}

.site-header {
  width: min(1160px, calc(100% - 40px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand,
.header-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-two));
  color: #05111c;
  font-weight: 800;
}

.header-actions {
  gap: 10px;
}

.icon-button,
.github-link {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button {
  width: 40px;
  font-size: 1.15rem;
}

.github-link {
  display: grid;
  padding: 0 16px;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 600;
}

main,
footer {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  padding: 100px 0 84px;
}

.eyebrow,
.section-kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow span {
  width: 22px;
  height: 1px;
  background: var(--accent);
}

h1 {
  max-width: 860px;
  margin: 22px 0 24px;
  font-size: clamp(2.7rem, 6vw, 5.3rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.hero-copy {
  max-width: 660px;
  margin: 0 0 42px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.85;
}

.search-wrap {
  position: relative;
  display: flex;
  max-width: 700px;
  height: 62px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-wrap:focus-within {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.search-wrap svg {
  width: 21px;
  margin-left: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.7;
}

.search-wrap input {
  width: 100%;
  height: 100%;
  padding: 0 18px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-wrap input::placeholder {
  color: var(--muted);
}

kbd {
  margin-right: 16px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.75rem;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.filter-button {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
}

.filter-button:hover,
.filter-button.active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.content-section {
  padding: 30px 0 100px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-kicker {
  margin: 0 0 10px;
}

.section-heading h2,
.about-card h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
}

#result-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.resource-card {
  position: relative;
  min-height: 240px;
  padding: 25px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.resource-card:hover {
  z-index: 1;
  border-color: color-mix(in srgb, var(--card-color) 55%, transparent);
  background: var(--surface-hover);
  transform: translateY(-4px);
}

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

.card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-color) 13%, transparent);
  color: var(--card-color);
  font-size: 1.25rem;
}

.card-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.resource-card:hover .card-arrow {
  color: var(--card-color);
  transform: translate(3px, -3px);
}

.resource-card h3 {
  margin: 34px 0 10px;
  font-size: 1.08rem;
}

.resource-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.7;
}

.card-tag {
  display: inline-block;
  margin-top: 22px;
  color: var(--card-color);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.empty-state {
  padding: 65px 20px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state span {
  font-size: 2rem;
}

.empty-state h3 {
  margin: 14px 0 8px;
  color: var(--text);
}

.empty-state p {
  margin: 0;
}

.about-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-two) 9%, var(--surface)), var(--surface));
}

.about-card > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

footer {
  display: flex;
  justify-content: space-between;
  margin-top: 80px;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

@media (max-width: 860px) {
  .hero {
    padding-top: 72px;
  }

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

  .about-card {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 580px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1160px);
  }

  .brand span:last-child,
  .github-link,
  kbd {
    display: none;
  }

  .hero {
    padding: 58px 0 55px;
  }

  h1 {
    font-size: 2.65rem;
  }

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

  .resource-card {
    min-height: 220px;
  }

  .about-card {
    padding: 32px 24px;
  }

  footer {
    gap: 20px;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
