* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #0a1020;
  background: #f3f7fc;
}

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

.topbar {
  height: 72px;
  width: 100vw;
  display: grid;
  grid-template-columns: 390px minmax(280px, 560px) minmax(260px, 1fr);
  align-items: center;
  gap: 36px;
  padding: 0 54px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 50%),
    linear-gradient(90deg, #0653f5 0%, #2872ff 50%, #79adff 100%);
  color: #fff;
  box-shadow: 0 8px 26px rgba(18, 83, 195, .18);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.brand-logo {
  width: 118px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.site-title {
  font-weight: 850;
  font-size: 18px;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.search-box {
  height: 38px;
  min-width: 280px;
  max-width: 560px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 8px 18px rgba(15, 56, 130, .15), inset 0 1px 0 rgba(255,255,255,.9);
}

.search-box svg {
  width: 18px;
  height: 18px;
  fill: #3b78ee;
  flex: 0 0 auto;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2937;
  font-size: 14px;
}

.search-box input::placeholder {
  color: rgba(92, 107, 130, .78);
}

.search-chevron {
  color: #6d8fd2;
  font-size: 18px;
  line-height: 1;
}

.repo-link {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: rgba(255,255,255,.94);
  font-weight: 700;
  font-size: 14px;
}

.repo-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.repo-link span:nth-child(2) {
  max-width: 260px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.layout {
  width: 100vw;
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  background:
    linear-gradient(90deg, #f5f8fd 0%, #f2f6fc 286px, #ffffff 286px, #ffffff 100%);
}

.sidebar {
  padding: 28px 22px 28px 34px;
}

.sidebar-card {
  width: 100%;
  min-height: calc(100vh - 120px);
  padding: 16px 14px 20px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  border: 1px solid #dbe4f2;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .07), inset 0 1px 0 rgba(255,255,255,.96);
}

.nav-title {
  padding: 0 8px 10px 8px;
  font-weight: 900;
  font-size: 15px;
  color: #111827;
}

.nav-section {
  margin: 15px 8px 7px 8px;
  font-weight: 850;
  color: #1d6bff;
  font-size: 13px;
}

.nav-item {
  height: 28px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 7px;
  color: #273344;
  font-size: 13.5px;
  font-weight: 550;
  transition: .15s ease;
}

.nav-item:hover {
  color: #0759ef;
  background: rgba(31, 106, 242, .08);
}

.nav-item.active {
  color: #0b5cf0;
  background: linear-gradient(90deg, #eaf2ff 0%, #dbeafe 100%);
  box-shadow: inset 0 0 0 1px rgba(31, 106, 242, .16), 0 6px 14px rgba(31, 106, 242, .10);
  font-weight: 850;
}

.nav-ico {
  width: 16px;
  text-align: center;
  opacity: .85;
  font-size: 13px;
}

.github-card {
  margin: 32px 0 0 0;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 10px;
  border: 1px solid #e0e7f2;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.github-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #050914;
}

.github-dot svg {
  width: 23px;
  height: 23px;
  fill: #fff;
}

.github-card b {
  display: block;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 3px;
}

.github-card small {
  display: block;
  color: #6b7280;
  font-size: 12px;
}

.content {
  min-width: 0;
  background: #fff;
}

.hero {
  position: relative;
  min-height: clamp(560px, 46vw, 720px);
  border-bottom: 1px solid #dbe4f0;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../assets/home-hero-wide.png");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.82) 40%, rgba(255,255,255,.36) 72%, rgba(255,255,255,.10) 100%),
    radial-gradient(720px 420px at 76% 36%, rgba(31, 106, 242, .10), rgba(31,106,242,0) 68%);
}

.hero-copy {
  padding: clamp(46px, 4.8vw, 82px) 0 0 clamp(76px, 7vw, 132px);
  width: min(820px, 56vw);
}

.badge {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 1px solid #cbd6e7;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .06), inset 0 1px 0 rgba(255,255,255,.96);
  color: #2b3445;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0;
  color: #050914;
  font-size: clamp(42px, 3.45vw, 64px);
  line-height: 1.08;
  letter-spacing: -.052em;
  font-weight: 920;
  max-width: 820px;
}

.blue-line {
  width: 58px;
  height: 3px;
  border-radius: 999px;
  background: #1766f7;
  margin: 28px 0 24px 0;
}

.hero p {
  margin: 0;
  color: #2f394b;
  font-size: clamp(17px, 1.25vw, 22px);
  line-height: 1.45;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn {
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  font-size: 15px;
  font-weight: 830;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(90deg, #0b5cf0 0%, #347bff 100%);
  box-shadow: 0 14px 26px rgba(31, 106, 242, .24), inset 0 1px 0 rgba(255,255,255,.28);
}

.btn.secondary {
  color: #111827;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148, 163, 184, .56);
  box-shadow: 0 8px 18px rgba(15,23,42,.06), inset 0 1px 0 rgba(255,255,255,.96);
}

.hero-tags {
  position: static;
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 28px;
  color: #111827;
  font-size: 13px;
  font-weight: 780;
  flex-wrap: wrap;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-tags span + span {
  padding-left: 28px;
  border-left: 1px solid #d5dfed;
}

.price-card {
  position: absolute;
  right: clamp(36px, 4.2vw, 90px);
  top: clamp(150px, 13vw, 225px);
  width: 260px;
  color: #111827;
  font-weight: 800;
  padding: 14px 16px 16px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,.50), rgba(255,255,255,.18));
  backdrop-filter: blur(1.5px);
}

.price-card strong {
  display: block;
  color: #0b5cf0;
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 2px;
}

.price-card b {
  display: block;
  font-size: 16px;
}

.price-card i {
  display: block;
  width: 170px;
  height: 2px;
  background: #9ab8ff;
  margin: 16px 0;
}

.price-card em {
  display: block;
  color: #1265f6;
  font-style: normal;
  font-size: clamp(25px, 2.2vw, 34px);
  line-height: 1;
  margin-bottom: 28px;
}

.price-card p {
  color: #2b3445;
  font-size: clamp(15px, 1.1vw, 19px);
  line-height: 1.45;
  font-weight: 760;
}

.feature-strip {
  height: 104px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #dbe4f0;
  background: rgba(255,255,255,.98);
}

.feature {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 0 clamp(22px, 3vw, 52px);
  border-right: 1px solid #dbe4f0;
}

.feature:last-child {
  border-right: 0;
}

.feature-icon {
  font-size: 34px;
  line-height: 1;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon.icon-blue,
.feature-icon.shield {
  color: #1766f7;
}

.feature h3 {
  margin: 0 0 7px 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.05;
  font-weight: 900;
}

.feature p {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.4;
}

.resources {
  padding: 30px clamp(44px, 6vw, 92px) 48px clamp(44px, 6vw, 92px);
  background:
    radial-gradient(700px 260px at 30% 0%, rgba(31,106,242,.04), rgba(31,106,242,0) 70%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  color: #0f172a;
  font-weight: 920;
}

.section-line {
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: #1766f7;
  margin-top: 12px;
}

.section-head a {
  color: #0b5cf0;
  font-weight: 800;
  font-size: 14px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 30px);
}

.resource-card {
  min-height: 136px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 16px;
  padding: 28px 26px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e0e7f2;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .06), inset 0 1px 0 rgba(255,255,255,.96);
}

.resource-card > span {
  color: #1766f7;
  font-size: 38px;
  font-weight: 920;
  letter-spacing: -.05em;
  line-height: 1;
}

.resource-card h3 {
  margin: 4px 0 12px 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.resource-card p {
  margin: 0 0 18px 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
}

.resource-card b {
  color: #0b5cf0;
  font-size: 13px;
  font-weight: 850;
}

@media (max-width: 1280px) {
  .topbar {
    grid-template-columns: 320px minmax(260px, 500px) minmax(220px, 1fr);
    padding: 0 36px;
  }

  .layout {
    grid-template-columns: 260px minmax(0, 1fr);
    background:
      linear-gradient(90deg, #f5f8fd 0%, #f2f6fc 260px, #ffffff 260px, #ffffff 100%);
  }

  .sidebar {
    padding-left: 24px;
  }

  .hero-copy {
    padding-left: 58px;
    width: min(760px, 58vw);
  }

  .hero-tags {
    margin-top: 26px;
  }

  .price-card {
    right: 54px;
  }
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
    background: #fff;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    grid-template-columns: minmax(230px, 1fr) minmax(250px, 420px);
    gap: 18px;
  }

  .repo-link {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-copy {
    width: min(760px, 64vw);
  }

  .feature-strip {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature {
    height: 104px;
  }

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

@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: 72px;
    grid-template-columns: 1fr;
    padding: 14px 18px;
  }

  .search-box {
    width: 100%;
    max-width: none;
  }

  .hero {
    min-height: 720px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.88) 46%, rgba(255,255,255,.20) 100%),
      radial-gradient(600px 420px at 70% 72%, rgba(31,106,242,.10), rgba(31,106,242,0) 68%);
  }

  .hero-bg {
    background-position: 66% bottom;
  }

  .hero-copy {
    width: auto;
    padding: 34px 24px 0 24px;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .hero-tags {
    margin-top: 22px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero-tags span + span {
    border-left: 0;
    padding-left: 0;
  }

  .price-card {
    display: none;
  }

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

  .feature {
    border-right: 0;
    border-bottom: 1px solid #dbe4f0;
  }

  .resources {
    padding: 28px 22px 42px 22px;
  }

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

/* =========================================
   Responsive stability patch
   Fix half-screen overlaps in hero/title/buttons/price card.
   ========================================= */
@media (max-width: 1180px) {
  .price-card {
    display: none;
  }

  .hero-copy {
    width: min(780px, calc(100vw - 360px));
  }

  .hero h1 {
    font-size: clamp(40px, 4.6vw, 58px);
    line-height: 1.08;
  }

  .hero-tags {
    max-width: 760px;
  }
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
    background: #fff;
  }

  .sidebar {
    display: none;
  }

  .hero {
    min-height: 590px;
  }

  .hero-copy {
    width: auto;
    max-width: 780px;
    padding: clamp(42px, 6vw, 70px) 34px 0 clamp(42px, 7vw, 72px);
  }

  .hero h1 {
    font-size: clamp(38px, 6.4vw, 56px);
    max-width: 720px;
  }

  .hero-tags {
    gap: 14px;
  }

  .hero-tags span + span {
    padding-left: 14px;
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 72px;
    padding: 14px 18px;
    gap: 12px;
  }

  .topbar-left {
    gap: 14px;
  }

  .brand-logo {
    width: 96px;
  }

  .site-title {
    font-size: 16px;
  }

  .search-box {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .repo-link {
    display: none;
  }

  .hero {
    min-height: 690px;
  }

  .hero-copy {
    padding: 34px 24px 0 24px;
  }

  .hero h1 {
    font-size: clamp(36px, 10vw, 52px);
    line-height: 1.08;
    letter-spacing: -.045em;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-actions {
    gap: 12px;
  }

  .btn {
    height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }

  .hero-tags {
    margin-top: 22px;
    gap: 10px 14px;
  }

  .hero-tags span + span {
    border-left: 0;
    padding-left: 0;
  }
}

/* =========================================
   Sidebar alignment patch
   Make the left navigation card align with the main content area.
   ========================================= */
.layout {
  align-items: stretch;
}

.sidebar {
  display: flex;
  align-items: stretch;
}

.sidebar-card {
  min-height: auto;
  height: calc(100vh - 72px - 56px);
  position: sticky;
  top: calc(72px + 28px);
  overflow-y: auto;
}

/* Avoid over-constraining the sidebar on small screens where it is hidden. */
@media (max-width: 1080px) {
  .sidebar-card {
    height: auto;
    position: static;
    overflow-y: visible;
  }
}
